Application Development 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: 

HOW TO CREATE AND POST PO USING BADI ME_PROCESS_PO_CUST.

former_member574106
Participant
0 Kudos

Hi friends,

I am doing my first BADI implementation. In this scenario, the user will create the PO, post it and he will receive the notification, that the mail has been created. Workflow strictly not allowed. I have written the initial part of the code. Please check the code and tell the remaining steps.

Regards, Saurav Lahiry

METHOD if_ex_me_process_po_cust~process_header.
*Fetching header data
  DATA : lt_header TYPE mepoheader.
CALL METHOD im_header->get_data
RECEIVING
re_data = lt_header.
* Pass data to the PO header
lt_header-ebeln = 'ABCD'.
lt_header-bukrs = '1000'.
lt_header-aedat = sy-datum.
lt_header-ernam = 'SAURAV LAHIRY'.
* Set header data
CALL METHOD im_header->set_data
  EXPORTING
    im_data = lt_header.
    .


 METHOD if_ex_me_process_po_cust~process_item.
  DATA : lt_items type mepoitem.
  CALL METHOD im_item->get_data
    RECEIVING
      re_data = lt_items
      .

0 REPLIES 0