Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_PO_GETDETAIL1 how to write program

Former Member
0 Likes
6,336

Hi gurus ,

Please help me with the detail code to call a BAPI to dispaly PURCHSA ORDER details.

i have to use BAPI_PO_GETDETAIL1.

how to do the coding??????

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,507

The function module BAPI_PO_GETDETAIL1 enables you to display detailed information on a purchase order. The BAPI uses the technology available in the Enjoy purchase order (transaction ME23N).

The import field purchaseorder must be populated.

data: PURCHASE_ORDER TYPE EBELN,

i_item_data TYPE TABLE OF bapimepoitem,

i_bapi_return TYPE TABLE OF bapiret2.

PURCHASE_ORDER = '4500004639' ** Give PO number here*

CALL FUNCTION 'BAPI_PO_GETDETAIL1'

EXPORTING

purchaseorder = purchase_order

account_assignment = space

item_text = space

header_text = space

delivery_address = '*'

version = space

services = space

IMPORTING

poheader = wa_header_data

TABLES

return = i_bapi_return

poitem = i_item_data.

I hope it helps.

Thanks,

Vibha

Please mark all the useful answers

3 REPLIES 3
Read only

Former Member
0 Likes
3,508

The function module BAPI_PO_GETDETAIL1 enables you to display detailed information on a purchase order. The BAPI uses the technology available in the Enjoy purchase order (transaction ME23N).

The import field purchaseorder must be populated.

data: PURCHASE_ORDER TYPE EBELN,

i_item_data TYPE TABLE OF bapimepoitem,

i_bapi_return TYPE TABLE OF bapiret2.

PURCHASE_ORDER = '4500004639' ** Give PO number here*

CALL FUNCTION 'BAPI_PO_GETDETAIL1'

EXPORTING

purchaseorder = purchase_order

account_assignment = space

item_text = space

header_text = space

delivery_address = '*'

version = space

services = space

IMPORTING

poheader = wa_header_data

TABLES

return = i_bapi_return

poitem = i_item_data.

I hope it helps.

Thanks,

Vibha

Please mark all the useful answers

Read only

Former Member
0 Likes
3,507

Hi,

call BAPI-function in this system *

CALL FUNCTION 'BAPI_PO_GETDETAIL1'

EXPORTING

PURCHASEORDER = PURCHASEORDER

ACCOUNT_ASSIGNMENT = ACCOUNT_ASSIGNMENT

ITEM_TEXT = ITEM_TEXT

HEADER_TEXT = HEADER_TEXT

DELIVERY_ADDRESS = DELIVERY_ADDRESS

VERSION = VERSION

SERVICES = SERVICES

IMPORTING

POHEADER = POHEADER

POEXPIMPHEADER = POEXPIMPHEADER

TABLES

RETURN = RETURN

POITEM = POITEM

POADDRDELIVERY = POADDRDELIVERY

POSCHEDULE = POSCHEDULE

POACCOUNT = POACCOUNT

POCONDHEADER = POCONDHEADER

POCOND = POCOND

POLIMITS = POLIMITS

POCONTRACTLIMITS = POCONTRACTLIMITS

POSERVICES = POSERVICES

POSRVACCESSVALUES = POSRVACCESSVALUES

POTEXTHEADER = POTEXTHEADER

POTEXTITEM = POTEXTITEM

POEXPIMPITEM = POEXPIMPITEM

POCOMPONENTS = POCOMPONENTS

POSHIPPINGEXP = POSHIPPINGEXP

POHISTORY = POHISTORY

POHISTORY_TOTALS = POHISTORY_TOTALS

POCONFIRMATION = POCONFIRMATION

ALLVERSIONS = ALLVERSIONS

POPARTNER = POPARTNER

EXTENSIONOUT = EXTENSIONOUT

EXCEPTIONS

OTHERS = 1.

Regards,

Shiva.

Read only

Former Member
0 Likes
3,507

Hi,

Welcome To SDN!!

Try this out...

Report ZBapi .

data: po_items type table of bapiekpo with header line.

parameters: p_ebeln type ekko-ebeln.

call function 'BAPI_PO_GETDETAIL'

exporting

purchaseorder = p_ebeln

ITEMS = 'X'

ACCOUNT_ASSIGNMENT = ' '

SCHEDULES = ' '

HISTORY = ' '

ITEM_TEXTS = ' '

HEADER_TEXTS = ' '

SERVICES = ' '

CONFIRMATIONS = ' '

SERVICE_TEXTS = ' '

EXTENSIONS = ' '

IMPORTING

PO_HEADER =

PO_ADDRESS =

tables

PO_HEADER_TEXTS =

po_items = po_items

PO_ITEM_ACCOUNT_ASSIGNMENT =

PO_ITEM_SCHEDULES =

PO_ITEM_CONFIRMATIONS =

PO_ITEM_TEXTS =

PO_ITEM_HISTORY =

PO_ITEM_HISTORY_TOTALS =

PO_ITEM_LIMITS =

PO_ITEM_CONTRACT_LIMITS =

PO_ITEM_SERVICES =

PO_ITEM_SRV_ACCASS_VALUES =

RETURN =

PO_SERVICES_TEXTS =

EXTENSIONOUT =

.

check sy-subrc = 0.

loop at po_items.

write:/ po_items.

endloop.

Refer

http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1

Regards

Kiran SURE