03-14-2014 7:33 AM
I have to add a custom filed to EBAN table. Can anybody help me with the function exit_003,006,008 regarding code.
Functional Design:
Short description
Please enter a new
numeric field “Budget” (ZZ_BUDGET) on purchase requisition item level (EBAN) on
writer Customer Data and on purchase
order item level (EKPO) on writer Customer Data
Please place it above field Project Name.
Make sure that the description “Budget” is available in all languages.
As an amount of money
should be entered, please display field EBAN_WAERS in the Purchase requisition
and EKPO_WAERS in the Purchase order behind the new Budget field and format the
new field in the same way as NETPR (###.###,##).
If somebody filled the budget field in the purchase requisition, it needs to be shown in the purchase order.
03-14-2014 8:31 AM
Hi Prasann -
As I understand, you need to extend the custom fields in EBAN.
For that you can add the fields to structure CI_EBANDB.
Add the fields in screen 111 of program SAPLXM02.
Implement the exit (accordingly with your requirement)
EXIT_SAPLMEREQ_001
EXIT_SAPLMEREQ_002
EXIT_SAPLMEREQ_003
Regards,
Atul Mohanty
03-14-2014 9:00 AM
Hi atul,
I have added the filed to structure CI_EBANDB and added screen 111.
Now i have to give condition(code) to this function exits.
Can you plz.. help me , to write code to get data from input screen and save on the EBAN table.
03-14-2014 9:33 AM
In Include ''ZXM02TOP'.
TABLES:ci_ebandb.
In EXIT_SAPLMEREQ_001 -> INCLUDE ZXM02U01
DATA : lw_preq TYPE mereq_item,
CALL METHOD IM_REQ_ITEM->GET_DATA
RECEIVING
RE_DATA = W_PREQ.
* Here Populate the ci_ebandb structure here with value from W_PREQ
Example ci_ebandb-zzcustom_fld = W_PREQ-zzcustom_fld
In Exit - EXIT_SAPLMEREQ_003 -> Include ZXM02U03
DATA: w_preq TYPE mereq_item.
* Assign value from ci_ebandb to W_PREQ
Example W_PREQ-zzcustom_fld = ci_ebandb-zzcustom_fld.
CALL METHOD im_req_item->set_data
EXPORTING
im_data = w_preq..
EX_CHANGED = 'X'.
Make sure your screen field should have the name with ci_ebandb.
Additionally you can write PBO and PAI logic for screen 111..
Let us know any further help.
03-14-2014 10:10 AM
Hi atul,
Thanks for your valuable help.
Can you plz guide me on following points:
1. As you can see in FS, the requirements is like if we change the data of custom field "ZBUDGET" in EBAN table, automatically it should update in EKPO TABLE.
2. The description of the custom field should available in all languages.
I have added the field to the ci_ebandb structure but the description is not showing cause of original language is DE.
PLZ give me your input.