Application Development and Automation 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: 
Read only

while Customizing me23n the fields are not disable

Former Member
0 Likes
3,658

Hi,

1. while customizing Purchase Order(me21n/me22n/me23n), I add three fields,

in that when i open me23n that fields are not disables.

i use this code,

case sy-tcode.

when 'me23n'.

loop at screen.

screen-input = 0.

modify screen.

endloop.

endcase.

bt it will not work.

any one can give the solutions for that?

2. that customized fields are comes under default tab customer data,

is it possible toi change the tab name?

give me the Solutions for that Issues.

Thanks.

Edited by: vino_abap on Jan 28, 2011 11:51 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,836

Hi Vino,

Which exit/BADI you have used to add the fields? fields are at header level or at item level?

Assuming that you have used exit MM06E005 to add field at header level, the following are the answers:

1)You have to write the code in the PBO of screen 101. Create a PBO module in the screen using include ZXM06O01 and write the code in the following way :


 IF SY-TCODE = 'ME23N''.

    LOOP AT SCREEN.

      IF SCREEN-NAME = 'WA_EKKO_CI-ZZREGIO'.

        SCREEN-INPUT = 0.

        MODIFY SCREEN.

      ENDIF.

    ENDLOOP.

  ENDIF.

2)You will not be able to change the tab name.

Thanks & Regards,

Faheem.

Hi,

1. while customizing Purchase Order(me21n/me22n/me23n), I add three fields,

in that when i open me23n that fields are not disables.

i use this code,

case sy-tcode.

when 'me23n'.

loop at screen.

screen-input = 0.

modify screen.

endloop.

endcase.

bt it will not work.

any one can give the solutions for that?

2. that customized fields are comes under default tab customer data,

is it possible toi change the tab name?

give me the Solutions for that Issues.

Thanks.

Edited by: vino_abap on Jan 28, 2011 11:51 AM

18 REPLIES 18
Read only

Former Member
0 Likes
2,837

Hi Vino,

Which exit/BADI you have used to add the fields? fields are at header level or at item level?

Assuming that you have used exit MM06E005 to add field at header level, the following are the answers:

1)You have to write the code in the PBO of screen 101. Create a PBO module in the screen using include ZXM06O01 and write the code in the following way :


 IF SY-TCODE = 'ME23N''.

    LOOP AT SCREEN.

      IF SCREEN-NAME = 'WA_EKKO_CI-ZZREGIO'.

        SCREEN-INPUT = 0.

        MODIFY SCREEN.

      ENDIF.

    ENDLOOP.

  ENDIF.

2)You will not be able to change the tab name.

Thanks & Regards,

Faheem.

Read only

0 Likes
2,836

Hi Faheem,

ya I given that code in PBO of screen 101 and that include ZXM06O01

bt my problem is not solve.

now i try to ur coding, that also not working.

wt a meaning for that ZZREGIO

if u give the solution it will help for me.

Read only

0 Likes
2,836

Hi Vinu,

WA_EKKO_CI-ZZREGIO is a screen field name which I have implemented here. Put your screen fieldname there.

This will work only when you have implemented exit MM06E005.

As Raymond said, it is always better to use transaction type, but unfortunately I_TRTYP is not available in that include. So declare a variable say W_TRTYP LIKE T160-TRTYP in ZXM06TOP and assign I_TRTYP to W_TRTYP in ZXM06U36 of function exit EXIT_SAPMM06E_006 as

W_TRTYP = I_TRTYP.

Now your code should look like this :


 IF W_TRTYP = 'A'.                "A is a display mode
 
    LOOP AT SCREEN.
 
      IF SCREEN-NAME = 'WA_EKKO_CI-ZZREGIO'."Keep your screen fieldname here
 
        SCREEN-INPUT = 0.
 
        MODIFY SCREEN.
 
      ENDIF.
 
    ENDLOOP.
 
  ENDIF.

Thanks & Regards,

Faheem.

Read only

0 Likes
2,836

HI Faheem.,

thanks for the quick rly,

I tried that coding. bt my problem is not solved

actually i am using predefined project in cmod that is LO020

it is any problem for that.

Edited by: vino_abap on Jan 29, 2011 6:20 AM

Edited by: vino_abap on Jan 29, 2011 7:03 AM

Read only

0 Likes
2,836

Hi Vino,

Check which exit is assigned to that project? to check which exit is assigned goto Enhancement Assignments and check which exit is assigned to that project, if it is MM06E005, and you have followed what I have asked to do, then it should work for your requirement.Coz I worked a lot on exit MM06E005.

Thanks & Regards,

Faheem.

Read only

0 Likes
2,836

Hi Faheem ,

I already checked that. The exit name is MM06E005

I added the fields in header level only.

i tried that codes,

bt no change.

same screen only appear.

Read only

0 Likes
2,836

Hi Faheem ,

I already checked that. The exit name is MM06E005

I added the fields in header level only.

i tried that codes,

bt no change.

same screen only appear.

I dont know wr the mistake.

Edited by: vino_abap on Jan 29, 2011 8:09 AM

Read only

0 Likes
2,836

Hi Vino,

Hmmm, do the following :

1)Paste your code, with all the details like where you have written your code,include name etc.

2)Check whether that exit is active or not?

Thanks & Regards,

Faheem.

Read only

0 Likes
2,836

Hi Faheem,

Thanks u.

My problem solved.

Problem is,

Under PBO what ever i create include like zxm06o01

these are stored in include zxm06zzz

in my case that include is not activate.

that is the problem.

Now its fine.

Thanks,

Read only

0 Likes
2,835

Hi Faheem,

Thanks u.

I pasted my code in ur gmail. just check once.

My problem solved.

Problem is,

Under PBO what ever i create include like zxm06o01

these are stored in include zxm06zzz

in my case that include is not activate.

that is the problem.

Now its fine.

Thanks,

Edited by: vino_abap on Jan 31, 2011 8:18 AM

Read only

0 Likes
2,835

Hi frieds,

Thanks for the replay. these are very useful for me,

Now i have another issue.

what ever i add fields in me21n/22n/23n.(purchase order header level) same fields i want to add in sales order(header level).

for that i want to add that fields in vbak thro appand structure? if i want to add means,

further what to do,

for sales order what is the exit name for add a fields,

I found some exit name from that no exit name have a screen exit name,

so i cant get which is correct exit name for add a fields,

any one can give details about that,

Regards,

Vino,

Read only

0 Likes
2,835

Hi Vino,

To add fields in Sales Order at header level you have to use tab Additional Data B. To do that you have to add your fields in screen 8309 of program SAPMV45A. For details you can read SAP notes 302497 & 209278.

Thanks & Regards,

Faheem.

Read only

0 Likes
2,835

Hi, vinoth R.

My problem is solved.

Include zxm06zzz was inactive.

Only I have activated it and it work.


Read only

0 Likes
2,835

Nice Faheem!

Starting from yuor observation a wrote this step by step procedure (very easy)

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,835

Don't check transaction code (*), check field(s) provided by SAP like I_TRTYP ("A" Anzeigen = Display) - e.g. call ME23N and press F7 or menu : Purchase order display/change, transaction is always ME23N but data can be changed (reverse way works too)

Regards,

Raymond

(*) and don't check in lowercase

Read only

0 Likes
2,835

HI Raymond,

I try to use that i_trtyp also,

bt i got error..

field I_TRTYP IS UNKNOWN.

This is my code,

IF ( ( sy-tcode = 'ME21N' ) OR

( sy-tcode = 'ME21' ) OR

( sy-tcode = 'ME22N' ) OR

( sy-tcode = 'ME22' ) OR

( sy-tcode = 'ME23' ) OR

( sy-tcode = 'ME23N' ) ).

CLEAR i_trtyp.

IMPORT i_trtyp FROM MEMORY ID sy-uname.

LOOP AT SCREEN.

IF screen-name = 'EKKO_CI-custom field'.

IF i_trtyp = 'A'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

ENDIF.

Read only

Former Member
0 Likes
2,835

Hi,

Which user-exit are you using ??

Try Below:

case sy-tcode.
when 'ME23N'. "All Caps
loop at screen.
screen-input = 0.
modify screen.
endloop.
endcase.

Regards,

Jovito

Read only

roton_hossain
Explorer
0 Likes
2,835

Following the step :

PROCESS BEFORE OUTPUT.


   MODULE status_0101.

implement the MODULE status_0101 .

write the code :

MODULE status_0101 OUTPUT.

*  SET PF-STATUS 'xxxxxxxx'.

*  SET TITLEBAR 'xxx'.

    IF SY-TCODE = 'ME23N'.

     LOOP AT SCREEN.

       IF SCREEN-NAME = 'EKKO_CI-ZZPOHDR_SPIN'.   //field name

         SCREEN-INPUT = 0.

         MODIFY SCREEN.

       ENDIF.

     ENDLOOP.

   ENDIF.

ENDMODULE.                 " STATUS_0101  OUTPUT