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

Standard Change Button Functionality for Custom Fields in PO Header

Former Member
0 Likes
801

Hi,

I have implemented screen exit IN PO Header. But in ME22n when I am selecting the standard change/display button custom fields are not getting grey and they are in edit mode and in me23n when I am selecting standard change/display button it is not getting into edit mode

5 REPLIES 5
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
739

Have you coded for Display/Change based on Transaction type Create, Change, Display

Nabheet

Read only

0 Likes
739

Yes I have done it like this.

IF sy-tcode eq 'ME23' or sy-tcode eq 'ME23N'.

   LOOP AT SCREEN.

     IF screen-group1 eq 'A1'.

       screen-input = 0.

       MODIFY SCREEN.

     ENDIF.

   ENDLOOP.

ENDIF.

Read only

0 Likes
739

Hi Aashish,

please modify your logic as shown below

IF sy-tcode eq 'ME23' or sy-tcode eq 'ME23N'.

     LOOP AT SCREEN .

      CASE SCREEN-GROUP1.

        WHEN 'A1'.

           SCREEN-ACTIVE = 0.

           MODIFY SCREEN.

       ENDCASE.

     ENDLOOP.

     CLEAR : A1.

   ENDIF.

Read only

0 Likes
739

Hi Sanjeev,

As you said I tried but at CLEAR : A1it is showing error.

So I tried it without CLEAR : A1. in this case the input fields are not appearing at all in ME23N except the static texts.

Read only

0 Likes
739

Hi Aashish,

what is your declaration for A1, can you specify what is your declaration for A1.

for understanding please see the below code, then implement it, you will not get  error at.

CLEAR : A1

,

please see these code and understands , how to use

PARAMETERS : P_DATE TYPE SY-DATUM,                    

              P_LOAD TYPE VBAK-NETWR OBLIGATORY,        

              P_NETWR TYPE VBAK-NETWR OBLIGATORY,      

              P_ZOCP TYPE N OBLIGATORY,                

              P_STORE AS CHECKBOX USER-COMMAND STOR,  

              P_STR(10) TYPE C MODIF ID STR,           

              P_MDATE TYPE DATUM OBLIGATORY,           

              P_PAID AS CHECKBOX USER-COMMAND PAID,    

              P_PD(10) TYPE C MODIF ID PAD,            

              P_PD1(10) TYPE C MODIF ID PAD.            


IF P_PAID NE 'X'.

     LOOP AT SCREEN .

       CASE SCREEN-GROUP1.

         WHEN 'PAD'.

           SCREEN-ACTIVE = 0.

           MODIFY SCREEN.

       ENDCASE.

     ENDLOOP.

     CLEAR : P_PD, P_PD1.

   ENDIF.