Customised Back button in ALV loses selection screen parameters

Hi,
In my ALV output, the user interacts with the output. I had to program my own back button in the pf-status so that when the user hit back they didnt return to the original alv output. (if that makes sense)
I use LEAVE TO TRANSACTION 'ZZZZ'  (user_command form) but the problem is that i lose all the selection parameters that the user has entered.
I have tried everything.........set screen 0, leave screen etc..........and searched the forum but cant find the answer.
Anyone know what i need i do..........
Cheers..........

try submit ...
submit the report of ZZZZ tcode... with the selection parameters of your existing report....
e.g.
SUBMIT  zbbp_sc_arch_initial_upload
VIA SELECTION-SCREEN                              
  WITH p_r01    EQ p_r01
  WITH p_r02    EQ p_r02
  WITH p_mode   EQ p_mode.

Similar Messages

  • Reg: Alv and selection-screen

    Hi,
    I created a ALV report,
    I gave the user provision delete rows and dispalyed the new list without the deleted rows( one row at a time)
    when i deleted few rows and when i press the back button i am getting all the rows deleted, but i want to jump directly to selection screen
    please help me how to jump to selection screen after pressing the back button
    i tried set screen 0     leave to screen 0 but of no use,
    please help in this regard
    thnx

    Hi learner,
    After deleting a row in ur internal tab u hav to refresh the display to remove dat row from display rite .....how r u doing it...??
    Are u calling the ALV FM again... if ur doin so !! its a wrong way and der lies de problem....
    check the sample code below in which if u double click on a row dat row gets deleted and the screen is refreshed.....also if u click back it goes to the selection-screen and not the previous alv display with deleted rows......
    TYPE-POOLS: slis.
    PARAMETERS rows TYPE i DEFAULT 20.
    DATA: itab        TYPE TABLE OF mara      WITH HEADER LINE,
          ls_layout   TYPE slis_layout_alv.
    START-OF-SELECTION.
      SELECT * UP TO rows ROWS
      FROM   mara
      INTO   CORRESPONDING FIELDS  OF TABLE itab.
      ls_layout-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_structure_name        = 'MARA'
          is_layout               = ls_layout
          i_callback_program      = sy-repid
          i_grid_title            = 'Double click on a row'
          i_callback_user_command = 'EVENT_HANDLER'
        TABLES
          t_outtab                = itab[].
    *&      Form  event_handler
    FORM event_handler  USING r_ucomm     TYPE sy-ucomm
                              rs_selfield TYPE slis_selfield.
      CLEAR  itab.
      DELETE itab INDEX rs_selfield-tabindex.
      MOVE 'X'   TO rs_selfield-refresh .                 " this automatically refreshes the display
    ENDFORM.                    "event_handler
    Cheers,
    jose.

  • Back button in ALV

    Dear All,
    i have redefined the functionality of back button in ALV list display calling the FM popup_to_confirm....... but the problem is that the pop up is being generated twice in the program. can this be made to one.
    regards
    abhi

    hi praveen,
    You can check the value of sy-lsind on the click of back button and set its value to the previous list.
    so what i mean to say is forcefully change the value of sy-lsind on click of back button to (sy-lsind - 1)
    ,this will take you to its parent list.
    Hope this is helpful to you.
    Abhishek.

  • Get selection screen parameters from sap query

    Hello. I use SAP Query Reporting, so I added a report assignment for detailing (sq01 ->  Change button -> Goto -> Report Assignment -> Insert row -> Other type row -> Abap Report Program)
    and put there ABAP program.
    When I run query and press CtrlShiftF1  (or double click) It calls my abap program.
    So the question is: how to get selection screen parameters in my program ?
    to be more precise I want to get date parameter (begda, endda)
    Thanks a lot.

    There is a Z query which I can see in sq01. I set reporting period and run the query; when I run it, it gives me the employee list.
    So I wrote the abap report to get an employee details, customized query as I mentioned above.
    The query calls my report and I need to get parameters.
    SELECTION-SCREEN BEGIN OF BLOCK frm1 WITH FRAME TITLE text-001.
    PARAMETER :  p_pernr LIKE p0001-pernr OBLIGATORY MATCHCODE OBJECT prem.
    PARAMETER : p_date LIKE sy-datum.
    SELECTION-SCREEN END OF BLOCK frm1.
    Parameter
    p_pernr
    passes normal. ALV Query contains it, but I'd like to get one more parameter from selection screen of the query and don't know how to get it.

  • ABAP Query Selection screen parameters

    I need to add an additional selection screen parameter  in existing ABAP Query. How to modify the selection screen fields in existing ABAP query ? Kindly help me.

    Hi,
    GO to info set transaction SQ02
    Give the infoset
    Press change
    Press the selections button..Shift F7
    In the right hand side you will get a table control to enter the selection screen parameters..
    Press create button on top of the table control to create new parameters
    Thanks,
    Naren

  • How to clear all selection screen parameters before calling transaction?

    Hi Experts
       I have a ABAP report that displays data using ALV.
      When I double click a cell it calls transaction MB51. Before calling the transaction I need to set some parameters of the selection screen  of the transaction.
      My code is like below:
      <UL>
       <LI>FREE MEMORY ID 'MAT'. <I>"material</I>
       <LI> FREE MEMORY ID 'WRK'. <I>"plant</I>
       <LI> FREE MEMORY ID 'CHA'. <I>"batch</I>
       <LI><I>* Get the selected ALV row data</I>
       <LI>READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
       <LI><I>*   If link MB51 is clicked then open tcode MB51</I>
       <LI> IF p_selfield-sel_tab_field+8(4) = 'MB51'.
       <LI><I>*   Pass material, plant to the corresponding tcode</I>
       <LI>       SET PARAMETER ID 'MAT' FIELD x_recon-matnr.
       <LI>       SET PARAMETER ID 'WRK' FIELD p_plant.
        <LI>      CALL TRANSACTION 'MB51' AND SKIP FIRST SCREEN.
    </UL>
    The problem is:
    <UL> <LI> 1. First, I run the given transaction before running the report in a separate session with some set of values in the selection screen. For example: plant = AB01, Material = 990001 and Batch = 10001.</LI>
    </UL>
    <UL>
            <LI> 2. Then in another session I run my report. In the report ALV I have selected a record where plant = AB01, Material = 990001 but Batch is blank. But it opens the transaction with plant = AB01, Material = 990001 and Batch = 10001.
    Even though in my ALV record the batch is blank yet it uses the batch value from the memory. That is, the batch value that was given in the transaction earlier. Why it is not getting cleared? I have also used FREE MEMORY ID code in the beginning. But still it is not clearing the values in the memory.
    </UL>
    <UL>
            <LI>What shall I do to clear all the selection screen parameters before calling the transaction?</LI>
    </UL>
    <UL>
            <LI>
    Thanks
    Gopal
    </LI>
    </UL>
    Edited by: gopalkrishna baliga on Aug 11, 2010 10:29 AM

    Its because sap memory is globally shared.
    Do it like this.
    READ TABLE i_recon INDEX p_selfield-tabindex INTO x_recon.
    IF p_selfield-sel_tab_field+8(4) = 'MB51'.
    perform bdc_dynpro      using 'RM07DOCS' '1000'.
    perform bdc_field       using 'BDC_OKCODE'   '=ONLI'.
    perform bdc_field       using 'MATNR-LOW'  x_recon-matnr.
    perform bdc_field       using 'WERKS-LOW'  p_plant.
    perform bdc_field       using 'CHARG-LOW'  p_batch.
    perform bdc_field       using 'DATABASE'  'X'.
    call transaction 'MB51' with i_bdcdata mode 'E'.
    endif.
    form bdc_dynpro using program dynpro.
      clear la_bdcdata.
      la_bdcdata-program  = program.
      la_bdcdata-dynpro   = dynpro.
      la_bdcdata-dynbegin = 'X'.
      append la_bdcdata to i_bdcdata.
    endform.
    form bdc_field using fnam fval.
        clear la_bdcdata.
        la_bdcdata-fnam = fnam.
        la_bdcdata-fval = fval.
        append la_bdcdata to i_bdcdata.
    endform.

  • Auto-populating the selection screen parameters for web report

    hello
    i am having a scenario where my web report is a link to another internet application (a BSP application) and it is called by clicking some link or button on the BSP page.
    can i pass the selection values for BW Web report directly from BSP application through a query string or by setting some cookie values so that the user will directly view the report on click of that link?
    Thanks in advance.
    Regards
    Rajeev

    we can do this by adding a URL as the query-string with web template_id and with the selection screen parameters as key value pairs

  • Selection Screen Parameters in SQL statements

    Very new ABAP programmer here, so sorry if this is a really dumb question.
    I'm trying to use my selection screen parameters to limit what is pulled in by my SQL statement (which seems to me to be a very logical thing to do).  But I'm having a problem, that when no values are entered in the parameters, no data is returned in the table instead of all the data being returned.
    Here is the code I have now:
      SELECT cname1 akostl aorgeh asname apernr bbegda bendda bstatu
             bconfl bmedcf breasn breman b~rqday
      INTO CORRESPONDING FIELDS OF TABLE it_record
       FROM ( ( pa0001 AS a
          INNER JOIN pa0672 AS b ON bpernr = apernr )
          INNER JOIN t500p AS c ON cpersa = awerks )
      WHERE  b~reman in so_reman
        AND a~kostl  in so_kostl
        AND a~orgeh = p_orgeh
        AND b~begda = p_begda
        AND b~statu = p_statu
        AND b~confl = p_confl
        AND b~medcf = p_medcf
        AND b~reasn = p_reasn
        AND b~rqday = p_rqday
        AND c~name1 = p_name1.
    Can anyone tell me what I'd need to do to make it return properly?

    When you use parameters and no value is entered, it is treated as initial value. and the select statement looks for the initial values for those fields in the tabl;e...
    you can make the parameters mandatory..then the user would be forced to enter something....
    also you could do the following..
    instead of parameters, use select-options with the addition no intervals and no extension, then practically it looks like a parameter but internally it is a select-option...
    and in the select statement, give conditions like....field1 in <s_option name>....in this case if the user is not entering a value ...it is treated as *...
    Thnaks & Regards,
    Renjith

  • How to restrict or stop the same data provided in selection screen parameters its should stop fetch the data on previously provided data?

    Hi Developer,
    i have issues that i need stop or restrict the same entries provided in the selection screen parameters it should no display that data but it should give an alert message by saying the data all ready viewed or displayed.
    example: organisation :getha pvt.td.
                  name :ramesh.
                  start date:10.2.2013.
    these are parameter which has been displayed by clicking execute ,if provide the same value to display again it should give waring message.
    Please guide me in solve the problem.
    thanks.
    ravi.

    Hi Somendra,
    Thanks for your response sir , i have provided the according to your provided information sir  but it was not  displaying the data first time also its giving message which i have provided ,my issues is if i provide data from time should display if i provide same data next time then only it should restrict the data and give a message.
    example:
    types:BEGIN OF str1,
       ROOMNO type zROOMNO,
       NAME TYPE zname3,
      BRANCH type zBRANCH,
       PHONENUMBER type zPHONENUMBER,
       END OF str1.
       data:it_str1 type TABLE OF str1,
            wa_str1 type str1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
         skip.
    PARAMETERS:s_roomno type ZTABLE_2-roomno.
    skip.
    parameters:s_name type ztable_2-name.
    skip.
    PARAMETERS:s_branch type ztable_2-branch.
    skip.
    PARAMETERS:s_pho type ztable_2-phonenumber.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
    SELECT  roomno
             name
             branch
             phonenumber from ztable_2 into TABLE it_str1
             WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
       READ TABLE it_str1 INTO wa_str1 with KEY roomno = s_roomno name = s_name branch = s_branch phonenumber = s_pho.
       if sy-subrc eq 0.
         MESSAGE 'THE DATA IS ALL READY VIEWED' TYPE   'E'.
         RETURN.
         ENDIF.
         START-OF-SELECTION.
       SELECT  roomno
             name
             branch
             phonenumber from ztable_2 into TABLE it_str1
             WHERE roomno eq s_roomno and name eq s_name and branch eq s_branch and phonenumber eq s_pho.
         loop at it_str1 into wa_str1.
         WRITE:/1 wa_str1-roomno,
                10 wa_str1-name,
                30 wa_str1-branch,
               60 wa_str1-phonenumber.
         ENDLOOP.
    please guide me in solving the issue sir.
    thanks,
    Ravi

  • Hi its urgent...help on selection screen parameters

    Hi all,
    I need help on selection screen parameters.
    requirement is that,
    i am having input fields for material, plant ,start date and end date and a check box and an input field for getting the txt file.
    when i select the checkbox, it should ignore the mandatory fileds in the selection screen.
    and when i get the file input, it should take  the input data material, plant, start date and end date from the flat file and populate the corresponding input fields in selection screen.
    How to do this..
    thanks in advance.

    Hi ..
    While declare the Matnr, Plant etc dont use the OBLIGATORY addition.
    instead of the based on the value of check box validate them .
    AT SELECTION-SCREEN.
      IF c_box = ' '.
       << validate for mandatory fields>>
    endif.
    <b>REWARD IF HELPFUL.</b>

  • Submit program with selection screen parameters - getting blank values

    Hi, I'm submitting a program with selection screen parameters. when I pass '000' (I_TPLSCN  )value for Planning Scenario and when this goes to selection screen then I don't see value for Planning scenario as '000'(I_TPLSCN  ) but the value is blank in selection screen. I'm using the below code for this.
    SUBMIT RMCPAMRP WITH MATNR_GL EQ I_MATNR   SIGN 'I'
                      WITH WERKS_GL EQ I_WERKS   SIGN 'I'
                      WITH PLSCN    EQ I_TPLSCN  SIGN 'I'
        via selection-screen        AND RETURN.
    Could anyone please help me how to display value '000' rather than blanks.
    thanks in advance.

    If I_MATNR, I_TPLSCN and I_WERKS are variable then try with
    SUBMIT rmcpamrp
      WITH matnr_gl = i_matnr
      WITH plscn    = i_tplscn
      WITH werks_gl = i_werks
      via selection-screen       
       AND RETURN .
    If I_MATNR, I_TPLSCN and I_WERKS are of type range then try  with
    SUBMIT rmcpamrp
      WITH matnr_gl IN i_matnr
      WITH plscn    IN i_tplscn
      WITH werks_gl IN i_werks
    via selection-screen       
       AND RETURN
    Edited by: Pawan Kesari on Dec 24, 2009 3:33 PM

  • Reset selection screen parameters.

    Hi,
    I enter values in parameters on screen and generte output(add values to table/view report).  After I return to originial screen, the fields should be reset to initial empty status.
    How do I do that.
    Thanks
    Praveen

    Hi,
    U Clear the Selection Screen Parameters in At Selection Screen event, before clearing the value pass the Parameter value to some global variable for further use.
    eg:
    PARAMETERS : p_matnr TYPE matnr.
    DATA : gv_matnr TYPE matnr.
    AT SELECTION-SCREEN.
      gv_matnr = p_matnr.          "Passing the P_matnr value to global variable gv_matnr
          CLEAR : p_matnr.
    START-OF-SELECTION.
      WRITE : gv_matnr.
    Hope it helps!!
    Rgds,
    Pavan

  • How to pass selection screen parameters in text elements?

    how to pass selection screen parameters in text elements?

    don't you mean he other way around. Assign text-elements (selection texts) to select options?
    This you do in the menu where you can find text-elements, selection texts.
    menu Goto->text elements->selection texts.
    Edited by: Micky Oestreich on May 10, 2008 2:45 PM

  • Back button in ALV oops with two screens

    hi,
    i have created the ALV report using oops concept. have kept the selection screen say 1000 and two more screens say 9001 and 9002.
    when i click on back from 9002 screen  it should go to 9001.

    Hello Sankumar
    I assume your 2nd screen (9002) displays detailed data based on a selection of the first screen (9001).
    Example: first ALV displays customers -> select single customer via double-clicking -> display sales orders on 2nd ALV
    Furthermore, I assume you trigger the second screen within your event handler method. If this is the case then I regard this as bad design which is bound to cause problems.
    Within the event handler method just store the required selection (e.g. customer number) and trigger PAI using:
    CALL METHOD cl_gui_cfw=>set_new_ok_code( ok_code = 'DISPLAY_DETAILS' ).
    This trigger PAI of your first screen with a defined ok-code (= 'DISPLAY_DETAILS' ).
    Now you may call a FORM routine DISPLAY_DETAILS where you make the call to your second screen.
    This allows you to use the normal PAI logic to switch back and forth between multiple screens.
    Regards
      Uwe

  • Problem in Back Button in ALV report

    Hi Team,
    I have created a report which has a selection screen. Based on the input I am showing an ALV OO grid in my custom screen 0100. Now In the system toolbar on my 0100 screen I have enabled back, up and exit button. On click of which I am wrting 'LEAVE TO SCREEN 0. '
    But it doesn't take me to the selection screen. Rather it throws me out of the transaction. Can anybody
    suggest me a command so that when I click on back button it will take to the selection screen.
    Thanks,
    Mainak

    Hi,
    Go through given program it is very usefull for you,
    ***Correct your program as follows...
    PROGRAM rsolett1 MESSAGE-ID sy.
    TYPE-POOLS: slis.
    data: repid like sy-repid.
    DATA: w_fieldcat TYPE slis_fieldcat_alv,
    t_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: w_listheader TYPE slis_listheader,
    t_listheader TYPE slis_t_listheader.
    DATA: BEGIN OF t_output OCCURS 0,
    slno TYPE char10,
    name TYPE char10,
    lino TYPE char10,
    prof TYPE char10,
    addr TYPE char10,
    fanm TYPE char10,
    plbu TYPE char10,
    END OF t_output.
    w_fieldcat-col_pos = 1.
    w_fieldcat-fieldname = 'SLNO'.
    w_fieldcat-seltext_m = 'SERIAL NUMBER'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-col_pos = 2.
    w_fieldcat-fieldname = 'NAME'.
    w_fieldcat-seltext_m = 'NAME'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-col_pos = 3.
    w_fieldcat-fieldname = 'LINO'.
    w_fieldcat-seltext_m = 'LICENCE NUMBER'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-col_pos = 4.
    w_fieldcat-fieldname = 'PROF'.
    w_fieldcat-seltext_m = 'PROFESSION'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-col_pos = 5.
    w_fieldcat-fieldname = 'ADDR'.
    w_fieldcat-seltext_m = 'ADDRESS'.
    w_fieldcat-do_sum = 'X'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-col_pos = 6.
    w_fieldcat-fieldname = 'FANM'.
    w_fieldcat-seltext_m = 'FATHER NAME'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-col_pos = 7.
    w_fieldcat-fieldname = 'PLBU'.
    w_fieldcat-seltext_m = 'PLACE OF BUSSINESS'.
    APPEND w_fieldcat TO t_fieldcat.
    CLEAR w_fieldcat.
    *PUPULATING TOP-OF-PAGE.
    w_listheader-typ = 'H'.
    w_listheader-info = 'FORMA'.
    APPEND w_listheader TO t_listheader.
    CLEAR w_listheader.
    repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = repid
    i_callback_pf_status_set = 'SET_PF_STATUS'
    i_callback_user_command = ' '
    i_callback_top_of_page = 'SUB_TOP_OF_PAGE'
    it_fieldcat = t_fieldcat
    i_default = 'X'
    TABLES
    t_outtab = t_output.
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZPFSTATUS'.
    ENDFORM.
    Edited by: Ganesh Modhave on Aug 12, 2008 1:06 PM
    Thanks&Regards,
    Naresh kumar

Maybe you are looking for

  • How to register custom workflow in oracle apps ?

    Hello I am new to workflow. I have customized an oracle standard workflow and now i want to register this custom one. Please help how to register the custom workflow. What steps need to achieve this. Thanks

  • Dreamweaver CS5.5, v11.5, Build 5366 keeps crashing with Mac OS 10.7.5

    Dreamweaver CS5.5, v11.5, Build 5366 keeps crashing with Mac OS 10.7.5. This started a few weeks ago.   Dreamweaver crashes at random time so I cannot pinpoint one thing that causes it.  It just crashed as I was trying to adjust margins in a style sh

  • Bad readback voltage from SCXI 1331 / 1127 /1000

    I am using SCXI 1000 with 1127 with1331 in our application with the 2 wire configuration. My application is to read and log all the cell voltages(31 cells) and during the application i am not able to get the correct read back voltages for the cells b

  • HTML Source for Web Page Guest Authentication

    Where is the html source located in the WLC for Guest web authentication page.                  

  • Adobe 1998 Not in PS CC?

    I just got PS cc. I shoot in RAW.  I have an Epson R3000.  I have an iMac with Mavericks.  Adobe support just told me that "Adobe 1998" is no longer used in Printer Profiles and that it stopped with CS5.   Is this really true?  What profile should I