A sample program to create Push Button in Selection Screen.
REPORT Ypushbutton.
TYPE-POOLS icon.
TABLES sscrfields.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: p_carrid TYPE s_ carr_id,
p_cityfr TYPE s_ from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
function key 3.
INITIALIZATION.
functxt-icon_id = icon_ws_ plane.
functxt-quickinfo = ' Preselected Carrier'.
functxt-icon_text = 'LH'.
sscrfields-functxt_01 = functxt.
functxt-icon_text = 'UA'.
sscrfields-functxt_02 = functxt.
functxt-icon_id = ICON_ GREEN_LIGHT.
functxt-quickinfo = 'Lights' .
functxt-icon_text = 'Naresh' .
sscrfields-functxt_03 = functxt.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'..
WHEN OTHERS.
....
ENDCASE.
START-OF-SELECTION.
REPORT Ypushbutton.
TYPE-POOLS icon.
TABLES sscrfields.
DATA functxt TYPE smp_dyntxt.
PARAMETERS: p_carrid TYPE s_
p_cityfr TYPE s_
SELECTION-SCREEN: FUNCTION KEY
FUNCTION KEY
function key
INITIALIZATION.
functxt-icon_id = icon_ws_
functxt-quickinfo = '
functxt-icon_text = 'LH'.
sscrfields-functxt_01 =
functxt-icon_text = 'UA'.
sscrfields-functxt_02 =
functxt-icon_id = ICON_
functxt-quickinfo = 'Lights'
functxt-icon_text = 'Naresh'
sscrfields-functxt_03 =
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'..
WHEN OTHERS.
....
ENDCASE.
START-OF-SELECTION.
Thanks Naresh
ReplyDelete