Friday, March 18, 2011

Push Button in Selection Screen

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-SCREENFUNCTION 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.



1 comment: