06-08-2021 1:31 PM
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
.