2008 Jul 24 7:45 AM
Hello gurus ,
guru I want to make a selection screen like fint tcode . suppose I have two button one is open and another is close , when user will press the open button one bolck will come wih close button and open button will disappear , and viceversa . Just like FINT .
How to do , if any one have any sample prog plz healp .
I am waiting for your valuable reply .
Regards ,
Joy .
2008 Jul 24 7:54 AM
hi,
You can modify the selection-screen properties so that it will work like fint transaction. For getting the push buttons on the screen refer to the following documentation and example. You can use the event at selection-screen for modifying their properties based on ucomm value.
Pushbuttons on the Selection Screen
To create a pushbutton on the selection screen, you use:
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
<push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREEN event.
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
This example defines four pushbuttons on a selection screen that is displayed as a dialog box. The selection screen is defined in a statement chain for keyword SELECTION-SCREEN.
Regards,
Veeresh
2008 Jul 24 7:54 AM
hi,
You can modify the selection-screen properties so that it will work like fint transaction. For getting the push buttons on the screen refer to the following documentation and example. You can use the event at selection-screen for modifying their properties based on ucomm value.
Pushbuttons on the Selection Screen
To create a pushbutton on the selection screen, you use:
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
<push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREEN event.
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
This example defines four pushbuttons on a selection screen that is displayed as a dialog box. The selection screen is defined in a statement chain for keyword SELECTION-SCREEN.
Regards,
Veeresh
2008 Jul 24 8:01 AM
Hi , Thanks for your reply . But I dnt like to show close button at first and expansion screen .
1 . First one button will be there open .
2 . When I wl click the open button open button will disappear and expansion screen will come and close button will come .
3 when I click into close , close wll disappear and open button will come .
This is happening in FINT .
Joy .