Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To update custom field in EKPO (not through screen)

former_member738447
Discoverer
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Use transport additon to MODIFY statement like below:

modify XEKPO index sy-tabix transporting YYPOBALQTY.

saranwin
Contributor
0 Kudos

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

0 Kudos

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!!! ?

0 Kudos

Hi,

Did  you got the solution, now we have similar requirement, can you please help us with the solution here

Sri