SAP Function Modules

BAPI_PO_GET_LIST SAP Function module - List Purchase Orders - Only up to 4.0A







BAPI_PO_GET_LIST 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_GET_LIST 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_GET_LIST - BAPI PO GET LIST





CALL FUNCTION 'BAPI_PO_GET_LIST' "List Purchase Orders - Only up to 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 =                " bapiekko      PO Header Data
*   po_addresses =              " bapiekan      Vendor Address for SAP Releases < 4.0A
*   po_addresses_new =          " bapiaddress   Vendor Address for SAP Releases >= 4.0A
    po_items =                  " bapiekpo      Purchase Order Items
*   return =                    " bapireturn    Processing Errors That Occurred
  EXCEPTIONS
    REL_CODE_MISSING = 1        "               Release Code Missing
    REL_AUTHORITY_CHECK_FAILED = 2  "           No Authorization to Release
    .  "  BAPI_PO_GET_LIST

ABAP code example for Function Module BAPI_PO_GET_LIST





The ABAP code below is a full code listing to execute function module BAPI_PO_GET_LIST 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 BAPIEKKO,"TABLES PARAM
wa_po_headers  LIKE LINE OF it_po_headers ,
it_po_addresses  TYPE STANDARD TABLE OF BAPIEKAN,"TABLES PARAM
wa_po_addresses  LIKE LINE OF it_po_addresses ,
it_po_addresses_new  TYPE STANDARD TABLE OF BAPIADDRESS,"TABLES PARAM
wa_po_addresses_new  LIKE LINE OF it_po_addresses_new ,
it_po_items  TYPE STANDARD TABLE OF BAPIEKPO,"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_addresses to it_po_addresses.

"populate fields of struture and append to itab
append wa_po_addresses_new to it_po_addresses_new.

"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_GET_LIST' * 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_addresses = it_po_addresses * po_addresses_new = it_po_addresses_new po_items = it_po_items * return = it_return EXCEPTIONS REL_CODE_MISSING = 1 REL_AUTHORITY_CHECK_FAILED = 2 . " BAPI_PO_GET_LIST
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here 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 BAPIEKKO ,
wa_po_headers  LIKE LINE OF it_po_headers,
ld_rel_code  TYPE BAPIMMPARA-REL_CODE ,
it_po_addresses  TYPE STANDARD TABLE OF BAPIEKAN ,
wa_po_addresses  LIKE LINE OF it_po_addresses,
ld_items_for_release  TYPE BAPIMMPARA-SELECTION ,
it_po_addresses_new  TYPE STANDARD TABLE OF BAPIADDRESS ,
wa_po_addresses_new  LIKE LINE OF it_po_addresses_new,
it_po_items  TYPE STANDARD TABLE OF BAPIEKPO ,
wa_po_items  LIKE LINE OF it_po_items,
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_addresses to it_po_addresses.

ld_items_for_release = some text here

"populate fields of struture and append to itab
append wa_po_addresses_new to it_po_addresses_new.

"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.

SAP Documentation for FM BAPI_PO_GET_LIST


You can use this method to list all purchase orders that have to be released (approved) with a certain release code and group (collective ...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_GET_LIST or its description.