Application Development 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: 

Updating Field Attributes of Screen

Former Member
0 Kudos

Hi Experts,

Is there any function module which can update the attributes of a screen like

SCREEN-INPUT = 0.

SCREEN-OUTPUT = 1

in a PAI event. I just want a FM that is similar to DYNP_VALUES_UPDATE or DYNP_UPDATE_FIELDS. Instead of values the attributes should get updated in PAI without PBO being triggered.

TIA.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You don't do this in an FM, but in the PBO routine, you use this type of logic.


  LOOP AT SCREEN.
    IF screen-group1 EQ 'RNT'.
      IF a1_zlmcont-zown = '2'.  "Rent
*        screen-invisible = 0.
*        screen-active = 1.
        screen-input = 1.
      ELSE.
*        screen-invisible = 1.
*        screen-active = 0.
        screen-input = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

You can force the PBO routine to be triggered in most cases by simply putting a value in the FCT field of the field definition.

Edited by: Paul Chapman on Nov 21, 2008 12:42 PM

3 REPLIES 3

Former Member
0 Kudos

You don't do this in an FM, but in the PBO routine, you use this type of logic.


  LOOP AT SCREEN.
    IF screen-group1 EQ 'RNT'.
      IF a1_zlmcont-zown = '2'.  "Rent
*        screen-invisible = 0.
*        screen-active = 1.
        screen-input = 1.
      ELSE.
*        screen-invisible = 1.
*        screen-active = 0.
        screen-input = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

You can force the PBO routine to be triggered in most cases by simply putting a value in the FCT field of the field definition.

Edited by: Paul Chapman on Nov 21, 2008 12:42 PM

0 Kudos

Hi Paul,

Thanx for ur reply. Which table has this FCT field? Do u mean FCODE by the way? Kindly help as am into a bottleneck situation.

TIA.

0 Kudos

Hi Sakkthish,

Can you explain what exactly is your requirement. AS per my understanding your requirement is to update the screen internal table using a function module. But, I doubt that you will get something like that.

But, since the logic of the screen modification is handled in the Process Before Output Module of the Screen, you can put the code to handle the screen modification there. Also, you can declare some global flag which you can modify the value based on your Function Code triggered in PAI Module. And later in the PBO Module you can check the flags and based on this values you can make the changes.

In the TOP Include you can declare a global flag of type Char 1.And set the flag in the PAI and check the same in PBO and then clear the same in that module.

Hope this will help you.

Thanks,

Samantak.