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

Clear fields in Screen

Former Member
0 Likes
503

Dear Gurus ,

i have a screen that has three sub-screens . With a code i check some things and i hide one of the subscreens when something triggers.

This subscreen has 3 fields that the exist and in the other screens.

The problem is that when i change record these 3 fileds only doesnt change value and keep the first value that they had.

Look my code

The screen hide code ...

SET PF-STATUS 'MAIN100'.
  SET TITLEBAR 'TITLE'.

  IF ITAB-CLAIMDPT = '02'.
    SCREEN_CUST = TEXT-SC1. "'Vendor'.
    SCREEN_BILL = TEXT-SC3.
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'CMD_TAB6'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '0'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB3'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB2'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB1'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.

  ELSE.
    SCREEN_CUST = TEXT-SC2. "'Customer'.
    SCREEN_BILL = TEXT-SC4.
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'CMD_TAB6'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '1'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB3'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '0'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB2'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '0'.
      ENDIF.
      IF SCREEN-NAME = 'CMD_TAB1'.
        SCREEN-ACTIVE = '1'.
        SCREEN-INVISIBLE = '0'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

Do you thing that is matter of the fields .......???

Also i see in the debbuging that the field is filled with the right value ....

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
456

When you change value and press entrer just look in debugging what happens..In module pool its is always advisable to debug first. You will get better understanding of how technically this thing works.

Nabheet

3 REPLIES 3
Read only

Former Member
0 Likes
456

hi ,

try using chain ...end chain in pai module.

regards ,

somesh

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
457

When you change value and press entrer just look in debugging what happens..In module pool its is always advisable to debug first. You will get better understanding of how technically this thing works.

Nabheet

Read only

Former Member
0 Likes
456

Hi

For every IF condition, write ELSE so that the screen is not modified, If possible assign screen fields which are to be modified for a particular condition to GROUP so that the logic looks good.

Regards

Haritha