SAP Function Modules

RH_OBJID_REQUEST_40A SAP Function module







RH_OBJID_REQUEST_40A is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RH_OBJID_REQUEST_40A into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HRBAS00SEARCH_INTERNAL
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RH_OBJID_REQUEST_40A - RH OBJID REQUEST 40A





CALL FUNCTION 'RH_OBJID_REQUEST_40A' "
* EXPORTING
*   mode = 'X'                  " ppmac-shlp_mode  INTERNAL: Operation Mode Type for Possible Entries
*   plvar =                     " plvar         Plan Version (Optional)
*   otype = SPACE               " otype         Object Type
*   seark = '*'                 " ppmac-seark   Search Term
*   seark_begda = $LOW_DATE     " begdatum      Search Period (Start)
*   seark_endda = $HIGH_DATE    " enddatum      Search Period (End)
*   no_seark_popup = SPACE      " flag          INTERNAL: Do Not Display Dialog Box for Search Term
*   without_rsign =             " rsign         Unrelated Objects: RSIGN
*   without_relat =             " relat         Unrelated Objects: RELAT
*   without_sclas =             " sclas         Unrelated Objects: SCLAS
*   dynpro_repid = SPACE        " syrepid       Name of Calling Program (Not SY_SUBRC)
*   dynpro_dynnr = SPACE        " sydynnr       Number of Current Screen
*   dynpro_plvarfield = SPACE   " dynpread-fieldname  Name of Plan Version Field on Screen
*   dynpro_otypefield = SPACE   " dynpread-fieldname  Name of Object Type Field on Screen
*   dynpro_searkfield = SPACE   " dynpread-fieldname  Name of Search Term Field on Screen
*   seark_text = SPACE          " otext         INTERNAL: "Search Function for "
*   win_title = SPACE           " sytitle       INTERNAL: Window Title
*   list_header = SPACE         " sytitle       INTERNAL: List Header
*   callback_prog = SPACE       " hrf4param-cbk_prog  Callback Program
*   callback_form = SPACE       " hrf4param-cbk_form  Callback Routine for Reorganization
*   restrict_fb = SPACE         " hrf4param-rc_func  FM for Restriction
*   restrict_data = SPACE       " hrf4param-rc_data  Data String for Restriction
*   forget_base_objects = SPACE  " flag         Ignore Basic Set in New Selection
*   pfkey = SPACE               " sypfkey       INTERNAL: F Key Status (SPACE,,$OWN)
*   langu = SY-LANGU            " hrf4param-srk_langu  INTERNAL: Language
*   langu_mode = SPACE          " hrf4param-srk_lmode  INTERNAL: For All Languages
*   set_mode = SPACE            " flag          X = Multiple Selection
*   select_message = 'X'        " flag          X = Set Object Transferred Message
*   no_dialog = SPACE           " flag          X = No Selection Dialog
*   no_new_entries = SPACE      " flag          X = Create No New Objects
*   read_short_stext = SPACE    " flag          X = Read Object Texts
*   fill_sel_hrobject_tab = SPACE  " flag       X = Return Objects in SEL_HROBJID_TAB
*   fill_sel_hrsobid_tab = SPACE  " flag        X = Return Objects in SEL_HROBJID_TAB
*   no_generic_warning = SPACE  " flag          X = No Warning with Generic Search
*   orgbeg = SY-DATUM           " hrf4param-org_begda  Organizational Assignment of Positions
*   orgend = SY-DATUM           " hrf4param-org_endda  Organizational Assignment of Positions
  IMPORTING
    sel_plvar =                 " plvar         Selected Plan Version
    sel_otype =                 " otype         Selected Object Type
    sel_object =                " objec         Selected Object
    used_fcode =                " syucomm       Function Code (Pressed on Dialog Box)
    sel_mode =                  " ppmacmode     Type of Help Selected
* TABLES
*   otype_table =               " t788o         Object Type Table
*   condition =                 " hrcond        Condition Table
*   base_objects =              " rhmc2         Object Basic Set (-> No Database Selection)
*   sel_objects =               " objec         Selected Set in Multiple Selection
*   marked_objects =            " hrsobid       Objects Already Selected
*   sel_hrobject_tab =          " hrobject      Selected Objects (Short ID)
*   sel_hrsobid_tab =           " hrsobid       Selected Objects (Extended ID)
  EXCEPTIONS
    CANCELLED = 1               "               Activity Terminated
    WRONG_CONDITION = 2         "               Invalid Dynamic Condition in CONDITION
    NOTHING_FOUND = 3           "               No Object Matched Search Criteria
    ILLEGAL_MODE = 4            "               Invalid Value for MODE
    INTERNAL_ERROR = 5          "               System Error
    .  "  RH_OBJID_REQUEST_40A

ABAP code example for Function Module RH_OBJID_REQUEST_40A





The ABAP code below is a full code listing to execute function module RH_OBJID_REQUEST_40A including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_sel_plvar  TYPE PLVAR ,
ld_sel_otype  TYPE OTYPE ,
ld_sel_object  TYPE OBJEC ,
ld_used_fcode  TYPE SYUCOMM ,
ld_sel_mode  TYPE PPMACMODE ,
it_otype_table  TYPE STANDARD TABLE OF T788O,"TABLES PARAM
wa_otype_table  LIKE LINE OF it_otype_table ,
it_condition  TYPE STANDARD TABLE OF HRCOND,"TABLES PARAM
wa_condition  LIKE LINE OF it_condition ,
it_base_objects  TYPE STANDARD TABLE OF RHMC2,"TABLES PARAM
wa_base_objects  LIKE LINE OF it_base_objects ,
it_sel_objects  TYPE STANDARD TABLE OF OBJEC,"TABLES PARAM
wa_sel_objects  LIKE LINE OF it_sel_objects ,
it_marked_objects  TYPE STANDARD TABLE OF HRSOBID,"TABLES PARAM
wa_marked_objects  LIKE LINE OF it_marked_objects ,
it_sel_hrobject_tab  TYPE STANDARD TABLE OF HROBJECT,"TABLES PARAM
wa_sel_hrobject_tab  LIKE LINE OF it_sel_hrobject_tab ,
it_sel_hrsobid_tab  TYPE STANDARD TABLE OF HRSOBID,"TABLES PARAM
wa_sel_hrsobid_tab  LIKE LINE OF it_sel_hrsobid_tab .


DATA(ld_mode) = some text here
DATA(ld_plvar) = 'Check type of data required'.
DATA(ld_otype) = 'Check type of data required'.

DATA(ld_seark) = some text here
DATA(ld_seark_begda) = 'Check type of data required'.
DATA(ld_seark_endda) = 'Check type of data required'.
DATA(ld_no_seark_popup) = 'Check type of data required'.
DATA(ld_without_rsign) = 'Check type of data required'.
DATA(ld_without_relat) = 'Check type of data required'.
DATA(ld_without_sclas) = 'Check type of data required'.
DATA(ld_dynpro_repid) = 'some text here'.
DATA(ld_dynpro_dynnr) = 'some text here'.

DATA(ld_dynpro_plvarfield) = some text here

DATA(ld_dynpro_otypefield) = some text here

DATA(ld_dynpro_searkfield) = some text here
DATA(ld_seark_text) = 'some text here'.
DATA(ld_win_title) = 'some text here'.
DATA(ld_list_header) = 'some text here'.

DATA(ld_callback_prog) = some text here

DATA(ld_callback_form) = some text here

DATA(ld_restrict_fb) = some text here

DATA(ld_restrict_data) = some text here
DATA(ld_forget_base_objects) = 'some text here'.
DATA(ld_pfkey) = 'some text here'.

DATA(ld_langu) = Check type of data required

DATA(ld_langu_mode) = some text here
DATA(ld_set_mode) = 'some text here'.
DATA(ld_select_message) = 'some text here'.
DATA(ld_no_dialog) = 'some text here'.
DATA(ld_no_new_entries) = 'some text here'.
DATA(ld_read_short_stext) = 'some text here'.
DATA(ld_fill_sel_hrobject_tab) = 'some text here'.
DATA(ld_fill_sel_hrsobid_tab) = 'some text here'.
DATA(ld_no_generic_warning) = 'some text here'.

DATA(ld_orgbeg) = 20210129

DATA(ld_orgend) = 20210129

"populate fields of struture and append to itab
append wa_otype_table to it_otype_table.

"populate fields of struture and append to itab
append wa_condition to it_condition.

"populate fields of struture and append to itab
append wa_base_objects to it_base_objects.

"populate fields of struture and append to itab
append wa_sel_objects to it_sel_objects.

"populate fields of struture and append to itab
append wa_marked_objects to it_marked_objects.

"populate fields of struture and append to itab
append wa_sel_hrobject_tab to it_sel_hrobject_tab.

"populate fields of struture and append to itab
append wa_sel_hrsobid_tab to it_sel_hrsobid_tab. . CALL FUNCTION 'RH_OBJID_REQUEST_40A' * EXPORTING * mode = ld_mode * plvar = ld_plvar * otype = ld_otype * seark = ld_seark * seark_begda = ld_seark_begda * seark_endda = ld_seark_endda * no_seark_popup = ld_no_seark_popup * without_rsign = ld_without_rsign * without_relat = ld_without_relat * without_sclas = ld_without_sclas * dynpro_repid = ld_dynpro_repid * dynpro_dynnr = ld_dynpro_dynnr * dynpro_plvarfield = ld_dynpro_plvarfield * dynpro_otypefield = ld_dynpro_otypefield * dynpro_searkfield = ld_dynpro_searkfield * seark_text = ld_seark_text * win_title = ld_win_title * list_header = ld_list_header * callback_prog = ld_callback_prog * callback_form = ld_callback_form * restrict_fb = ld_restrict_fb * restrict_data = ld_restrict_data * forget_base_objects = ld_forget_base_objects * pfkey = ld_pfkey * langu = ld_langu * langu_mode = ld_langu_mode * set_mode = ld_set_mode * select_message = ld_select_message * no_dialog = ld_no_dialog * no_new_entries = ld_no_new_entries * read_short_stext = ld_read_short_stext * fill_sel_hrobject_tab = ld_fill_sel_hrobject_tab * fill_sel_hrsobid_tab = ld_fill_sel_hrsobid_tab * no_generic_warning = ld_no_generic_warning * orgbeg = ld_orgbeg * orgend = ld_orgend IMPORTING sel_plvar = ld_sel_plvar sel_otype = ld_sel_otype sel_object = ld_sel_object used_fcode = ld_used_fcode sel_mode = ld_sel_mode * TABLES * otype_table = it_otype_table * condition = it_condition * base_objects = it_base_objects * sel_objects = it_sel_objects * marked_objects = it_marked_objects * sel_hrobject_tab = it_sel_hrobject_tab * sel_hrsobid_tab = it_sel_hrsobid_tab EXCEPTIONS CANCELLED = 1 WRONG_CONDITION = 2 NOTHING_FOUND = 3 ILLEGAL_MODE = 4 INTERNAL_ERROR = 5 . " RH_OBJID_REQUEST_40A
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_sel_plvar  TYPE PLVAR ,
ld_mode  TYPE PPMAC-SHLP_MODE ,
it_otype_table  TYPE STANDARD TABLE OF T788O ,
wa_otype_table  LIKE LINE OF it_otype_table,
ld_sel_otype  TYPE OTYPE ,
ld_plvar  TYPE PLVAR ,
it_condition  TYPE STANDARD TABLE OF HRCOND ,
wa_condition  LIKE LINE OF it_condition,
ld_sel_object  TYPE OBJEC ,
ld_otype  TYPE OTYPE ,
it_base_objects  TYPE STANDARD TABLE OF RHMC2 ,
wa_base_objects  LIKE LINE OF it_base_objects,
ld_used_fcode  TYPE SYUCOMM ,
ld_seark  TYPE PPMAC-SEARK ,
it_sel_objects  TYPE STANDARD TABLE OF OBJEC ,
wa_sel_objects  LIKE LINE OF it_sel_objects,
ld_sel_mode  TYPE PPMACMODE ,
ld_seark_begda  TYPE BEGDATUM ,
it_marked_objects  TYPE STANDARD TABLE OF HRSOBID ,
wa_marked_objects  LIKE LINE OF it_marked_objects,
it_sel_hrobject_tab  TYPE STANDARD TABLE OF HROBJECT ,
wa_sel_hrobject_tab  LIKE LINE OF it_sel_hrobject_tab,
ld_seark_endda  TYPE ENDDATUM ,
it_sel_hrsobid_tab  TYPE STANDARD TABLE OF HRSOBID ,
wa_sel_hrsobid_tab  LIKE LINE OF it_sel_hrsobid_tab,
ld_no_seark_popup  TYPE FLAG ,
ld_without_rsign  TYPE RSIGN ,
ld_without_relat  TYPE RELAT ,
ld_without_sclas  TYPE SCLAS ,
ld_dynpro_repid  TYPE SYREPID ,
ld_dynpro_dynnr  TYPE SYDYNNR ,
ld_dynpro_plvarfield  TYPE DYNPREAD-FIELDNAME ,
ld_dynpro_otypefield  TYPE DYNPREAD-FIELDNAME ,
ld_dynpro_searkfield  TYPE DYNPREAD-FIELDNAME ,
ld_seark_text  TYPE OTEXT ,
ld_win_title  TYPE SYTITLE ,
ld_list_header  TYPE SYTITLE ,
ld_callback_prog  TYPE HRF4PARAM-CBK_PROG ,
ld_callback_form  TYPE HRF4PARAM-CBK_FORM ,
ld_restrict_fb  TYPE HRF4PARAM-RC_FUNC ,
ld_restrict_data  TYPE HRF4PARAM-RC_DATA ,
ld_forget_base_objects  TYPE FLAG ,
ld_pfkey  TYPE SYPFKEY ,
ld_langu  TYPE HRF4PARAM-SRK_LANGU ,
ld_langu_mode  TYPE HRF4PARAM-SRK_LMODE ,
ld_set_mode  TYPE FLAG ,
ld_select_message  TYPE FLAG ,
ld_no_dialog  TYPE FLAG ,
ld_no_new_entries  TYPE FLAG ,
ld_read_short_stext  TYPE FLAG ,
ld_fill_sel_hrobject_tab  TYPE FLAG ,
ld_fill_sel_hrsobid_tab  TYPE FLAG ,
ld_no_generic_warning  TYPE FLAG ,
ld_orgbeg  TYPE HRF4PARAM-ORG_BEGDA ,
ld_orgend  TYPE HRF4PARAM-ORG_ENDDA .


ld_mode = some text here

"populate fields of struture and append to itab
append wa_otype_table to it_otype_table.
ld_plvar = 'some text here'.

"populate fields of struture and append to itab
append wa_condition to it_condition.
ld_otype = 'some text here'.

"populate fields of struture and append to itab
append wa_base_objects to it_base_objects.

ld_seark = some text here

"populate fields of struture and append to itab
append wa_sel_objects to it_sel_objects.
ld_seark_begda = 'some text here'.

"populate fields of struture and append to itab
append wa_marked_objects to it_marked_objects.

"populate fields of struture and append to itab
append wa_sel_hrobject_tab to it_sel_hrobject_tab.
ld_seark_endda = 'some text here'.

"populate fields of struture and append to itab
append wa_sel_hrsobid_tab to it_sel_hrsobid_tab.
ld_no_seark_popup = 'some text here'.
ld_without_rsign = 'some text here'.
ld_without_relat = 'some text here'.
ld_without_sclas = 'some text here'.
ld_dynpro_repid = 'some text here'.
ld_dynpro_dynnr = 'some text here'.

ld_dynpro_plvarfield = some text here

ld_dynpro_otypefield = some text here

ld_dynpro_searkfield = some text here
ld_seark_text = 'some text here'.
ld_win_title = 'some text here'.
ld_list_header = 'some text here'.

ld_callback_prog = some text here

ld_callback_form = some text here

ld_restrict_fb = some text here

ld_restrict_data = some text here
ld_forget_base_objects = 'some text here'.
ld_pfkey = 'some text here'.

ld_langu = Check type of data required

ld_langu_mode = some text here
ld_set_mode = 'some text here'.
ld_select_message = 'some text here'.
ld_no_dialog = 'some text here'.
ld_no_new_entries = 'some text here'.
ld_read_short_stext = 'some text here'.
ld_fill_sel_hrobject_tab = 'some text here'.
ld_fill_sel_hrsobid_tab = 'some text here'.
ld_no_generic_warning = 'some text here'.

ld_orgbeg = 20210129

ld_orgend = 20210129

SAP Documentation for FM RH_OBJID_REQUEST_40A


This function module is for internal use only. ...See here for full SAP fm documentation













Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RH_OBJID_REQUEST_40A or its description.