SAP RH_MACO Function Module for Entry Check









RH_MACO is a standard rh maco SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Entry Check processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rh maco FM, simply by entering the name RH_MACO into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRBAS00SEARCH
Program Name: SAPLHRBAS00SEARCH
Main Program:
Appliation area: H
Release date: 29-Jul-1997
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_MACO pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RH_MACO'"Entry Check
EXPORTING
* SEARK = '*' "Search Term
* RESTRICT_DATA = ' ' "Data String for Restriction
* FORGET_BASE_OBJECTS = ' ' "Ignore Basic Set in New Selection
* PFKEY = ' ' "F Key Status (' ',,$OWN)
* LANGU = SY-LANGU "INTERNAL: Language
* LANGU_MODE = ' ' "INTERNAL: For All Languages
* SET_MODE = ' ' "X = Multiple Selection
* SELECT_MESSAGE = ' ' "X = Set Object Transferred Message
* NO_DIALOG = ' ' "X = No Selection Dialog
* NO_GENERIC_WARNING = ' ' "X = No Warning During Generic Search
* ORGBEG = SY-DATUM "Organizational Assignment of Positions
* SEARK_TEXT = ' ' "'Search Function for '
* ORGEND = SY-DATUM "Organizational Assignment of Positions
* NO_NEW_ENTRIES = ' ' "X = Create No New Objects
* ENABLE_NEW_SHELP = ' ' "INTERNAL: Call with F4
* WIN_TITLE = ' ' "Window Title
* LIST_HEADER = ' ' "List Header
PLVAR = "Plan Version
* OTYPE = ' ' "Object Type
* CALLBACK_PROG = ' ' "Callback Program
* CALLBACK_FORM = ' ' "Callback Routine for Reorganization
* RESTRICT_FB = ' ' "FM for Restriction

IMPORTING
SEL_OBJECT = "Selected Object
USED_FCODE = "Function Code (Pressed on Dialog Box)

TABLES
* OTYPE_TAB = "Object Type Table
* CONDITION = "Condition Table
* BASE_OBJECTS = "Object Basic Set (-> No Database Selection)
* SEL_OBJECTS = "Selected Set in Multiple Selection
* MARKED_OBJECTS = "Objects Already Selected
* F4_LIST = "INTERNAL: Prepared List for F4

EXCEPTIONS
F15 = 1 WRONG_CONDITION = 2 NOTHING_FOUND = 3
.



IMPORTING Parameters details for RH_MACO

SEARK - Search Term

Data type: ANY
Default: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)

RESTRICT_DATA - Data String for Restriction

Data type: RHMC1-MC_DATA
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FORGET_BASE_OBJECTS - Ignore Basic Set in New Selection

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PFKEY - F Key Status (SPACE,,$OWN)

Data type: SY-PFKEY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU - INTERNAL: Language

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU_MODE - INTERNAL: For All Languages

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SET_MODE - X = Multiple Selection

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SELECT_MESSAGE - X = Set Object Transferred Message

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_DIALOG - X = No Selection Dialog

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_GENERIC_WARNING - X = No Warning During Generic Search

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ORGBEG - Organizational Assignment of Positions

Data type: WPLOG-BEGDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEARK_TEXT - 'Search Function for '

Data type: T777O-OTEXT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ORGEND - Organizational Assignment of Positions

Data type: WPLOG-ENDDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_NEW_ENTRIES - X = Create No New Objects

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENABLE_NEW_SHELP - INTERNAL: Call with F4

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

WIN_TITLE - Window Title

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

LIST_HEADER - List Header

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLVAR - Plan Version

Data type: PLOGI-PLVAR
Optional: No
Call by Reference: No ( called with pass by value option)

OTYPE - Object Type

Data type: PLOGI-OTYPE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CALLBACK_PROG - Callback Program

Data type: SY-REPID
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CALLBACK_FORM - Callback Routine for Reorganization

Data type: ANY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

RESTRICT_FB - FM for Restriction

Data type: TFTIT-FUNCNAME
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RH_MACO

SEL_OBJECT - Selected Object

Data type: OBJEC
Optional: No
Call by Reference: No ( called with pass by value option)

USED_FCODE - Function Code (Pressed on Dialog Box)

Data type: ANY
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RH_MACO

OTYPE_TAB - Object Type Table

Data type: T788O
Optional: Yes
Call by Reference: No ( called with pass by value option)

CONDITION - Condition Table

Data type: HRCOND
Optional: Yes
Call by Reference: No ( called with pass by value option)

BASE_OBJECTS - Object Basic Set (-> No Database Selection)

Data type: RHMC2
Optional: Yes
Call by Reference: No ( called with pass by value option)

SEL_OBJECTS - Selected Set in Multiple Selection

Data type: OBJEC
Optional: Yes
Call by Reference: No ( called with pass by value option)

MARKED_OBJECTS - Objects Already Selected

Data type: HRSOBID
Optional: Yes
Call by Reference: No ( called with pass by value option)

F4_LIST - INTERNAL: Prepared List for F4

Data type: HRF4LIST
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

F15 - Activity Terminated

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WRONG_CONDITION - Invalid Dynamic Condition in CONDITION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOTHING_FOUND - No Object Matched Search Criteria

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RH_MACO Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_f15  TYPE STRING, "   
lv_seark  TYPE ANY, "   '*'
lt_otype_tab  TYPE STANDARD TABLE OF T788O, "   
lv_sel_object  TYPE OBJEC, "   
lv_restrict_data  TYPE RHMC1-MC_DATA, "   SPACE
lv_forget_base_objects  TYPE ANY, "   SPACE
lv_pfkey  TYPE SY-PFKEY, "   SPACE
lv_langu  TYPE SY-LANGU, "   SY-LANGU
lv_langu_mode  TYPE ANY, "   SPACE
lv_set_mode  TYPE ANY, "   SPACE
lv_select_message  TYPE ANY, "   SPACE
lv_no_dialog  TYPE ANY, "   SPACE
lv_no_generic_warning  TYPE C, "   SPACE
lv_orgbeg  TYPE WPLOG-BEGDA, "   SY-DATUM
lt_condition  TYPE STANDARD TABLE OF HRCOND, "   
lv_seark_text  TYPE T777O-OTEXT, "   SPACE
lv_used_fcode  TYPE ANY, "   
lv_wrong_condition  TYPE ANY, "   
lv_orgend  TYPE WPLOG-ENDDA, "   SY-DATUM
lv_no_new_entries  TYPE C, "   SPACE
lv_enable_new_shelp  TYPE C, "   SPACE
lv_win_title  TYPE ANY, "   SPACE
lt_base_objects  TYPE STANDARD TABLE OF RHMC2, "   
lv_nothing_found  TYPE RHMC2, "   
lv_list_header  TYPE ANY, "   SPACE
lt_sel_objects  TYPE STANDARD TABLE OF OBJEC, "   
lv_plvar  TYPE PLOGI-PLVAR, "   
lt_marked_objects  TYPE STANDARD TABLE OF HRSOBID, "   
lv_otype  TYPE PLOGI-OTYPE, "   SPACE
lt_f4_list  TYPE STANDARD TABLE OF HRF4LIST, "   
lv_callback_prog  TYPE SY-REPID, "   SPACE
lv_callback_form  TYPE ANY, "   SPACE
lv_restrict_fb  TYPE TFTIT-FUNCNAME. "   SPACE

  CALL FUNCTION 'RH_MACO'  "Entry Check
    EXPORTING
         SEARK = lv_seark
         RESTRICT_DATA = lv_restrict_data
         FORGET_BASE_OBJECTS = lv_forget_base_objects
         PFKEY = lv_pfkey
         LANGU = lv_langu
         LANGU_MODE = lv_langu_mode
         SET_MODE = lv_set_mode
         SELECT_MESSAGE = lv_select_message
         NO_DIALOG = lv_no_dialog
         NO_GENERIC_WARNING = lv_no_generic_warning
         ORGBEG = lv_orgbeg
         SEARK_TEXT = lv_seark_text
         ORGEND = lv_orgend
         NO_NEW_ENTRIES = lv_no_new_entries
         ENABLE_NEW_SHELP = lv_enable_new_shelp
         WIN_TITLE = lv_win_title
         LIST_HEADER = lv_list_header
         PLVAR = lv_plvar
         OTYPE = lv_otype
         CALLBACK_PROG = lv_callback_prog
         CALLBACK_FORM = lv_callback_form
         RESTRICT_FB = lv_restrict_fb
    IMPORTING
         SEL_OBJECT = lv_sel_object
         USED_FCODE = lv_used_fcode
    TABLES
         OTYPE_TAB = lt_otype_tab
         CONDITION = lt_condition
         BASE_OBJECTS = lt_base_objects
         SEL_OBJECTS = lt_sel_objects
         MARKED_OBJECTS = lt_marked_objects
         F4_LIST = lt_f4_list
    EXCEPTIONS
        F15 = 1
        WRONG_CONDITION = 2
        NOTHING_FOUND = 3
. " RH_MACO




ABAP code using 7.40 inline data declarations to call FM RH_MACO

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
DATA(ld_seark) = '*'.
 
 
 
"SELECT single MC_DATA FROM RHMC1 INTO @DATA(ld_restrict_data).
DATA(ld_restrict_data) = ' '.
 
DATA(ld_forget_base_objects) = ' '.
 
"SELECT single PFKEY FROM SY INTO @DATA(ld_pfkey).
DATA(ld_pfkey) = ' '.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_langu).
DATA(ld_langu) = SY-LANGU.
 
DATA(ld_langu_mode) = ' '.
 
DATA(ld_set_mode) = ' '.
 
DATA(ld_select_message) = ' '.
 
DATA(ld_no_dialog) = ' '.
 
DATA(ld_no_generic_warning) = ' '.
 
"SELECT single BEGDA FROM WPLOG INTO @DATA(ld_orgbeg).
DATA(ld_orgbeg) = SY-DATUM.
 
 
"SELECT single OTEXT FROM T777O INTO @DATA(ld_seark_text).
DATA(ld_seark_text) = ' '.
 
 
 
"SELECT single ENDDA FROM WPLOG INTO @DATA(ld_orgend).
DATA(ld_orgend) = SY-DATUM.
 
DATA(ld_no_new_entries) = ' '.
 
DATA(ld_enable_new_shelp) = ' '.
 
DATA(ld_win_title) = ' '.
 
 
 
DATA(ld_list_header) = ' '.
 
 
"SELECT single PLVAR FROM PLOGI INTO @DATA(ld_plvar).
 
 
"SELECT single OTYPE FROM PLOGI INTO @DATA(ld_otype).
DATA(ld_otype) = ' '.
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_callback_prog).
DATA(ld_callback_prog) = ' '.
 
DATA(ld_callback_form) = ' '.
 
"SELECT single FUNCNAME FROM TFTIT INTO @DATA(ld_restrict_fb).
DATA(ld_restrict_fb) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!