SAP Function Modules

BAPI_PO_GETDETAIL1 SAP Function module - Detail Information for a Purchase Order







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

Associated Function Group: 2012
Released Date: 16.03.2005
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_PO_GETDETAIL1 - BAPI PO GETDETAIL1





CALL FUNCTION 'BAPI_PO_GETDETAIL1' "Detail Information for a Purchase Order
  EXPORTING
    purchaseorder =             " bapimepoheader-po_number  Purchasing Document Number
*   account_assignment = SPACE  " bapimmpara-selection  Account Assignment Data
*   item_text = SPACE           " bapimmpara-selection  Item Text
*   header_text = SPACE         " bapimmpara-selection  Header Txt
*   delivery_address = SPACE    " bapimmpara-selection  Delivery address
*   version = SPACE             " bapimmpara-selection  Version Management
*   services = SPACE            " bapimmpara-selection  External Service Data
*   serialnumbers = SPACE       " bapimmpara-selection  Serial Numbers
*   invoiceplan = SPACE         " bapimmpara-selection  Invoicing Plan
  IMPORTING
    poheader =                  " bapimepoheader  Purchase Order Header Data
    poexpimpheader =            " bapieikp      Foreign Trade: Export/Import: Header Data
* TABLES
*   return =                    " bapiret2      Return Parameter(s)
*   poitem =                    " bapimepoitem  Purchase Order Item
*   poaddrdelivery =            " bapimepoaddrdelivery  Addresses for Inward Delivery (Item)
*   poschedule =                " bapimeposchedule  Delivery Schedule
*   poaccount =                 " bapimepoaccount  Account Assignment Fields
*   pocondheader =              " bapimepocondheader  Conditions (header)
*   pocond =                    " bapimepocond  Conditions (Items)
*   polimits =                  " bapiesuhc     External Services: Limits
*   pocontractlimits =          " bapiesucc     Communication Structure: Contract Limits
*   poservices =                " bapiesllc     Communication Structure: Create Service Line
*   posrvaccessvalues =         " bapiesklc     External Services: Account Assignment Distribution for Service Lines
*   potextheader =              " bapimepotextheader  Header Texts
*   potextitem =                " bapimepotext  Item Texts
*   poexpimpitem =              " bapieipo      Foreign Trade: Item Data
*   pocomponents =              " bapimepocomponent  BAPI Structure for Components
*   poshippingexp =             " bapimeposhippexp  Export Structure for Shipping Data
*   pohistory =                 " bapiekbe      Purchase Order History
*   pohistory_totals =          " bapiekbes     Purchase Order History - Totals
*   poconfirmation =            " bapiekes      Vendor Confirmation
*   allversions =               " bapimedcm_allversions  Version Data
*   popartner =                 " bapiekkop     Partner
*   extensionout =              " bapiparex     ExtensionOut
*   serialnumber =              " bapimeposerialno  Serial Numbers in Purchase Order BAPIs
*   invplanheader =             " bapi_invoice_plan_header  Invoicing Plan: Header Data
*   invplanitem =               " bapi_invoice_plan_item  Invoicing Plan: Item Data
*   pohistory_ma =              " bapiekbe_ma   Transfer Structure for Purchase Order History Account Assignment Level
    .  "  BAPI_PO_GETDETAIL1

ABAP code example for Function Module BAPI_PO_GETDETAIL1





The ABAP code below is a full code listing to execute function module BAPI_PO_GETDETAIL1 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:
ld_poheader  TYPE BAPIMEPOHEADER ,
ld_poexpimpheader  TYPE BAPIEIKP ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_poitem  TYPE STANDARD TABLE OF BAPIMEPOITEM,"TABLES PARAM
wa_poitem  LIKE LINE OF it_poitem ,
it_poaddrdelivery  TYPE STANDARD TABLE OF BAPIMEPOADDRDELIVERY,"TABLES PARAM
wa_poaddrdelivery  LIKE LINE OF it_poaddrdelivery ,
it_poschedule  TYPE STANDARD TABLE OF BAPIMEPOSCHEDULE,"TABLES PARAM
wa_poschedule  LIKE LINE OF it_poschedule ,
it_poaccount  TYPE STANDARD TABLE OF BAPIMEPOACCOUNT,"TABLES PARAM
wa_poaccount  LIKE LINE OF it_poaccount ,
it_pocondheader  TYPE STANDARD TABLE OF BAPIMEPOCONDHEADER,"TABLES PARAM
wa_pocondheader  LIKE LINE OF it_pocondheader ,
it_pocond  TYPE STANDARD TABLE OF BAPIMEPOCOND,"TABLES PARAM
wa_pocond  LIKE LINE OF it_pocond ,
it_polimits  TYPE STANDARD TABLE OF BAPIESUHC,"TABLES PARAM
wa_polimits  LIKE LINE OF it_polimits ,
it_pocontractlimits  TYPE STANDARD TABLE OF BAPIESUCC,"TABLES PARAM
wa_pocontractlimits  LIKE LINE OF it_pocontractlimits ,
it_poservices  TYPE STANDARD TABLE OF BAPIESLLC,"TABLES PARAM
wa_poservices  LIKE LINE OF it_poservices ,
it_posrvaccessvalues  TYPE STANDARD TABLE OF BAPIESKLC,"TABLES PARAM
wa_posrvaccessvalues  LIKE LINE OF it_posrvaccessvalues ,
it_potextheader  TYPE STANDARD TABLE OF BAPIMEPOTEXTHEADER,"TABLES PARAM
wa_potextheader  LIKE LINE OF it_potextheader ,
it_potextitem  TYPE STANDARD TABLE OF BAPIMEPOTEXT,"TABLES PARAM
wa_potextitem  LIKE LINE OF it_potextitem ,
it_poexpimpitem  TYPE STANDARD TABLE OF BAPIEIPO,"TABLES PARAM
wa_poexpimpitem  LIKE LINE OF it_poexpimpitem ,
it_pocomponents  TYPE STANDARD TABLE OF BAPIMEPOCOMPONENT,"TABLES PARAM
wa_pocomponents  LIKE LINE OF it_pocomponents ,
it_poshippingexp  TYPE STANDARD TABLE OF BAPIMEPOSHIPPEXP,"TABLES PARAM
wa_poshippingexp  LIKE LINE OF it_poshippingexp ,
it_pohistory  TYPE STANDARD TABLE OF BAPIEKBE,"TABLES PARAM
wa_pohistory  LIKE LINE OF it_pohistory ,
it_pohistory_totals  TYPE STANDARD TABLE OF BAPIEKBES,"TABLES PARAM
wa_pohistory_totals  LIKE LINE OF it_pohistory_totals ,
it_poconfirmation  TYPE STANDARD TABLE OF BAPIEKES,"TABLES PARAM
wa_poconfirmation  LIKE LINE OF it_poconfirmation ,
it_allversions  TYPE STANDARD TABLE OF BAPIMEDCM_ALLVERSIONS,"TABLES PARAM
wa_allversions  LIKE LINE OF it_allversions ,
it_popartner  TYPE STANDARD TABLE OF BAPIEKKOP,"TABLES PARAM
wa_popartner  LIKE LINE OF it_popartner ,
it_extensionout  TYPE STANDARD TABLE OF BAPIPAREX,"TABLES PARAM
wa_extensionout  LIKE LINE OF it_extensionout ,
it_serialnumber  TYPE STANDARD TABLE OF BAPIMEPOSERIALNO,"TABLES PARAM
wa_serialnumber  LIKE LINE OF it_serialnumber ,
it_invplanheader  TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_HEADER,"TABLES PARAM
wa_invplanheader  LIKE LINE OF it_invplanheader ,
it_invplanitem  TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_ITEM,"TABLES PARAM
wa_invplanitem  LIKE LINE OF it_invplanitem ,
it_pohistory_ma  TYPE STANDARD TABLE OF BAPIEKBE_MA,"TABLES PARAM
wa_pohistory_ma  LIKE LINE OF it_pohistory_ma .


DATA(ld_purchaseorder) = some text here

DATA(ld_account_assignment) = some text here

DATA(ld_item_text) = some text here

DATA(ld_header_text) = some text here

DATA(ld_delivery_address) = some text here

DATA(ld_version) = some text here

DATA(ld_services) = some text here

DATA(ld_serialnumbers) = some text here

DATA(ld_invoiceplan) = some text here

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

"populate fields of struture and append to itab
append wa_poitem to it_poitem.

"populate fields of struture and append to itab
append wa_poaddrdelivery to it_poaddrdelivery.

"populate fields of struture and append to itab
append wa_poschedule to it_poschedule.

"populate fields of struture and append to itab
append wa_poaccount to it_poaccount.

"populate fields of struture and append to itab
append wa_pocondheader to it_pocondheader.

"populate fields of struture and append to itab
append wa_pocond to it_pocond.

"populate fields of struture and append to itab
append wa_polimits to it_polimits.

"populate fields of struture and append to itab
append wa_pocontractlimits to it_pocontractlimits.

"populate fields of struture and append to itab
append wa_poservices to it_poservices.

"populate fields of struture and append to itab
append wa_posrvaccessvalues to it_posrvaccessvalues.

"populate fields of struture and append to itab
append wa_potextheader to it_potextheader.

"populate fields of struture and append to itab
append wa_potextitem to it_potextitem.

"populate fields of struture and append to itab
append wa_poexpimpitem to it_poexpimpitem.

"populate fields of struture and append to itab
append wa_pocomponents to it_pocomponents.

"populate fields of struture and append to itab
append wa_poshippingexp to it_poshippingexp.

"populate fields of struture and append to itab
append wa_pohistory to it_pohistory.

"populate fields of struture and append to itab
append wa_pohistory_totals to it_pohistory_totals.

"populate fields of struture and append to itab
append wa_poconfirmation to it_poconfirmation.

"populate fields of struture and append to itab
append wa_allversions to it_allversions.

"populate fields of struture and append to itab
append wa_popartner to it_popartner.

"populate fields of struture and append to itab
append wa_extensionout to it_extensionout.

"populate fields of struture and append to itab
append wa_serialnumber to it_serialnumber.

"populate fields of struture and append to itab
append wa_invplanheader to it_invplanheader.

"populate fields of struture and append to itab
append wa_invplanitem to it_invplanitem.

"populate fields of struture and append to itab
append wa_pohistory_ma to it_pohistory_ma. . CALL FUNCTION 'BAPI_PO_GETDETAIL1' EXPORTING purchaseorder = ld_purchaseorder * account_assignment = ld_account_assignment * item_text = ld_item_text * header_text = ld_header_text * delivery_address = ld_delivery_address * version = ld_version * services = ld_services * serialnumbers = ld_serialnumbers * invoiceplan = ld_invoiceplan IMPORTING poheader = ld_poheader poexpimpheader = ld_poexpimpheader * TABLES * return = it_return * poitem = it_poitem * poaddrdelivery = it_poaddrdelivery * poschedule = it_poschedule * poaccount = it_poaccount * pocondheader = it_pocondheader * pocond = it_pocond * polimits = it_polimits * pocontractlimits = it_pocontractlimits * poservices = it_poservices * posrvaccessvalues = it_posrvaccessvalues * potextheader = it_potextheader * potextitem = it_potextitem * poexpimpitem = it_poexpimpitem * pocomponents = it_pocomponents * poshippingexp = it_poshippingexp * pohistory = it_pohistory * pohistory_totals = it_pohistory_totals * poconfirmation = it_poconfirmation * allversions = it_allversions * popartner = it_popartner * extensionout = it_extensionout * serialnumber = it_serialnumber * invplanheader = it_invplanheader * invplanitem = it_invplanitem * pohistory_ma = it_pohistory_ma . " BAPI_PO_GETDETAIL1
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_poheader  TYPE BAPIMEPOHEADER ,
ld_purchaseorder  TYPE BAPIMEPOHEADER-PO_NUMBER ,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
ld_poexpimpheader  TYPE BAPIEIKP ,
ld_account_assignment  TYPE BAPIMMPARA-SELECTION ,
it_poitem  TYPE STANDARD TABLE OF BAPIMEPOITEM ,
wa_poitem  LIKE LINE OF it_poitem,
ld_item_text  TYPE BAPIMMPARA-SELECTION ,
it_poaddrdelivery  TYPE STANDARD TABLE OF BAPIMEPOADDRDELIVERY ,
wa_poaddrdelivery  LIKE LINE OF it_poaddrdelivery,
ld_header_text  TYPE BAPIMMPARA-SELECTION ,
it_poschedule  TYPE STANDARD TABLE OF BAPIMEPOSCHEDULE ,
wa_poschedule  LIKE LINE OF it_poschedule,
ld_delivery_address  TYPE BAPIMMPARA-SELECTION ,
it_poaccount  TYPE STANDARD TABLE OF BAPIMEPOACCOUNT ,
wa_poaccount  LIKE LINE OF it_poaccount,
ld_version  TYPE BAPIMMPARA-SELECTION ,
it_pocondheader  TYPE STANDARD TABLE OF BAPIMEPOCONDHEADER ,
wa_pocondheader  LIKE LINE OF it_pocondheader,
ld_services  TYPE BAPIMMPARA-SELECTION ,
it_pocond  TYPE STANDARD TABLE OF BAPIMEPOCOND ,
wa_pocond  LIKE LINE OF it_pocond,
it_polimits  TYPE STANDARD TABLE OF BAPIESUHC ,
wa_polimits  LIKE LINE OF it_polimits,
ld_serialnumbers  TYPE BAPIMMPARA-SELECTION ,
ld_invoiceplan  TYPE BAPIMMPARA-SELECTION ,
it_pocontractlimits  TYPE STANDARD TABLE OF BAPIESUCC ,
wa_pocontractlimits  LIKE LINE OF it_pocontractlimits,
it_poservices  TYPE STANDARD TABLE OF BAPIESLLC ,
wa_poservices  LIKE LINE OF it_poservices,
it_posrvaccessvalues  TYPE STANDARD TABLE OF BAPIESKLC ,
wa_posrvaccessvalues  LIKE LINE OF it_posrvaccessvalues,
it_potextheader  TYPE STANDARD TABLE OF BAPIMEPOTEXTHEADER ,
wa_potextheader  LIKE LINE OF it_potextheader,
it_potextitem  TYPE STANDARD TABLE OF BAPIMEPOTEXT ,
wa_potextitem  LIKE LINE OF it_potextitem,
it_poexpimpitem  TYPE STANDARD TABLE OF BAPIEIPO ,
wa_poexpimpitem  LIKE LINE OF it_poexpimpitem,
it_pocomponents  TYPE STANDARD TABLE OF BAPIMEPOCOMPONENT ,
wa_pocomponents  LIKE LINE OF it_pocomponents,
it_poshippingexp  TYPE STANDARD TABLE OF BAPIMEPOSHIPPEXP ,
wa_poshippingexp  LIKE LINE OF it_poshippingexp,
it_pohistory  TYPE STANDARD TABLE OF BAPIEKBE ,
wa_pohistory  LIKE LINE OF it_pohistory,
it_pohistory_totals  TYPE STANDARD TABLE OF BAPIEKBES ,
wa_pohistory_totals  LIKE LINE OF it_pohistory_totals,
it_poconfirmation  TYPE STANDARD TABLE OF BAPIEKES ,
wa_poconfirmation  LIKE LINE OF it_poconfirmation,
it_allversions  TYPE STANDARD TABLE OF BAPIMEDCM_ALLVERSIONS ,
wa_allversions  LIKE LINE OF it_allversions,
it_popartner  TYPE STANDARD TABLE OF BAPIEKKOP ,
wa_popartner  LIKE LINE OF it_popartner,
it_extensionout  TYPE STANDARD TABLE OF BAPIPAREX ,
wa_extensionout  LIKE LINE OF it_extensionout,
it_serialnumber  TYPE STANDARD TABLE OF BAPIMEPOSERIALNO ,
wa_serialnumber  LIKE LINE OF it_serialnumber,
it_invplanheader  TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_HEADER ,
wa_invplanheader  LIKE LINE OF it_invplanheader,
it_invplanitem  TYPE STANDARD TABLE OF BAPI_INVOICE_PLAN_ITEM ,
wa_invplanitem  LIKE LINE OF it_invplanitem,
it_pohistory_ma  TYPE STANDARD TABLE OF BAPIEKBE_MA ,
wa_pohistory_ma  LIKE LINE OF it_pohistory_ma.


ld_purchaseorder = some text here

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

ld_account_assignment = some text here

"populate fields of struture and append to itab
append wa_poitem to it_poitem.

ld_item_text = some text here

"populate fields of struture and append to itab
append wa_poaddrdelivery to it_poaddrdelivery.

ld_header_text = some text here

"populate fields of struture and append to itab
append wa_poschedule to it_poschedule.

ld_delivery_address = some text here

"populate fields of struture and append to itab
append wa_poaccount to it_poaccount.

ld_version = some text here

"populate fields of struture and append to itab
append wa_pocondheader to it_pocondheader.

ld_services = some text here

"populate fields of struture and append to itab
append wa_pocond to it_pocond.

"populate fields of struture and append to itab
append wa_polimits to it_polimits.

ld_serialnumbers = some text here

ld_invoiceplan = some text here

"populate fields of struture and append to itab
append wa_pocontractlimits to it_pocontractlimits.

"populate fields of struture and append to itab
append wa_poservices to it_poservices.

"populate fields of struture and append to itab
append wa_posrvaccessvalues to it_posrvaccessvalues.

"populate fields of struture and append to itab
append wa_potextheader to it_potextheader.

"populate fields of struture and append to itab
append wa_potextitem to it_potextitem.

"populate fields of struture and append to itab
append wa_poexpimpitem to it_poexpimpitem.

"populate fields of struture and append to itab
append wa_pocomponents to it_pocomponents.

"populate fields of struture and append to itab
append wa_poshippingexp to it_poshippingexp.

"populate fields of struture and append to itab
append wa_pohistory to it_pohistory.

"populate fields of struture and append to itab
append wa_pohistory_totals to it_pohistory_totals.

"populate fields of struture and append to itab
append wa_poconfirmation to it_poconfirmation.

"populate fields of struture and append to itab
append wa_allversions to it_allversions.

"populate fields of struture and append to itab
append wa_popartner to it_popartner.

"populate fields of struture and append to itab
append wa_extensionout to it_extensionout.

"populate fields of struture and append to itab
append wa_serialnumber to it_serialnumber.

"populate fields of struture and append to itab
append wa_invplanheader to it_invplanheader.

"populate fields of struture and append to itab
append wa_invplanitem to it_invplanitem.

"populate fields of struture and append to itab
append wa_pohistory_ma to it_pohistory_ma.

SAP Documentation for FM BAPI_PO_GETDETAIL1


The function module BAPI_PO_GETDETAIL1 enables you to display detailed information on a purchase order. The BAPI uses the technology available ...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_GETDETAIL1 or its description.