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: 

Visible and invisible options for pushbutton in module pool programming

Former Member
0 Kudos

Dear All,

I have the requirement to provide visible and invisible options for push button

for ex; i have two buttons

    create         save

first save button is need to be in invisible mode After create button click save button need to be appears.

and is there any options for display text fields need to display in module pool  when click on display button.

Thanks.

Chowdary.

1 ACCEPTED SOLUTION

former_member184578
Active Contributor
0 Kudos

Hi,

Yes. It is possible. Assign screen group number to the SAVE button. ( in layout click on SAVE button and click on attributes, there you can assign the saceen group number). Let say SC1. Also assign function codes to the both buttons, let say CRET for create button and SAVE for save button.

Now in PBO,

* To hide initially.

loop at screen.

if screen-group1 = 'SC1'

screen-active = 0.

endif.

endloop.

endloop.

and to make visible on click on create button.,

In PAI.,

case sy-ucomm.

when 'CRET'  " function code for create

*make save visible

loop at screen.

if screen-group1 = 'SC1'

screen-active = 1.

endif.

endloop.

endloop.

endcase.

Hope this helps u.,

Thanks & Regards,

Kiran.

4 REPLIES 4

Former Member
0 Kudos

Use Loop at screen before the display of the screen. Set screen-invisible option to 1 to make the save button invisible.

On user command when the sy-ucomm is create, again loop at screen and set the scree-invisible option to 0 for save button to be visible.

Assign a screen-group for the save button in screen painter to map screen value in your program.

--- Raja Sekhar

0 Kudos

Dear raja,

i am using the fallowing code in PBO it is working and In PAI i am using SCREEN-INVISIBLE = 0 it is not working.

   LOOP AT SCREEN.
   IF SCREEN-NAME = 'SAVE'.     "Mod Group
      SCREEN-ACTIVE = 0.  " Remove
     SCREEN-INVISIBLE = 1.
      MODIFY SCREEN.
    ENDIF.
ENDLOOP.

former_member184578
Active Contributor
0 Kudos

Hi,

Yes. It is possible. Assign screen group number to the SAVE button. ( in layout click on SAVE button and click on attributes, there you can assign the saceen group number). Let say SC1. Also assign function codes to the both buttons, let say CRET for create button and SAVE for save button.

Now in PBO,

* To hide initially.

loop at screen.

if screen-group1 = 'SC1'

screen-active = 0.

endif.

endloop.

endloop.

and to make visible on click on create button.,

In PAI.,

case sy-ucomm.

when 'CRET'  " function code for create

*make save visible

loop at screen.

if screen-group1 = 'SC1'

screen-active = 1.

endif.

endloop.

endloop.

endcase.

Hope this helps u.,

Thanks & Regards,

Kiran.

0 Kudos

Dear all,

Thanks for your reply

solved by my self.

Regadrs,

Chowdary.