SAP Function Modules

BAPI_PO_GETITEMSREL SAP Function module - List Purchase Orders for Release (Approval): New as of 4.0A







BAPI_PO_GETITEMSREL 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 BAPI_PO_GETITEMSREL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MEWP
Released Date: 17.09.1997
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_PO_GETITEMSREL - BAPI PO GETITEMSREL





CALL FUNCTION 'BAPI_PO_GETITEMSREL' "List Purchase Orders for Release (Approval): New as of 4.0A
* EXPORTING
*   rel_group =                 " bapimmpara-rel_group  Release Group
*   rel_code =                  " bapimmpara-rel_code  Release Code
*   items_for_release = 'X'     " bapimmpara-selection  Indicator: Display Purchase Orders Awaiting Release Only
  TABLES
    po_headers =                " bapiekkol     PO Header Data
    po_items =                  " bapiekpoc     Purchase Order Items
*   return =                    " bapireturn    Return Messages
    .  "  BAPI_PO_GETITEMSREL

ABAP code example for Function Module BAPI_PO_GETITEMSREL





The ABAP code below is a full code listing to execute function module BAPI_PO_GETITEMSREL 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:
it_po_headers  TYPE STANDARD TABLE OF BAPIEKKOL,"TABLES PARAM
wa_po_headers  LIKE LINE OF it_po_headers ,
it_po_items  TYPE STANDARD TABLE OF BAPIEKPOC,"TABLES PARAM
wa_po_items  LIKE LINE OF it_po_items ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_rel_group) = some text here

DATA(ld_rel_code) = some text here

DATA(ld_items_for_release) = some text here

"populate fields of struture and append to itab
append wa_po_headers to it_po_headers.

"populate fields of struture and append to itab
append wa_po_items to it_po_items.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BAPI_PO_GETITEMSREL' * EXPORTING * rel_group = ld_rel_group * rel_code = ld_rel_code * items_for_release = ld_items_for_release TABLES po_headers = it_po_headers po_items = it_po_items * return = it_return . " BAPI_PO_GETITEMSREL
IF SY-SUBRC EQ 0. "All OK 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_rel_group  TYPE BAPIMMPARA-REL_GROUP ,
it_po_headers  TYPE STANDARD TABLE OF BAPIEKKOL ,
wa_po_headers  LIKE LINE OF it_po_headers,
ld_rel_code  TYPE BAPIMMPARA-REL_CODE ,
it_po_items  TYPE STANDARD TABLE OF BAPIEKPOC ,
wa_po_items  LIKE LINE OF it_po_items,
ld_items_for_release  TYPE BAPIMMPARA-SELECTION ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN ,
wa_return  LIKE LINE OF it_return.


ld_rel_group = some text here

"populate fields of struture and append to itab
append wa_po_headers to it_po_headers.

ld_rel_code = some text here

"populate fields of struture and append to itab
append wa_po_items to it_po_items.

ld_items_for_release = some text here

"populate fields of struture and append to itab
append wa_return to it_return.

SAP Documentation for FM BAPI_PO_GETITEMSREL


This method allows you to list all purchase orders that have to be released with a certain release code and group (collective release). ...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 BAPI_PO_GETITEMSREL or its description.