07-23-2009 3:47 PM
hello everyone,
can anyone guide how do i make use of screen invisible stuff so that i can make use of same screen for multiple purposes?
I tried googling but ended it on a confusing note.
Thanks a lot for writing back.
Regards,
Lucky
07-23-2009 3:56 PM
Hi,
Try this way.
Thanks
Venkat.O
Report ztest.
parameters:r1 radiobutton group gr1 user-command uc1,
r2 radiobutton group gr1,
p_matnr type mard-matnr.
AT SELECTION-SCREEN OUTPUT.
if r1 = 'X'.
Loop at screen.
if screen-name = 'P_MATNR'.
screen-invisible = 0.
modify screen.
endif.
endloop.
else.
if screen-name = 'P_MATNR'.
screen-invisible = 1.
modify screen.
endif.
endloop.
endif.
07-23-2009 3:56 PM
Hi,
Try this way.
Thanks
Venkat.O
Report ztest.
parameters:r1 radiobutton group gr1 user-command uc1,
r2 radiobutton group gr1,
p_matnr type mard-matnr.
AT SELECTION-SCREEN OUTPUT.
if r1 = 'X'.
Loop at screen.
if screen-name = 'P_MATNR'.
screen-invisible = 0.
modify screen.
endif.
endloop.
else.
if screen-name = 'P_MATNR'.
screen-invisible = 1.
modify screen.
endif.
endloop.
endif.
07-23-2009 4:24 PM
Could you explain something? How do i proceed if i want to do it in dialog programming?
In reports i can also use 'CLEAR SCREEN'.
Also could you explain something?
1. " group gr1 user-command uc1",
2. p_matnr type mard-matnr.
3. if r1 = 'X'. <--- what does an X signifies here?
4. if screen-name = 'P_MATNR'. <----can we have this p_matnr as same as that of title name of screen?
screen-invisible = 0.
very confusin though actin like a newbie to this stuf.. i can do this stuff by usin many screens i just want to make use of screen invisible stuff so as to clear the contents of screen drawn by a screen painter used in dialog programming?
Thanks a heap brother for writing back.
Regards,
Lucky
07-24-2009 5:36 AM
Hi,
If r1 ia radiobutton or any check Box , X indicates that user has selected that radio button or check Box.
If r1 = 'X' ,Verifies whether user has selected r1 or not.
Chk the Structure of the SCREEN table in SE11. U will get to know what are components its going to contain ,and how u can play
Screens.
Check the SAP Standard which was mentioned above and switch on to debugging mode .Analyse the behaviour of SCREEN table at runtime .U will get a clear picture then.
Regards,
Lakshman.
07-24-2009 5:42 AM
Hi,
In Dialog program you have to write the code in PBO to make any field disabled.
Something like this.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'field name1'.
screen-invisible = 1.
MODIFY SCREEN.
WHEN 'field name2'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'fieldname3'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
CASE screen-group1.
WHEN 'G1'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
for clearing screen in module pool
In PAI,
CASE sy-ucomm.
WHEN 'F_CLEAR'.
CLEAR : ZLOGIN116693-TITLE,
ZLOGIN116693-USERID,
ZLOGIN116693-FIRSTNAME,
ZLOGIN116693-LASTNAME,
ZLOGIN116693-DOB,
ZLOGIN116693-EMAIL,
ZLOGIN116693-OCCUPATION,
ZLOGIN116693-ADD1,
ZLOGIN116693-ADD2,
ZLOGIN116693-CITY,
ZLOGIN116693-PINCODE,
ZLOGIN116693-STATE,
ZLOGIN116693-COUNTRY,
ZLOGIN116693-TELEPHONE,
ZLOGIN116693-FAX,
ZLOGIN116693-MOBILE,
ZLOGIN116693-PSWD,
ZLOGIN116693-CPSWD.
CALL SCREEN 0003.
ENDCASE.
p_matnr type mard-matnr.
It means you are declaring a parameter of same type which the field matne has in mard table.
if r1 = 'X'. <--- what does an X signifies here?
Here X signifies that the radio button is checked.
if screen-name = 'P_MATNR'. <----can we have this p_matnr as same as that of title name of screen?
Yes you can.
Hope it clears all your doubts. Revert in case of any more doubts.
Thanks,
Sri.
07-24-2009 5:45 AM
Also could you explain something?
1. " group gr1 user-command uc1", -->this implies you are creating two radio buttons of same group so that only one of them can be selected at a time and user-command UC1 enables the group to be responding to the clicks on the buttons.
2. p_matnr type mard-matnr. --> whats the doubt here? its just a declaration
3. if r1 = 'X'. <--- what does an X signifies here? r1 = 'X' means the radio button R1 is selected. if its not selected the value of R1 will be ''. (blank)*
4. if screen-name = 'P_MATNR'. <----can we have this p_matnr as same as that of title name of screen?
screen-invisible = 0. its not the title but the NAME of the parameter as u have declared
any thing more needed?
thanks
Somu
07-24-2009 6:22 AM
Thanks a heap everyone!! hope i would now be able to play with screens.. thanks again everyone your help is much appericiated.
Regards,
Lucky
07-23-2009 4:05 PM
Hi,
Check the Dmeo program DEMO_CALL_SELECTION_SCREEN.
You can design the screen and call the screen in the start-of-selection.
07-24-2009 5:27 AM
07-24-2009 5:39 AM
Hi Lucky,
You have two scenarios when you talk of a screen:
1) In a selection screen: Here you use a "MODIF ID" and use that to display / hide screen fields.
For eg: parameters: v_para(10) type c modif id M1.
AT SELECTION-SCREEN OUTPUT.
This is the event for displaying / hiding screen elements.
loop at screen.
if screen-group1 = 'M1'.
screen-invisible = '1'. "Flag for visibility, 1 = invisible, 0 = visible
modify screen.
endif.
endloop.
2) In a module pool screen: Here you use the PBO event to define visibility.
First, specify a group in the layout mode for the screen element. Lets suppose group = 'M1'.
Then in PBO, write the same code as above.
NOTE! Always write MODIFY SCREEN, failing which you won't be able to change visibility of the objects.
Hope this helps! Do revert back if you need anything else!!
Cheers,
Shailesh
Always provide feedback for helpful answers!
07-24-2009 5:45 AM
USER-COMMAND GR1.
The purpose of user-command is if any user has clicked any radio button then event AT user-command is going to be triggered
SY-UCOMM is going to contain GR1
Regards,
Lakshman