How to create command button called 'Remarks' and Check box in ALV GRID?

Hi, Experts,
Requirement is: in the ALVE GRID report output, user select a record by clicking the check box and pressing the button 'Remarks' it will take me into other transaction from the output list.
Please help me out.
Reward points.
Sekhar

Hi Chandra Shekar,
Check the following sample program. 2 things to remember.
1. Check the callback subroutine PF_STATUS_SET and create PF status for the program.and also ur REMARKS button in the application tool. Comments are made every where wherever those are needed. After creating Pf status execute the report.
2.Once you select records by selecting checkboxes, u have to press on Refresh button( that is there on application toolbar), then only for selected records, CHECK field in the internal is updated. After that press on REMARKS button .
  REPORT zvenkat_alv_grid.
  TABLES:t001.
  "Types
  TYPES:
        BEGIN OF t_1001,
          check TYPE c,
          bukrs TYPE t001-bukrs,
          butxt TYPE t001-butxt,
          ort01 TYPE t001-ort01,
          land1 TYPE t001-land1,
        END OF t_1001.
  "Work area
  DATA:
        w_t001 TYPE t_1001.
  "Internal table
  DATA:
        i_t001 TYPE STANDARD TABLE OF t_1001.
  " ALV Declarations
* Types Pools
  TYPE-POOLS:
     slis.
* Types
  TYPES:
     t_fieldcat         TYPE slis_fieldcat_alv,
     t_events           TYPE slis_alv_event,
     t_layout           TYPE slis_layout_alv.
* Workareas
  DATA:
     w_fieldcat         TYPE t_fieldcat,
     w_events           TYPE t_events,
     w_layout           TYPE t_layout.
* Internal Tables
  DATA:
     i_fieldcat         TYPE STANDARD TABLE OF t_fieldcat,
     i_events           TYPE STANDARD TABLE OF t_events.
*&    start of selection
  START-OF-SELECTION.
    PERFORM get_data.
*&    end-of-selection.
  END-OF-SELECTION.
    PERFORM build_fieldcatlog.
    PERFORM build_events.
    PERFORM build_layout.
    PERFORM list_display.
*&      Form  get_data
  FORM get_data .
    SELECT bukrs
           butxt
           ort01
           land1
      FROM t001
      INTO CORRESPONDING FIELDS OF TABLE i_t001
      UP TO 30 ROWS.
  ENDFORM.                    " get_data
*&      Form  build_fieldcatlog
  FORM build_fieldcatlog .
    CLEAR:w_fieldcat,i_fieldcat[].
    PERFORM build_fcatalog USING:
             'CHECK' 'I_T001' ' ',
             'BUKRS' 'I_T001' 'BUKRS',
             'BUTXT' 'I_T001' 'BUTXT',
             'ORT01' 'I_T001' 'ORT01',
             'LAND1' 'I_T001' 'LAND1'.
  ENDFORM.                    "BUILD_FIELDCATLOG
*&      Form  BUILD_FCATALOG
  FORM build_fcatalog USING l_field l_tab l_text.
    w_fieldcat-fieldname      = l_field.
    w_fieldcat-tabname        = l_tab.
    w_fieldcat-seltext_m      = l_text.
    IF  l_field = 'CHECK'..
      w_fieldcat-checkbox = 'X'.
      w_fieldcat-edit     = 'X'.
    ENDIF.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
  ENDFORM.                    " build_fieldcatlog
*&      Form  build_events
*       text
  FORM build_events.
    CLEAR :
          w_events, i_events[].
    w_events-name = 'TOP_OF_PAGE'."Event Name
    w_events-form = 'TOP_OF_PAGE'."Callback event subroutine
    APPEND w_events TO i_events.
    CLEAR  w_events.
    w_events-name = 'USER_COMMAND' .
    w_events-form = 'USER_COMMAND' .
    APPEND w_events TO i_events.
    CLEAR w_events.
    w_events-name = 'PF_STATUS_SET' .
    w_events-form = 'PF_STATUS_SET' .
    APPEND w_events TO i_events.
    CLEAR w_events.
  ENDFORM.                    "build_events
*&      Form  build_layout
  FORM build_layout .
    w_layout-colwidth_optimize = 'X'.
    w_layout-zebra             = 'X'.
  ENDFORM.                    " build_layout
*&      Form  list_display
  FORM list_display .
    DATA:
          l_program TYPE sy-repid.
    l_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = l_program
        is_layout          = w_layout
        it_fieldcat        = i_fieldcat
        it_events          = i_events
      TABLES
        t_outtab           = i_t001
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ENDFORM.                    " list_display
*&      Form  top_of_page
  FORM top_of_page.
    DATA :
     li_header TYPE slis_t_listheader,
     w_header  LIKE LINE OF li_header.
    DATA:
          l_date TYPE char10.
    WRITE sy-datum TO l_date.
    w_header-typ  = 'H'.
    CONCATENATE sy-repid ':' 'From Date' l_date INTO w_header-info SEPARATED BY space.
    APPEND w_header TO li_header.
    CLEAR w_header.
    w_header-typ  = 'S'.
    w_header-info = sy-title.
    APPEND w_header TO li_header.
    CLEAR w_header.
    w_header-typ  = 'A'.
    w_header-info = sy-uname.
    APPEND w_header TO li_header.
    CLEAR w_header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary = li_header.
  ENDFORM.                    "top_of_page
*&      Form  pf_status_set
  FORM pf_status_set    USING extab TYPE slis_t_extab.
    "Procedure to set own pf-status.
    "1.Goto Transaction code SE41
    "2.give program = SAPLKKBL and status = STANDARD_FULLSCREEN.
    "3.Click on Application toolbar STATUS button
    "4.Give ur program name Status name that is to be used in the program using SET pf-status statement
    "5.Create ur button REMARKS.
    SET PF-STATUS 'STATUS1' EXCLUDING extab.
  ENDFORM.                    "pf_status_set
*&      Form  user_command
  FORM user_command USING ucomm LIKE sy-ucomm
                    selfield TYPE slis_selfield.
    CASE ucomm .
      WHEN 'REMARKS'."When u click on remarks button.
        LOOP AT i_t001 INTO w_t001 WHERE check = 'X'.
          WRITE :/ w_t001-bukrs, 'Checked'.
        ENDLOOP.
    ENDCASE.
  ENDFORM.                    "user_command
I hope that it helps u .
Regards,
Venkat.O

Similar Messages

  • How to get check box in alv grid list output

    hi gurus,
    can anyone inform me
    how to get check box in alv output it should not be a pop up window
    thank you
    regards
    kals.

    or
    hi go through the fallowing code.
    code*&----
    *& Report YGS_ALV_BOM *
    REPORT YGS_ALV_BOM .
    TABLES : MAST,STKO,STPO.
    TYPE-POOLS: SLIS.
    TYPES : BEGIN OF TY_MAST,
    CHECK_BOX,
    MATNR TYPE MAST-MATNR,
    WERKS TYPE MAST-WERKS,
    STLAN TYPE MAST-STLAN,
    STLNR TYPE MAST-STLNR,
    STLAL TYPE MAST-STLAL,
    END OF TY_MAST.
    TYPES : BEGIN OF TY_STKO,
    STLTY TYPE STKO-STLTY,
    STLNR TYPE STKO-STLNR,
    STLAL TYPE STKO-STLAL,
    STKOZ TYPE STKO-STKOZ,
    BMENG TYPE STKO-BMENG,
    BMEIN TYPE STKO-BMEIN,
    END OF TY_STKO.
    TYPES : BEGIN OF TY_STPO,
    LIGHTS,
    STLTY TYPE STPO-STLTY,
    STLNR TYPE STPO-STLNR,
    STLKN TYPE STPO-STLKN,
    STPOZ TYPE STPO-STPOZ,
    IDNRK TYPE STPO-IDNRK,
    MENGE TYPE STPO-MENGE,
    MEINS TYPE STPO-MEINS,
    END OF TY_STPO.
    DATA : IT_MAST TYPE TABLE OF TY_MAST,
    WA_MAST TYPE TY_MAST,
    IT_STKO TYPE TABLE OF TY_STKO,
    WA_STKO TYPE TY_STKO,
    IT_STPO TYPE TABLE OF TY_STPO,
    WA_STPO TYPE TY_STPO.
    DATA : lt_fieldcat TYPE slis_t_fieldcat_alv,
    ls_layout TYPE slis_layout_alv,
    ls_event TYPE slis_alv_event,
    lt_event TYPE slis_t_event,
    it_sortinfo type slis_t_sortinfo_alv,
    ls_header TYPE slis_listheader,
    lt_header TYPE slis_t_listHEADER.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    SELECT-OPTIONS : S_MATNR FOR MAST-MATNR.
    START-OF-SELECTION.
    PERFORM GET_DATA.
    PERFORM BUILD_FIELDCAT USING LT_FIELDCAT.
    PERFORM BUILD_LAYOUT.
    END-OF-SELECTION.
    PERFORM DISPLAY_DATA.
    *& Form GET_DATA
    text
    --> p1 text
    <-- p2 text
    form GET_DATA .
    REFRESH : IT_MAST.
    SELECT MATNR
    WERKS
    STLAN
    STLNR
    FROM MAST
    INTO CORRESPONDING FIELDS OF TABLE IT_MAST
    WHERE MATNR IN S_MATNR.
    endform. " GET_DATA
    *& Form BUILD_FIELDCAT
    text
    --> p1 text
    <-- p2 text
    form BUILD_FIELDCAT USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 1.
    L_FIELDCAT-FIELDNAME = 'MATNR'.
    L_FIELDCAT-TABNAME = 'IT_MAST'.
    L_FIELDCAT-REF_FIELDNAME = 'MATNR'.
    L_FIELDCAT-REF_TABNAME = 'MAST'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 2.
    L_FIELDCAT-FIELDNAME = 'WERKS'.
    L_FIELDCAT-TABNAME = 'IT_MAST'.
    L_FIELDCAT-REF_FIELDNAME = 'WERKS'.
    L_FIELDCAT-REF_TABNAME = 'MAST'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 3.
    L_FIELDCAT-FIELDNAME = 'STLNR'.
    L_FIELDCAT-TABNAME = 'IT_MAST'.
    L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
    L_FIELDCAT-REF_TABNAME = 'MAST'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform. " BUILD_FIELDCAT
    *& Form BUILD_LAYOUT
    text
    --> p1 text
    <-- p2 text
    form BUILD_LAYOUT .
    CLEAR LS_LAYOUT.
    LS_LAYOUT-BOX_FIELDNAME = 'CHECK_BOX'.
    LS_LAYOUT-BOX_TABNAME = 'IT_MAST'.
    endform. " BUILD_LAYOUT
    *& Form DISPLAY_DATA
    text
    --> p1 text
    <-- p2 text
    form DISPLAY_DATA .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    I_STRUCTURE_NAME =
    IS_LAYOUT = LS_LAYOUT
    IT_FIELDCAT = LT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = IT_MAST
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform. " DISPLAY_DATA
    FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'YSTATUS' OF PROGRAM SY-REPID
    EXCLUDING RT_EXTAB.
    ENDFORM.
    FORM USER_COMMAND USING RF_UCOMM TYPE SY-UCOMM
    SELFIELD TYPE SLIS_SELFIELD.
    CASE RF_UCOMM.
    WHEN '&NEXT'.
    PERFORM GET_DATA_BOM .
    PERFORM BUILD_FIELDCAT_BOM USING LT_FIELDCAT.
    PERFORM BUILD_LAYOUT_BOM.
    PERFORM DISPLAY_DATA_BOM.
    ENDCASE.
    ENDFORM.
    *& Form GET_DATA_BOM
    text
    --> p1 text
    <-- p2 text
    form GET_DATA_BOM .
    CLEAR : WA_STPO,
    WA_MAST.
    REFRESH : IT_STPO.
    DATA : IT_CHECK TYPE TABLE OF TY_MAST.
    LOOP AT IT_MAST INTO WA_MAST.
    IF WA_MAST-CHECK_BOX EQ 'X'.
    APPEND WA_MAST TO IT_CHECK.
    ENDIF.
    ENDLOOP.
    SELECT STLTY
    STLNR
    STLKN
    VGKNT
    IDNRK
    MENGE
    MEINS
    FROM STPO
    INTO CORRESPONDING FIELDS OF TABLE IT_STPO
    FOR ALL ENTRIES IN IT_CHECK
    WHERE IDNRK EQ IT_CHECK-MATNR.
    CLEAR WA_STPO.
    LOOP AT IT_STPO INTO WA_STPO.
    SELECT SINGLE * FROM MAST WHERE MATNR EQ WA_STPO-IDNRK.
    IF SY-SUBRC = 0.
    WA_STPO-LIGHTS = '2'.
    ELSE.
    WA_STPO-LIGHTS = '1'.
    ENDIF.
    MODIFY IT_STPO FROM WA_STPO.
    ENDLOOP.
    endform. " GET_DATA_BOM
    *& Form BUILD_FIELDCAT_BOM
    text
    --> p1 text
    <-- p2 text
    form BUILD_FIELDCAT_BOM USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 1.
    L_FIELDCAT-FIELDNAME = 'STLTY'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'STLTY'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 2.
    L_FIELDCAT-FIELDNAME = 'STLNR'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 3.
    L_FIELDCAT-FIELDNAME = 'STLKN'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'STLKN'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 4.
    L_FIELDCAT-FIELDNAME = 'IDNRK'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'IDNRK'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    L_FIELDCAT-COL_POS = 5.
    L_FIELDCAT-FIELDNAME = 'MENGE'.
    L_FIELDCAT-TABNAME = 'IT_STPO'.
    L_FIELDCAT-REF_FIELDNAME = 'MENGE'.
    L_FIELDCAT-REF_TABNAME = 'STPO'.
    APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform. " BUILD_FIELDCAT_BOM
    *& Form BUILD_LAYOUT_BOM
    text
    --> p1 text
    *<-- p2 text
    form BUILD_LAYOUT_BOM .
    CLEAR : LS_LAYOUT.
    LS_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
    LS_LAYOUT-LIGHTS_TABNAME = 'IT_STPO'.
    endform. " BUILD_LAYOUT_BOM
    *& Form DISPLAY_DATA_BOM
    text
    --> p1 text
    <-- p2 text
    form DISPLAY_DATA_BOM .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND_BOM'
    I_CALLBACK_TOP_OF_PAGE = 'TOP9'
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = 'ALV_BACKGROUND'
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    IS_LAYOUT = LS_LAYOUT
    IT_FIELDCAT = LT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IT_ALV_GRAPHICS =
    IT_HYPERLINK =
    IT_ADD_FIELDCAT =
    IT_EXCEPT_QINFO =
    I_HTML_HEIGHT_TOP =
    I_HTML_HEIGHT_END =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = IT_STPO
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform. " DISPLAY_DATA_BOM
    FORM TOP9 .
    CLEAR LS_HEADER.
    REFRESH LT_HEADER.
    LS_HEADER-TYP = 'H'.
    LS_HEADER-INFO = 'BILL OF MATERIALS'.
    APPEND LS_HEADER TO LT_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = LT_HEADER
    I_LOGO = 'ENJOYSAP_LOGO'
    I_END_OF_LIST_GRID =
    ENDFORM.
    FORM USER_COMMAND_BOM USING RF_UCOMM_BOM LIKE SY-UCOMM
    SEL_FIELD TYPE SLIS_SELFIELD.
    CASE RF_UCOMM_BOM.
    WHEN '&IC1'.
    SET PARAMETER ID 'MAT' FIELD WA_STPO-IDNRK.
    SET PARAMETER ID 'WRK' FIELD WA_MAST-WERKS.
    SET PARAMETER ID 'CSA' FIELD WA_MAST-STLAN.
    CALL TRANSACTION 'CS03' AND SKIP FIRST SCREEN.
    ENDCASE.[/code]

  • How to show check box in ALV grid??

    Hi All,
         I am using an option edit in the feild catalogue which allows me to change the values in a few columns in the ALV list.
    What I want is to be able to show a check box in a few columns which user can check and use the value X in the program for the later processing....
    Can somebody tell me how to show a check box in the ALV screen in the changeable format??
    Win full point by answering this typical question..
    Thanks - Chandan

    hi go through the fallowing code.
    *& Report  YGS_ALV_BOM                                                 *
    REPORT  YGS_ALV_BOM                             .
    TABLES : MAST,STKO,STPO.
    TYPE-POOLS: SLIS.
    TYPES : BEGIN OF TY_MAST,
            CHECK_BOX,
            MATNR TYPE MAST-MATNR,
            WERKS TYPE MAST-WERKS,
            STLAN TYPE MAST-STLAN,
            STLNR TYPE MAST-STLNR,
            STLAL TYPE MAST-STLAL,
            END OF TY_MAST.
    TYPES : BEGIN OF TY_STKO,
            STLTY TYPE STKO-STLTY,
            STLNR TYPE STKO-STLNR,
            STLAL TYPE STKO-STLAL,
            STKOZ TYPE STKO-STKOZ,
            BMENG TYPE STKO-BMENG,
            BMEIN TYPE STKO-BMEIN,
            END OF TY_STKO.
    TYPES : BEGIN OF TY_STPO,
            LIGHTS,
            STLTY TYPE STPO-STLTY,
            STLNR TYPE STPO-STLNR,
            STLKN TYPE STPO-STLKN,
            STPOZ TYPE STPO-STPOZ,
            IDNRK TYPE STPO-IDNRK,
            MENGE TYPE STPO-MENGE,
            MEINS TYPE STPO-MEINS,
            END OF TY_STPO.
    DATA : IT_MAST TYPE TABLE OF TY_MAST,
           WA_MAST TYPE TY_MAST,
           IT_STKO TYPE TABLE OF TY_STKO,
           WA_STKO TYPE TY_STKO,
           IT_STPO TYPE TABLE OF TY_STPO,
           WA_STPO TYPE TY_STPO.
    DATA : lt_fieldcat TYPE slis_t_fieldcat_alv,
           ls_layout TYPE slis_layout_alv,
           ls_event TYPE slis_alv_event,
           lt_event TYPE slis_t_event,
           it_sortinfo type slis_t_sortinfo_alv,
           ls_header TYPE slis_listheader,
           lt_header TYPE slis_t_listHEADER.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    SELECT-OPTIONS : S_MATNR FOR MAST-MATNR.
    START-OF-SELECTION.
    PERFORM GET_DATA.
    PERFORM BUILD_FIELDCAT USING LT_FIELDCAT.
    PERFORM BUILD_LAYOUT.
    END-OF-SELECTION.
    PERFORM DISPLAY_DATA.
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form GET_DATA .
    REFRESH : IT_MAST.
    SELECT MATNR
           WERKS
           STLAN
           STLNR
      FROM MAST
      INTO CORRESPONDING FIELDS OF TABLE IT_MAST
    WHERE MATNR IN S_MATNR.
    endform.                    " GET_DATA
    *&      Form  BUILD_FIELDCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form BUILD_FIELDCAT USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA  : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 1.
            L_FIELDCAT-FIELDNAME = 'MATNR'.
            L_FIELDCAT-TABNAME = 'IT_MAST'.
            L_FIELDCAT-REF_FIELDNAME = 'MATNR'.
            L_FIELDCAT-REF_TABNAME = 'MAST'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 2.
            L_FIELDCAT-FIELDNAME = 'WERKS'.
            L_FIELDCAT-TABNAME = 'IT_MAST'.
            L_FIELDCAT-REF_FIELDNAME = 'WERKS'.
            L_FIELDCAT-REF_TABNAME = 'MAST'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 3.
            L_FIELDCAT-FIELDNAME = 'STLNR'.
            L_FIELDCAT-TABNAME = 'IT_MAST'.
            L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
            L_FIELDCAT-REF_TABNAME = 'MAST'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform.                    " BUILD_FIELDCAT
    *&      Form  BUILD_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form BUILD_LAYOUT .
    CLEAR LS_LAYOUT.
    LS_LAYOUT-BOX_FIELDNAME = 'CHECK_BOX'.
    LS_LAYOUT-BOX_TABNAME =  'IT_MAST'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form DISPLAY_DATA .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET       = 'PF_STATUS'
       I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
    *   I_STRUCTURE_NAME               =
       IS_LAYOUT                      = LS_LAYOUT
       IT_FIELDCAT                    = LT_FIELDCAT
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
    *   IT_SORT                        =
    *   IT_FILTER                      =
    *   IS_SEL_HIDE                    =
    *   I_DEFAULT                      = 'X'
    *   I_SAVE                         = ' '
    *   IS_VARIANT                     =
    *   IT_EVENTS                      =
    *   IT_EVENT_EXIT                  =
    *   IS_PRINT                       =
    *   IS_REPREP_ID                   =
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE            = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        =
    *   ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = IT_MAST
    * EXCEPTIONS
    *   PROGRAM_ERROR                  = 1
    *   OTHERS                         = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " DISPLAY_DATA
    FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'YSTATUS' OF PROGRAM SY-REPID
                               EXCLUDING RT_EXTAB.
    ENDFORM.
    FORM USER_COMMAND USING RF_UCOMM TYPE SY-UCOMM
                      SELFIELD TYPE SLIS_SELFIELD.
      CASE RF_UCOMM.
          WHEN '&NEXT'.
           PERFORM GET_DATA_BOM .
           PERFORM BUILD_FIELDCAT_BOM USING LT_FIELDCAT.
           PERFORM BUILD_LAYOUT_BOM.
           PERFORM DISPLAY_DATA_BOM.
      ENDCASE.
    ENDFORM.
    *&      Form  GET_DATA_BOM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form GET_DATA_BOM .
      CLEAR   : WA_STPO,
                WA_MAST.
      REFRESH : IT_STPO.
      DATA  : IT_CHECK TYPE TABLE OF TY_MAST.
      LOOP AT IT_MAST INTO WA_MAST.
          IF WA_MAST-CHECK_BOX EQ 'X'.
             APPEND WA_MAST TO IT_CHECK.
          ENDIF.
      ENDLOOP.
      SELECT STLTY
             STLNR
             STLKN
             VGKNT
             IDNRK
             MENGE
             MEINS
        FROM STPO
        INTO CORRESPONDING FIELDS OF TABLE IT_STPO
         FOR ALL ENTRIES IN IT_CHECK
       WHERE IDNRK EQ IT_CHECK-MATNR.
    CLEAR WA_STPO.
       LOOP AT IT_STPO INTO WA_STPO.
         SELECT SINGLE * FROM MAST WHERE MATNR EQ WA_STPO-IDNRK.
         IF SY-SUBRC = 0.
           WA_STPO-LIGHTS = '2'.
         ELSE.
           WA_STPO-LIGHTS = '1'.
         ENDIF.
         MODIFY IT_STPO FROM WA_STPO.
       ENDLOOP.
    endform.                    " GET_DATA_BOM
    *&      Form  BUILD_FIELDCAT_BOM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form BUILD_FIELDCAT_BOM USING LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA  : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    REFRESH : LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 1.
            L_FIELDCAT-FIELDNAME = 'STLTY'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'STLTY'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 2.
            L_FIELDCAT-FIELDNAME = 'STLNR'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'STLNR'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 3.
            L_FIELDCAT-FIELDNAME = 'STLKN'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'STLKN'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 4.
            L_FIELDCAT-FIELDNAME = 'IDNRK'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'IDNRK'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
            L_FIELDCAT-COL_POS = 5.
            L_FIELDCAT-FIELDNAME = 'MENGE'.
            L_FIELDCAT-TABNAME = 'IT_STPO'.
            L_FIELDCAT-REF_FIELDNAME = 'MENGE'.
            L_FIELDCAT-REF_TABNAME = 'STPO'.
            APPEND L_FIELDCAT TO LT_FIELDCAT.
    endform.                    " BUILD_FIELDCAT_BOM
    *&      Form  BUILD_LAYOUT_BOM
    *      text
    * -->  p1        text
    *<--  p2        text
    form BUILD_LAYOUT_BOM .
    CLEAR  : LS_LAYOUT.
    LS_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
    LS_LAYOUT-LIGHTS_TABNAME = 'IT_STPO'.
    endform.                    " BUILD_LAYOUT_BOM
    *&      Form  DISPLAY_DATA_BOM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form DISPLAY_DATA_BOM .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND_BOM'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP9'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = 'ALV_BACKGROUND'
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                         = LS_LAYOUT
       IT_FIELDCAT                       = LT_FIELDCAT
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = IT_STPO
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " DISPLAY_DATA_BOM
    FORM TOP9 .
    CLEAR   LS_HEADER.
    REFRESH  LT_HEADER.
    LS_HEADER-TYP = 'H'.
    LS_HEADER-INFO = 'BILL OF MATERIALS'.
    APPEND LS_HEADER TO LT_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = LT_HEADER
       I_LOGO                   = 'ENJOYSAP_LOGO'
    *   I_END_OF_LIST_GRID       =
    ENDFORM.
    FORM USER_COMMAND_BOM USING RF_UCOMM_BOM LIKE SY-UCOMM
                      SEL_FIELD TYPE SLIS_SELFIELD.
        CASE RF_UCOMM_BOM.
          WHEN '&IC1'.
          SET PARAMETER ID 'MAT' FIELD WA_STPO-IDNRK.
          SET PARAMETER ID 'WRK' FIELD WA_MAST-WERKS.
          SET PARAMETER ID 'CSA' FIELD WA_MAST-STLAN.
          CALL TRANSACTION 'CS03' AND SKIP FIRST SCREEN.
        ENDCASE.

  • How to add a check box in ALV Grid using SAP R/3 release 4.6b?

    Hello everyone,
    I hope you all fine.
    I'm writing because I have a requirement with ALV Grid,  what I need to do, is to insert a checkbox into a cell, I already read the forum to know how to do that, but I'm using a SAP R/3 release 4.6b, and when I execute the program the checkbox is displayed greyout,  because this release doesn't have the EDIT property into the slis_t_fieldcat_alv.
    Does any body know how to enable the checkbox cell in the ALV Grid for this release?, so it will allow the user to mark the desired rows.
    I'll really appreciate if you guys could help me to find a solution.
    Thanks for your time.
    Regards,
    Guillermo

    Hi,
    if you need just a check box for each line, try to get rid of this line from your layout.
    g_layout-box_fieldname = 'ZZCHECK'.
    SAP uses this field to store info about selected lines. Hence you click on the second check box, you select different line and the first line is erased. You can select more line by holding SHIFT + CTRL
    Cheers

  • Re: creating check boxes in ALV grid using web dynpro

    Hi Techies,
       I need to have a check box column in alv grid, and it should allow me to select the check box and the selected row has to be updated in the database.
      Kindly assist me with the steps to handle the above mentioned scenario
    Thanks in advance.

    Now to first make the last column of my ALV as a checkbox:
    method BUILD_ALV .
      data: l_ref_cmp_usage type ref to if_wd_component_usage.
    " Instantiate the ALV usage
      l_ref_cmp_usage =   wd_This->wd_CpUse_My_Alv( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
    " Get reference to the model
      DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
      l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_My_Alv( ).
      data: lr_config type ref to Cl_Salv_Wd_Config_Table.
      lr_config = l_ref_INTERFACECONTROLLER->Get_Model( ).
    |" Set read only mode to false (and display edit toolbar)
      lr_config->if_salv_wd_table_settings~set_read_only( abap_false ).
      data: lr_table_settings type ref to if_salv_wd_table_settings.
      lr_table_settings ?= lr_config.
      lr_table_settings->set_read_only( abap_false ).
      data: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lt_columns         TYPE        salv_wd_t_column_ref,
            lr_checkbox1        TYPE REF TO cl_salv_wd_uie_checkbox,
            lr_checkbox2        TYPE REF TO cl_salv_wd_uie_checkbox.
      FIELD-SYMBOLS <fs_column> LIKE LINE OF lt_columns.
    "  Embed the UI elements within the ALV
      lr_column_settings ?= lr_config.
      lt_columns = lr_column_settings->get_columns( ).
    " Embed an checkbox within the column APPROVE
      LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'APPROVE'.
            CREATE OBJECT lr_checkbox1
              EXPORTING
                checked_fieldname = <fs_column>-id.
            <fs_column>-r_column->set_cell_editor( lr_checkbox1 ).
            FREE lr_checkbox1.
        ENDCASE.
      ENDLOOP.
    ENDMETHOD.                    "BUILD_ALV

  • How to Create Dynamic button at runtime and save it by using c#?

    Hi All,
    Can someone please provide me code to create button dynamically at runtime and save it permanently?
    Your quick help is appreciable.
    regards,
    Sourabh

    You cant add controls to the visual tree a runtime which persist beyond the lifetime of the application.  You will have to persist an indicator to your program which tells it to add the control.  Adding a control is as simple as initializing
    it and adding it to a parent already on the tree.  Controls can be created programmatically or using the XamlReader.Load static method.  You can find XamReader.Load in Windows.UI.Xaml.Markup in windows 8.1, Windows 8.1/Windows Phone unified
    projects.  For old windows phone ad just Silverlight I believe it is in System.Windows.Markup.
    Hope this helps.

  • How to create a field with combo or check box group in a form

    1 - i created a database table messages (sender_name , date , message_type , message_body)
    message type accept only COMPLAINT , SUGESSTION OR OPENION
    2 - I created a form which has a field called message_type
    3 - i want the message type appear in the runtime as a checkbox group or as combo box (with values COMPLAINT , SUGESSTION OR OPENION)
    PLEASE GUIDE ME STEP BY STEP TO DEVELOP IT
    Regards
    Mohamed Hammed

    Hi,
    You can create another table to hold the unique values COMPLAINT, SUGESSTION and OPINION. You can then dynamically query this table in a Dynamic Page & construct the HTML code within a function like this :-
    CREATE OR REPLACE FUNCTION FN_GET_RADIO_OPTIONS
    RETURN VARCHAR2
    AS
    ln_return_html VARCHAR2(32767);
    BEGIN
    FOR rec IN ( SELECT ROWNUM,MESSAGE_TYPE FROM SCOTT.MESSAGES_TYPES )
    LOOP
    ln_return_html := ln_return_html || '<INPUT TYPE=RADIO NAME=rd'||rec.ROWNUM||' VALUE='||rec.MESSAGE_TYPE||' />';
    END LOOP;
    RETURN ln_return_html;
    END;
    /You can then get something out of Dynamic Page like this :-
    <ORACLE>
    DECLARE
    ln_SQL VARCHAR2(32767);
    BEGIN
    ln_SQL:= FN_GET_RADIO_OPTIONS;
    HTP.P(ln_SQL);
    END;
    </ORACLE>Of course, you do the same in a million other ways - using Java, etc - this is just an example to give you an idea.
    Regards,
    Sandeep

  • Pack and Integer type in ALV grid

    Hello,
    Can anyone give a small example of how to display fields of type I and P in an ALV grid. Using the alv grid FM and manually filling the fieldcatalog.
    Thanks for your help.

    Hi Moussa Khelifi  ,
    u can manually fill fieldcatalog like this..
    form manual_filling_fieldcatalog.
    X_FIELDCAT-FIELDNAME = 'ATWRT'.
    X_FIELDCAT-TABNAME   = 'TB_FINAL'.
    X_FIELDCAT-SELTEXT_L = 'Source of Supply'(001).
    X_FIELDCAT-DDICTXT   =  L_DDICTXT.
    X_FIELDCAT-FIELDNAME = 'MATNR'.
    X_FIELDCAT-TABNAME   = 'TB_FINAL'.
    X_FIELDCAT-SELTEXT_L = 'MATERIAL'(002).
    X_FIELDCAT-DDICTXT   =  L_DDICTXT.
    APPEND X_FIELDCAT TO TB_FIELDCAT .
    endform.
    u can directly pass the table to 'REUSE_ALV_GRID_DISPLAY'
    regardless of type p or i fields in it.
    Regards,
    kiran B

  • How to create a button which unloads an iFrame and puts in its position another iFrame?

    How to create a button which unloads an iFrame and puts in its position another iFrame?
    It is very important for me if anyone could answer...
    Thank you all in advance,
    Frank

    Ok I found it!!

  • How to create custom button by amending template in sc and change po screen

    Hi,
    Can anybody tell the steps that How to create custom button by amending the template  in shopping cart or change purchase order screen.
    Full points for the answer.
    Edited by: shraman saha on Aug 17, 2008 6:44 PM

    Hi,
    I dont have any idea what you mean by Template for "Change Purchase Order" functionality. As far as i know there is a change button on the screen using which we go to the change mode and edit the PO.
    About your other query: you do not require to download any HTML pages. To see the templates for PO go through the following path:
    Transaction SE80 --> Internet options --> in the drop-down enter BBP_POC (for PO) --> Topic 99 --> HTML templates.
    Then look for the following templates :
    SAPLBBP_PO_UI_ITS 3000  --> for header basic data
    SAPLBBP_PO_UI_ITS 4000  --> for item overview
    SAPLBBP_PO_UI_ITS 4100  --> for item basic data
    SAPLBBP_PO_UI_ITS 2200  --> for buttons.
    Make appropriate changes to the screen and then publish it before using it. It is just like activating objects.
    Hope this helps.
    Thanks,
    Pradeep

  • How to create SAVE button in Workbook using BI IP Functionality

    Hi All,
    I have Real-time Infocube (ZCUBSDID) with me. Planning has been done on the cube using BI-IP (like Aggregation level, filter, planning function and planning sequence are present there).
    As an Input i have everything in Quality system like I can access query in Bex Anlyzer (Input Ready Query) and also i have workbook associated with the query. SAVE button is also present on workbook which is giving result based on fiscal year and version.
    Now my task is to create workbook on Development system with the same functionality as Quality System.
    I have same Query available on DEV system also. I created new  Workbook but SAVE button is not available in my workbook.
    Can anyone suggest how to create SAVE button in my new workbook.
    I am new in IP side so please let me know if i can get any help from workbook which is already present in Quality system.
    Which type of analysis i should do to come out with solution.....otherwise let me know step by step procedure to create SAVE button on workbook using BI-IP functionality.
    It will be great help. My advance thanks goes to you people.
    Thanks,
    Rupali Singh

    Check points 19 & 20 on this link http://help.sap.com/saphelp_nw2004s/helpdata/en/43/a033e0f56e21b5e10000000a1553f6/frameset.htm.
    Command to be called on SAVE button is SAVE_AREA as explained in the point 20.
    Regards,
    Deepti

  • How to create a gui pf status and guititle in module pool programming?

    hi frnds,
    how to create a gui pf status and gui title in module pool programming?
    my problem is i created a screen and wen execute the screen by a tcode.am nt able to activate SAVE BACK EXIT CANCEL COMMANDS?.how to do this can any one explain in detail procedure?
    plz gve step by step process.

    Hi,
    For Title:In PBO...just write
    SET TITLEBAR 'ZTITLE'.
    double click on 'ZTITLE'....give whatever title u want...save it...activate...and check...reward points if useful...
    PF means FUNCTION CODE
    ex; set pf-status 'zrstatus'.
    double click on the zrstatus expand the application server ,
    at the time of execution the default menu(ie system,help),application toolbar buttons like enter,help etc and function keys(by default there will be no function keys)as are there on the normal
    will appear on the screen.
    Details:
    PF-STATUS is used to set the GUI Status of a screen, ie you can control the options on your menu bar, application toolbar, the function keys assigned to various options etc.
    Implementing the status for a screen can be done in 2 ways:
    1) Create the GUI status using the object list of the program or by using the transaction SE41. Then, assign it to the screen using SET PF-STATUS statement.
    2) Create the GUI status by means of forward navigation, ie, use the SET PF-STATUS 'XXX' statement where 'XXX' is the name of the GUI status and double click on it to create it.
    Status names can have a maximum of 20 characters.
    After assigning a GUI status to a screen, this is inherited to all subsequent screens. In order to have a different status for each of the subsequent screens, you have to set a separate status for each screen.
    In transaction SE41,
    1) Give the program name and the status name and click on the Create button.
    2) Go to 'Function keys' and expand.
    3) On top of the save icon type SAVE, on top of the back icon type BACK, on top the the exit icon type EXIT etc ie on top of all the icons that you want to use, type the respective names that you want to give.
    Whatever you have typed now becomes the function codes of these icons and can be used in your program.
    For example you have a screen 100.
    In the 'Element list' tab of the screen, give "ok_code" as the name where "OK" is the type of screen element. Activate screen.
    The flow logic for the screen looks like this:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    Create the modules STATUS_0100 and USER_COMMAND_0100 in the main program by simply double clicking on them.
    The code for these modules can be something like this:
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'Example'. "Example is the name of the GUI status
    ENDMODULE.
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'SAVE'.
    "call a subroutine to save the data or give statements to save data.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.
    Regards,
    Shiva Kumar (Reward If helpful)

  • How to create a routine call in FM (FI Module)

    How to create a routine call in FM (FI Module)

    Anu,
    I've attached a really short example that does something like what you're talking about.  It just compares the user's username and password a pre-determined username and password and then "logs the user in" based on that comparison.  Like Greycat said, you probably want to store this username and password info in some sort of file on the PDA that's in an encrypted format for both security and flexibility of your application.
    I hope this helps,
    Justin D.
    Applications Engineer
    National Instruments
    Attachments:
    LoginVI.vi ‏17 KB

  • How to create a Templates for Categories and Products In BCC

    Hi All,
    Could you please tell me How to create a Templates for Categories and Products In BCC and how Can I get those Templates details(Categories and Products)in jsp
    If possible can any one send the document or where we find in atg docs
    Regards,

    At product/category/sku level there is a property called template.
    Find the property in ACC/BCC and provide all the values including the URL property.
    In you jsp, you can use this property from product/sku like the way you retrieve any other property from sku/product.
    <dsp:valueof param="product.template.URL" />
    Using that property with <dsp:include> includes that page.
    Peace
    Shaik

  • How to create a barcode in scripts and smartforms

    hi
    how to create a barcode in scripts and smartforms

    Hi,
    For Script:
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool. 
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research - 
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes. 
    - Thirdly, you can buy a third party software like Barcode.dll and install on your frontend PC connected to the laser printer.
    Now you have a barcode printed - what next?
    Well there are two options, depending on your business requirements:
    - You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
    - Another solution is to use SAPConsole transactions
    or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor. 
    These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.
    For SmartForm:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Regards,
    Bhaskar

Maybe you are looking for

  • Graphs not rendering in IE 7.0 but perfectly shown in Firefox after SSL

    Hi All, I am facing a problem. I have two instances 1) Stage instance - SSO wired but not SSL verified. Reports + Graphs are rendered properly in IE 7.0 and firefox For deployment from stage to production, we copied Repository and the web catalog fol

  • Entitlement Setting in 4.0 Portal Tools Keeps Blowing Up

    When we try to create an empty WLCS database (empty except for the required data), run an EBCC sync (to get all of the configuration files into the database, and then try to set page entitlements we get an exception. Any help would be appreciated as

  • Archiving entourage emails as pdf with applescript

    Hello, I would like to archive all my emails in a flexible format that doesnt need entourage to read them. I would like to save all my emails in entourage to PDF. does anyone have a script that can do this? I can do this individaully by just selectin

  • As5350 one voip dial-peer to 2 IP address?

    Is there any way to configure AS5350 so that one voip dial-peer can point to 2 different Ip address, one for primary, one for backup? so when primary is down, the traffic can be sent to backup automatically? BTW, I do not have GK. those 2 IP for redu

  • Custon workflows in OIM

    Hi all, We have a requirement to develop custom workflows wherein administrator should be able to request a resource for anyuser from Myrequests section of admin console. When he clicks on the link, and selects the user then based on the group user i