How to create a program in alv.

Hi Experts,
I am new to Alv programming. I am learning alv programming myself.I dont know anything about that. so can u please guide me how to create an alv program. give some documents to learn about alv.i ve searched it but i could not find any subsequent documents or materials here. please help me to learn.
My some doubts are below.
1.why are we using Type pools?
2.How many type pools are there?
3. give some links to learn alv.
Thanks in advance.
Urs
Goreddem.

HI,
There are basically two types of ALV reports are there
list and grid.
List mode is good old list processing with standard functionalities,
and grid mode is using a new OCX object displaying grids.
For list check this
http://www.scribd.com/doc/7345300/basic-ALV-1-Step-by-Step
For Grid checkout this might be helpful.
http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
http://help.sap.com/saphelp_sm32/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/content.htm
Regards and Best wishes.

Similar Messages

  • How to create secondary lists in ALV

    Hi all,
    Can u plz explain me how to create Secondary lists usingl ALV and how many secondary lists we can create.
    Thanks in advance
    Venkat

    this is the very very simple program in HR module to demonstrate interactive ALV report.
    If u have HR module implemented...just copy and paste this code and debug it...you will easily get the flow of the report...this is the simplest program..
    i hope it helps...here u go......
    REPORT ztej_alv_interactive.
    TABLES: pa0000, pa0001.
    DATA : BEGIN OF it0001 OCCURS 0,
              pernr LIKE pa0001-pernr,
              ename LIKE pa0001-ename,
           END OF it0001.
    DATA : BEGIN OF it0000 OCCURS 0,
              pernr LIKE pa0000-pernr,
              begda LIKE pa0000-begda,
              endda LIKE pa0000-endda,
              massn LIKE pa0000-massn,
              massg LIKE pa0000-massg,
              aedtm LIKE pa0000-aedtm,
           END OF it0000.
    TYPE-POOLS: slis.
    DATA: v_repid LIKE sy-repid .
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: i_fieldcat1 TYPE slis_t_fieldcat_alv.
    DATA: it_listheader TYPE slis_t_listheader.
    DATA: it_listheader1 TYPE slis_t_listheader.
    DATA: v_events TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    DATA: alv_layout TYPE slis_layout_alv.
    DATA:  i_title_0001 TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
    DATA:  i_title_0000 TYPE lvc_title.
    DATA : temp_pernr LIKE pa0001-pernr.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS : s_pernr FOR pa0000-pernr DEFAULT '16240147'.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      v_repid = sy-repid.
      PERFORM build_fieldcatlog USING i_fieldcat.
      PERFORM event_call.
      PERFORM populate_event.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_listheader USING it_listheader.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATLOG
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatlog USING temp_fieldcat TYPE slis_t_fieldcat_alv.
      DATA : wa_temp_fieldcat TYPE slis_fieldcat_alv.
      wa_temp_fieldcat-tabname = 'IT0001'.
      wa_temp_fieldcat-fieldname = 'PERNR'.
      wa_temp_fieldcat-seltext_m = 'Personnel Number'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0001'.
      wa_temp_fieldcat-fieldname = 'ENAME'.
      wa_temp_fieldcat-seltext_m = 'Name'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
          text
    -->  p1        text
    <--  p2        text
    FORM event_call.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
            EXPORTING
               i_list_type     = 0
            IMPORTING
               et_events       = v_events
           EXCEPTIONS
                LIST_TYPE_WRONG = 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.                    " EVENT_CALL
    *&      Form  POPULATE_EVENT
          text
    -->  p1        text
    <--  p2        text
    FORM populate_event.
      READ TABLE v_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'TOP_OF_PAGE'.
        MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-form.
      ENDIF.
      READ TABLE v_events INTO wa_event WITH KEY name = 'USER_COMMAND'.
      IF sy-subrc EQ 0.
        wa_event-form = 'USER_COMMAND'.
        MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-name.
      ENDIF.
    ENDFORM.                    " POPULATE_EVENT
    *&      Form  DATA_RETRIEVAL
          text
    -->  p1        text
    <--  p2        text
    FORM data_retrieval.
      SELECT pernr ename
             FROM pa0001
             INTO TABLE it0001
             WHERE pernr IN s_pernr.
      DELETE ADJACENT DUPLICATES FROM it0001.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_LISTHEADER
          text
         -->P_IT_LISTHEADER  text
    FORM build_listheader USING i_listheader TYPE slis_t_listheader.
      DATA hline TYPE slis_listheader.
      hline-info = 'This is Interactive ALV Program.'.
      hline-typ = 'H'.
      APPEND hline TO i_listheader.
    ENDFORM.                    " BUILD_LISTHEADER
    *&      Form  DISPLAY_ALV_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_report.
      v_repid = sy-repid.
      alv_layout-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = i_title_0001
      I_GRID_SETTINGS                   =
       is_layout                         = alv_layout
         it_fieldcat                       = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
        i_default                         = 'ZLAY1'
         i_save                            = 'A'
        is_variant                        = i_variant
         it_events                         = v_events
        TABLES
          t_outtab                          = it0001
    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.
      REFRESH i_fieldcat.
      CLEAR i_fieldcat.
      REFRESH it_listheader.
      CLEAR it_listheader.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  TOP_OF_PAGE
          text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_listheader
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      REFRESH i_fieldcat1.
      REFRESH it_listheader1.
      CASE r_ucomm.
        WHEN '&IC1'.
          READ TABLE it0001 INDEX rs_selfield-tabindex.
          IF sy-subrc = 0.
            temp_pernr = it0001-pernr.
            PERFORM build_fieldcatlog_0000 USING i_fieldcat1.
            PERFORM event_call_0000.
            PERFORM populate_event_0000.
            PERFORM data_retrieval_0000.
            PERFORM build_listheader_0000 USING it_listheader1.
            PERFORM display_alv_0000.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_0000
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatlog_0000 USING temp_fieldcat TYPE slis_t_fieldcat_alv
      DATA : wa_temp_fieldcat TYPE slis_fieldcat_alv.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'BEGDA'.
      wa_temp_fieldcat-seltext_m = 'From Date'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'ENDDA'.
      wa_temp_fieldcat-seltext_m = 'To Date'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'MASSN'.
      wa_temp_fieldcat-seltext_m = 'Action'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'MASSG'.
      wa_temp_fieldcat-seltext_m = 'Reason'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'AEDTM'.
      wa_temp_fieldcat-seltext_m = 'Action Run On'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL_0000
          text
    -->  p1        text
    <--  p2        text
    FORM event_call_0000.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = v_events
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.                    " EVENT_CALL_0000
    *&      Form  POPULATE_EVENT_0000
          text
    -->  p1        text
    <--  p2        text
    FORM populate_event_0000.
      READ TABLE v_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'F_TOP_OF_PAGE'.
        MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-form.
      ENDIF.
    ENDFORM.                    " POPULATE_EVENT_0000
    *&      Form  TOP_OF_PAGE
          text
    FORM f_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_listheader1
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM data_retrieval_0000.
      SELECT pernr begda endda massn massg aedtm
             FROM pa0000
             INTO TABLE it0000
             WHERE pernr = temp_pernr.
    ENDFORM.
    *&      Form  BUILD_LISTHEADER_0000
          text
         -->P_IT_LISTHEADER  text
    FORM build_listheader_0000 USING i_listheader1 TYPE slis_t_listheader.
      DATA: hline1 TYPE slis_listheader.
      hline1-typ = 'H'.
      hline1-info = 'Actions Detail List'.
      APPEND hline1 TO i_listheader1.
    ENDFORM.                    " BUILD_LISTHEADER_0000
    *&      Form  DISPLAY_ALV_0000
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_0000.
      CONCATENATE 'Actions For Personnel Number ' temp_pernr
                   INTO i_title_0000 SEPARATED BY ' '.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
         i_callback_top_of_page            = 'F_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
         i_grid_title                      = i_title_0000
      I_GRID_SETTINGS                   =
       is_layout                          = alv_layout
         it_fieldcat                      = i_fieldcat1[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         =
         i_save                            = 'A'
      IS_VARIANT                        =
         it_events                         = v_events
        TABLES
          t_outtab                          = it0000
       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_ALV_0000
    Regards,
    Tejas

  • How to create check box in ALV Reports?

    how to create check box in ALV Reports?

    Hi
    check the report  BCALV_TEST_GRID_EDITABLE
    or
    check this report
    REPORT ZRFC346_TST.
    TABLES:SFLIGHT,RL034.
    TYPE-POOLS:SLIS.
    INCLUDE:<ICON>,<SYMBOL>.
    DATA: G_REPID          LIKE SY-REPID,
          G_FIELDCAT       TYPE SLIS_T_FIELDCAT_ALV,
          G_IT_SORT        TYPE SLIS_T_SORTINFO_ALV,
          G_LAYOUT         TYPE SLIS_LAYOUT_ALV,
          G_TABNAME_HEADER TYPE SLIS_TABNAME,
          G_TABNAME_ITEM   TYPE SLIS_TABNAME,
          G_KEYINFO        TYPE SLIS_KEYINFO_ALV,
          G_VARIANT        LIKE DISVARIANT,
          G_EXTAB          TYPE SLIS_T_EXTAB,
          I_SLIS_EXIT_BY_USER TYPE SLIS_EXIT_BY_USER.
    DATA: XEVENT         TYPE SLIS_T_EVENT,
          AEVENT         TYPE SLIS_ALV_EVENT,
          VARIANT        LIKE DISVARIANT,
          LAYOUT         TYPE SLIS_LAYOUT_ALV,
          ASP_GROUP      TYPE SLIS_SP_GROUP_ALV,
          GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          EXTAB          TYPE SLIS_T_EXTAB WITH HEADER LINE,
          XFIELD         TYPE SLIS_T_FIELDCAT_ALV,
          AFIELD         TYPE SLIS_FIELDCAT_ALV,
          G_SUCOMM      LIKE SY-UCOMM,
          G_SELFLD       TYPE SLIS_SELFIELD.
    DATA: SAV_SY_REPID      LIKE SY-REPID.
    CONSTANTS: CON_SFLIGHT TYPE LVC_FNAME VALUE 'SFLIGHT',
               CON_DISPLAY_FULL TYPE I VALUE 3.
    Data to be displayed
    DATA: BEGIN OF GT_SFLIGHT OCCURS 0.
            INCLUDE STRUCTURE SFLIGHT.
    DATA:ACTIVATE(1).
    DATA: END OF GT_SFLIGHT.
    INITIALIZATION.
    *........Initialisierung...............................................
      PERFORM INITIALIZATION_RL034.
    *........Field cata....................................................
      PERFORM FIELD_CAT.
    *........SPECIAL GROUP.................................................
      PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
    START-OF-SELECTION.
    Selection
      SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
    *........ALV CALL.......................................................
      PERFORM ALV_CALL.
      PERFORM USER_COMMAND_LOCAL USING G_SUCOMM G_SELFLD.
          FORM USER_COMMAND_LOCAL                                       *
    -->  G_UCOMM                                                       *
    -->  G_SELFIELD                                                    *
    FORM USER_COMMAND_LOCAL USING G_UCOMM LIKE SY-UCOMM
                                  G_SELFIELD TYPE SLIS_SELFIELD.
      CASE G_UCOMM.
        WHEN 'ACT'.
      ENDCASE.
    ENDFORM.
          FORM ALV_CALL                                                 *
    FORM ALV_CALL.
    Call ABAP List Viewer (ALV)
    G_LAYOUT-BOX_FIELDNAME = 'ACTIVATE'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
                 EXPORTING
                I_BACKGROUND_ID         = 'ALV_BACKGROUND'
                   I_BYPASSING_BUFFER                = SPACE
                   I_BUFFER_ACTIVE                   = SPACE
                    I_CALLBACK_PROGRAM                = SAV_SY_REPID
                    I_CALLBACK_PF_STATUS_SET          = 'STATUS'
                   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND_LOCAL'
                I_CALLBACK_TOP_OF_PAGE            = ' '
                I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                I_CALLBACK_HTML_END_OF_LIST       = ' '
                 I_STRUCTURE_NAME                  = 'SFLIGHT'
                I_BACKGROUND_ID                   = ' '
                I_GRID_TITLE                      =
                I_GRID_SETTINGS                   =
                  IS_LAYOUT                         = G_LAYOUT
                  IT_FIELDCAT                       = XFIELD[]
                IT_EXCLUDING                      =
                  IT_SPECIAL_GROUPS                 = GT_SP_GROUP[]
                IT_SORT                           =
                IT_FILTER                         =
                 IS_SEL_HIDE                       = 'X'
                I_DEFAULT                         = 'X'
                  I_SAVE                            = 'A'
                IS_VARIANT                        =
                 IT_EVENTS                         = XEVENT
                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_ADD_FIELDCAT                   =
                IT_HYPERLINK                      =
                I_HTML_HEIGHT_TOP                 =
                I_HTML_HEIGHT_END                 =
                IT_EXCEPT_QINFO                   =
              IMPORTING
                E_EXIT_CAUSED_BY_CALLER           =
                ES_EXIT_CAUSED_BY_USER            =
                  TABLES
                    T_OUTTAB                          = GT_SFLIGHT
              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.
          FORM status                                                   *
    -->  EXTAB                                                         *
    FORM STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STAT' EXCLUDING EXTAB.
    ENDFORM.                               " STATUS
    *&      Form  INITIALIZATION_RL034
          text
    -->  p1        text
    <--  p2        text
    FORM INITIALIZATION_RL034.
      SAV_SY_REPID = SY-REPID.
    ENDFORM.                    " INITIALIZATION_RL034
    *&      Form  DEFINE_EVENTS_RL034
          text
    -->  p1        text
    <--  p2        text
    FORM DEFINE_EVENTS_RL034.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = XEVENT.
       exceptions
            list_type_wrong = 1
            others          = 2.
    ENDFORM.                    " DEFINE_EVENTS_RL034
    *&      Form  FIELD_CAT
          text
    -->  p1        text
    <--  p2        text
    FORM FIELD_CAT.
      DATA: LS_FCAT TYPE SLIS_FIELDCAT_ALV,
            L_LIN   TYPE I.
      REFRESH XFIELD.
           1. per Default eingeblendete Felder                          *
    *........Ikone/Symbol..................................................
      CLEAR AFIELD.
      DATA: LS1_FCAT TYPE SLIS_FIELDCAT_ALV,
            L_LIN1   TYPE I.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_STRUCTURE_NAME       = CON_SFLIGHT
                I_BYPASSING_BUFFER     = SPACE
                I_BUFFER_ACTIVE        = SPACE
           CHANGING
                CT_FIELDCAT            = XFIELD
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      DESCRIBE TABLE XFIELD LINES L_LIN1.
      ADD 1 TO L_LIN1.
      CLEAR LS_FCAT.
      LS1_FCAT-FIELDNAME = 'ACTIVATE'.
      LS1_FCAT-CHECKBOX  = 'X'.
    LS1_FCAT-KEY       = 'X'.
      LS1_FCAT-INPUT     = 'X'.
      LS1_FCAT-EDIT     = 'X'.
      LS1_FCAT-INTTYPE   = 'C'.
      LS1_FCAT-DATATYPE  = 'CHAR'.
      LS1_FCAT-INTLEN    = 1.
      LS1_FCAT-COL_POS   = L_LIN1.
      LS1_FCAT-SELTEXT_S = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SELTEXT_M = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SELTEXT_L = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SP_GROUP = 'A'.
      APPEND LS1_FCAT TO XFIELD.
      ADD 1 TO L_LIN.
    ENDFORM.                    " FIELD_CAT
    FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
      DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
      CLEAR  LS_SP_GROUP.
      LS_SP_GROUP-SP_GROUP = 'A'.
      LS_SP_GROUP-TEXT     = 'SPECIAL'.
      APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
    ENDFORM.
    Regards
    Shiva

  • HELP! PDF objects - How to create a program line object?

    Hi Experts,
    I would like to know how to create a Program lines object (icon cog wheels). I need to create additional coding inside the context tab but when I try to right click on a folder --> create -->graphic,address,text,alternative...single record... No
    program lines can be created.
    Hope someone could help me.
    Thanks,
    Jeff

    There are two ways of doing it, depending on what you want to accomplish. Both require that you edit the file ~/.bashrc (I assume you use bash)
    1) If the application places all the executable files in a given directory (let's say /opt/Application/bin/), you can access all those executables directly by simply telling your shell where to look (in the same way the shell automatically looks for executable files in eg. /usr/bin). In ~/.bashrc, you would have to add a line that looks like this:
    PATH="$PATH:/opt/Application/bin"
    2) If you just want to make a traditional "shortcut" that executes a given command, this can be done with alias. Add this command to your ~/.bashrc:
    alias shortcut="some command"
    In this case, typing shortcut into a terminal will be interpreted just like if you had typed some command instead.
    In order to try out these changes, either restart your terminal or run this command:
    source ~/.bashrc
    [EDIT]
    I was obviously beaten to it
    Last edited by Peanut (2009-05-26 23:12:47)

  • How to create a program that will accept a series of strings of 0 and 1 onl

    how to create a program that will accept a series of strings of 0 and 1 only then displays 0 as 48 and displays 1 as 49.

    Isn't one thread enough for your homework?
    http://forum.java.sun.com/thread.jspa?threadID=5253850&messageID=10051155#10051155

  • How to create a program that accepts 5 digits from the user between 0 and 9

    how to create a program that accepts 5 digits from the user between 0 and 9 then put them in ascending order using link-list method..

    You can use a scanner to get user input from the command line.
    import java.util.*;
    public class Test {
        private List<Integer> list;
        private Scanner in;
        public static void main (String... args) {
            new Test ();
        public Test () {
            list = new LinkedList<Integer> ();
            in = new Scanner (System.in);
            for (int i = 0; i < 5; i ++) {
                System.out.format ("Please enter a number (%d more): ", (5 - i));
                list.add (in.nextInt ());
            Collections.sort(list, new Comparator<Integer> () {
                public int compare (Integer i1, Integer i2) {
                    return i2 - i1;
            System.out.println (list);
    }

  • How to create required field in alv?

    hi friends^^
    how to create required field in alv?
    i don't find required option in fieldcatalog and others.
    is it possible?

    Source code..
    PLANETYPE is key_sel = 'X'.
    But does't required field...
    REPORT  zs32editable1  .
    TYPE-POOLS : slis.
    DATA : gt_sflight  TYPE TABLE OF sflight.
    DATA : gt_fieldcat TYPE slis_t_fieldcat_alv,
           gs_fieldcat LIKE LINE OF gt_fieldcat,
           gs_layout   TYPE slis_layout_alv.
    START-OF-SELECTION.
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE gt_sflight
        FROM sflight.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-edit = 'X'.
      gs_fieldcat-fieldname = 'PLANETYPE'.
      gs_fieldcat-key_sel = 'X'.
      append gs_fieldcat to gt_fieldcat.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_STRUCTURE_NAME = 'SFLIGHT'
          is_layout        = gs_layout
          IT_FIELDCAT      = gt_fieldcat
        TABLES
          t_outtab         = gt_sflight
        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.

  • How to Create another program instance in iphone from a COPY previous proj

    Say I've created one program by starting Xcode afresh.
    Now I want to create another program using the previous program as a base, I copy and paste the project folder and rename it, unfortunately, when I run the program, it replaces the previous program in my iPhone.
    How do I tell xcode it's a new program ?
    Message was edited by: Bracer-J

    Thank you

  • How to created Freely Programmed F4 help in Select Options

    hi,all
       I have a probelm about how to created a Freely Programmed F4 help in Select Options,and put help value into select options field
      Thanks and Best Regards

    Hi Haung,
    You need to use FREE_HELP not the component name.
    Modify you code as below:
       LT_RANGE_TABLE_V = wd_this->m_handler_V->create_range_table( 'ZCYPHDATE' ).
      wd_this->M_HANDLER_V->add_selection_field(
          i_id                         = 'ZCYPHDATE'
          it_result                    = LT_RANGE_TABLE_V
          i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_APPLDEV
          i_value_help_id              = 'FREE_HELP'
          i_no_intervals               = abap_false ).
    Hope this helps you.
    Regards,
    Rama

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • How to create SAPScript program? step-by-step process?

    Hi everybody
    Can anybody please provide some information on how to create SAP Script program?
    Please provide step-by-step process if possible as examples given in abap certification program
    thanks

    Hi
    here is the sample program for SAP SCRIPTS
    *& Report  ZHMR_POANNEX                                                *
         MODULE Materials Management
          Objective :Calling program for ANNEXURE FOR P.O
          text ................................................
          text ................................................
          text ................................................
    REPORT  ZHMR_POANNEX                            .
    TABLES :EKKO,STXH.
    PARAMETERS
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE text-001.
    PARAMETERS : P_EBELN LIKE EKKO-EBELN.
    SELECTION-SCREEN END OF BLOCK BLK.
    DATA DECLARATION
    DATA : V_LIFNR LIKE EKKO-LIFNR,
           V_AEDAT LIKE EKKO-AEDAT,
           V_NAME  LIKE LFA1-NAME1,
           V_ADRNR LIKE LFA1-ADRNR,
           V_BSTYP LIKE EKKO-BSTYP.
    DATA : BEGIN OF IT_ADRC OCCURS 0,
           NAME1  LIKE ADRC-NAME1,
           STREET LIKE ADRC-STREET,
           CITY1  LIKE ADRC-CITY1,
           POST_CODE1 LIKE ADRC-POST_CODE1,
           COUNTRY LIKE ADRC-COUNTRY,
           END OF IT_ADRC.
    DATA : IT_TEXT LIKE TLINE OCCURS 0 WITH HEADER LINE,
           IT_NOTE LIKE TLINE OCCURS 0 WITH HEADER LINE,
           IT_DEL  LIKE TLINE OCCURS 0 WITH HEADER LINE,
           IT_SHIP LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA : V_ID  LIKE THEAD-TDID ,
           V_LAN LIKE THEAD-TDSPRAS,
           V_NAME1 LIKE THEAD-TDNAME ,
           V_OBJ LIKE THEAD-TDOBJECT VALUE 'EKKO',
           N1 TYPE I,N2 TYPE I,N3 TYPE I ,N4 TYPE I.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = P_EBELN
    IMPORTING
       OUTPUT        = P_EBELN.
    TO GET VENDOR NAME ,,PO DATE
    SELECT SINGLE
                 LIFNR
                 AEDAT
                 BSTYP
                 FROM EKKO
                 INTO (V_LIFNR, V_AEDAT,V_BSTYP)
                 WHERE EBELN EQ P_EBELN.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE NAME1 ADRNR
                  FROM LFA1
                  INTO (V_NAME,V_ADRNR)
                  WHERE LIFNR EQ V_LIFNR.
      IF SY-SUBRC EQ 0.
    SELECT NAME1
            STREET
            CITY1
            POST_CODE1
            COUNTRY
            FROM ADRC
            INTO CORRESPONDING FIELDS OF TABLE IT_ADRC
            WHERE ADDRNUMBER EQ V_ADRNR.
    IF SY-SUBRC NE 0.
    ENDIF.
      ENDIF.
    ENDIF.
    *TO GET HEADER TEXT
      IF V_BSTYP = 'L'.
        V_ID = 'L01'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F01'.
      ENDIF.
      V_NAME1 = P_EBELN.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_TEXT.
    ENDIF.
    *TO GET HEADER NOTE
      IF V_BSTYP = 'L'.
        V_ID = 'L02'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F02'.
      ENDIF.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_NOTE.
    ENDIF.
    *TO GET TERMS OF DELIVERY
      IF V_BSTYP = 'L'.
        V_ID = 'L05'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F05'.
      ENDIF.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_DEL.
    ENDIF.
    *TO GET SHIPPING INSTRUCTIONS
    IF V_BSTYP = 'L'.
        V_ID = 'L06'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F06'.
      ENDIF.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_SHIP.
    ENDIF.
    OPEN FORM
    DESCRIBE TABLE IT_TEXT LINES N1.
    DESCRIBE TABLE IT_NOTE LINES N2.
    DESCRIBE TABLE IT_DEL LINES N3.
    DESCRIBE TABLE IT_SHIP LINES N4.
    IF NOT ( N1 = 0 AND N2 = 0 AND N3 = 0 AND N4 = 0 ).
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       FORM                              = 'ZHML001_POANNEX'
       LANGUAGE                          = SY-LANGU.
    else.
    message 'For This P.O no annexure is maintained.' type 'I'.
    endif.
    WRITE FORM
    LOOP AT IT_ADRC.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'HEADER'
       WINDOW                         = 'HEADER'.
    ENDLOOP.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'FOTTER'
       WINDOW                         = 'FOTTER'.
    IF NOT IT_TEXT[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'TEXT1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_TEXT.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'TEXT'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    IF NOT IT_NOTE[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'NOTE1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_NOTE.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'NOTE'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    IF NOT IT_DEL[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DEL1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_DEL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DEL'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    IF NOT IT_SHIP[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'SHIP1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_SHIP.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'SHIP'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    CLOSE FORM
    CALL FUNCTION 'CLOSE_FORM'.
    Reward if it is helpful.
    Regards,
    Sangeetha.A

  • How to create one program from few programs

    Hi.
    I have for example 5 programs and I would like to create one program in which i could switch between this 5 programs. One of these should be running all the time and the others should start when i will switch to them. I need solution or something like that.
    Thanks.

    You can do a search on "dynamically called" sub vi's.
    See the tiny example below of how to call it.  You can actually call multiple VI's and they will run in parallel, although you have to be careful when doing this.
    You would have to wire False to  "Wait till done"
    You can stop/close the VI using property node.  If you wired False to "Auto Dispose Ref", then make sure you do close ALL references before exiting your program.
    Message Edited by Ray.R on 04-27-2010 08:19 AM
    Attachments:
    callByReference.png ‏16 KB

  • How to create a program in J2EE using eclipse

    Hello
    I am planning to start with J2EE. i have downloaded glassfish v3, maven, derby and JUnit and eclipse. But i am not getting how to start with it.
    please guide me.i am following apress publication's Antonio Goncalves. How to write a program , how to deploy with glassfish then.
    really confused..
    thanking in advance

    abhinav291988 wrote:
    Hello
    I am planning to start with J2EE. i have downloaded glassfish v3, maven, derby and JUnit and eclipse. But i am not getting how to start with it.
    please guide me.i am following apress publication's Antonio Goncalves. How to write a program , how to deploy with glassfish then.
    really confused..
    thanking in advanceIn terms of learning how to use Eclipse [http://eclipsetutorial.sourceforge.net/]
    In terms of learning how to use Java EE [http://java.sun.com/javaee/5/docs/tutorial/doc/]
    In terms of how to write a program [http://java.sun.com/docs/books/tutorial/]
    If you have a specific question to ask, then please repost. My suggestion would be to take the Eclipse tutorial to familiarize yourself, and then follow along in your book. If the book is too advanced, buy one aimed more at beginners. Online tutorials should also help you out.
    - Saish

  • How to create executable programs

    How can I create an executable program using J2SDK 1.2.2?
    Thank you

    There are some programs that can do what you are looking for but most of them just include the JRE in the project and make a small wrapper .exe that calls it.
    I agree with MarcinSc - you should make your friends install the JRE even for their own good.

  • How to create blank line in alv output

    Hi all,
    Iam getting alv output with currency values like below
    text1    20.0  10.0  30.0
    text2    25.0  11.0  30.0
    text3    27.0  19.0  30.0
    text1    24.0  18.0  30.0
    text2    27.0  16.0  30.0
    text3    29.0  15.0  30.0
    text1    23.0  17.0  30.0
    text2    22.0  13.0  30.0
    text3    21.0  14.0  30.0
    and so on...
    My requirement is to create blank line after text3. Since its currency field even i claer work area iam able to get 0.0.
    If i use no-zero in field catalog i will be able to get blank values for all 0.0, but thats not required.
    Can u help me out how to crate blank line after one set of values(text1, text2, text3) in alv display
    Thanks

    Hi,
    If i use no-zero, then all 0.0 will be replaced by blank, but that is not required.
    I want only blank line to be displayed after set of line items.
    Skip doesn't help in alv. Secondly if i append blank work area i will be getting 0.0 as it is a currency field.

Maybe you are looking for