Custom Fields in ME31K , ME32K , ME33K

Custom Fields in ME31K , ME32K , ME33K

As we know the enhancement to the screen is not impossible but it is not supportedbecause we need some S_DEVELOP authorisation and 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

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.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ChampaignWolf

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值