BAPI PURCHAGE ORDER GET DETAIL

FORM get_position_details USING
pi_bukrs TYPE ekko-bukrs
pi_lifnr TYPE ekko-lifnr
pi_ebeln TYPE ekko-ebeln
pi_zterm TYPE ekko-zterm
pi_bsart TYPE ekko-bsart
pi_date TYPE d
pi_file TYPE string.

  • Read informations of all order positions for one purchase order

DATA:
ls_poitem TYPE bapiekpo,
ls_item_hist TYPE bapiekbe,
lt_poitem TYPE STANDARD TABLE OF bapiekpo,
lt_item_hist TYPE STANDARD TABLE OF bapiekbe,
lt_item_total TYPE STANDARD TABLE OF bapiekbes,
l_ebeln TYPE ekpo-ebeln,
l_ebelp TYPE ekpo-ebelp.

CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
purchaseorder = pi_ebeln
items = c_yes
history = c_yes
TABLES
po_items = lt_poitem
po_item_history = lt_item_hist
po_item_history_totals = lt_item_total.

  • Check posting date, because the bapi list the complete
  • history of a delivery plan

DELETE lt_item_hist WHERE pstng_date LT pi_date.

RELATED POST

DELIVERY PROCESS WITH BAPI SAMPLE CODE
ABAP ASSIGNMENT

ABAP REAL TIME INTERVIEW QUESTIONS PART ONE

ABAP REAL TIME INTERVIEW QUESTIONS PART TWO

ABAP REAL TIME INTERVIEW QUESTIONS PART THREE

No comments:

Post a Comment