100% found this document useful (1 vote)
549 views

Creating Custom Fields in ME31K, ME32K, ME33K - SAP Blogs

Uploaded by

Sagar Ganji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
549 views

Creating Custom Fields in ME31K, ME32K, ME33K - SAP Blogs

Uploaded by

Sagar Ganji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Community Topics Groups Answers Blogs Events Programs Resources What's New Explore SAP

Ask a Question Write a Blog Post Login

Jayesh Mudaliar
July 28, 2016 | 5 minute read

Creating Custom Fields in ME31K , ME32K , ME33K


 2  4  15,665

Follow Custom Fields in ME31K , ME32K , ME33K

As we know the enhancement to the screen is not impossible but it is not supported because we need some S_DEVELOP authorisation and
 Like modify some of the Standard table with z fields .That why please consider this document only if water is above your head and is a critical
requirement of client

 RSS Feed 1) Create a Project using CMOD Tcode.

2) Give the enhancement name MM06E005.

3) Go to component Tab.
4) go to SAPMM06E 0201 (This is for Header if you want to add tab on Header)

go to layout and design the screen according to your requirement

It seems you have created your screen. Now go back to PBO and create a module with any name I name it as PBO so as to remove any confusion
as described below. Just double click to create it will ask you to create with some name like this ZXM06O01 or whatever just press enter to
create save it in your request.
Now we are reaching towards the conclusion as we are going to play with the data we are going to insert in our fields.

First of all in the first screen you will see EXIT_SAPMM06E_006 double click on that you will find

INCLUDE ZXM06U36-> double click on that->it will ask to create and save it in your request. This is the first exit which is executed so we will
export our values from there. After implementing this exit just put a hard break point and for testing execute me33k with->enter agreement number
-> execute.

Click on Header our breakpoint will be triggered. This indicates everything is fine (ALL IS WELL).See the below screen the Yellow field is our
custom field. Now from here we will export our values so do like this

IF i_ekko–zvat is NOT INITIAL.


FREE MEMORY ID ‘ZVAT’.
zvat = i_ekko–zvat.
EXPORT zvat to MEMORY id ‘ZVAT’ .
ENDIF.

IF i_ekko–zdelivery is NOT INITIAL.


FREE MEMORY ID ‘ZDELIVERY’.
zdelivery = i_ekko–zdelivery.
EXPORT zdelivery to MEMORY id ‘ZDELIVERY’ .
ENDIF.

IF i_ekko–ZFREIGHT is NOT INITIAL.


FREE MEMORY ID ‘ZFREIGHT’.
ZFREIGHT = i_ekko–ZFREIGHT.
EXPORT ZFREIGHT to MEMORY id ‘ZFREIGHT’ .
ENDIF.
In the above part you have exported the values but so as to store this values in table you need to go to the PBO which we have created.It will lead
to ZXM06O01 which system has automatically created .

Now here we will manipulate our custom screen like storing the values in standard table or your z table. We will import the value which have been
exported earlier.

IF sy–tcode EQ ‘ME21N’ OR sy–tcode EQ ‘ME22N’ OR sy–tcode EQ ‘ME23N’.

DATA: zvat TYPE zvat.

DATA: zdelivery(30) TYPE c.

DATA: zfreight(50) TYPE c.

DATA: i_trtyp .

IMPORT zvat TO zvat FROM MEMORY ID ‘ZVAT’.

IMPORT zdelivery TO zdelivery FROM MEMORY ID ‘ZDELIVERY’.

IMPORT zfreight TO zfreight FROM MEMORY ID ‘ZFREIGHT’.

IMPORT i_trtyp TO i_trtyp FROM MEMORY ID ‘I_TRTYP’.

ekko_ci–zvat = zvat.

ekko_ci–zdelivery = zdelivery.

ekko_ci–zfreight = zfreight.

IF i_trtyp = ‘A’.

** if sy-tcode = ‘ME23N’ OR sy-tcode EQ ‘ME29N’..

LOOP AT SCREEN.
IF screen–group1 = ‘VAT’ OR screen–name = ‘EKKO_CI-ZVAT’.

screen–input = 0.

ENDIF.

IF screen–group1 = ‘DEL’ OR screen–name = ‘EKKO_CI-ZDELIVERY’.

screen–input = 0.

ENDIF.

IF screen–group1 = ‘FRT’ OR screen–name = ‘EKKO_CI-ZFREIGHT’..

screen–input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

** endif.

ENDIF.

IF i_trtyp <> ‘A’.

** if sy-tcode = ‘ME23N’ OR sy-tcode EQ ‘ME29N’..

LOOP AT SCREEN.

IF screen–group1 = ‘VAT’ OR screen–name = ‘EKKO_CI-ZVAT’.

screen–input = 1.

ENDIF.
IF screen–group1 = ‘DEL’ OR screen–name = ‘EKKO_CI-ZDELIVERY’.

screen–input = 1.

ENDIF.

IF screen–group1 = ‘FRT’ OR screen–name = ‘EKKO_CI-ZFREIGHT’..

screen–input = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

** endif.

ENDIF.

ENDIF.

Now as per the document everything has been explained regarding storing and retrieving the values from fields. You might have noticed that I
have used the zvat field in ekko_ci which is the standard. For doing this you will require S_DEVELOP Authorization to append standard table with
your Z feild so consult your basis team soon you get authorization do like this go to se11-> ekko ->scroll down to find CI_EKKODB structure for
more explanation find the screen shot
double click on this CI_EKKODB it will ask you to create the structure -> click on yes button ->the following screen will be displayed.

now create the z data element for your fields and enter it save it and activate it.

Now you are ready with the custom fields in Header and your standard table will look like this.
Alert Moderator

Assigned Tags

ABAP Development

Similar Blog Posts


Enjoy SAP 
Adding tabstrip to Screen exit How to update Standard fields of Purchase Order using User Exit MM06E005
By Tolga POLAT Jan 06, 2014 By Cao Dang Duc Dec 19, 2018

Purchasing Document Approval Process with Manual Approver Selection


Development
By Prachi Yalgude Sep 30, 2016

Related Questions 
Transaction related to PLAF EBAN EKET Transaction Code needed
By Former Member Jun 22, 2007 By Former Member Dec 14, 2005

Contracts in R/3..?
By Former Member May 22, 2006
2 Comments

You must be Logged on to comment or reply to a post.

Satya Tiwari
March 5, 2018 at 8:29 am

Could someone tell me what is the difference between the ""validity start , "valididy end" in Header data and "validity on" , "validity to" in Item condition (PB0) .

Basically i am not getting for what header data is and from where its fetching ""validity start , "valididy end" , its not same as "validity on" , "validity to" in Item condition
(PB0) .

Like 0 | Share

SRIRAM KOMPELL
August 22, 2022 at 5:04 am

Hi Jayesh,

Nice blog. Thanks.

i would like to know is it possible to enhance the Item screen of Purchase Contract.

i tried it but i could see no exit has given by SAP for this requirement. In this case,

the only way is to modify the existing screen which is not recommendable.

Any ideas/thoughts from your side pertaining to this.


Regards

Sri Ram

Like 0 | Share

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

You might also like