How to save varaint in a report program with tabstrip in selection-screen

Hi Gurus,
We have a custom report program and selection screen of this program has a tabstrip of 9 tabs. This program will run in background job and we are facing problem to save variant for this report program. 
We saved one variant with 'TAB2' populated. But when we execute the report and select that variant and we are not navigated to 'TAB2' automatically. So, code for TAB2 is not triggerd and we are not getting desired output.
When we set this program with variant in Job, program is not navigated to 'TAB2' as per variant setup.
Is there any way to save variant for this kind of report ?
Please help with your suggestions
Thanks & Regards
Chandan

Thanks for your help.
I found during debugging that it is holding the sy-ucomm of the first tab as default value.  So, I declared a new field in selection screen with No-Display option. When user will select a tab, this new field will hold the value of that sy-ucomm. As this field is in selection screen, it is getting stored in variant also.
In start-of-selection of program I am checking this field value and accordingly set the TABSTRIP.
Thanks again for your help.....
Regards,
Chandan

Similar Messages

  • How to save the output of report program??

    Hello Everbody,
    I want to save the output of a report program(i.e list),how can i do this???which function module should i use to achieve this???
    Thanx in advance.

    <b>data: list like abaplist occurs 0 with header line.
    data: begin of listout occurs 0,   
      line(1024) type c,   
      end of listout.
    do 100 times.
      write:/ sy-index.enddo.
    call function 'SAVE_LIST'
    EXPORTING*
    LIST_INDEX               = '0'
    tables 
      listobject    = list
    exceptions 
    list_index_invalid       = 1  
    others                   = 2          .
    call function 'LIST_TO_ASCI'    
    tables         
    listobject         = list    
    listasci           = listout 
       exceptions      
       empty_list         = 1    
       list_index_invalid = 2    
        others             = 3.
    call function 'GUI_DOWNLOAD' 
       exporting   
          filename = 'C:\Test.txt'  
      tables    
         data_tab = listout.</b>

  • How to get the F4 help for a field in the selection screen

    Hi all,
    I am working on a report program. In the selection screen, I have the field 'Brand Node ID'(ZNODEID). The requirement is to have the F4 help for this field. This field is available in a 'Z' table ZNODETAB. There is no Value table maintained for the corresponding data element. So, without disturbing the table data element/domain, I should get the F4 help in the selection screen of the report. In the F4 help, data should be fetched from the table ZNODETAB and the field is ZNODEID. Is there any way to do this.
    By searching the function modules, I could find that, we can use the FM F4IF_INT_TABLE_VALUE_REQUEST. But, I am not Sure. Can someone tell me the parameters to be passed to this function module to get the F4 help and the procedure to follow. S_NODEID is the select option used in the program. Please help me in this regard. Thanks in advance.
    Thanks & Regards,
    Paddu.

    look at this code and try
    select-options : S_NODEID for ZNODETAB-ZNODEID.
    at selection-screen on value-request for s_nodeid-low
    perform f4_nodeid using 'S_NODEID-LOW'.
    at selection-screen on value-request for s_nodeid-low
    perform f4_nodeid using 'S_NODEID-HIGH'.
    end-of-selection.
    FORM f4_nodeid  USING    p_field.
      declare it_node.
    select znodeid from ZNODETAB into table it_node.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ZNODEID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = p_field
          value           = space
          value_org       = 'S'
          display         = 'F'
        TABLES
          value_tab       = it_node
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    endform

  • How to do the Validations in Report Programming?

    How to do the Validations in Report Programming?
    how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
    Tks
    Durusoju

    AT SELECTION-SCREEN - selscreen_event
    Syntax
      | { ON {para|selcrit} }
      | { ON END OF selcrit }
      | { ON BLOCK block }
      | { ON RADIOBUTTON GROUP radi }
      | { }
      | { ON {HELP-REQUEST|VALUE-REQUEST}
      |   FOR {para|selcrit-low|selcrit-high} }
      | { ON EXIT-COMMAND }.
    Alternatives:
    1. ... OUTPUT
    2. ... ON {para|selcrit}
    3. ... ON END OF selcrit
    4. ... ON BLOCK block
    5. ... ON RADIOBUTTON GROUP radi
    6. ... { }
    7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
          {para|selcrit-low|selcrit-high} }
    8. ... ON EXIT-COMMAND
    Effect
    These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
    Alternative 1
    ... OUTPUT
    Effect
    This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
    Note
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
    Alternative 2
    ... ON {para|selcrit}
    Effect
    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
    No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
    Note
    If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
    Alternative 3
    ... ON END OF selcrit
    Effect
    This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
    Alternative 4
    ... ON BLOCK block
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
    Alternative 5
    ... ON RADIOBUTTON GROUP radi
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
    Note
    The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
    Alternative 6
    Effect
    The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
    Alternative 7
    ... ON { HELP-REQUEST | VALUE-REQUEST } FOR
        {para|selcrit-low|selcrit-high} }
    Effect
    The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
    In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
    Notes
    These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
    Alternative 8
    ... ON EXIT-COMMAND
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
    Example
    In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
    REPORT demo_at_selection_screen.
    Global data
    DATA: sflight_tab TYPE TABLE OF sflight,
          sflight_wa  LIKE LINE  OF sflight_tab.
    Selection screens
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN BEGIN OF SCREEN 500.
      SELECT-OPTIONS s_conn FOR sflight_wa-connid.
      DATA s_conn_wa LIKE LINE OF s_conn.
    SELECTION-SCREEN END OF SCREEN 500.
    Handling selection screen events
    AT SELECTION-SCREEN ON p_carrid.
      IF p_carrid IS INITIAL.
        MESSAGE 'Please enter a value' TYPE 'E'.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                          ID 'CARRID' FIELD p_carrid
                          ID 'ACTVT'  FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE 'No authorization for carrier' TYPE 'E'.
      ELSEIF sy-subrc <> 0.
        MESSAGE 'Error in authority check' TYPE 'A'.
      ELSE.
        IF sy-ucomm = 'ONLI'.
          CALL SELECTION-SCREEN '0500'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-dynnr = '0500'.
        IF s_conn IS INITIAL.
          MESSAGE 'Please enter values' TYPE 'W'.
        ELSE.
          SELECT *
                 FROM sflight
                 INTO TABLE sflight_tab
                 WHERE carrid = p_carrid AND
                       connid IN s_conn.
          IF sy-subrc <> 0.
            MESSAGE 'No flights found' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.
    Main program
    START-OF-SELECTION.

  • How does works default parameters in a program with logical database PNP?

    Hi Friends,
      I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
      If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
      Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
      How does works period parameters in a program with logical database PNP?
    This it's the program example, i use the default category.
    REPORT  ZRPHRTEST.
    tables: pernr.
    infotypes: 0001.
    start-of-selection.
    get pernr.
      write: pernr-pernr, p0001-begda, p0001-endda.
    end-of-selection.
    write 'fin'.

    Hi,
    Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
    Syntax: Tables pernr.
                Get pernr.
    Try, activate and test. This should solve your problem.
    Regards,
    Abhijeet

  • How to call subroutines defined in ABAP program with type S

    how to call subroutines defined in ABAP program with type S? can you give an example?

    Normal executable program,
    REPORT  ZTEST_MAIN.
    perform sub1 in program ztest_sub.
    "you can call using in program addition
    Subroutine pool program
    PROGRAM  ZTEST_SUB.
    form sub1.
    endform.

  • Background Report Program with Variants to be Overwritten

    I have an Following Scenario.
    I have an Report program with the Selection Screen displaying an Input Parameter of date type sy-datum.This particular program is scheduled as an Background Job.
    Now when i execute the program  in background  the existing variant date must be overwritten with any new values . So please provide an solution for this.
    Thanks
    K.Nadesh Kumar

    hi nadesh,
    enter date on your selection screen , then save variant.
    tick the selection variable check box i.e L.
    now click on pushbutton SELETION VARIABLE.
    Then select type D and select the criteria current date or whatver of your choice.
    if you are not clear then search for the thread "daily background job". I think you will get the answer from there.
    Regards
    Abhinesh

  • How to add program documentation icon on selection screen

    Hi All,
    Please let me know how to add  program documentation icon on selection screen.
    Thanks
    Jog

    THis is pretty straight forward, in se38, enter program name, click change.  Now click Go To, Documentation.  Enter the documentation on this screen, save and activate, now run the program,  the icon will be there.
    REgards,
    Rich Heilman

  • How can we place a F4 help in a parameter in selection screen

    Hi,
    How can we place a F4 help in a parameter in selection screen. Can we do add a  Process 0n Value request similar to a module pool prg in stadard report program.
    saji

    Hello Saji,
    Try below attached report.
    Regards,
    Naimesh.
    Reward, if it is useful..!
    REPORT ZTEST_NP_1.
    DATA: HELPVAL1 LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE .
    DATA: VALUE_TAB     LIKE PDTASK-OTEXT OCCURS 2 WITH HEADER LINE.
    DATA: VALUE         LIKE FEBMKA-BANKN,
          GIVEN_VALUE   LIKE HELP_INFO-FLDVALUE.
    DATA: IT_T005T LIKE T005T OCCURS 0 WITH HEADER LINE,
          IT_T002T LIKE T002T OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN: BEGIN OF BLOCK BLK1 WITH FRAME TITLE ABC.
    PARAMETERS:       P_SPRAS  LIKE  T002T-SPRAS,
                      P_LAND1  LIKE  T005T-LAND1.
    SELECTION-SCREEN: END   OF BLOCK BLK1.
    INITIALIZATION.
      ABC = 'Selection Criteria:'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAND1.
      PERFORM VALUE_REQUEST_LAND1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SPRAS.
      PERFORM VALUE_REQUEST_SPRAS.
    *&      Form  VALUE_REQUEST_land1
    FORM VALUE_REQUEST_LAND1.
    *---- Reading the Screen values.
      DATA: LT_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
            LV_DYNAME     LIKE D020S-PROG,
            LV_DYNUMB     LIKE D020S-DNUM.
    *-------Append field which you want to read from the screen
      LV_DYNAME = SY-REPID.
      LV_DYNUMB = SY-DYNNR.
      LT_DYNPFIELDS-FIELDNAME = 'P_SPRAS'.
      APPEND LT_DYNPFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME     = LV_DYNAME
                DYNUMB     = LV_DYNUMB
           TABLES
                DYNPFIELDS = LT_DYNPFIELDS.
      SELECT * FROM T005T
             INTO  TABLE IT_T005T
             WHERE SPRAS = P_SPRAS.
        REFRESH: HELPVAL1, VALUE_TAB.
        CLEAR:   HELPVAL1, VALUE_TAB, GIVEN_VALUE, VALUE.
    *---- Append field name for the columns in the help popup
        HELPVAL1-TABNAME    = 'T005T' .
        HELPVAL1-FIELDNAME  = 'LAND1' .
        HELPVAL1-SELECTFLAG = 'X' . " will return the value on the screen
        APPEND HELPVAL1 .
        CLEAR  HELPVAL1 .
        HELPVAL1-TABNAME    = 'T005T' .
        HELPVAL1-FIELDNAME  = 'LANDX' .
        HELPVAL1-SELECTFLAG = ' ' .
        APPEND HELPVAL1 .
        CLEAR  HELPVAL1 .
        LOOP AT IT_T005T.
          VALUE_TAB = IT_T005T-LAND1.
          APPEND VALUE_TAB.
          VALUE_TAB = IT_T005T-LANDX.
          APPEND VALUE_TAB.
        ENDLOOP.
        GIVEN_VALUE    = P_LAND1.
        CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
           EXPORTING
                DISPLAY      = SPACE
                GIVEN_VALUE  = GIVEN_VALUE
           IMPORTING
                SELECT_VALUE = VALUE
           TABLES
                FIELDS       = HELPVAL1
                VALUETAB     = VALUE_TAB.
        IF NOT VALUE IS INITIAL.
          P_LAND1 = VALUE. " Assing value to the parameter
        ENDIF.
    ENDFORM.                    " VALUE_REQUEST_land1
    *&      Form  VALUE_REQUEST_SPRAS
    FORM VALUE_REQUEST_SPRAS.
      REFRESH: HELPVAL1, VALUE_TAB.
      CLEAR:   HELPVAL1, VALUE_TAB, GIVEN_VALUE, VALUE.
      HELPVAL1-TABNAME    = 'T002T' .
      HELPVAL1-FIELDNAME  = 'SPRSL' .
      HELPVAL1-SELECTFLAG = 'X' .
      APPEND HELPVAL1 .
      CLEAR  HELPVAL1 .
      HELPVAL1-TABNAME    = 'T002T' .
      HELPVAL1-FIELDNAME  = 'SPTXT' .
      HELPVAL1-SELECTFLAG = ' ' .
      APPEND HELPVAL1 .
      CLEAR  HELPVAL1 .
      SELECT * FROM T002T
             INTO   TABLE IT_T002T
             WHERE  SPRAS = SY-LANGU.
      LOOP AT IT_T002T.
        VALUE_TAB = IT_T002T-SPRSL.
        APPEND VALUE_TAB.
        VALUE_TAB = IT_T002T-SPTXT.
        APPEND VALUE_TAB.
      ENDLOOP.
      GIVEN_VALUE    = P_SPRAS.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
           EXPORTING
              DISPLAY      = SPACE
              GIVEN_VALUE  = GIVEN_VALUE
           IMPORTING
              SELECT_VALUE = VALUE
           TABLES
              FIELDS       = HELPVAL1
              VALUETAB     = VALUE_TAB.
      IF NOT VALUE IS INITIAL.
        P_SPRAS = VALUE.
      ENDIF.
    ENDFORM.                    " VALUE_REQUEST_SPRAS

  • How to Add a parameter of currency exchange rate in the selection screen

    Dear Friends,
    How to Add a parameter of currency exchange rate in the selection screen with format (9999.99999). wich field i need to take.
    Thanks,
    Sridhar

    TCURR-UKURS.
    ~Suresh

  • How to assign Transaction code for report program?

    All,
    I have developed a custom report. I want to associate it to a transaction code. How to do it?

    Hi,
    Please follow the steps for creating a transaction for report..
    GOTO SE93
    Give the transaction code.
    Press create button..
    Enter the short description..
    Choose the radio button which says "Program and selection screen(report transaction)".
    Press Enter..
    Give the program name..
    Remove the Selection screen "1000" if you want.
    Save the transaction code..
    Regards

  • How to create TCode to a report program...?

    <b>Hi all
    How to create a transaction code to a report program,,
    can any one give me  in step-by-step procedure..
    points will b rewarded for the exact answer....
    Thanks,</b>
    regards,
    prashanth

    Hi Prashanth,
    Following are the steps for crating t-code for a report program:
    1. Goto transaction SE93 and press create.
    2. Give the transaction code to be created
    3. Enter short text
    4. Select the type of transaction to be created (based on ur requirements).
    5. Enter screen number (1st screen to be displayed)
    6. In GUI support, check all the checkbox
    7. Save and activate.
    You can also do this procedure by going to SE80, right click on program name->create transaction.
    THanks
    Vijay
    PLZ Reward points if helpful

  • How to find Transaction code from Report/program name ?

    Dear all,
    How to find Transaction code if i know Report/program name ?

    Hi,
    In se 38 when u open ur program,in the application toolbar u have a button beside the where-used list button as display object list.on clicking this button,a window will be opened at the left most corner for repository browser,in this u can find any tranasctions,fileds,screens,dictionary structures defined for the program.
    if any transaction is created for the program u can find it under the transaction folder.
    revert back for further queries.
    Regards,
    Sravanthi

  • How to create 2 transaction codes for same report program with diff title

    Hi All -
      I have created report program and create 2 transaction codes with different short description. I want to display the Tcodes decriptions instead of program attributes title.
    Can anyone pls tell me how to do this?
    Thanks,
    Kannan

    Hi Kannan,
    define 2 titlebars t1 and t2 for the report. In report initialization,
    IF sy-tcode = 't1'
      SET TITLE t1.
    ELSE.
      SET TITLE t2.
    ENDIF.
    Regards,
    Clemens

  • How to save the state of a program ?

    I am working on a program, where one can open several tabs with JEditorpanes, and in the tabs one can read a webpage. I was wondering if there is a way to save the state of the program. For example the program starts with three tabs, but say that the user opens three more tabs. How would one save this info, so that it could be retrieved again when the program is restarted ?????

    Check out java.util.prefs.Preferences. This is the standard API for loading/saving preferences between sessions of an application.

Maybe you are looking for

  • How to tally P&L YTD data with R/3

    Dear Friends, Daily we are loading data 0FI_GL_4 data source to GL cube. In GL two types accounts available. 1.Balance sheet items. 2.P&L items. Balcne sheet items allways carry foward the last years balacne.So my closing balance is tallying with R/3

  • Can't log in after recovery from time machine

    We had to replace the disk on my daughter's MacBook Pro. We restored her data from Time Machine on an external drive. After completion the system brought up the login screen. In addition to her account, there's one for me and one for my wife. All of

  • New 3g nano... will only show apple...

    I have an ipod classic that works fine. i just purchased an ipod 3g nano for my sister. we tried hooking it up to my mac to load songs on it, but all it will do is flash an apple on the screen (and it will only do that when it is plugged in to the co

  • Messages from Multiple customers&Multiple depots

    Hi All, My scenario is : we have 10 different customers like A, B,C... and each customer got some 4 or 5 different depots like 01, 02, 03, 04 and 05 and we will be receiving multiple messages from all of them in multiple time intervals A01, A02, A03

  • SingleThreadModel for a JSP

    Hi all, is it possible to advice the JSPC to generate Servlets with SingleThreadModel? regards jack