Execute Report, while pressing push button

Hello friends,
I have a selection-screen with some parameters or so..... now I want to place a pushbutton over this screen ( how to place a pushbutton, do I need a dynpro). when user press this pushbutton, I want to execute a report, and have to send parameters to this report?
is this possible in ABAP ?
Many thanks for your kind help....

HI Syed,
  To call a report program from another report, use
SUBMIT statement.
You can pass the values from the first report to the second report using export /import statements or with ranges addition.
Example
The program report1 has a stand-alone selection screen with the screen number 1100. In the program report2, an internal table with row type RSPARAMS and a ranges table are filled for this selection screen. These are transferred at SUBMIT together with a single condition.
Program accessed
REPORT report1.
DATA text(10) TYPE c.
SELECTION-SCREEN BEGIN OF SCREEN 1100.
  SELECT-OPTIONS: selcrit1 FOR text,
                  selcrit2 FOR text.
SELECTION-SCREEN END OF SCREEN 1100.
Calling program
REPORT report2.
DATA: text(10)   TYPE c,
      rspar_tab  TYPE TABLE OF rsparams,
      rspar_line LIKE LINE OF rspar_tab,
      range_tab  LIKE RANGE OF text,
      range_line LIKE LINE OF range_tab.
rspar_line-selname = 'SELCRIT1'.
rspar_line-kind    = 'S'.
rspar_line-sign    = 'I'.
rspar_line-option  = 'EQ'.
rspar_line-low     = 'ABAP'.
APPEND rspar_line TO rspar_tab.
range_line-sign   = 'E'.
range_line-option = 'EQ'.
range_line-low    = 'H'.
APPEND range_line TO range_tab.
range_line-sign   = 'E'.
range_line-option = 'EQ'.
range_line-low    = 'K'.
APPEND range_line TO range_tab.
SUBMIT report1 USING SELECTION-SCREEN '1100'
               WITH SELECTION-TABLE rspar_tab
               WITH selcrit2 BETWEEN 'H' AND 'K'
               WITH selcrit2 IN range_tab
               AND RETURN.
Regards,
Ravi

Similar Messages

  • While Pressing the button i want to skip first screen in standard screen.

    Hello All,
    I need to create a z Program and call a screen variant of a standard transaction in it.
    I am calling a screen variant of transaction PA70 to hide some of the fields of the screen.
    Also the first screen is supressed.
    My requirement is while pressing back button it should not come on the first screen.
    while if i am doing the same thing with Transaction PA20 it is not coming back to first screen.
    How can i supress this first screen while coming back?
    Regards.

    Hi,
    Use:
    "set al the field values on the initial screen of the transaction and then use
    CALL TRANSACTION '<t-code>' AND SKIP FIRST SCREEN.
    Now you will be navigated to second screen of the transaction, when you click, you will be navigated to your program selection screen.
    Hope this helps you.
    Regards,
    Tarun

  • Am having major issues! this does not work i dont understand..does the ipod have to be off while pressing the buttons if so how is it possible if it is connected to the computer either way it turns on..and when i tried these steps while the ipod was on it

    i am having major issues! this does not work i dont understand..does the ipod have to be off while pressing the buttons if so how is it possible if it is connected to the computer either way it turns on..and when i tried these steps while the ipod was on it still doesnt  work it just asks me “slide to power off” please someone help me i just cant seem to put my ipod in DFU mode

    To get the iPod in recovery mode and DFU mode you first have to turn the iPod off.
    Just what is the problem you are tying to resolve?
    Sometimes you have to let the battery fully drain if you can't turn the iPod off. After charging for at least hour try again.

  • Bex Analizer - while pressing "Open" button or any other there is no action

    Hello,
    We have a problem with Bex Analizer application installed on a certain computers (for example Dell 520 laptop or Dell GX 755 desktop computer). After installation there is no possibility to initiate application.
    The instalation ends successfully. I am choosing Start -->  Programs --> Bussiness Explorer --> Analyzer. The correct excel window with Bex Analyzer belt on the left side of the window appears. While pressing u201EOpenu201D button or any other button belonging to Bex Analizer, there is no any program action.
    Computer with this Bex Analizer problem has WinXP, Office 2003 installation, gui patch no. 13 (file: gui710_13-10002995.exe)  and BEX patch (file: bi710sp09p_902-10004472.exe). These files are also installed on other computers (for example Dell 630 laptop) and Bex Analizer works there correctly.
    Waiting for your reply.
    Adam Pikula

    Hi,
    Please try the following....
    Uninstall:
    .NET Framework, if this is not 2.0
    SAP GUI
    Install:
    .NET Framework 2.0
    SAP GUI 710 - install GUI and Business Explorer
    GUI path 11
    BI Add - on for GUI "bi710sp09p_902-10004472.exe"
    Other Way:
    Applying the patch attached to the OSS Note 1121263 - BEx Analyzer 7.10
    Applying the Microsoft patch : http://support.microsoft.com/kb/908002/
    Rgds,
    Murali

  • How to stay back on same section of a report after pressing cancel button

    Hi,
    How we can stay back on a same section of a report page when I press Cancel button or Apply Changes button from linked Data Entry Form. For instance if I have a 200 rows in a report and I scroll down to 80th row and press Edit button when called a data entry form. Now when I press Cancel it again re-load the report from the start of the page.
    Any idea!
    Thanks
    Sabahat

    Hi Sajid,
    Thanks for reply.
    I have used RETURN statement like below.
    SUBMIT RFWT0010 WITH vendor       = 'X'
                     WITH i_lifnr  IN i_lifnr
                     WITH i_bukrs  IN i_kunnr
                     WITH test         = 'X'
                      AND RETURN.
    The output of RFWT0010 is displayed. but on pressing "back" button on toolbar, the flow is coming back  from RFWT0010 to calling report. I want that On pressing ENTER button of keyboard. The flow should come back to calling report.
    Regards,
    Ratnesh

  • Saving a plot as a hws file while pressing a button

    I wanna save a plot received from a digital scope as a hws file while the button shown on the figure (its just a cutting/the important part of the program) below is in pressed (true) state.
    But when im running this program and i press the button always a hws file of a constant length is saved. It makes no difference how long the button stays pressed.
    What could be wrong?
    Attachments:
    save hws file.jpg ‏103 KB

    Without knowing all of the details of your app, I see two issues that don't match up with what you mentioned you are trying to do.
    1) The Open Waveform VI is set to "Create New Always", so at each iteration of your while loop, the old HWS file is being destroyed and a new one is getting created in it's place. If you are intending to append data to an HWS file, you must use the "Read/Write" permissions only.
    2) Your inner for loop has a Create New Waveform VI inside of it. So what is happeing is that each iteration of your for loop is creating a new waveform inside of your HWS file rather than appending to the already existing one. HWS files can save multiple waveforms into one HWS file. I see you are naming each waveform, so I'm guessing this was intentional.
    If you are trying to stream to a file only when the button is pressed, my guess is that your problem is with item 1) above. When the button is pressed, any existing HWS files at that filepath are getting destroyed, and a new one is getting created in it's place. So when your application is finished, you will have one file with one set up data in it. The data will be from the last while loop interation when the boolean was set to true.
    If you are trying to append to an existing HWS file, you will need to open the file with Read/Write permissions and then use the Open Existing Waveform VI rather then the Create New Waveform VI inside of your for loop.
    -JaredW

  • Create trigger to execute report upon pressing enter

    Hi,
    I have a screen where users input a vendor number and then have to click the execute button to view the report. I want to create some sort of trigger so when the user presses the enter button the program will execute instead of having to press the execute button or F8. Does anyone know how to create this event? Thanks for your help!
    Shane

    Hi,
    You need to check sy-ucomm at selection screen.If its  for "enter" then execute the program.Same as the execute button does.
    I am not sure if sy-ucomm gets captured there, It should be blank.Just try once.
    Edited by: sap_wiz on May 26, 2011 10:39 AM

  • LIRC - 100% cpu usage while pressing a button

    Hi all.
    I'm having some problems with latest lirc versions. It just uses 100% of my cpu while I press any key on the remote. For example, with xbmc, pressing a remote control button makes a one second video lag and frame dropping due to high cpu usage...
    I'm using latest kernel and lirc in testing repo
    Pinnacle pctv remote (and receiver, rs232 ou ttyS0).
    I can't follow the wiki since kernel 2.6.25 (maybe), if i do modprobe lirc_serial (and before a setserial uart none), on irw, nothing happens. -> this used to work before.
    I've edited /etc/conf.d/lircd in order to make this remote to work. I don't need anymore to load lirc_serial and remote works... but uses ALL CPU resources.
    Solutions? Anyone with same problem?
    Thanks friends:D
    Last edited by TigTex (2009-07-08 02:11:22)

    What about a "bump" to this...
    Bump

  • Strange error while pressing a button

    Hello. I am having trouble when clicking on a button... it gives me the following error and I have no idea what this means.
    - Thank you
    Franklin Angulo
    javax.servlet.ServletException: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:824)
         org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:69)
         org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:747)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:745)
         org.apache.jsp.opcventan_jsp._jspService(opcventan_jsp.java:78)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         java.security.AccessController.doPrivileged(Native Method)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    root cause
    java.lang.IllegalArgumentException: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
         com.sun.faces.util.Util.getSelectItems(Util.java:642)
         com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:488)
         com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:465)
         com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:430)
         javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
         javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:616)
         javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:539)
         com.sun.faces.taglib.html_basic.SelectOneMenuTag.doEndTag(SelectOneMenuTag.java:505)
         org.apache.jsp.opcventan_jsp._jspx_meth_h_selectOneMenu_0(opcventan_jsp.java:288)
         org.apache.jsp.opcventan_jsp._jspx_meth_h_form_0(opcventan_jsp.java:150)
         org.apache.jsp.opcventan_jsp._jspx_meth_f_view_0(opcventan_jsp.java:110)
         org.apache.jsp.opcventan_jsp._jspService(opcventan_jsp.java:71)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         java.security.AccessController.doPrivileged(Native Method)
         java.security.AccessController.doPrivileged(Native Method)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    note

    What other components do you have on your form?
    When you click a button that typically submits the form, at which time converters and validators will be applied to you inputtext and dropdown components etc.
    Looking at your messages, something with select items looks like it could be the issue - do you have a dropdown or some other list component?
    if you don't want the converters/validators to be triggered, you can set the immediate property on the button itself... this is something we do at times when the button will navigate to another form and the validation is not needed (we intend to discard the values anyway).
    hyh,
    Val

  • Urgent: getting error while pressing SAVE button on final grid screen

    Hi ABAPers,
          please help me to sort this problem, i want to save the records selected by the user to database table. but when i m pressing save on o/p grid screen its giving error as GETWA_NOT_ASSIGNED.
    This is my code
    TABLES: plaf,
            mara,
            makt,
            zcdr_d.
    Type Pools for ALV *************************************
    TYPE-POOLS: SLIS,
                ABAP.
    TYPES DECLARATION ************************************
    TYPES:
    ******Types declaration for the plaf
    BEGIN OF ty_plaf,
    plnum TYPE plaf-plnum,
    matnr TYPE plaf-matnr,
    END OF ty_plaf,
    ******Types declaration for the makt
    BEGIN OF ty_makt,
    maktx TYPE makt-maktx,
    END OF ty_makt.
    INTERNAL TABLE DECLARATION ***************************
    DATA:
    *---internal table for the type ty_plaf
    it_plaf TYPE TABLE OF ty_plaf,
    *---internal table for the type t_bseg
    it_makt TYPE TABLE OF ty_makt,
    *---internal table for fieldcat
    it_fcat TYPE TABLE OF slis_fieldcat_alv WITH NON-UNIQUE DEFAULT KEY
    WITH HEADER LINE INITIAL SIZE 0,
    *it_fcat1 TYPE TABLE OF slis_fieldcat_alv WITH NON-UNIQUE DEFAULT KEY
    *WITH HEADER LINE INITIAL SIZE 0,
    *---internal table for alv events
    it_events TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
    WITH HEADER LINE INITIAL SIZE 0,
    *it_events1 TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
    *WITH HEADER LINE INITIAL SIZE 0,
    *---final Internal table
    BEGIN OF it_final OCCURS 0,
    plnum LIKE plaf-plnum,
    sel TYPE C,
    matnr LIKE plaf-matnr,
    maktx LIKE makt-maktx,
    END OF it_final,
    BEGIN OF it_zcdr_d OCCURS 0,
    DSEL TYPE C,
            CBOOKNO LIKE zcdr_d-CBOOKNO,
            PLNUM LIKE zcdr_d-plnum,
            MATNR LIKE zcdr_d-matnr,
            MAKTX LIKE zcdr_d-maktx,
    END OF it_zcdr_d,
    *-------to pass the internal table data to database table
    itab TYPE TABLE OF zcdr_d with header line,
    it_save TYPE TABLE OF zcdr_d with header line.
    WORK AREA DECLARATION ********************************
    DATA:
    *---workarea for the type ty_plaf
    wa_plaf TYPE ty_plaf,
    *---workarea for the type ty_makt
    wa_makt TYPE ty_makt,
    *---workarea for the fieldcatalog
    wa_fcat TYPE slis_fieldcat_alv,
    wa_final LIKE LINE OF it_final,
    *---WORKAREA FOR THE PROCESSED DOCUMENT
    wa_zcdr_d LIKE LINE OF it_zcdr_d,
    *---LAYA OUT DECLARATION
    wa_layout TYPE slis_layout_alv.
    *---LAYA OUT DECLARATION
    *wa_layout1 TYPE slis_layout_alv.
    Variables DECLARATION ********************************
    DATA: v_repid LIKE SY-REPID,
               v_hkont LIKE bseg-hkont,
               v_pifno(16) TYPE C,
               v_pifdat LIKE SY-DATUM,
               v_pif(6) TYPE C,
               Field_Cat type Slis_T_fieldcat_alv with HEADER LINE,
               List_Top_Of_Page type Slis_T_Listheader.
    PARAMETERS ****************************************
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS : CBOOKNO(16) TYPE n OBLIGATORY.      "Customs Book number
    SELECTION-SCREEN END OF BLOCK b1.
    SELECT OPTION ****************************************
    SELECTION-SCREEN : BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:
    Date
    so_pertr for plaf-pertr,
    Material
    so_matnr for plaf-matnr,
    Material Group
    so_matkl for mara-matkl,
    Plant
    so_plwrk for plaf-plwrk OBLIGATORY,
    Sales Order
    so_kdauf for plaf-kdauf.
    SELECTION-SCREEN : END OF BLOCK blk.
    LOAD OF PROGRAM ***************************************
    *LOAD-OF-PROGRAM.
    *IF sy-tcode NE text-002. "Condition for TCode Check
    MESSAGE 'RUN THROUGH THE TRANSACTION CODE' TYPE 'X'.
    *ENDIF. "End Condition for TCode
    INITIALIZATION ****************************************
    INITIALIZATION.
    PERFORM CLEAR_DATA.
    CLEAR: wa_layout.
    START-OF-SELECTION *************************************
    START-OF-SELECTION.
    *-------Getting the data from database
    PERFORM GET_DATA.
    *-------Populating field catalog
    PERFORM populate_fieldcatalog.
    PERFORM set_events USING it_events[].
    PERFORM top_of_page.
    *------Processing the Data and Moving to final Internal Table
    *PERFORM PROCESS_DATA.
    *------Displaying the data in the Output
    PERFORM DISPLAY_OUTPUT.
    *end-of-SELECTION.
    *call screen 0500.
    **&      Module  d0100_set_status  OUTPUT
          text
    *module d0500_set_status output.
    data : rt_extab TYPE slis_t_extab.
    perform set_pf_status USING rt_extab.
    *endmodule.                 " d0100_set_status  OUTPUT
    *module d0100_fcode input.
    perform user_command.
    *endmodule.                 " d0100_fcode  INPUT
    form CLEAR_DATA .
    **CLEARDING THE TABLES AND WORK AREAS
    CLEAR: it_plaf[],
    it_makt[],
    wa_plaf,
    wa_makt.
    endform. " CLEAR_DATA
    *& Form GET_DATA
    text
    --> p1 text
    <-- p2 text
    form populate_fieldcatalog.
      DATA: L_POS TYPE I.
    FIELD_CAT-COL_POS   = L_POS.
    L_POS = L_POS + 1.
    CLEAR FIELD_CAT.
    field_cat-SELTEXT_M = 'Planned Order Nos.'.
    field_cat-tabname = wa_final.
    field_cat-fieldname = 'PLNUM'.
    append field_cat.
    FIELD_CAT-COL_POS   = L_POS.
    L_POS = L_POS + 1.
    CLEAR FIELD_CAT.
    *field_cat-checkbox = 'X'.
    field_cat-SELTEXT_M = 'Check Box'.
    Field_Cat-outputlen = '1'.
    field_cat-tabname = wa_final.
    field_cat-checkbox  = abap_true.
    field_cat-edit = abap_true.
    field_cat-fieldname = 'CHK'.
    append field_cat.
    FIELD_CAT-COL_POS   = L_POS.
    L_POS = L_POS + 1.
    CLEAR FIELD_CAT.
    field_cat-SELTEXT_M = 'Material'.
    field_cat-tabname = wa_final.
    field_cat-fieldname = 'MATNR'.
    append field_cat.
    FIELD_CAT-COL_POS   = L_POS.
    L_POS = L_POS + 1.
    CLEAR FIELD_CAT.
    field_cat-SELTEXT_M = 'Material Description'.
    field_cat-tabname = wa_final.
    field_cat-fieldname = 'MAKTX'.
    append field_cat.
    endform. "  build_fieldcatalog
    form GET_DATA .
    SELECT
              a~PLNUM
              a~MATNR
              b~MAKTX
              c~matkl
              INTO CORRESPONDING FIELDS OF TABLE it_final
              FROM plaf as a
              Inner join makt as b
              on amatnr  = bmatnr
              Inner join mara as c
              on cmatnr = bmatnr
              where a~pertr in so_pertr
                    or a~matnr in so_matnr
                    or c~matkl in so_matkl
                    or a~kdauf in so_kdauf
                    or a~plwrk in so_plwrk.
    SORT it_final by plnum.
    endform. " GET_DATA
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = List_Top_Of_Page.
      ENDFORM.
    form DISPLAY_OUTPUT .
    DATA:   repid LIKE sy-REPID,
            Eventcat type Slis_T_Event,
            LAYOUT TYPE SLIS_LAYOUT_ALV.
        LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
        LAYOUT-ZEBRA = 'X'.
    repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                  =  repid
       I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = 'PLANNED ORDERS'
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         = layout
       IT_FIELDCAT                       = Field_Cat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
       I_SAVE                            = 'X'
      IS_VARIANT                        =
      IT_EVENTS                         = IT_EVENTS[]
      TABLES
        T_OUTTAB                          = it_final
    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 set_events USING it_events TYPE slis_t_event.
    DATA: x_event TYPE LINE OF slis_t_event.
    clear x_event.
    x_event-name = 'USER_COMMAND'.
    x_event-form = 'USER_COMMAND'.
    append x_event to it_events.
    CLEAR x_event.
    call function 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        I_LIST_TYPE           = 0
      IMPORTING
        ET_EVENTS             = IT_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.
    read table it_events into x_event with key name = 'USER_COMMAND'.
          if sy-subrc = 0.
          x_event-form = 'USER_COMMAND'.
          modify it_events from x_event index sy-tabix transporting form .
          endif.
    ENDFORM.
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'Z_PFSTAT'.
    ENDFORM. "set_pf_status
    *& Form user_command
    text
    -->R_UCOMM text
    -->RS_SELFIELDtext
    FORM user_command USING
             r_ucomm TYPE sy-ucomm
             rs_selfield TYPE slis_selfield. "#EC *
    if r_ucomm = '&DATA_SAVE' .
    LOOP AT it_final INTO wa_final.
    IF wa_final-sel EQ 'X'.
    MOVE: wa_final-plnum TO it_save-plnum,
    wa_final-matnr TO it_save-matnr,
    wa_final-maktx TO it_save-maktx,
    v_pifno TO it_save-CBOOKNO,
    SY-MANDT TO it_save-mandt.
    MOVE it_save to zcdr_d.
    *INSERT zcdr_d.
    *if l_valid = 'X'.
    MODIFY zcdr_d FROM TABLE it_save.
    endif.
    ENDLOOP.
    IF it_save is initial.
    MESSAGE 'Select Atleast one Check Box' TYPE 'E' .
    ELSE.
    *CONCATENATE 'Number ' V_PIFNO ' Genrated'
    IF SY-SUBRC EQ 0.
    MESSAGE S001(zcdr_d) WITH 'Number ' CBOOKNO ' Genrated'.
    ENDIF.
    endif.
    ENDFORM.

    Thanks a lot for the reply Kiran, but i have already checked it, but its the same one. In debugging mode its going for error when there is a call for method like: 
    call method gt_grid-grid->set_function_code
          changing
            c_ucomm = l_okcode.
    so i dont know where is the problem. & this is in PAI module of the system program.
    Thanks
    Pankaj

  • I want to execute selection screen by pressing enter button

    Hi,
    I have a requirement like after giveing values in selection screen I want to execute it by pressing enter button not by pressing execute button.
    Please give some sample code if u have any solution.
    Thanks & Regards
    Venkatrami Reddy B

    Hi,
    You can achive this.
    You just need to do all your coding under even AT SELECTION-SCREEN OUTPUT.
    But you have to put a check also say counter.
    Define a variable of type integer and then put the check on the mail block of code (whole program eccept selection screen) as mentioned below.
    IF lv_count > 1.
    program lines..
    ENDIF.
    lv_count = lv_count + 1.
    Regards,
    Raj Gupta

  • Push button on selection screen

    Hi,
    I have provided push button on selection screen after input fields I mean just below to input fields by using the syntax selection screen pushbutton…..   And it is appearing on the selection screen.  As per the requirement I need to enter material number on the selection screen and if I press corresponding push button I need to call one transaction using bdc program.  I wrote case sy-comm and corresponding user command ( whatever is there in the selection screen syntax) in when condition under start of selection event.
    But the control is not going to that place after I press push button. If I put that code inside of at selection screen it is going. But I can not write all the bdc program and select queries inside of at selection screen event if so please suggest me how I can proceed.
    I will give the points.
    Thanks a lot in advance.

    Hi,
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-018.
    SELECT-OPTIONS s_fields FOR qpmk-mkmnr NO-DISPLAY.
    SELECTION-SCREEN PUSHBUTTON /1(24) name USER-COMMAND flds.
    SELECTION-SCREEN END OF BLOCK b_2.
    AT SELECTION-SCREEN.
    IF sscrfields-ucomm = 'FLDS'.
        PERFORM display_fields.
      ENDIF.

  • Save push button in varient.

    Hello experts,
                I have a pushbutton on my selection screen. When i will click on that button then only i can enter
    the values in other paramtere. After entering all values i will save it in varient. When i will call that varient for next time
    push button will not be pressed( i should have to press it manually) How i can save the pressed push button in varient.

    Hi,
    Go to Tcode SHD0 to create a transaction variant that active your paramenters. Then go to SE93 to create a new transaction Type Trasaction Variant, enter your old transaction and variant. Then save.
    Hope it help.
    Regards,

  • Edit a selected row in an alv report after pressing a push button ?

    hi all ,
    I want to edit a selected row in an alv report but that too after i press a push button . After pressing the push button , a pop up shud *** showing all the entries of the selected row which shud be editable and after editing it shud be saved into the database table.
    How can i do this please help asap ???

    May this prog. of mine can solve your requirement.
    REPORT z_demo_alv_jg.
    TYPE-POOLS                                                          *
    TYPE-POOLS: slis.
    INTERNAL TABLES/WORK AREAS/VARIABLES                                *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.
    FIELD-SYMBOLS                                                       *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.
    SELECTION SCREEN                                                    *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.
    START-OF-SELECTION                                                  *
    START-OF-SELECTION.
    Storing table name
      p_table = tabname.
    Create internal table dynamically with the stucture of table name
    entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
        LEAVE TO LIST-PROCESSING.
      ENDIF.
    Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.
      SORT i_fieldcat BY col_pos.
    Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.
      REFRESH <dyn_tab_temp>.
    Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    *&      Form  SET_PF_STATUS
          Setting custom PF-Status
         -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'Z_STANDARD'.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  user_command
          Handling custom function codes
         -->R_UCOMM      Function code value
         -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.
    Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.
      CASE r_ucomm.
      When a record is selected
        WHEN '&IC1'.
        Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.
          IF sy-subrc = 0.
          Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
          Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.
            Make all the fields input enabled except key fields
              w_field-input = 'X'.
              MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.
            ENDIF.
          Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.
            IF sy-subrc = 0.
            Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
            If the record is changed then track its index no.
            and populate it in an internal table for future
            action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.
          ENDIF.
      When save button is pressed
        WHEN 'SAVE'.
        Sort the index table
          SORT i_index.
        Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.
          LOOP AT i_index.
          Find out the changes in the internal table
          and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.
          ENDLOOP.
        Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.
          IF sy-subrc = 0.
          Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
            REFRESH <dyn_tab_temp>.
          Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.
          ENDIF.
      ENDCASE.
      rs_selfield-refresh = 'X'.
    ENDFORM.                    "user_command
    Regards,
    Joy.

  • Call(PUSH) Button after executing report

    Hi,
    After executing report how to call select layout button automatically,
    and select layout screen display at output of screen after executing
    report.
    Regards
    Arpit

    how can we pass key stroke ctrl + F9 or call function code "&0AD" for selecting layout.
    pls advice.
    Regards
    Arpit

Maybe you are looking for