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: 

How to suppress the Push button in a custom screen

Former Member
0 Kudos

Hi,

Is there any procedure to suppress a Push button in a custom Screen based on a condition.

For eg: If Material is not initial.

then display the Continue button.

else not.

endif.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If the push button is not on the application toolbar, then follow the below procedure...

1. Assign the MODIF-ID for the button in the screen. Assume that MODIF-ID for the button is SC1.

2. In the PBO of the screen add the below code...

IF not MATERIAL is INITIAL.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'

SCREEN-OUTPUT = 1.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'

SCREEN-OUTPUT = 0.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Regards,

Vara

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

Hi laxmi,

If the button is on the PF Status, and has a function code say, BUT1, then you xcan say

if material is initial.

set pf-status 'STAT1' excluding 'BUT1'.

endif.

This part of the code must be in a PBO module

Regards,

Ravi

Former Member
0 Kudos

Hi,

If the button is in the PF Status, then you can use SET PF-STATUS 'XXXXX' EXCLUDING FCODE where FCODE is the function code of the Push Button.

But, if the button is on the screen then, you can either convert the same button into Continue Button by changing the text dynamically and handling the funciton code of that button to work as a continue in the program or hide the Push Button & Display the continue Button.

Reward points if the answer is helpful.

Regards,

Mukul

Former Member
0 Kudos

Hi,

If the push button is not on the application toolbar, then follow the below procedure...

1. Assign the MODIF-ID for the button in the screen. Assume that MODIF-ID for the button is SC1.

2. In the PBO of the screen add the below code...

IF not MATERIAL is INITIAL.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'

SCREEN-OUTPUT = 1.

SCREEN-ACTIVE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'

SCREEN-OUTPUT = 0.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Regards,

Vara