SAP Function RH_OBJID_REQUEST - Input Help (F4) for OBJID

Parameter Reference Type Length Default Optional Text
APP_DATA HRF4PARAM-APP_DATA C 1024 X Application-Specific Data
CALLBACK_FORM ANY A 0 SPACE X Callback Routine for Reorganization
CALLBACK_PROG SYST-REPID C 40 SPACE X Callback Program
DYNPRO_DYNNR SYST-DYNNR C 4 SPACE X Number of Current Screen
DYNPRO_OTYPEFIELD DYNPREAD-FIELDNAME C 132 SPACE X Name of Object Type Field on Screen
DYNPRO_PLVARFIELD DYNPREAD-FIELDNAME C 132 SPACE X Name of Plan Version Field on Screen
DYNPRO_REPID SYST-REPID C 40 SPACE X Name of Calling Program (Not SY_SUBRC)
DYNPRO_SEARKFIELD DYNPREAD-FIELDNAME C 132 SPACE X Name of Search Term Field on Screen
ORGBEG WPLOG-BEGDA D 8 SY-DATUM X Organizational Assignment of Positions
ORGEND WPLOG-ENDDA D 8 SY-DATUM X Organizational Assignment of Positions
OTYPE PLOGI-OTYPE C 2 SPACE X Object Type
PLVAR PLOGI-PLVAR C 2 X Plan Version (Optional)
RESTRICT_DATA RHMC1-MC_DATA C 100 SPACE X Data String for Restriction
RESTRICT_FB TFTIT-FUNCNAME C 30 SPACE X FM for Restriction
SEARK PPMAC-SEARK C 12 '*' X Search Term
SEARK_BEGDA WPLOG-BEGDA D 8 $LOW_DATE X Search Period (Start)
SEARK_ENDDA WPLOG-ENDDA D 8 $HIGH_DATE X Search Period (End)
SET_MODE C C 0 SPACE X X = Multiple Selection
WIN_TITLE SYTITLE C 70 X Redefine Window Title
WITHOUT_RELAT P1001-RELAT C 3 X Unrelated Objects: RELAT
WITHOUT_RSIGN P1001-RSIGN C 1 X Unrelated Objects: RSIGN
WITHOUT_SCLAS P1001-SCLAS C 2 X Unrelated Objects: SCLAS

Parameter Reference Type Length Text
SEL_OBJECT OBJEC u 127 Selected Object
SEL_OTYPE PLOGI-OTYPE C 2 Selected Object Type
SEL_PLVAR PLOGI-PLVAR C 2 Selected Plan Version

Parameter Reference Length Optional Text
BASE_OBJECTS RHMC2 57 X Input: Object Basic Set (-> No Database Selection)
CONDITION HRCOND 72 X Input: Condition Table
MARKED_OBJECTS HRSOBID 49 X Input: List of Already Selected Objects
OTYPE_TABLE T788O 2 X Input: Object Type Table
SEL_HROBJECT_TAB HROBJECT 12 X Output: Selected Objects (Short ID)
SEL_HRSOBID_TAB HRSOBID 49 X Output: List of Selected Objects (Extended ID)
SEL_OBJECTS OBJEC 127 X Output: List of Selected Objects (with Text)

Exception Text
CANCELLED Activity Terminated
ILLEGAL_MODE (No Longer Used)
INTERNAL_ERROR System Error
NOTHING_FOUND No Object Matched Search Criteria
WRONG_CONDITION Invalid Dynamic Condition in CONDITION

Functionality
This function module implements the standard value help for PersonnelPlanning objects. It replaces the possible entries help that wasimplemented in the module pool RHOBIDF4.
The module first attempts to display the value help type (searchfunction, structure search, standard matchcode and unrelated objects)that was last selected for this object type. If nothing was selected, adialog box is displayed in which you can select the type of value helpyou require.
You can specify details on the plan version, the object type, and asearch string directly in the parameters PLVAR, OTYPE and SEARK.Alternatively, you can complete the parameters DYNPRO_REPID andDYNPRO_DYNNR or the relevant entry fields for DYNPRO_PLVARFIELD,DYNPRO_OTYPEFIELD and DYNPRO_SEARKFIELD can be read directly from thescreen. If both options are used, the screen data is taken.
If you require the option "unrelated objects" to be available, theparameters WITHOUT_RSIGN, WITHOUT_RELAT and WITHOUT_SCLAS must befilled.
You can restrict the data selected using CALLBACK_PROG andCALLBACK_FORM. The same applies to the parameters RESTRICT_FB andRESTRICT_DATA. You can specify conditions for the database selectionusing CONDITIONS. However, you can also specify all allowed objectswith BASE_OBJECTS, in which case, there is no database selection.
All of these options only apply to the search function. It is notpossible to set restrictions for the Matchcode search or the structuresearch.

Example
RESET N1
Example: Simple value help with plan version and object type specified(neither should be read from the screen)
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
PLVAR = My_plan_version
OTYPE = My_object_type
IMPORTING
SEL_OBJECT = Selected_object
EXCEPTIONS
CANCELLED = 1
WRONG_CONDITION = 2
NOTHING_FOUND = 3
INTERNAL_ERROR = 4
OTHERS = 5
Example: as in 1 but with several objects selected. In addition, theobjects previously selected are already marked.
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
PLVAR = My_plan_version
OTYPE = My_object_type
SET_MODE = 'X'
TABLES
SEL_OBJECTS = Subsequently_selected
MARKED_OBJECTS = Previously_selected
EXCEPTIONS
CANCELLED = 1
WRONG_CONDITION = 2
NOTHING_FOUND = 3
INTERNAL_ERROR = 5
OTHERS = 6.
Example: Simple value help, plan version and object type are read fromthe screen.
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
DYNPRO_REPID = Name_of_my_program
DYNPRO_DYNNR = My_screen_number
DYNPRO_PLVARFIELD = 'NAME_OF_PLVAR_FIELD'
DYNPRO_OTYPEFIELD = 'NAME_OF_OTYPE_FIELD'
IMPORTING
SEL_OBJECT = Selected_object
EXCEPTIONS
CANCELLED = 1
WRONG_CONDITION = 2
NOTHING_FOUND = 3
INTERNAL_ERROR = 4
OTHERS = 5
Example: Value help with unrelated objects (w/o 'A003' to 'O')
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
PLVAR = My_plan_version
OTYPE = My_object_type
WITHOUT_RSIGN = 'A'
WITHOUT_RELAT = '003'
WITHOUT_SCLAS = 'O'
IMPORTING
SEL_OBJECT = Selected_object
EXCEPTIONS
CANCELLED = 1
WRONG_CONDITION = 2
NOTHING_FOUND = 3
INTERNAL_ERROR = 4
OTHERS = 5
Caution! You can also select related objects if you use the structuresearch option for instance.
Example: Value help with direct return of the object ID in an HROBJECTstructure (single objects are also returned in a table).
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
PLVAR = My_plan_version
OTYPE = My_object_type
TABLES
SEL_HROBJECT_TAB = My_object_table
EXCEPTIONS
CANCELLED = 1
WRONG_CONDITION = 2
NOTHING_FOUND = 3
INTERNAL_ERROR = 4
OTHERS = 5

Notes
You must use the function module RH_MACO for the input check. Forselecting an object in a dialog step (for example, "Relate" or"Assign"), call the function module RH_DETERMINE_ORG_OBJID withF4_MODE=SPACE.
Also refer to the parameter documentation.

Further information
You can find further information in the source code of the functionmodule.

Description
In SEL_OBJECT, data on the selected object is returned. However, thisonly applies if SET_MODE = SPACE.
If READ_SHORT_STEXT = SPACE, only the PLVAR, OTYPE, OBJID, and REALOfields are filled for a standard matchcode and a structure search. IfREAD_SHORT_STEXT = 'X', all fields are filled.

Description
In SEL_OTYPE the object type specified by the user is returned.

Description
In SEL_PLVAR the plan version selected is returned. It may have beenchanged by the user.

Description
This parameter has no effect on the behavior of the search help. It istransfered directly to the business add-in and can be evaluated by theincluded application search helps. It is only for the transfer ofapplication-specific data.

Description
This parameter is only active for the search function.
The parameters CALLBACK_PROG and CALLBACK_FORM together specify anexternal form routine and its program. The function of this formroutine is to check the validity of the selected objects and to deleteinvalid objects from the internal table.
The routine must be declared as follows:
FORM MyCallbackRoutine TABLES Objects_To_Check STRUCTURE HROBJECT.
... "check
ENDFORM.
This Callback Routine is called by the function module specified inRESTRICT_FB.

Value range
All combinations of CALLBACK_PROG and CALL_BACK_FORM that are possiblefor an external PERFORM are valid.
If one of the two parameters is not filled (SPACE), both are ignoredand the system displays all selected objects.

Default
Default value is SPACE (display all objects).

Description
CALLBACK_PROG contains the program name for CALLBACK_FORM.
For more information, see the documentation for CALLBACK_FORM.

Description
The number of the screen containing the fields to be read.
This parameter is required if the search string, the object type, orthe plan version are to be read from the screen of the program calling.

Default
Default is blank - no data should be read.

Description
The name of the field on the screen that contains the object type to beread. The entry is automatically converted to upper case letters.
The value of the OTYPE parameter is ignored if the object type is readfrom the screen.
The DYNPRO_REPID and DYNPRO_DYNNR parameters must be set.

Default
The default value is empty, that is, the object type is not read.

Description
The name of the field on the screen that contains the plan version tobe read. The entry is automatically converted to upper case letters.
The value of the PLVAR parameter is ignored if the plan version is readfrom the screen.
The DYNPRO_REPID and DYNPRO_DYNNR parameters must be set.

Default
The default value is empty, that is, the plan version is not read.

Description
The name of the calling program. SY-REPID is not allowed as a transferparameter because this field automatically changes to the name of thefunction group after the function module has been accessed.
This parameter is required if the search term, object type, or planversion must be read from the screen of the calling program.

Default
The default is SPACE, which means that no values are read from thescreen.

Description
The name of the field on the screen that contains the search term to beread. The entry is automatically converted to upper case letters.
The value of the SEARK parameter is ignored if the search term is readfrom the screen.
The DYNPRO_REPID and DYNPRO_DYNNR parameters must be set.

Default
The default value is empty, that is, the search term is not read.

Description
This parameter only applies to the search function.
The parameters ORGEND and ORGBEG together determine the period in whichthe organizational assignment data for positions is read. The entry inORGBEG specifies the start of the search period.

Value range
Allowed values are all dates smaller than the date in ORGEND.

Default
The default value is the smallest system date.

Description
This parameter affects only the search function.
Along with the parameter ORGBEG, ORGEND determines the period in whichthe organizational assignment of positions should be read. The end dateof the search period is transferred in ORGEND.

Value range
Valid values: all date values which are larger than those transferredin ORGBEG.

Default
The highest system date is standard.

Description
The parameter OTYPE determines for which object type value help shouldbe displayed.
If the parameters DYNPRO_REPID, DYPRO_DYNNR and DYNPRO_OTYPEFIELD arefilled, the system tries to read the object type directly from thescreen. In this case, it ignores the parameter OTYPE.
The structure search is only possible when the object type isspecified.

Value range
All of the values in the check table T778O are allowed. No check iscarried out.

Default
The default value is SPACE.

Description
The parameter PLVAR determines for which plan version the value helpshould be displayed.
If the parameters DYNPRO_REPID, DYPRO_DYNNR and DYNPRO_PLVARFIELD arefilled, the system tries to read the plan version directly from thescreen. In this case, the value in parameter PLVAR is ignored.
If the plan version is blank, the system first tries to find a planversion in the user parameter POP. If it finds none, it takes theactive Workflow plan version.

Value range
All of the values in the check table T778P are allowed. No check iscarried out.

Default
The default value is SPACE.

Description
This parameter only affects the search function.
The data set by the RESTRICT_DATA parameter is also set in RESTRICT_FBwhen the function module is accessed. This enables restrictions to bewritten that depend on user entries.

Value range
The permitted values depend on the function module set in RESTRICT_FB.

Default
The default is empty.

Description
This parameter only affects the search function.
The RESTRICT_FB parameter enables you to set a function module thatrestricts the set of objects to be selected. The data set inRESTRICT_DATA is written to the module.

Value range
All function modules are allowed that meet certain criteria. Moredetailed information is included in the coding of function moduleRHMC_EXAMPLE.
If the parameter is set to empty (SPACE), it is ignored.

Default
The default value is empty.

Description
The parameter SEARK determines what objects are searched for based on asearch string you enter.
If the parameters DYNPRO_REPID, DYPRO_DYNNR and DYNPRO_SEARKFIELD arefilled, the system tries to read the search string directly from thescreen. In this case, the value of the parameter SEARK is ignored.
If you use the search function, you have the option of entering orchanging the search string later on in a dialog box.

Value range
The values are user-definable. The system only takes the first 12characters entered. You can also enter an asterisk (*) for a genericsearch.

Default
The default value is '*'.

Description
The parameter SEARK_BEGDA specifies the start of the period for theobject search.

Warnung
The parameter only applies to the search function (object list) andonly to Personnel Planning objects (internal objects).
The time period restriction does not apply for the Matchcode functionsince the matchcode you select may not allow a time restriction. Thus,you cannot assume that all objects found have their validity in theperiod specified.
The period restriction is not available for the structure search forperformance reasons.

Value range
All valid date values in the ABAP internal format 'JJJJMMTT'areallowed.

Default
The default value is the lowest system date 1.1.1900.

Description
The parameter SEARK_ENDDA specifies the end of the period for theobject search.

Warnung
The parameter only applies to the search function (object list) andonly to Personnel Planning objects (internal objects).
The time period restriction does not apply for the Matchcode functionsince the matchcode you select may not allow a time restriction. Thus,you cannot assume that all objects found have their validity in theperiod specified.
The period restriction is not available for the structure search forperformance reasons.

Value range
All valid date values in the ABAP internal format 'JJJJMMTT'areallowed.

Default
The default value is the highest system date 31.12.9999.

Description
This parameter specifies whether single or multiple object selection isallowed.
If you use the SAP Standard Matchcode feature, only one object may beselected. The parameter SET_MODE is ignored in this case.

Value range
SPACE means that only one object may be selected. The selected objectis returned in SEL_PLVAR, SEL_OTYPE and SEL_OBJECT.
'X' means that multiple objects may be selected. In this case, theobjects in MARKED_OBJECTS[] have been preselected. The user's selectionis returned in SEL_OBJECTS[].

Default
The default value is SPACE - single object selection only.

Description
In the PD search function, the title "Possible entries for" is displayed if you leave the parameter WIN_TITLE blank.If the parameter SEARK_TEXT contains an entry, the title reads"Possible entries for ". However, if you make an entry inWIN_TITLE, this is the text that is displayed in the title.

Value range
Any text of up to 70 characters.

Default
The default value is SPACE - the standard title is displayed.

Description
If you set the parameter MODE to 'X' or '3', and the parametersWITHOUT_RSIGN, WITHOUT_RELAT and WITHOUT_SCLAS are filled, the systemfinds and displays all unrelated objects.
The parameter WITHOUT_RELAT specifies the relationship.

Value range
Valid values are all entries in table T778V, or SPACE which deactivatesthis additional function.
No check is carried out.

Default
The default value is SPACE.

Description
If you set the parameter MODE to 'X' or '3', and the parametersWITHOUT_RSIGN, WITHOUT_RELAT and WITHOUT_SCLAS are filled, the systemfinds and displays all unrelated objects.
The parameter WITHOUT_RSIGN specifies the relationship direction.

Value range
Valid values are A and B, or SPACE which deactivates this additionalfunction.
No check is carried out.

Default
The default value is SPACE.

Description
If you set the parameter MODE to 'X' or '3', and the parametersWITHOUT_RSIGN, WITHOUT_RELAT and WITHOUT_SCLAS are filled, the systemfinds and displays all unrelated objects.
The parameter WITHOUT_SCLAS specifies the object type of the targetobject.

Value range
Valid values are all entries in table T778O, or SPACE which deactivatesthis additional function.
No check is carried out.

Default
The default value is SPACE.

Description
Input: You can enter the set of allowed objects in this table. Nodatabase selection takes place in this case. This parameter is onlyactive for the search function.

Description
Input: Table containing conditions for the database restriction.Invalid field names are PLVAR, OTYPE, LANGU, MC_SHORT, MC_SEARK.
Valid field names are BEGDA, ENDDA und ISTAT.
This parameter is only active for the search function.

Description
Input: sorted table of preselected objects. If you select the parameterSET_MODE = 'X' , all of the objects returned in this table are displayedin the structure as preselected.

Description
Input: Table of allowed object types. This only affects the searchfunction.

Description
Output: A list of selected objects is written to this table.

Description
Output: This table returns a list of the objects selected.

Description
Output: Table of selected objects