2008 Mar 19 5:26 AM
TABLES sscrfields.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
sscrfields-functxt_01 = 'LH'.
sscrfields-functxt_02 = 'UA'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
ENDCASE.
START-OF-SELECTION.
WRITE / 'START-OF-SELECTION'.
hey in the above program , how to keep the icons and text for the push buttons using the structure smp_dyntxt.
its very urgent . help me out.
2008 Mar 19 5:31 AM
Hi,
try like this.
TABLES sscrfields.
TYPE-POOLS:icon.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
CONCATENATE ICON_CHECKED 'LH' INTO sscrfields-functxt_01 separated by space.
CONCATENATE ICON_INCOMPLETE 'UA' INTO sscrfields-functxt_02 separated by space.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
ENDCASE.
START-OF-SELECTION.
WRITE / 'START-OF-SELECTION'.
rgds,
bharat.
2008 Mar 19 5:46 AM
hi
thank u , for giving that answer.
and can u tell me how to use that structure smp_dyntxt along with the function key.
2008 Mar 19 5:47 AM
hi
thank u , for giving that answer.
and can u tell me how to use that structure smp_dyntxt along with the function key.
2008 Mar 19 6:02 AM
Hi,
refer to this link
http://help.sap.com/saphelp_erp2004/helpdata/en/d1/801e3a454211d189710000e8322d00/content.htm
rgds,
bharat.
2008 Mar 19 5:35 AM
Hi,
There is no need to check another structure,,
in your current program ,do the following changes,
INITIALIZATION.
sscrfields-functxt_01 = '@o1@' " give icon id.
sscrfields-functxt_02 = '@02@'.
Regards,
Talwinder
2008 Mar 19 5:39 AM
Hi,
see the example.
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.