03-25-2010 10:43 AM
Hello!
My requirement: To add a custom field in EKPO, and update the field with calculation with the quantity.
Senario 1 >>>The custom field in EKPO should be populated when a PO is created. ( ME21N > Create PO > Update the custom filed)
Senario 2 >>> When PO is changed through then Update Custom field in EKPO ( ME22N < Change PO > Update Custom field in EKPO)
-
Working on ECC6.0
I have created custom fields in EKPO (YYPOBALQTY)
-
Trial 1: I tried enhancement u201CMM06E005u201D component u201CEXIT_SAPMM06E_013u201D . The values in ITab are changed but the custom field in EKPO is not updated.
Code>>>
loop at XEKPO.
Clear XEKPO-YYPOBALQTY.
move XEKPO-MENGE to XEKPO-YYPOBALQTY.
modify XEKPO index sy-tabix.
endloop.
Trial 2: I tried BADI u201CME_PURCHDOC_POSTEDu201D though u201CIF_EX_ME_PURCHDOC_POSTED~POSTEDu201D but its not allowing to change the content of the internal table.
Pls suggest Which option would be better , User-Exits/BADI/ Implicit Enhanement.
Appreciate your hints and help on this. Thanks.
Bobby
03-25-2010 1:12 PM
Use transport additon to MODIFY statement like below:
modify XEKPO index sy-tabix transporting YYPOBALQTY.
03-25-2010 1:26 PM
Hey.,
Implement the Enhancemnet MM06E005 using transaction code CMOD and create the screen 0111( Purchase Order Item). then do your code to populate the custom value. Change your field namespace to ZZPOBALQTY from YYPOBALQTY. All custom field in standard structure should start with ZZ.
Here creating screen 0111 is mandatory. then only your code will get execute.
Regards,
Saravanan M
03-26-2010 8:40 AM
Thanks Saravanan.
My requirement does not need a screen. Would want to store line item u201Cquantityu201D value in ZZPOBALQTY field (after some calculations) in EKPO.
I think, if we can find a better place >>> to populating custom field in the line item internal table >>> then system will take the table and post it as normal posting.
If not user exit any other option!!! ?
12-22-2014 9:09 AM
Hi,
Did you got the solution, now we have similar requirement, can you please help us with the solution here
Sri