Purchase Order

<< Click to Display Table of Contents >>

Navigation:  All About ABAP Technique > English > Function Module Examples Code >

Purchase Order

Objective

Knowledge using SAP Standard Function Module to retrieve information on the Purchase Order document without using Bapi

Support

 

Contributor

Albertus Reinandang ( reinandang@yahoo.com )

 

MEPO_DOC_READ : Read the entire document PO documents in a transaction.

Example :

REPORT  ztest_fm301 NO STANDARD PAGE HEADING LINE-SIZE 1023.
 
PARAMETERS : pa_ebeln LIKE ekko-ebeln OBLIGATORY.
 
 
START-OF-SELECTION.
  DATA: lw_status_header TYPE mepo_status.
 
  CALL FUNCTION 'MEPO_DOC_INITIALIZE'.
  CALL FUNCTION 'MEPO_DOC_READ'
    EXPORTING
      im_ebeln = pa_ebeln
      im_tcode = 'ME23N'
      im_trtyp = 'A'.
 
  PERFORM get_status_header IN PROGRAM saplmepo
                                      CHANGING lw_status_header.
 
  WRITE : / 'PO Header Status'.
  WRITE : / sy-uline.
  WRITE : / 'Purchase Order Quantity                   : ', lw_status_header-quantity_ordered,
          / 'Quantity as Per Vendor Confirmation       : ', lw_status_header-quantity_confirmed,
          / 'Quantity of Goods Received                : ', lw_status_header-quantity_delivered,
          / 'Goods Receipt Blocked Stock in Order Unit : ', lw_status_header-quantity_restr_stock,
          / 'Open Quantity                             : ', lw_status_header-quantity_open,
          / 'Quantity invoiced                         : ', lw_status_header-quantity_invoiced.