SAP SEARCH_OM_PARTNER Function Module for Partner view: possible entries help









SEARCH_OM_PARTNER is a standard search om partner SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Partner view: possible entries help 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 search om partner FM, simply by entering the name SEARCH_OM_PARTNER into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHWI
Program Name: SAPLRHWI
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SEARCH_OM_PARTNER 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 'SEARCH_OM_PARTNER'"Partner view: possible entries help
EXPORTING
* ACT_NRART = "Transfer partner type
* ACTIVE_PLVAR = ' ' "Active plan version
SEARCH_STRING = "
* RESTRICTION_OTYPE = ' ' "Object type for restrictions ('O','S',...)
* RESTRICTION_OBJID = '00000000' "Object ID for restrictions (8-character)

IMPORTING
SEL_PARNR = "

EXCEPTIONS
NO_ACTIVE_PLVAR = 1 NOT_SELECTED = 2 NO_OM_OTYPE = 3
.



IMPORTING Parameters details for SEARCH_OM_PARTNER

ACT_NRART - Transfer partner type

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

ACTIVE_PLVAR - Active plan version

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

SEARCH_STRING -

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

RESTRICTION_OTYPE - Object type for restrictions ('O','S',...)

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

RESTRICTION_OBJID - Object ID for restrictions (8-character)

Data type: OBJEC-OBJID
Default: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SEARCH_OM_PARTNER

SEL_PARNR -

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

EXCEPTIONS details

NO_ACTIVE_PLVAR - No active plan version found

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

NOT_SELECTED - Not an OrgManagement object type

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

NO_OM_OTYPE -

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

Copy and paste ABAP code example for SEARCH_OM_PARTNER 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_act_nrart  TYPE TPAR-NRART, "   
lv_sel_parnr  TYPE IHPA-PARNR, "   
lv_no_active_plvar  TYPE IHPA, "   
lv_active_plvar  TYPE OBJEC-PLVAR, "   SPACE
lv_not_selected  TYPE OBJEC, "   
lv_no_om_otype  TYPE OBJEC, "   
lv_search_string  TYPE OBJEC, "   
lv_restriction_otype  TYPE OBJEC-OTYPE, "   SPACE
lv_restriction_objid  TYPE OBJEC-OBJID. "   '00000000'

  CALL FUNCTION 'SEARCH_OM_PARTNER'  "Partner view: possible entries help
    EXPORTING
         ACT_NRART = lv_act_nrart
         ACTIVE_PLVAR = lv_active_plvar
         SEARCH_STRING = lv_search_string
         RESTRICTION_OTYPE = lv_restriction_otype
         RESTRICTION_OBJID = lv_restriction_objid
    IMPORTING
         SEL_PARNR = lv_sel_parnr
    EXCEPTIONS
        NO_ACTIVE_PLVAR = 1
        NOT_SELECTED = 2
        NO_OM_OTYPE = 3
. " SEARCH_OM_PARTNER




ABAP code using 7.40 inline data declarations to call FM SEARCH_OM_PARTNER

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.

"SELECT single NRART FROM TPAR INTO @DATA(ld_act_nrart).
 
"SELECT single PARNR FROM IHPA INTO @DATA(ld_sel_parnr).
 
 
"SELECT single PLVAR FROM OBJEC INTO @DATA(ld_active_plvar).
DATA(ld_active_plvar) = ' '.
 
 
 
 
"SELECT single OTYPE FROM OBJEC INTO @DATA(ld_restriction_otype).
DATA(ld_restriction_otype) = ' '.
 
"SELECT single OBJID FROM OBJEC INTO @DATA(ld_restriction_objid).
DATA(ld_restriction_objid) = '00000000'.
 


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!