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: 

save custom fields value in EKKO through ME21N

Former Member
0 Kudos

Hello Friends,

putting a new inputfield in the header of ME21N - PO transaction must be inserted within existing tabstrib "Additional Data".

This the new requirement.

I have used the enhancement "MM06E005". I have only implemented and activated the USEREXIT without writing

any code in any Function Module.

Additionally I have added through the screen painter (Function Pool MEGUI) into screen 1229 the customer

ZFIELD (Textinputfield).

I can see this field in the transaction ME21N, ME22N, ME23N but if I enter any value and save it. This Field has only 0000000 in the EKKO instaed of the entered value by me.

In the other transaction like ME21 ME22 ME23 this problem is not existing. I can save the enterd date without any problem.

I have already implemented the structure CI_EKKODB too. There is the zcustom field added.

I need your help for in how to save the data in EKKO with me21n.

Kindly Regards

Marco

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You have to write code in EXIT_SAPMM06E_008 which is called just before saving.

if g_aktyp ne 'A'. "CHECK IF THE MODE IS CHANGE MODE . 'A' IS FOR DIAPLAY MODE 'V' FOR CHANGE MODE

if G_CI_EKKO-ZZPRINTDEL ne E_CI_EKKO-ZZPRINTDEL.

E_CI_EKKO-ZZPRINTDEL = g_CI_EKKO-zzprintdel. "MOVE TEH SCREEN CHANGED VALUE TO STRUCTURE

e_ci_update = 'X'. "THIS IS TO UPDATE IN THE CHANGED VALUE TO THE DATABASE

endif.

8 REPLIES 8

former_member536879
Active Contributor
0 Kudos

Dear Marco,

Dont use User Exit for this . Use the BADI's .If uses the USer Exit it will create u some probs at later stage.

There are 2 BADI's available for this.

1) ME_PROCESS_PO_CUST.

2) ME_GUI_PO_CUST.

1) ME_PROCESS_PO_CUST.This BADI is for Validating the PO at various Level. Methods for this BADI is

1.Open.

2.Initialize.

3.Process Header.

4.Process Item.

5.Check.

6.Post.

Etc.

So u can Validate the Entire PO ..

2. ME_GUI_PO_CUST.

Adding the Customer Own Screen to Enjoy Purchase Order.

The Process is that Just Create a Function Group with the Screen with Screen Which u want to Add to the Header Level.

Through this BADI u can add N Number of Screen to PO.

In the First Method of this BADI just Add the Screen. For Better Understanding goto the Sample Coding of Both BADI's.

With Regards,

Sumodh.P

0 Kudos

can you pls give me more details.

Regards

Marco

Former Member
0 Kudos

Hi,

You have to write code in EXIT_SAPMM06E_008 which is called just before saving.

if g_aktyp ne 'A'. "CHECK IF THE MODE IS CHANGE MODE . 'A' IS FOR DIAPLAY MODE 'V' FOR CHANGE MODE

if G_CI_EKKO-ZZPRINTDEL ne E_CI_EKKO-ZZPRINTDEL.

E_CI_EKKO-ZZPRINTDEL = g_CI_EKKO-zzprintdel. "MOVE TEH SCREEN CHANGED VALUE TO STRUCTURE

e_ci_update = 'X'. "THIS IS TO UPDATE IN THE CHANGED VALUE TO THE DATABASE

endif.

0 Kudos

Hi Joshi.

Is EXIT_SAPMM06E_008 working with ME21N ? If so

1 ) How did you define G_CI_EKKO and where ?

2) How did you define e_ci_update .

3) I have inserted a field into CI_EKKODB (ZDATUM)

4) I have added an input field (for date input) in the tabstrip "additonal data" within ME21.

It is the SCREEN 1229 I have added through Screen Painter. How msut the element name be?

EKKO-ZDATE or CI_EKKODB-ZDATUM

Regards

Marco M.

0 Kudos

Hi ,

EXIT_SAPMM06E_008 is in enhancement MM06E005 which u have used it is for customer enhancements at header level

1 ) G_CI_EKKO is a screen field name .it also has to be declared in the top include ZXM06TOP in function group XM06

2) no need to define e_ci_update it is present in the export parameters of EXIT_SAPMM06E_008 .

Regards

Pallavi Joshi

Former Member
0 Kudos

Hello I have solved the problem.

Thank you very much for your helps.

Regards

Marco

Former Member
0 Kudos

Hi,

I did all the steps for adding a new field in the ekko table (in the structure CI_EKKODB), taking as example this question , but the value is not updated in the database.

I traced the code in EXIT_SAPMM06E_008 but never pass when I save the PO

I use the screen 1229 or i need to use the screens of enhancement MM06E005??

What is wrong?.. It's necesary to active another exit?

Regards

Tatiana

0 Kudos

hello i want to know thw sap code for segment purchase order