Alv selection screen issue.

Hi,
   In my requirement i want to disable the screen field based on condition.
in input screen..
posting date------------select option
period------------------paramter
if user enters posting date means want to validate period or throw error message.(not allowed to enter period) and vice versa.
am having no radio button.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'ASD'.
IF mbudat IS not INITIAL.
SCREEN-INPUT = '1'.
ELSE.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
but it is not working.................Any one can suggest????/

Please don't repost the same question after having the previous rejected by a moderator.
This is relatively basic ABAP - please search and/or use help.sap.com.
<Thread locked>

Similar Messages

  • Variant in ALV selection screen

    Hi friends,
         How to protect a variant in ALV selection screen from changing or deleting by other users.
    Thanks,
    Rajesh

    Rajesh,
    You still need someone to be able to change the variant, right? That is what exactly PROTECT VARIANT does.
    If you select the field Protect variant, the variant can only be changed by the person who created it or last changed it.                         
    Regards,
    Ravi
    Note :Please mark the helpful answers  and close the thread if the quesiton is answered

  • Screen Text in ALV selection screen

    A user has asked me to add some text at the bottom of a selection screen in an ALV report program. In se80 I double clicked the screen (1000) and then went into the layout and added a text field with some text in it. The system then requested a transport and added a LIMU DYNP screen object to it. The only other object in the transport is the Report Source Code.
    When I run the transport to another system the new text fields disappear from the screen object although double clicking the screen object in the transport shows they are there.
    Any ideas why they disappear??

    I have tried selection-screen comment but there appears to be a limit to the size of the text string (83) and this is not long enough for our purpose as the next needs to go right accross the page. Thanks for replying.

  • Check box in ALV selection screen

    Hi to all
              I like to know how to create a checkbox in the input screen of an ALV.

    What do you mean by ALV check box selection screen?
    ALV and selection screen check box( you are mixing two cases in your Question).
    You need use the Function moduel in the user command to get the updated data.
    in fieldcatalog you have to use INPUT = 'X' and EDIT = 'X' for the columns which ever you want edit.
    GET_GLOBALS_FROM_SLVC_FULLSCR
    follow the sample code.
    REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
    TYPE-POOLS: SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    L_LAYOUT TYPE SLIS_LAYOUT_ALV,
    X_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    CHK(1),
    color(4),
    END OF ITAB.
    SELECT VBELN
    POSNR
    FROM VBAP
    UP TO 20 ROWS
    INTO TABLE ITAB.
    X_FIELDCAT-FIELDNAME = 'CHK'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 1.
    X_FIELDCAT-INPUT = 'X'.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-CHECKBOX = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-SELTEXT_L = 'VBELN'.
    X_FIELDCAT-HOTSPOT = 'X'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-SELTEXT_L = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 3.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_LAYOUT-info_fieldname = 'COLOR'.
    *L_LAYOUT-ZEBRA = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = L_LAYOUT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_FIELDCAT = IT_FIELDCAT
    TABLES
    T_OUTTAB = ITAB
    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.
    *& Form STATUS
    text
    -->P_EXTAB text
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    Pf status
    SET PF-STATUS 'STATUS'.
    ENDFORM. " STATUS
    *& Form USER_COMMAND
    text
    -->R_UCOMM text
    -->RS_SELFIELD text
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    DATA: GD_REPID LIKE SY-REPID, "Exists
    REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    IF REF_GRID IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = REF_GRID.
    ENDIF.
    IF NOT REF_GRID IS INITIAL.
    CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
    ENDIF.
    loop at itab where chk = 'X'.
    itab-color = 'C300'.
    modify itab index sy-tabix transporting color.
    endloop.
    RS_SELFIELD-refresh = 'X'.
    break-point.
    ENDFORM. "USER_COMMAND
    Regards
    Vijay Babu Dudla

  • SAP Query selection screen issues after ECC upgrade

    Hi all
    We have a custom query created and assigned to a custom transaction code, which after upgrade to ECC 6.0 we find that the selection screen layout is different from what was available in 4.6C system.
    All the fields required are available.
    However, the sequence of the fields on the screen is different from the 4.6C after the upgrade.
    Can anyone help identify the issue so that the issue can be resolved?
    Thanks
    Vinodh S

    Hi N_niki
    There is no resolution as such.
    We had raised a Customer message with SAP and were informed that this was expected as the procedure to execute the reports was changed in ECC when compared to 4.6 (technical changes) and hence this issue shall remain for some queries wherein the old changes need to be brought back using an option in the SAP Query.
    Please refer to SAP Note # 723577 which could provide a better explanation for the issue.
    Hope this helps.
    Thanks
    Vinodh Sudhakaran

  • Variable Selection Screen Issue in WAD

    Hi Guru's,
    I have created a Query in 3.5 and having Variables for the same as Acutal Good's Issued Date & Plant. I am able to see the variable screen with selection option(Intervals) in Query level. But I am not able to see the Variable selection option as interval in Portal (WAD). The variable is showing only as single value.
    Please suggest to get the variable selection screen as interval's.
    Regards,
    Bandi

    Hi,
    I got your point.When you open that query in Analyzer,it shows the variable screen and the variable is shown as a interval variable.But if you open the same query in Web Analyzer,the variable shown as single value variable.
    This looks little weird because both Web and BEx Analyzer uses the same Query.Can you execute the query in RSRT Tcode and check how the variable shown(whether as a Single or interval variable).
    And also check the variable definition.Try to create a new variable with the same settings and check the behavior.
    Rgds,
    Murali

  • Selection-screen issue

    HI All,
    I have to call a F4 value request at the selection screen by choosing one of the two radio buttons in the selection screen.I know that for calling f4 value request I have to use SELECTION-SCREEN VALUE-REQUEST on <FIELD>.
    but the problem is that i am not able to get the value of the radio button i.e. it is cheked or not.
    <b><u>actual scenario:</u>
    I have to upload a file using the function module.
    I can upload the file either from pc or application server of sap.
    so for pc upload i am using a function module which will open the browser, this will only happen when pc named radiobutton is checked.
    but in case of application server the user have to manually enter the file path when the app radio button is clicked but in case of application server the browser should not popup.</b>

        MOVE: 'P_RPRT'   TO T_DYNFIELDTAB-FIELDNAME.
        APPEND T_DYNFIELDTAB.
        CALL FUNCTION 'DYNP_VALUES_READ'
          EXPORTING
            DYNAME                         = SY-REPID
            DYNUMB                         = SY-DYNNR
          TABLES
            DYNPFIELDS                     = T_DYNFIELDTAB
          EXCEPTIONS
            INVALID_ABAPWORKAREA           = 1
            INVALID_DYNPROFIELD            = 2
            INVALID_DYNPRONAME             = 3
            INVALID_DYNPRONUMMER           = 4
            INVALID_REQUEST                = 5
            NO_FIELDDESCRIPTION            = 6
            INVALID_PARAMETER              = 7
            UNDEFIND_ERROR                 = 8
            DOUBLE_CONVERSION              = 9
            STEPL_NOT_FOUND                = 10
            OTHERS                         = 11
        IF SY-SUBRC = 0.
          READ TABLE T_DYNFIELDTAB INDEX 1.
          IF SY-SUBRC = 0.
            MOVE T_DYNFIELDTAB-FIELDVALUE TO P_RPRT.
          ENDIF.
        ENDIF.

  • Selection screen issue with hierarchy variable, due to compounding

    Hello people,
    I'm having this odd effect with a Hierarchy variable in the selection screen of a query,  the IObject is 0PROFIT_CTR.
    When I display the hierarchy values and pick up one of them, it returns ok to the sel.screen in this format: CO_AREA + "/" + ProfitCtr Value, example: "CANI/AR03".  (CO_AREA is compounding of 0PROFIT_CTR).
    Now,  if I hit the "check" button in the selection screen, the system converts the value to an different one, by repeating twice the compounding (CO Area) value, therefore creating an incorrect value like this: "CANI/CANIAR03". Note the string after the "/" is supposed to have only the profit center value, however now has also CO Area value (repeated).
    This value goes effectively to the query execution, but because this value does not exist, I get a message "SID value not found" and the effect is that the query does not get filtered by the value I picked up.
    Note, the same happens if I go directly to the query execution without hitting the check button, as it seems internally the system its doing the same conversion before sending the value to the query.
    I can't figure out if this is a problem of the variable, the hierarchy or the selection screen mechanism.... but I cannot find an explanation/solution.
    I trust someone has already facing this!!
    cheers and happy August to everyone.
    Fernando

    Sorry, but actually its the parent that needs tagging with "Never Share", not the level 0 member, so Alt_Entity1 and Alt_Entity2 etc, see Essbase DBA guide
    understanding Implied
    Sharing
    The shared member property defines a shared data relationship explicitly. Some
    members are shared even if you do not explicitly set them as shared. These
    members are said to be implied shared members.
    If you do not want a member to be shared implicitly, mark the parent as Never Share so
    that the data is duplicated, and is not shared. See Understanding Shared Members for an
    explanation of how shared members work.
    So in the example above
    Entity Dimension:
    E1 (user has access)
    E2
    E3(user has access)
    E4
    Alt_Entity
    Alt_Entity1 - Set to "Never Share"E1 (sharedmember)
    Alt_Entity2E2 (sharedmember)
    Alt_Entity3 - Set to "Never Share"E3 (sharedmember)
    Alt_Entity4E4 (sharedmember
    Thanks
    Anthony

  • Infoset Query Selection Screen Issue

    Dearf Experts,
    I am a SAP-PM functional area. (Do know very little about technical sideof SAP)
    I am working on SQ03/SQ02/SQ01 for the first time to create an Infoset query.
    The output screen is incontrol and showing all the fields as per my specifications.
    My problem is the Selection Screen. This is displaying to many things not desired by me.
    1. Two tabs (I do not expect any tabs)
    2. Many Screen areas, repeating the fields (1000,0100,0101,0102,0103) 
    The screen area of my specified fields in at the bottom.
    My expectations about the selection screen is - just like simple one as in the case of SQVI.
    Please help me in getting through this problem.
    Regards
    Jogeswara Rao

    Gungor Ozcelebi,
    Thank you very much for responding,
    Exactly as you said, I am using Notifications logical database.
    (I was suspecting this reason)
    Infact I found about 8 fields (Perhaps related to Date fields, checkboxes etc) are automatically selected from the LDB.
    My trials to delete them were invain. They reappear while saving.
    I would be very thankful, if you help me in this case.
    Regards...

  • ALV selection screen

    Hi,
    Iam new to A.L.V and have few queries.please tell me the coding for the below.
    At selection screen:
    Process the following validations for selection screen fields and display the appropriate error messages.
    1.     Validate  the Date From (SAP Transaction Date ) against VEKP –Created-On Date .
    2.     Validate  the Date From (SAP Transaction Date ) against VEKP –Created-On Date .
    3.     Validate the Plant From (Transaction Source Location ) against VEKP – Shipping Point.
    4.     Validate the Plant To (Transaction Destination Location ) against VEKP – Shipping Point.
    5.     Validate the Pallet ID against VEKP – Handling Unit.
    6.      If Date From field is blank, display an appropriate error message.
    7.     If Plant From field is blank, display an appropriate error message.
    Kindly send me the coding for this.
    Regards,
    Tanya

    Hi,
    the code is  :
    *For VEKP-Created-on-date :
    AT SELECTION-SCREEN ON s_erdat.
      IF NOT s_erdat[] IS INITIAL.
        SELECT erdat FROM VEKP    INTO VEKP-ERDAT
                      WHERE ERDAT IN s_erdat.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE 'Enter a valid created date' Type E.
        ENDIF.
    Else ( for question 6& 7)
    MESSAGE 'Enter a date in the Date From field' Type E.
      ENDIF.
    from 1 to 2, the above was the code.. and from 3 to 5 - the else paart is not requried..

  • BW-BPS Variable Selection Screen Issue

    We currently use BW-BPS as our planning tool with the web-based interface.  One of our planning web screens includes a cost center variable with the user selection configured as Input Field with Input Help.  This allows the user to select the cost center using search parameters in a pop-up screen.  I recently created a new web interface by copying the existing one and making minor changes.  After generating it, the new interface works as planned, however the data in the cost center search pop-up box is garbled. 
    Since the original screen works fine, I theorized that the act of generating the interface caused the issue.  I confirmed this by generating the original web screen without making any changes and it saw that it also has garbled pop-up search data.  I then changed the setting from Input Field with Input Help to Dropdown Box and re-generated.  This worked normally therefore the issue seems to specific to generating the Input Field with Input Help settings. 
    Are there any notes out there to correct this generation issue? We are currently on the following:
    SAP_BASIS - 700 - 0025
    SAP_ABA - 700 - 0025
    PI_BASIS - 2006_1_700 - 0015
    ST-PI - 2008_1_700 - 0004
    SAP_BW - 700 - 0027
    FINBASIS - 600 - 0020
    SEM-BW - 600 - 0020
    BI_CONT - 703 - 0016

    Hi,
    I got your point.When you open that query in Analyzer,it shows the variable screen and the variable is shown as a interval variable.But if you open the same query in Web Analyzer,the variable shown as single value variable.
    This looks little weird because both Web and BEx Analyzer uses the same Query.Can you execute the query in RSRT Tcode and check how the variable shown(whether as a Single or interval variable).
    And also check the variable definition.Try to create a new variable with the same settings and check the behavior.
    Rgds,
    Murali

  • Regarding ALV selection screen

    hi all,
    my issue:
    i have an alv report which has almost 10 paramters based on which the internal table will be populated. the two parameters are mandatory .. 4 are select options and 4 are radiobuttons. i think this will lead to a lot of select queries.
    i was wondering if there is any way we can minimize the no. of select query.
    also would like to know if ranges table can work in such a scenario.
    9 fields are from table pLAF and two are from MARA and MKAL respectively
    please advice.
    thanks in advance
    Srinivas

    Hi,
    For select-options,You dont have to check whether that field is initial or not.So For 4 select-options, u can use one select query.2 parameter field is also mandatory so you dont have to check those 2 field is intial or not.U got to put 4 if condition for 4 radio buttons.
    Eg:
    If rd_1 = 'X'.
    select field1 field1 from <table1> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    elseif rd_2 = 'X'.
    select field1 field1 from <table2> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    elseif rd_3 = 'X'.
    select field1 field1 from <table3> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    elseif rd_4 = 'X'.
    select field1 field1 from <table4> into table where field1 = p_param1
            and field2 = p_param2
    and field3 in s_selop1
    and field4 in s_selop2
    and field5 in s_selop3
    and field6 in s_selop4.
    endif.

  • Bex variable selection screen issue

    Dear All,
    I have three variables in my Bex report -- Submission date, User ID and Company Code. The variable -- 'Submission date' is of type 'Replacement Path'. Other two are User entry.
    When I run the report, only the 'User ID' and 'Company code' variables are displayed. After I supply the values to these, 'Submision date' screen pops up. But I require that all the three variables on a single scren at a time.
    Thanks,
    Srinivas

    Hi.....
    O.k. I agree with you. But when I execute the report in Web(or in Portal), then in that case all the variables are displayed in the same screen. How is this possible ?
    Thanks,
    Srinivas

  • 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

  • From ALV output list to selection screen

    Hi,
    I created one ALV report.
    After executing the program, it displays an ALV list.
    When I click on the back/exit/cancel buttons on the screen, it should take me to the selection screen.
    But that is not happening. it is taking to one screen which shows the report heading. IF i click back/cancel/exit buttons in this screen, it is taking me to the selection screen.
    I checked the program for any write statement, but therre are no write statements.
    Even i tried to remove the end-of-selection event in the program. but not working.
    Can any one help me on this how to overcome this issue.
    Thank you.
    Kumar

    hi check this example...
    REPORT zalv_sel_screen .TABLES: mara.DATA: BEGIN OF i_alv OCCURS 0,
          matnr TYPE mara-matnr,
          mtart TYPE mara-mtart,
          matkl TYPE mara-matkl,
          groes TYPE mara-groes,
          maktx TYPE makt-maktx,
          END OF i_alv.DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.PARAMETERS: p_check.INITIALIZATION.  PERFORM get_data.AT SELECTION-SCREEN OUTPUT.  DATA: variant TYPE  disvariant.
      DATA: repid TYPE sy-repid.  repid = sy-repid.  variant-report = sy-repid.
      variant-username = sy-uname.  layout-zebra = 'X'.
      layout-edit_mode = 'X'.  CHECK alv_container IS INITIAL.  CREATE OBJECT alv_container
                  EXPORTING repid     = repid
                            dynnr     = sy-dynnr
                            side      = alv_container->dock_at_left
                            extension = 1500.  CREATE OBJECT alv_grid
             EXPORTING
                   i_parent          =  alv_container.*  ALV Specific. Data selection.
    Populate Field Catalog
      PERFORM get_fieldcatalog.  CALL METHOD alv_grid->set_table_for_first_display
        EXPORTING
          is_layout        = layout
          is_variant       = variant
          i_save           = 'U'
          i_structure_name = 'I_ALV'
        CHANGING
          it_outtab        = i_alv[]
          it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    FORM GET_DATA
    FORM get_data.  SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
            FROM mara
              INNER JOIN makt
                ON maramatnr = maktmatnr
                       UP TO 100 ROWS
                   WHERE makt~spras = sy-langu.  SORT i_alv ASCENDING BY matnr.ENDFORM.                    "get_data***************************************************************
         Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.  DATA: ls_fcat TYPE lvc_s_fcat.
      REFRESH: fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '1'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Type'.
      ls_fcat-fieldname  = 'MTART'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '10'.
      ls_fcat-fix_column = 'X'.
      ls_fcat-key        = 'X'.
      ls_fcat-col_pos    = '2'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Group'.
      ls_fcat-fieldname  = 'MATKL'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '12'.
      ls_fcat-col_pos    = '3'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Size'.
      ls_fcat-fieldname  = 'GROES'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '30'.  ls_fcat-col_pos    = '4'.
      APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-fieldname  = 'MAKTX'.
      ls_fcat-ref_table  = 'I_ALV'.
      ls_fcat-outputlen  = '40'.  ls_fcat-col_pos    = '5'.
      APPEND ls_fcat TO fieldcat.ENDFORM.                    "get_fieldcatalog
    regards,
    venkat

Maybe you are looking for

  • Any way to connect ipod touch 3G to other non apple devices via Bluetooth??

    Hey People, I was jus wondering , can i connect ipod touch 3G to other non apple devices via Bluetooth?? is there any special application which fullfill my wish, if it is there, then it will make my day,,,,,,,,,,,,,,,

  • When downloading v3.6.6 the dialog box shows 'download paused'

    I normally update FF when prompted, and did so when v3.6.6 was released. Howvere, the dialog box appeared to function properly until it said 'download paused', and now won't go away or let me start again. How do I cancel this download to try again? =

  • Asynchronous event in Process chain

    Hi Experts , What is the use of asynchronous scheduling of an event in the process chain (using ABAP program) . I have used synchronous and local selections generally for my process chains earlier , but was wondering where could we exactly use asynch

  • Transport Number range intervals

    Hi, I have created a custom number range with intervals (from & to number range values) i need to transport this to production and unit testing boxes. how to create a transport for this. and also it is advisable to transport number ranges? Thanks Sa_

  • IMac G5 Trouble with OS 10.3.5 Reinstall

    I reciently upgraded to 10.4.11. I had some kernel panics and the machine went to gray screen when booting and never came out of it. I booted off the 10.4 disk ran disk utility, it failed. (I can't remember the error message )Tried to load 10.4 back