on 01-19-2006 1:36 AM
there is a exit EXIT_SAPMM06E_017 for me22n.
i have write some code on that include ZXM06U42.
Now my requirement is i want to know which line item is changed by user.
for eg suppose if there r 4 line items,user is going to change 3 line item
i want to validate the custom fields in the exit.
so i want to know which line item is changed in PO.
anybody worked on this?
Thanks in advance
Kumar
hi, if you want to log the change in me22n on PO, you can rely on 'change document' technology.
The related table is CDHDR & CDPOS.
If you do a change on PO, your input will be store in these two table, include PO & Item No & the field name which you change, and field value.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
i'm not getting any value on this field UPDKZ (or CONFUPD)after changing the line item values .
I_EKPO-EBELP this field shows line nos..
change pointers i can do that..
but thing is while changing the line no before clicking save button, i want to get that line nos..
suppose if there r 4 lines items, user is trying change the content of 3 line item, immediately i want to catch it before clicking save button me22n transaction.
Kumar
Hi Kumar,
I don't know you have an option to implement the BADI.
If so the I have one suggestion can you implement and use BADI : ME_PROCESS_PO_CUST.
In method : PROCESS_ITEM.
Please fetch the current item data (After User Changed the data) by
DATA: ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl,
ls_tbsg TYPE tbsg.
----
here we check customers data
----
ls_mepoitem = im_item->get_data( ).
Ls_MEPOitem contains the item data changed by user.
Then get the actual item data saved by using Select single * from EKPO........
Then you can compare your fields and addyour own custom logic.
Lanka
Hi Kumar,
First implement the BAdi and put a break point in method PROCESS_ITEM (After implementation you have to write code here. To check first set a break point between method and endmethod).
Please check the sample code for BADI via Transaction SE18> GOto> Sample code.
Please note BADI reads one line item at one time .
Hope this will help.Need any help let me know.
Lanka
Hi Lanka.
Now break-point is working..trying to declar internal table..it is giving error..i will try how to declare in badi..
DATA: ls_mepoitem TYPE mepoitem.
ls_mepoitem = im_item->get_data( ).
*TYPES: BEGIN OF TYPE_EKPO.
INCLUDE STRUCTURE EKPO.
*TYPES : END OF TYPE_EKPO.
*DATA I_EKPO TYPE STANDARD TABLE OF TYPE_EKPO WITH HEADER LINE.
Select single * from EKPO INTO I_EKPO WHERE EBELP = ls_mepoitem-
*EBELP.
Hi Lanka
thanks. i have one more question?. is same badi can i use to check all items at the time of save?. because in user exit i'm not able to get sy-ucomm values?.
My requirement is.
already user created PO with 2 or 3 line items.
now he is trying to change one line item..so at that time i have to validate only that particular line item.
But finally when he try to save or click the save button i have to check all line items..
basically i have to check some validation and once again i have to pass the value to bapi BAPI_ACC_DOCUMENT_CHECK.
one more question..how to compare these two work areas?
DATA: ls_mepoitem TYPE mepoitem.
ls_mepoitem = im_item->get_data( ).
DATA : wa_ekpo TYPE ekpo.
SELECT SINGLE * FROM ekpo INTO wa_ekpo
WHERE ebelp = ls_mepoitem-ebelp.
IF sy-subrc = 0.
if wa_ekpo = ls_mepoitem.
endif.
ENDIF.
thanks
Kumar
Hi Kumar,
The BDI will check all the line items at the time of save.
The BADI : ME_PROCESS_PO_CUST
Will work for you.
You don't know which are the values generally user will change like Qty or Price. Other wise you have to compare field by field.
after chnging the values for the line item you have to use the following method :
CALL METHOD IM_ITEM->SET_DATA
EXPORTING
IM_DATA = LS_MEPOITEM.
I am using the same for changing the PDT value at each line item based on some custom conditions.
Lanka
Message was edited by: Lanka Murthy
how to compare work area in here
DATA: ls_mepoitem TYPE mepoitem.
ls_mepoitem = im_item->get_data( ).
DATA : wa_ekpo TYPE ekpo.
SELECT SINGLE * FROM ekpo INTO wa_ekpo
WHERE ebelp = ls_mepoitem-ebelp.
wa_ekpo = ls_mepoitem equal or not?
Also after checking i have to call
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
EXPORTING
documentheader = w_documentheader
TABLES
accountgl = t_accountgl
currencyamount = t_currencyamount
return = t_return
extension2 = t_extension2.
so is it possible to call and pass the some values into bapi in the badi?
Thanks
Kumar
Hi Kumar,
Please compare work ares as
IF wa_ekpo-MENGE = ls_mepoitem-MENGE .
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
EXPORTING
documentheader = w_documentheader
TABLES
accountgl = t_accountgl
currencyamount = t_currencyamount
return = t_return
extension2 = t_extension2.
The pass your value which you want to change at item level
LS_MEPOITEM-Fieldname = Your variable retrived from BAPI
CALL METHOD IM_ITEM->SET_DATA
EXPORTING
IM_DATA = LS_MEPOITEM.
endif.
Hope this will help you.
Lanka
yes u r correct,but thing is instead of checking each file like IF wa_ekpo-MENGE = ls_mepoitem-MENGE , i have to check the whole work area.
one more thing so same way i can declear internal table and i can do like include in BADI?.
So as u said when user click save button that time it will check all line items. for that place also i have to write the code.can u pls tell me where is that place or method?.
Thanks for ur continuous help.
Muthu
Hi!
For EXIT_SAPMM06E_017 there is import parameter I_EKPO. Field I_EKPO-EBELP contains line item number for item being changed by user.
Hope it helps.
Regards,
Maxim.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Try to check the field UPDKZ (or CONFUPD) of item table, these should be the flag for modification type.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.