Selection-screen in alv oops

Hi All,
Am creating am alv report in oops .,., but am facing an unusual problem ,,,am unable to display selection-screen ..,
its really unusual which i never came across
Kindly provide me suggestions to fix it up..
thanks
jack

Please provide the solution.
Regards,
Sumit Nene.

Similar Messages

  • How to create Multiple Selection Screen in ALV

    Hi,
    Can anybody tell me how to create the Multiple Selection screen in ALV reports.
    Plse give me code sample if possible.
    Thanks in advance
    KP

    Hi Rich,
    thanks for the reply.
    I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
    eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen. 
    Hope my problem is understood.
    Thanks
    KP

  • Symbol as default in a selection screen in alv

    hi all,
    how to bring GE(>=) symbol as default in a selection screen in alv report.
    by
    Ramesh.

    Hai Ramesh,
    Create Pushbuttons in selection screen ,In pushbutton write the ' >=' instead of providing the text.
    Try like this may be u will find the answer,
    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.
    This example defines four pushbuttons on a selection screen that is displayed as a dialog box. The selection screen is defined in a statement chain for keyword SELECTION-SCREEN.
    If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4', the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
    CLI1, CLI2, CLI3 and CLI4 are used for <ucom>. When the user clicks one of the pushbuttons, the AT SELECTION-SCREEN event is triggered, and the FLAG field is set. The FLAG field can be further processed during subsequent program flow after the user has chosen Execute.
    Refer the above code, and make change just to clear all the fields in the selection screen, when corresponding push button is clicked..
    May be this answer is helpful to u.
    Regards,
    Skumari

  • Selection screen in ALV output

    Hi Experts,
    My requirement is - A selection screen should pop up on the click of a button in the ALV output. Using the parameters I input on the selection screen anothor ALV should be displayed on the same page at the bottom. I'm displaying ALV using cl_gui_alv_grid.
    Thanks.
    Ajith

    Hi Nimesh,
    The requirement has slightly been updated so as to display the 2nd ALV is another screen.
    As you suggested I used the call selection screen. How ever I did not use events for the same. I called the selection screen on checking sy-ucomm in PAI.
    After I input the values in the pop up selection screen , even if I click the cancel button(at bottom) or the close button( top corner)  the execution still  follows and the second ALV is displayed.
    Please help me in this so that If I click on cancel or close the second ALV is not displayed and the control remains in the first ALV
    Thank you.
    Edited by: Ajith  Krishna on Oct 31, 2008 10:24 PM

  • Show the drop down list of variant on the selection screen in ALV reports

    Hi,
    i have a alv report when i execute this display will come and then i click display layout it save as a variant on the selection screen and when i go back to selection screen and press f4 on the display variant its show the drop down list of varient.
    can u send me some code for this functionality...its very urgent.
    thanks!
    Vipin

    Hi,
    try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
    START HERE
    PARAMETERS: pa_vari TYPE disvariant-variant.
    INITIALIZATION.
      g_repid = sy-repid.
      CLEAR e_variant.
      e_variant-report   = sy-cprog.
      e_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = e_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        pa_vari = e_variant-variant.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    *&      Form  ALV_VARIANT_F4
    FORM alv_variant_f4 CHANGING pa_vari.
      DATA: l_exit(1) TYPE c.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant       = e_variant
          i_tabname_header = 'ANYTHING'
          i_save           = 'A'
        IMPORTING
          e_exit           = l_exit
          es_variant       = e_variant
        EXCEPTIONS
          not_found        = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'  NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF l_exit = space.
          pa_vari = e_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    END
    Hope iy helps!
    Alfonso

  • Variants on tabbed selection screen for ALV reports

    Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
    Question: How can I code such a check?
    Edited by: Alridge Tom on Jul 4, 2008 3:43 PM

    Hi,
    try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
    START HERE
    PARAMETERS: pa_vari TYPE disvariant-variant.
    INITIALIZATION.
      g_repid = sy-repid.
      CLEAR e_variant.
      e_variant-report   = sy-cprog.
      e_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = 'A'
        CHANGING
          cs_variant = e_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        pa_vari = e_variant-variant.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    *&      Form  ALV_VARIANT_F4
    FORM alv_variant_f4 CHANGING pa_vari.
      DATA: l_exit(1) TYPE c.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant       = e_variant
          i_tabname_header = 'ANYTHING'
          i_save           = 'A'
        IMPORTING
          e_exit           = l_exit
          es_variant       = e_variant
        EXCEPTIONS
          not_found        = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'  NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF l_exit = space.
          pa_vari = e_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                               " ALV_VARIANT_F4
    END
    Hope iy helps!
    Alfonso

  • How to put Layouts in selection screen for ALV

    Dear All,
    I have developed an ALV report . The users will create many layouts and save it. The requirement is that:
    In the selection screen , they need to get the list of saved layouts and select one from that so that they need not have to select layout after running the report.
    That means .. they want to select the layout before running the report.
    Hope that you understood my problem and will help me out...
    Thanking you,
    Shankar

    Hi,
    PARAMETERS P_LAYOUT LIKE DISVARIANT-VARIANT.
    INITIALIZATION.
    *Get Default display variant
    PERFORM F100_DISPLAY_DEFAULT_VARIANTS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAYOUT.
    *Value Help for Layouts
    PERFORM F1001_VALUE_REQUEST.
    *&      Form  F100_DISPLAY_DEFAULT_VARIANTS
         Initializing ALV Values                                        *
    FORM f100_display_default_variants.
      w_variant-report   = sy-repid.
      w_variant-handle   = c_handle.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save        = c_a
           CHANGING
                cs_variant    = w_variant
           EXCEPTIONS
                wrong_input   = 1
                not_found     = 2
                program_error = 3
                OTHERS        = 4.
      IF sy-subrc EQ 0.
        p_layout = w_variant-variant.
      ENDIF.
    ENDFORM.
    *&      Form  F1001_VALUE_REQUEST
          Get the values for the layout.
    form F1001_VALUE_REQUEST.
      DATA:  lv_exit        TYPE c,
             lw_variant    LIKE w_variant.
      w_variant-report   = sy-repid.
      w_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant    = w_variant
                i_save        = c_a
           IMPORTING
                e_exit        = lv_exit
                es_variant    = lw_variant
           EXCEPTIONS
                not_found     = 1
                program_error = 2
                OTHERS        = 3.
      IF sy-subrc IS INITIAL.
        IF lv_exit IS INITIAL.
          p_layout = lw_variant-variant.
        ENDIF.
      ELSE.
        MESSAGE i029."No layouts found
      ENDIF.
    endform.                    " F1001_VALUE_REQUEST
    Hope this helps.
    Regards,
    J.Jayanthi

  • Reg: GOING TO SELECTION SCREEN FROM ALV GRID.

    Hi all,
    Iam using an ALV grid display.
    I have called the grid display every times when i select a check box in the grid display.
    Then when i click on the back button the screen navigates to the previous ALV grid. My requirement is to go to the first selection screen.
    For this I have coded in the Back button as Call selection--screen <screen no>.
    When i do this, and after navigation to the selection-screen when i click on the back button on the selection screen its navigating back to the ALV grid.
    But i need to exit to the program in this case.
    Can anyone Help me on this issue?
    Regards
    Naveen

    You have to use LEAVE TO SCREEN 0.
    Regards
    Eswar
    Addition: Also see that you are releasing the grid with statement like CALL METHOD g_grid->free.
    So the code should be something like:
      CASE ok_code.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          CALL METHOD g_grid->free.
          LEAVE TO SCREEN 0.
      ENDCASE.
    Edited by: Eswar Rao  Boddeti on Feb 19, 2008 1:48 PM

  • Going back to selection screen from ALV

    Hi there,
    I have scenario: program -> selection screen -> ALV
    In the 'BACK' button I have put: LEAVE TO SCREEN 0. It should go back to selection screen. But it does not and exits the program. I also tried to call the selection screen like CALL SELECTION-SCREEN 1000. But in this case if I hit BACK on selection screen, it goes back to previous screen, the ALV not the program. Can you please assist any other way to use the back button from
    ALV -> Selection screen. Thanks.
    Regards,

    Hi Johnny
    Previously i got the same requirement according to that i had developed a report just go through this hope it may helpfull very much
    *& Report  ZALVDEMO                                                    *
    REPORT  ZALVDEMO.
    TABLES : J_1IEXCHDR, " header table
    J_1IEXCDTL, " item table
    J_1IPART2, " Excise Part II details
    LFA1, " vendor master table
    J_1IMOVEND, " vendor excise details table
    MSEG, " Document Segment: Material
    MKPF, " Header: Material Document
    DD07T, " domain text table
    T001W. " Plant and Branch Details
    DATA : BEGIN OF IT_CHDR OCCURS 100,
    DOCNO LIKE J_1IEXCHDR-DOCNO,
    DOCYR LIKE J_1IEXCHDR-DOCYR,
    EXNUM LIKE J_1IEXCHDR-EXNUM,
    EXDAT LIKE J_1IEXCHDR-EXDAT,
    WERKS LIKE J_1IEXCHDR-WERKS,
    EXBED LIKE J_1IEXCHDR-EXBED,
    EXCCD LIKE J_1IEXCHDR-EXCCD,
    ECS LIKE J_1IEXCHDR-ECS,
    END OF IT_CHDR.
    DATA : BEGIN OF IT_CDTL OCCURS 100,
    DOCYR LIKE J_1IEXCDTL-DOCYR,
    DOCNO LIKE J_1IEXCDTL-DOCNO,
    EXNUM LIKE J_1IEXCDTL-EXNUM,
    EXDAT LIKE J_1IEXCDTL-EXDAT,
    LIFNR LIKE J_1IEXCDTL-LIFNR,
    MATNR LIKE J_1IEXCDTL-MATNR,
    MAKTX LIKE J_1IEXCDTL-MAKTX,
    CHAPID LIKE J_1IEXCDTL-CHAPID,
    EXBAS LIKE J_1IEXCDTL-EXBAS,
    EXBED LIKE J_1IEXCDTL-EXBED,
    ECS LIKE J_1IEXCDTL-ECS,
    MENGE LIKE J_1IEXCDTL-MENGE,
    MEINS LIKE J_1IEXCDTL-MEINS,
    RDOC2 LIKE J_1IEXCDTL-RDOC2,
    END OF IT_CDTL.
    DATA TEXT(10).
    DATA : BEGIN OF IT_OUT OCCURS 0,
    SERIALNO LIKE J_1IPART2-SERIALNO,
    TEXT1 LIKE TEXT,
    EXNUM LIKE J_1IEXCDTL-EXNUM,
    EXDAT LIKE J_1IEXCDTL-EXDAT,
    NAME LIKE LFA1-NAME1,
    DDTEXT LIKE DD07T-DDTEXT,
    EXCCD LIKE J_1IEXCHDR-EXCCD,
    BUDAT LIKE MKPF-BUDAT,
    EXBAS LIKE IT_CDTL-EXBAS,
    EXBED LIKE IT_CDTL-EXBED,
    ECS LIKE IT_CDTL-ECS,
    MATNR LIKE IT_CDTL-MATNR,
    MAKTX LIKE IT_CDTL-MAKTX,
    CHAPID LIKE IT_CDTL-CHAPID,
    MENGE LIKE IT_CDTL-MENGE,
    MEINS LIKE IT_CDTL-MEINS,
    DEL_IND(1),
    END OF IT_OUT.
    DATA IT_PART2 LIKE J_1IPART2 OCCURS 0 WITH HEADER LINE.
    DATA S_NO(4) .
    DATA DB_CNT LIKE SY-TABIX.
    DATA EBELN_T LIKE MSEG-EBELN .
    TYPE-POOLS : SLIS.
    DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
    FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    LS_FTCAT TYPE LVC_S_FCAT,
    SORTCAT TYPE SLIS_T_SORTINFO_ALV,
    SORTCAT_LN LIKE LINE OF SORTCAT,
    G_REPID LIKE SY-REPID,
    G_BACK_GROUND(70), "like bapibds01-objkey,
    GS_VARIANT LIKE DISVARIANT,
    G_SAVE ,
    GT_EVENTS TYPE SLIS_T_EVENT,
    ALV_EVENT TYPE SLIS_ALV_EVENT,
    EVENTCAT TYPE SLIS_T_EVENT,
    EVENTCAT_LN LIKE LINE OF EVENTCAT,
    LAYOUT_IN TYPE SLIS_LAYOUT_ALV,
    LAYOUT_IN1 TYPE SLIS_LAYOUT_ALV.
    CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
    'TOP_OF_PAGE',
    GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
    'USER_COMMAND',
    GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
    'BEFORE_OUTPUT'.
    * ALV_EVENT TYPE SLIS_ALV_EVENT,
    DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
    DATA REGTYP_1 LIKE J_1IPART2-REGTYP.
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
    PARAMETERS WERKS TYPE J_1IEXCHDR-WERKS.
    SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
    PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
    R2 RADIOBUTTON GROUP GRP.
    SELECTION-SCREEN END OF BLOCK B.
    INITIALIZATION.
    G_REPID = SY-REPID.
    G_SAVE = 'A'.
    * PERFORM BUILD_EVENT USING GT_EVENTS[].
    PERFORM ALV_EVENT_INIT.
    AT SELECTION-SCREEN.
    REFRESH LIST_HEADER.
    PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
    START-OF-SELECTION.
    * PERFORM ALV_EVENT_INIT.
    G_REPID = SY-REPID.
    G_BACK_GROUND = ' ' .
    IF R1 = 'X'.
    CLEAR R2. CLEAR : REGTYP_1.
    REGTYP_1 = 'A'.
    * set titlebar 'BALAJI' with DB_CNT.
    ELSEIF R2 = 'X'.
    CLEAR R1.CLEAR : REGTYP_1.
    REGTYP_1 = 'C'.
    * set titlebar 'BALAJI1' with DB_CNT.
    ENDIF.
    SELECT * FROM J_1IPART2
    INTO CORRESPONDING FIELDS OF TABLE IT_PART2
    WHERE REGTYP = REGTYP_1 AND
    TRNTYP = 'GRPO' AND
    BUDAT IN BUDAT.
    * DOCYR = IT_CDTL-DOCYR AND
    * DOCNO = IT_CDTL-DOCNO.
    LOOP AT IT_PART2.
    SELECT SINGLE * FROM J_1IEXCHDR
    INTO CORRESPONDING FIELDS OF IT_CHDR
    WHERE TRNTYP = 'GRPO' AND
    DOCYR = IT_PART2-DOCYR AND
    DOCNO = IT_PART2-DOCNO AND
    WERKS = WERKS AND
    exdat IN BUDAT.
    * ORDER BY EXDAT.
    IF SY-SUBRC = 0.
    APPEND IT_CHDR.
    ELSE.
    CONTINUE.
    ENDIF.
    * IF SY-SUBRC <> 0.
    * MESSAGE E084.
    * ENDIF.
    ENDLOOP.
    LOOP AT IT_CHDR.
    SELECT * FROM J_1IEXCDTL
    INTO CORRESPONDING FIELDS OF IT_CDTL
    * FOR ALL ENTRIES IN IT_CHDR
    WHERE
    TRNTYP = 'GRPO' AND
    DOCNO = IT_CHDR-DOCNO AND
    DOCYR = IT_CHDR-DOCYR AND
    EXNUM = IT_CHDR-EXNUM AND
    EXDAT = IT_CHDR-EXDAT AND
    WERKS = IT_CHDR-WERKS.
    IF SY-SUBRC = 0.
    APPEND IT_CDTL.
    ELSE.
    CONTINUE.
    ENDIF.
    ENDSELECT.
    ENDLOOP.
    LOOP AT IT_CDTL.
    CLEAR TEXT.
    DB_CNT = DB_CNT + 1.
    READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM.
    READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
    IT_OUT-SERIALNO = IT_PART2-SERIALNO.
    SELECT SINGLE NAME1 FROM LFA1
    INTO IT_OUT-NAME
    WHERE LIFNR = IT_CDTL-LIFNR.
    SELECT SINGLE * FROM LFA1
    WHERE LIFNR = IT_CDTL-LIFNR.
    IF LFA1-LAND1 EQ 'IN'.
    TEXT = 'INVOICE'.
    IT_OUT-TEXT1 = TEXT.
    ELSE.
    TEXT = 'BOE'.
    IT_OUT-TEXT1 = TEXT.
    ENDIF.
    SELECT SINGLE * FROM J_1IMOVEND
    WHERE LIFNR = IT_CDTL-LIFNR.
    SELECT SINGLE * FROM DD07T
    * INTO IT_OUT-DDTEXT
    WHERE DOMNAME = 'J_1IVTYP' AND
    DDLANGUAGE = 'EN' AND
    DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
    IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
    OR
    DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
    DD07T-DDTEXT = 'Dealer'.
    ENDIF.
    IT_OUT-DDTEXT = DD07T-DDTEXT.
    * ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
    *goods'.
    * DD07T-DDTEXT =
    CLEAR EBELN_T.
    SELECT SINGLE LFBNR FROM MSEG
    INTO EBELN_T
    WHERE MBLNR = IT_CDTL-RDOC2 .
    SELECT SINGLE * FROM MSEG
    WHERE BWART = '106' AND
    LFBNR = EBELN_T ."and
    * ebeln = ebeln_t.
    IF SY-SUBRC = 0.
    IT_OUT-DEL_IND = 'X'.
    ELSE.
    IT_OUT-DEL_IND = ' '.
    ENDIF.
    SELECT SINGLE BUDAT FROM MKPF
    INTO IT_OUT-BUDAT
    WHERE MBLNR = EBELN_T ."MSEG-LFBNR.
    IT_OUT-EXNUM = IT_CDTL-EXNUM.
    IT_OUT-EXDAT = IT_CDTL-EXDAT.
    IT_OUT-EXCCD = IT_CHDR-EXCCD.
    IT_OUT-EXBAS = IT_CDTL-EXBAS.
    IT_OUT-EXBED = IT_CDTL-EXBED.
    IT_OUT-ECS = IT_CDTL-ECS.
    IT_OUT-MATNR = IT_CDTL-MATNR.
    IT_OUT-MAKTX = IT_CDTL-MAKTX.
    IT_OUT-CHAPID = IT_CDTL-CHAPID.
    IT_OUT-MENGE = IT_CDTL-MENGE.
    IT_OUT-MEINS = IT_CDTL-MEINS.
    APPEND IT_OUT.
    * EX_NO = IT_CDTL-EXNUM.
    ENDLOOP.
    * Title Portion
    IF REGTYP_1 = 'A'.
    SET TITLEBAR 'BALAJI' WITH DB_CNT.
    ELSEIF REGTYP_1 = 'C'.
    SET TITLEBAR 'BALAJI1' WITH DB_CNT.
    ENDIF.
    AFIELD-COL_POS = 1.
    AFIELD-FIELDNAME = 'SERIALNO'.
    AFIELD-SELTEXT_L = 'INPUTS'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 2.
    AFIELD-FIELDNAME = 'TEXT1'.
    AFIELD-SELTEXT_L = 'TYPE OF DOC'.
    AFIELD-JUST = 'L'.
    AFIELD-DECIMALS_OUT = '0'.
    AFIELD-NO_ZERO = 'X'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 3.
    AFIELD-FIELDNAME = 'EXNUM'.
    AFIELD-SELTEXT_L = 'DOC.NO'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 4.
    AFIELD-FIELDNAME = 'EXDAT'.
    AFIELD-SELTEXT_L = 'DOC.DATE'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 5.
    AFIELD-FIELDNAME = 'NAME'.
    AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
    AFIELD-NO_ZERO = 'X'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 6.
    AFIELD-FIELDNAME = 'DDTEXT'.
    AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 7.
    AFIELD-FIELDNAME = 'EXCCD'.
    AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
    AFIELD-NO_ZERO = 'X'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 8.
    AFIELD-FIELDNAME = 'BUDAT'.
    AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 9.
    AFIELD-FIELDNAME = 'EXBAS'.
    AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
    AFIELD-DO_SUM = 'X'.
    AFIELD-JUST = 'R'.
    AFIELD-DECIMALS_OUT = '2'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 10.
    AFIELD-FIELDNAME = 'EXBED'.
    AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
    AFIELD-JUST = 'R'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 11.
    AFIELD-FIELDNAME = 'ECS'.
    AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
    AFIELD-JUST = 'R'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 12.
    AFIELD-FIELDNAME = 'MATNR'.
    AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 13.
    AFIELD-FIELDNAME = 'MAKTX'.
    AFIELD-SELTEXT_L = 'DESCRIPTION'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 14.
    AFIELD-FIELDNAME = 'CHAPID'.
    AFIELD-SELTEXT_L = 'TARIFF-ID'.
    AFIELD-JUST = 'L'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 15.
    AFIELD-FIELDNAME = 'MENGE'.
    AFIELD-SELTEXT_L = 'QUANTITY'.
    AFIELD-JUST = 'R'.
    AFIELD-DO_SUM = ' '.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 16.
    AFIELD-FIELDNAME = 'MEINS'.
    AFIELD-SELTEXT_L = 'UOM'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 17.
    AFIELD-FIELDNAME = 'DEL_IND'.
    AFIELD-SELTEXT_L = 'Deleted'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    * * LAYOUT FOR ZEBRA CATLOG
    LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT_IN-ZEBRA = 'X'.
    LAYOUT_IN-GET_SELINFOS = 'X'.
    LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
    LAYOUT_IN-DETAIL_POPUP = 'X' .
    * SORTCAT-decimals = '0'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = G_REPID
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    I_SAVE = G_SAVE
    IS_VARIANT = GS_VARIANT
    IT_FIELDCAT = FIELDCAT
    IT_SORT = SORTCAT
    IS_LAYOUT = LAYOUT_IN
    IT_EVENTS = EVENTCAT
    * I_BACKGROUND_ID = g_back_ground
    TABLES
    T_OUTTAB = IT_OUT.
    *& Form TOP_OF_PAGE_LIST_HEADER
    * text
    * -->LIST_HEADERtext
    FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
    DATA : HLINE TYPE SLIS_LISTHEADER,
    TEXT(60) TYPE C.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    * WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE 'PLANT :' TO TEXT.
    WRITE WERKS TO TEXT+8.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE T001W-NAME1 TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE T001W-STRAS TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE T001W-ORT01 TO TEXT.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    CLEAR : HLINE,TEXT.
    HLINE-TYP = 'H'.
    WRITE 'DATE :' TO TEXT.
    WRITE BUDAT-LOW TO TEXT+7.
    IF BUDAT-HIGH NE ''.
    WRITE 'TO' TO TEXT+18.
    WRITE BUDAT-HIGH TO TEXT+22.
    ENDIF.
    HLINE-INFO = TEXT.
    APPEND HLINE TO LIST_HEADER.
    ENDFORM. "TOP_OF_PAGE_LIST_HEADER
    *& Form ALV_EVENT_INIT
    * text
    FORM ALV_EVENT_INIT .
    CLEAR ALV_EVENT.
    ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
    ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
    APPEND ALV_EVENT TO EVENTCAT.
    CLEAR ALV_EVENT.
    ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
    ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
    APPEND ALV_EVENT TO EVENTCAT.
    * CLEAR ALV_EVENT.
    * ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
    * ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
    * APPEND ALV_EVENT TO GT_EVENTS.
    * CLEAR ALV_EVENT.
    * ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
    * ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
    * APPEND ALV_EVENT TO GT_EVENTS.
    ENDFORM. "ALV_EVENT_INIT
    *& Form ALV_TOP_OF_PAGE
    * text
    FORM ALV_TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = LIST_HEADER
    I_LOGO = 'ENJOYSAP_LOGO'.
    ENDFORM. "ALV_TOP_OF_PAGE
    *& Form BUILD_EVENT
    * text
    * -->P_GT_EVENTS[] text
    FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = P_EVENTS
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2.
    READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
    ALV_EVENT.
    IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
    APPEND ALV_EVENT TO P_EVENTS.
    ENDIF.
    READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
    ALV_EVENT.
    IF SY-SUBRC = 0.
    MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
    APPEND ALV_EVENT TO P_EVENTS.
    ENDIF.
    ENDFORM. " BUILD_EVENT
    Reward if helpfull
    Regards
    Pavan

  • GOING TO SELECTION SCREEN FROM ALV GRID.

    Hi all,
    Iam using an ALV grid display.
    I have called the grid display every times when i select a check box in the grid display.
    Then when i click on the back button the screen navigates to the previous ALV grid. My requirement is to go to the first selection screen.
    For this I have coded in the Back button as Call selection--screen <screen no>.
    When i do this, and after navigation to the selection-screen when i click on the back button on the selection screen its navigating back to the ALV grid.
    But i need to exit to the program in this case.
    Can anyone Help me on this issue?
    Regards
    Naveen

    Naveen,
      Write below code,
    DATA ref1 TYPE REF TO cl_gui_alv_grid.
    WHEN 'BACK'
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
             IMPORTING
                  e_grid = ref1.
        CALL METHOD ref1->check_changed_data.
        CALL METHOD ref1->refresh_table_display.
        LEAVE TO SCREEN 0.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Aug 8, 2008 4:24 PM

  • Navigate to selection screen from ALV.

    Hi All,
    I am using ALV in my report which is editable alv. when i save after edit one more alv is generated with loggs. but when i click on back tab from application toolbar it navigate to previous alv. But i want to navigate to selection screen. so how to achive it.
    i have defined my own PF status and i tried following code which gives short dump.
    IF sy-ucomm = 'BACK'.
        SET SCREEN 1000.
        LEAVE TO SCREEN 1000.
      ENDIF.
    thanks ,
    Swarup.

    Hi Swarup,
    I have implemented the exact scenario, this is what you need to do.
    FORM f_alv_user_comm USING i_ucomm TYPE syucomm           
                              i_rs TYPE slis_selfield.
    *  Display ALV2 (This list shows the list blocked/unblocked customers)
        PERFORM f_display_alv2 CHANGING i_ucomm.
      IF i_ucomm EQ '&F03'.         " here you can use the back button code
    * Return to seletion screen
        LEAVE TO SCREEN 0.
      ENDIF.
    endform.
    In f_display_alv2 do like this :
    FORM f_display_alv2 CHANGING e_ucomm TYPE syucomm.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_bypassing_buffer = c_mark
            i_callback_program = w_repid
            is_layout          = lws_layout
            it_fieldcat        = int_fieldcat2[]
            it_events          = int_events_alv2
          TABLES
            t_outtab           = int_alv2_out
          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.
        ELSE.
          e_ucomm = '&F03'.                          " This will take the back button code
        ENDIF.
    endform.
    This is the right way to do it.
    Regards,
    Salil Sonam

  • Tab Strip Selection Screen in ALV Report

    Hi All,
    I want to create a ALV report with TABStrip selection screen. How to proceede.
    Is there any necessary to create dailog program for the screens.
    Please advise.
    Thank You,
    ANu.

    Hi
    You can create it using module pool program in an easy way. Have the tab strip in main screen and use the sub-screens for display. By this way you can do it. If you wish, you could refer the following link, where they have given step by step procedure.
    <<Link-farm removed>>
    Hope this helps you.
    Regards
    Vinodh
    Edited by: kishan P on Nov 1, 2010 3:00 PM

  • PF status of Selection screen and ALV Grid

    Hi,
    I need to create a report where on clicking the<b> 'ENTER'</b> key on application toolbar   on the <b>selection-screen</b> the processing logic should get  executed ( instead of clicking execute  pushbutton).
    For this i need to capture the function code associated with ENTER key on selection screen. How can i find this?
    Also , on clicking enter i have to display <b>an ALV grid</b> with the <b>SAVE</b> key activated on the toolbar.How can i activate SAVE key on application toolbar of ALV GRID. (<b>Selection-screen should not have save key</b> )
    thanks,
    vartika

    Hi
    you can just copy the alv standard pf status  into your alv.
    goto se41.
    enter "SAPLSLVC_FULLSCREEN"
    then copy the standard pf status " STANDARD_FULLSCREEN" to your program "xyz".
    in your prog, when you call the alv grid,
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
        i_callback_program                = l_v_repid
        i_callback_pf_status_set         = 'SET_PF_STATUS'  <----
        i_callback_user_command           = 'USER_COMMAND'
        i_callback_top_of_page            = 'ALV_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    tHEN CPOY PASTE THIS CODE:
    NOTE:  No need to make a perform for this....
    *       FORM SET_PF_STATUS                                         *
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS '/FIR/RRF2S0BG_ALV'.
      "Copy of standard pf_status from
    ENDFORM.                    "set_pf_status
    Now can see the full tool bar enabled in your alv grid.
    delete all the unwanted buttons from your programs pf status .
    Hope that helps.
    Cheers
    Ravish Garg.
    <i>
    Reward if useful</i>

  • Selective Sorting in ALV OOPS

    Hi
    Can you have 'selective sorting' in a single ALV OOPS grid?
    like i want only some specific rows to be sorted based on a condition.
    Any ideas?
    Thanks
    Pushpraj

    Problem Solved.
    Thanks
    Pushpraj

  • Regarding selection screens in alv.

    Hi experts,
    SELECTION-SCREEN COMMENT 01(31) text-026 for field rastbis1.
    what is meant by this statement, and what is meant by 01(31) after comment.

    HI
    SELECTION-SCREEN COMMENT 01(31) text-026 for field rastbis1
    this statment means that
    for filed RASLBIS! put TEXT-026 as the comment at location starting at 01 loaction and up to 31 location
    after this statment for that filed from 01 location to 31 you can write any comment
    it will display on the screen
    see this example
    for radiobuttons normally the text will display before and next button
    i had changed that button first and text next like this
    REPORT  ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
    ******DATA DECLARATIONS**********
    DATA : BEGIN OF IT_PLANT OCCURS 0,
            MATNR LIKE MARA-MATNR,
            WERKS LIKE MARC-WERKS,
            PSTAT LIKE MARC-PSTAT,
            EKGRP LIKE MARC-EKGRP,
           END OF IT_PLANT.
    DATA : BEGIN OF IT_PONO OCCURS 0,
            EBELN LIKE EKKO-EBELN,
            EBELP LIKE EKPO-EBELP,
            MATNR LIKE EKPO-MATNR,
            WERKS LIKE EKPO-WERKS,
            LGORT LIKE EKPO-LGORT,
           END OF IT_PONO.
    TABLES EKKO.
    ********END OF DATA DECLARATIONS*********
    ********SELECTION SCREEN DESIGN ***********
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
    SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
    SELECTION-SCREEN BEGIN OF LINE.
    <b>PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.</b>
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    <b>PARAMETERS : R2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.</b>
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    ******END OF SELECTION SCREEN DESIGN****************
    <b>Rewar dif usefull</b>

Maybe you are looking for

  • Error message 0x80010003 when trying to buy

    I have been unable to purchase anything off of iTunes since an issue I'm having with Safari started (cannot connect to secure sites.) Any idea why the two may be linked? After successfully browsing Music Store & selecting the desired purchase, I hit

  • Connecting an older (2009) Mac Mini to new TV

    I recently bought a new TV for the grandkid's playroom so they can watch movies on Apple TV and play on the game console. I have an older Mac Mini that I'd like to connect to the TV so they can play games on-line (Disney, Nickelodeon, etc). I thought

  • Mapping tested successfully in Simulator but fails in SXI_MONITOR

    Hi gyus, The Outbound message structure is the following: MT_CAP_BANKS actions     1..1    xsd:string RECORD   0..unbounded  Segment    Field1    Field2    etc The target Inbound message structure is the structure of the JDBC receicer adapter, since

  • Chinese PDF JRC Export urgent

    I used JRC in a java application, its not web based. since JRC does not embed the fonts in the pdf, i installed asian font packs so that i could view it properly, i also used chinese fonts for the fields that contains chinese values, but when i gener

  • Can i watch music videos in ipod nano...?

    it says in the menu "music videos", that means you can watch, right? O.O