Customer fields in item of Purchase Requisition

Problem: you want to add customer fields to the item of Purchase Requisition document in ERP (ME53N).

Solution: To do this you need to use the SMOD project called MEREQ001.

First you need to enhance structures CI_EBANDB and CI_EBANDBX with fields that you want to add to the transaction.

Second you need to put those fields into the screen 0111 of report SAPLXM02. This screen will be presented in the item, on the Customer Data tab of the ME53N transaction.

Last part is to transport data to and from the screen. There are two function modules for this:

  1. EXIT_SAPLMEREQ_001 – executed before PBO event of the screen; here you need to retrieve all the information from the item and move it to the screen’s structure; for this you need to use method GET_DATA of object IM_REQ_ITEM;
  2. EXIT_SAPLMEREQ_003 – executed after PAI event of the screen; here you need to retrieve data from the screen and move it to the item. For this you need to use methods SET_DATA and SET_DATAX from object IM_REQ_ITEM. To inform system that data has been changed you need to set parameter ex_changed to abap_true (X).

In both these functions Purchase Requisition item is represented by object IM_REQ_ITEM.

Any additional, extended logic for the screen can be of course programmed in the standard PBO and PAI events of the 0111 screen.

Komentowanie jest zakończone.