SAP Function RH_MACO - Entry Check

Parameter Reference Type Length Default Optional Text
CALLBACK_FORM ANY A 0 SPACE X Callback Routine for Reorganization
CALLBACK_PROG SYST-REPID C 40 SPACE X Callback Program
ENABLE_NEW_SHELP C C 0 SPACE X INTERNAL: Call with F4
FORGET_BASE_OBJECTS ANY A 0 SPACE X Ignore Basic Set in New Selection
LANGU SYST-LANGU C 1 SY-LANGU X INTERNAL: Language
LANGU_MODE ANY A 0 SPACE X INTERNAL: For All Languages
LIST_HEADER ANY A 0 SPACE X List Header
NO_DIALOG ANY A 0 SPACE X X = No Selection Dialog
NO_GENERIC_WARNING C C 0 SPACE X X = No Warning During Generic Search
NO_NEW_ENTRIES C C 0 SPACE X X = Create No New Objects
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
PFKEY SYST-PFKEY C 20 SPACE X F Key Status (SPACE,,$OWN)
PLVAR PLOGI-PLVAR C 2 Plan Version
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 ANY A 0 '*' X Search Term
SEARK_TEXT T777O-OTEXT C 25 SPACE X "Search Function for "
SELECT_MESSAGE ANY A 0 SPACE X X = Set Object Transferred Message
SET_MODE ANY A 0 SPACE X X = Multiple Selection
WIN_TITLE ANY A 0 SPACE X Window Title

Parameter Reference Type Length Text
SEL_OBJECT OBJEC u 127 Selected Object
USED_FCODE ANY A 0 Function Code (Pressed on Dialog Box)

Parameter Reference Length Optional Text
BASE_OBJECTS RHMC2 57 X Object Basic Set (-> No Database Selection)
CONDITION HRCOND 72 X Condition Table
F4_LIST HRF4LIST 187 X INTERNAL: Prepared List for F4
MARKED_OBJECTS HRSOBID 49 X Objects Already Selected
OTYPE_TAB T788O 2 X Object Type Table
SEL_OBJECTS OBJEC 127 X Selected Set in Multiple Selection

Exception Text
F15 Activity Terminated
NOTHING_FOUND No Object Matched Search Criteria
WRONG_CONDITION Invalid Dynamic Condition in CONDITION

Functionality
Entry check for Personnel Planning objects
The validity of the search term transferred in the SEARK parameter ischecked.
If the search term has eight digits, the system tries to read theobject with the corresponding ID. If the object is found, andcorresponds to the relevant conditions (RESTRICT_FB, CALLBACK_PROG undBASE_OBJECTS), it is returned; if not, the exception NOTHING_FOUND istriggered.
If the search term is alphanumeric, all objects which include thesearch term in their abbreviations or names are found (regardless ofcapitalization). If several suitable objects are found, a dialog boxappears, displaying the objects. The object you select is returned.

Example
CALL FUNCTION 'RH_MACO'
EXPORTING
SEARK = OBJECT_TO_SEARCH_FOR
PLVAR = PLANVERSION
OTYPE = OBJECTTYPE
IMPORTING
SEL_OBJECT = OBJECT_FOUND
EXCEPTIONS
F15 = 1
WRONG_CONDITION = 2
NOTHING_FOUND = 3
OTHERS = 4.
IF SY-SUBRC = 0.
"this object is valid
ENDIF.

Notes
This module carries out a complete object check for all search terms.If no exception is generated, the object is valid.
This is not the case for released prior to 4.6A. In previous releases,the return code (SY-SUBRC) was checked to see whether one of the fieldsSHORT, BEGDA or ENDDA was empty. If it was, the returned object was notvalid. This selection logic, regarding language is set in Customizing(Table T77S0, Switch SEARK LMODE). The behaviour is described in thedocumentation for parameter
LANGU_MODE.Nevertheless, this parameter can not be set so that the settings inCustomizing are used.

Description
In SEL_OBJECT, the data of the selected object is returned. This onlyapplies if SET_MODE = SPACE.

Description
Function code that was processed on the selection dialog box.
(Only makes sense in combination with specific F key status.)

Description
The CALLBACK_PROG and CALLBACK_FORM parameters specify an external formroutine and its program. This form routine can check the validity ofall selected objects and delete invalid objects from the transferredinternal table.
The routine must be declared as follows:
FORM MyCallbackRoutine TABLES Objects_To_Check STRUCTURE HROBJECT.
... "check
ENDFORM.
This callback routine is accessed before the function moduletransferred in RESTRICT_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 empty (SPACE), both of them are ignoredand all of the selected objects are displayed.

Default
The default is SPACE (display all objects).

Description
CALLBACK_PROG contains the name of the program for CALLBACK_FORM.
If you require further information, refer to CALLBACK_FORM.

Description
This parameter is for internal purposes only. It may not betransferred!

Value range
Valid values are SPACE for standard behaviour and 'X' to return tosearch help selection.

Default
SPACE

Description
This parameter determines whether the search function restrictions forthe objects specified in BASE_OBJECTS are retained for the "newselection" function.

Value range
If this parameter is set to SPACE, the restriction is retained. If,however, it is set to 'X', all of the available objects are displayedwhen a new selection is made.

Default
The default value is SPACE, which means that the prior restrictioncannot be avoided.

Description
This parameter is used internally. It should not be set so that thedefault value is used.
This value determines the language in which the system searches for andthen displays the data. The value constitutes the first search sequencedetermined by table T778L.

Description
This parameter is used internally. It should not be set, so thatthe default value can be used.
If LANGU_MODE = SPACE, the system reads the entry SEARK/LMODE fromtable T77S0. If the entry is found, it is interpreted as the LANGU_MODEvalues below. If the entry is not found, the system uses the value 1instead.
If LANGU_MODE = 0, the system only searches in the language set in theLANGU parameter. If no objects are found, the exception NOTHING_FOUNDis triggered.
If LANGU_MODE = 1, the system first searches in the language set in theLANGU parameter. If it finds at least one object, the search iscancelled. Otherwise, it searches through all languages in table T778Lsuccessively until it finds at least one object.
If LANGU_MODE = 2, the system searches for objects in all of thelanguages in T778L as well as in the language set in the LANGUparameter.

Notes
Caution! If you enter an asterisk (*) as the search string for ageneric search, the system selects all objects, irrespective of theirlanguage. This is done for performance reasons.

Description
The LIST_HEADER parameter sets an intermediate header for the searchfunction. This enables additional information to be displayed in thedialog box.
This parameter does not have to be entered

Value range
Any text can be entered.

Default
The default value is SPACE (no header).

Description
If NO_DIALOG = 'X' is set, the dialog box for selecting an object isnot displayed. Instead, the first entry is used.
The warning for a generic search is also suppressed.

Value range
The permitted values are SPACE for displaying a selection dialog, and'X' for suppressing the dialog.

Default
The default value is SPACE, so that the selection dialog is displayed.

Description
If the SEARK/GENER customizing entry in table T77S0 has the value 1, awarning message is displayed for a generic search (that is, when youenter "*" as a search term). The warning message is always displayedfor external objects, but is only displayed for internal objects ifthere are more than 50.
If the NO_GENERIC_WARNING parameter is set to 'X', the warning messageis not displayed. The same applies if the NO_DIALOG parameter is set to'X'.

Value range
The permitted values are SPACE (system responses are in accordance withT77S0 SEARK/GENER) and 'X' (the warning is never displayed).

Default
The default value is SPACE, so that the warning is determined by thecustomizing settings.
Do not change the default value!

Description
The parameter NO_NEW_ENTRIES prevents you from creating new objects ofthis type using the possible entries help. This should only beprevented for a good reason.

Value range
Allowed values are SPACE (permit creation of new objects) and 'X'(prevent creation).

Default
The default value is SPACE to allow the function "Create New Objects".

Description
In conjunction with the parameter ORGEND, the parameter ORGBEGdetermines the period in which the organizational assignment ofpositions is to be read. The parameter ORGBEG specifies the start ofthe period.

Value range
Allowed values are all dates before the date specified in ORGEND.

Default
The default date is the lowest system date.

Description
In conjunction with the parameter ORGBEG, the parameter ORGENDdetermines the period in which the organizational assignment ofpositions is to be read. The parameter ORGEND specifies the end of theperiod.

Value range
Allowed values are all dates after the date specified in ORGBEG.

Default
The default date is the highest system date.

Description
The OTYPE parameter determines the object type for which value help isdisplayed.

Value range
All of the values in check table T778O are allowed. There is no check.

Default
The default value is SPACE.

Description
The F status of the selection list.

Value range

  • SPACE The function module sets the appropriate status.

  • The status of the user interface is set (the status

  • must be defined for program SAPLRHDM).
    • $OWN The calling program set the status (the status must include

    • correct function codes if the standard functions will be
      processed). All of the function codes that start with the $
      character are returned in USED_FCODE and can be processed by
      the calling program.

      Default
      The default value is SPACE so that an appropriate status is setautomatically.

      Description
      The PLVAR parameter determines the plan version for which value help isdisplayed.

      Value range
      All of the values in check table T778P are allowed. There is no check.

      Default
      The default value is SPACE.

      Description
      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
      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 which objects are searched for using asearch string.

      Value range
      You can enter any values but only the first 12 characters are taken. Ageneric entry ('*') is also possible. You can not leave the search termempty, the message NOTHING_FOUND will appear.

      Default
      Default is '*'.

      Notes
      Prior to release 99a, numeric search terms were not checked. The systemonly tried to read the objects. In the case of an error, no exceptionwas triggered. Empty search terms were ignored.

      Description
      SEARK_TEXT is displayed in the list header of the PD search function.
      This parameter does not need to be transferred.

      Value range
      Any text with 25 characters is accepted.

      Default
      The default value is empty, that is, the object type text is used.

      Description
      If this parameter contains 'X', the message "Object transferred" isoutput when you select an object.

      Value range
      Possible values are SPACE and 'X'.

      Default
      Default is 'X' - message is output.

      Description
      This parameter specifies whether single or multiple object selection isallowed.

      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. The user's selectionis returned in SEL_OBJECTS[].

      Default
      Default is SPACE - single object selection.

      Description
      In the PD search function, "Possible entries for " isdisplayed in the title if WIN_TITLE is left blank. If an entry is madein the parameter SEARK_TEXT, the title "Possible entries for" is displayed. However, if the parameter WIN_TITLEcontains a text, this is the text that is displayed.
      This parameter does not need to be transferred.

      Value range
      Any text of 70 characters is accepted.

      Default
      Default is SPACE - the standard title is displayed.

      Description
      Entry: You can enter the number of allowed objects in this table. Nodatabase selection takes place in this case.

      Description
      Input: table with conditions for database delimitations. The followingfield names are invalid: PLVAR, OTYPE, LANGU, MC_SHORT, and MC_SEARK.
      The following field names are allowed: BEGDA, ENDDA, and ISTAT.

      Note
      The conditions affect all internal object fields.
      If, however, the SEARK search term consists of eight digits, or if theobject type is external, the system only checks the following fields:OBJID, ISTAT, BEGDA, ENDDA, SHORT, and STEXT (not for persons). If theobject has no NUMC8 key, OBJID is not checked.

      Description
      This parameter is for internal purposes. It must not be transferredas it will soon be deleted.
      When session NO_DIALOG = 'X', the function module in this table returnsthe selected objects, as well as the organizational units which belongto the postions. This information is needed for the search functionfrom the search help exit.

      Description
      This parameter is ignored.
      Do not use it.

      Description
      Output: Table of selected objects.
      The table is only filled correctly if multiple selection was active(SET_MODE = 'X').

903910Recipe with deleted user as the person responsible
499170RHPREL00 incorrect existence check