Variants without Selection Screen

Hi,
if i have a normal Dynpro Screen, and no selection screen, how can i then use the Variants of SAP? I found some FM like RS_CREATE_VARIANT but this does not work. The coding of these Variant helpers always try to read out the fields from the report. But my report has no fields, because it is a dynpro screen and no selection screen.
Do you know if i can use variants for dynpros?
Thanks

Hi Johnny,
You can create Transaction Variants using SHD0 transaction.
Have a look at the below SAP link:-
[Transaction Variants and Screen Variants  |http://help.sap.com/erp2005_ehp_03/helpdata/EN/5b/7bc3895d1111d295ad0000e82de14a/frameset.htm]
Also Have a look at the below wiki :-
[Creating variants for custom screens|Creating variants for custom screens;
<removed by moderator>
Regards
Abhii
Edited by: Thomas Zloch on Sep 1, 2010 5:56 PM - please leave this to the original poster

Similar Messages

  • Is it possible to create a variant without selection screen

    Hi,
    I would like to create a variant for a report(Standard report). It does not have selection screen. Could someone tell me is it possible to creste a varaint for it?
    Is it possible to create a variant w/o selection screen? if yes, how?

    If some SELECT-OPTIONS are hidden or NO-DISPLAY, you should be able to create a variant for the report.
    Rob

  • How to create a variant for a program without selection screen

    Hi All,
    I've created one program which takes the data from 30 tables and loads into one final table.
    This program is already moved to Production.
    But while creating variant it's not allowing, since the program doesn't have the selection screen.
    Is there anyway where I can create a variant in production without selection screen directly as the program code is already moved to production.
    Thank You,
    Regards,
    Karthik.Ch

    Hi ,
    Are you running this program in a process chain??

  • Adding layout variant to selection screen

    Hi all,
             Currently I am working on report program, where I have to allow user to select his own output pattern. i.e layout variant is to be added to selection screen. The report uses object oriented ALV for display purpose. [set_table_for_first_display]
    I made following steps,
    1.     Declared one parameter of type disvariant.
    2.     At selection-screen on value-request I called function REUSE_ALV_VARIANT_F4.
    3.     Passed internal table to method set_table_for_first_display.
    Now I am able to create save new variant, on selection screen I can select the variant that I have created, but output shows the all the fields though
    Only few are selected. Please tell me any modification so as to reflect the changes in output.
    I  am searching for a function which maintains fieldcat according to user defined variant.
    Regards,
    Nilesh kulkarni.

    U have to use REUSE_ALV_VARIANT_EXISTENCE inorder to use the layout u have selected
    After ur code of REUSE_ALV_VARIANT_F4.
    try this way
    AT SELECTION-SCREEN.
       PERFORM PAI_OF_SELECTION_SCREEN.
    G_REPID = SY-REPID.
    G_SAVE = 'A'.
    FORM PAI_OF_SELECTION_SCREEN .
      IF NOT P_LAYOUT IS INITIAL.
        MOVE G_VARIANT TO GX_VARIANT.
        MOVE P_LAYOUT TO GX_VARIANT-VARIANT.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
             EXPORTING
                  I_SAVE     = G_SAVE
             CHANGING
                  CS_VARIANT = GX_VARIANT.
        G_VARIANT = GX_VARIANT.
      ELSE.
        PERFORM VARIANT_INIT.
      ENDIF.
    ENDFORM.                    " PAI_OF_SELECTION_SCREEN
    FORM variant_init .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = G_REPID.
    ENDFORM.                    " variant_init
    Then when u call ALV for display, pass ur display variant, in this case  = g_variant
    Reward if useful
    Cheers
    ~Arun
    Message was edited by:
            Arun Shekhar

  • How to set Variant as selection-screen

    I have a variant i want to set that variant as selection-screen can anyone please tell me how to do that

    Hi Pradeep,
    What is your requirement?
    If you just want to create the variant for the selection screeen, then after entering the values on selection screen just press SAVE button.
    Regards,
    Atish

  • Run alv report without selection screen in background

    Hello Every body,
    i programmed a ALV Report without selection screen, and i want to create a job for this alv report.
    Any help?
    Thank u.
    Ouail.

    Hi Steve,
    Can you tell me where i have to put your code?
    this is my abap code:
    START-OF-SELECTION.
       p_filref = '\\SAPSERVER\f\SAFT\ivat\FI_Extract_1000_20140709_102346_910.XML'.
       PERFORM copy_from_xml_to_itab TABLES it_ref_file
                                     ref_xml_data
                                     USING p_filref.
    **Begin Extraction File
       SUBMIT ZZ_FI_IVAT_EXTRACTOR
       WITH p_bukrs EQ '1000'
       WITH p_gjahr EQ '1998'
       WITH filepath EQ '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
       WITH cldata eq space
       AND RETURN.
       DATA: FILE_TABLE  TYPE TABLE OF SDOKPATH,
       DIR_TABLE  TYPE TABLE OF SDOKPATH.
       CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
         EXPORTING
           DIRECTORY  = '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
           FILTER     = '*.*'
         TABLES
           FILE_TABLE = FILE_TABLE
           DIR_TABLE  = DIR_TABLE
         EXCEPTIONS
           CNTL_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.
       "get file name
       LOOP AT FILE_TABLE INTO p_filref.
       ENDLOOP.
       CONCATENATE '\\SAPSERVER\f\SAFT\iVAT_Extractie\' p_filref INTO path.
       PERFORM copy_from_xml_to_itab TABLES t_ext_file
                                     ext_xml_data
                                     USING path.
       PERFORM fill_xml_tab_in .
       perform build_fieldcatalog.
       PERFORM compare_data_ref_ext.
       PERFORM send_email.
       perform display_alv_report.
       PERFORM delete_extraction_file.
    in the perform copy_from_xml_to_itab TABLES it_ref_file......, i use this code:
       CREATE OBJECT gcl_xml.
    *Upload XML File
       CALL METHOD gcl_xml->import_from_file
         EXPORTING
           filename = p_filref
         RECEIVING
           retcode  = gv_subrc.
       IF gv_subrc = 0.
         CALL METHOD gcl_xml->render_2_xstring
           IMPORTING
             retcode = gv_subrc
             stream  = gv_xml_string
             size    = gv_size.
         IF gv_subrc = 0.
           REFRESH gt_xml_data[].
    * Convert XML to internal table
           CALL FUNCTION 'SMUM_XML_PARSE'
             EXPORTING
               xml_input = gv_xml_string
             TABLES
               xml_table = gt_xml_data
               return    = gt_return.
         ENDIF.
       ENDIF.

  • Dinamic variant for selection screen

    Hi,
    I got a requirement where i need  a Dynamic variant for selection screen .There is a date field in the selection screen i want to create  a variant such that when i choose it,it should give the current day date in selection screen.can anyone help me.
    Regards,
    Ravi

    Hi,
    Using Customer Exit code you can give it.
    Create a Customer Exit Variable and write simple code in CMOD. See the usefull Exit code for reports in the following url.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    WHEN 'ZV_DAT'.
        IF i_step = 1 .
          CLEAR l_s_range.
          l_s_range-low = sy-datum.
          l_s_range-opt = 'EQ'.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
    Thanks
    Reddy

  • Without selection screen how can we featch the file.

    Hi all,
         without selection screen(parameter,select-options iam not using these both.) how can we featch the flat file what ever it may be (file format is xls.textor any thing) how ot do...plz it's urgent for me.
    Regards,
    Krishna,

    Hi varun,
      this is my sample code.here we are geting selection screen.without selection screen hoe to get file from out internal table.
    plz gothrough this code and replay to me varun.
    tables:pa0002.
    type-pools:truxs.
    *data:W_TRUXS_T_TEXT_DATA TYPE TRUXS_T_TEXT_DATA ,
         it_p0001 type standard table of pa0001.
    TYPES: BEGIN OF it_p0002,
            pernr like pa0002-pernr,
            nachn like pa0002-nachn,
            vorna like pa0002-vorna,
           end of it_p0002.
    DATA: t_p0002 type standard table of it_p0002,
          wa_p0002 type It_p0002.
    DATA: it_raw TYPE truxs_t_text_data.
    SELECTION-SCREEN BEGIN OF BLOCK S_BLK WITH FRAME TITLE TEXT-000.
    parameters: P_EXCEL   TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN end OF BLOCK S_BLK.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_EXCEL.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
       FIELD_NAME          = 'P_EXCEL'
    IMPORTING
       FILE_NAME           = P_EXCEL .
    START-OF-SELECTION.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
       I_LINE_HEADER              = 'X'
        I_TAB_RAW_DATA             = it_raw
        I_FILENAME                 = p_excel
      TABLES
        I_TAB_CONVERTED_DATA       = t_p0002[]
    EXCEPTIONS
       CONVERSION_FAILED          = 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.
    end-of-selection.
        loop at t_p0002 into wa_p0002.
           write:/ wa_p0002-pernr,
                   wa_p0002-nachn,
                   wa_p0002-vorna.
        endloop.

  • How to create variant for selection screen which is in subscreen

    Hi,
    How to create variant for selection screen which is in subscreen in a module pool program?
    it is very urgent.
    Thanks in advance.

    Hi,
    You can create the 'Parameter Transaction' so that whenever you run the particular transaction it will run with the initial value given when the Tcode was created and hence you can skip the initial screen of the module pool program.
    To create Parameter transaction from SE93 you have to choose the last option i.e Parameter Transaction.
    Regards
    Sudheer

  • Layout variants in Selection screen

    Hi All,
        I have a requirement where i need to create a functinal key on selection screen'Disp Variant' and i need to provide F4 help when user click on button and when layout is selected the report should show the layout according to selected layout variant.
    I have written following code but it is not workin for me.Please help.
    initialisation.
        wa_functxt-icon_id   =  icon_variants.
        wa_functxt-quickinfo = 'CHOOSE'.
        wa_functxt-icon_text = 'DISP VAR'.
        sscrfields-functxt_01 = wa_functxt.
    wa_functxt of type smp_dyntxt and sscrfields have been declared at top.
    CLEAR: wa_variant2.
      wa_variant2-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = ' '
        CHANGING
          cs_variant = wa_variant2
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc EQ 0.
        PERFORM f_select_alv_variant.
      ENDIF.
    even this is in initialisation.
    form F_SELECT_ALV_VARIANT .
      MOVE sy-repid TO wa_variant1-report.
      CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
        EXPORTING
          i_dialog            = space
          i_user_specific     = 'X'
          i_default           = space
          it_default_fieldcat = i_fieldcat[]
          i_layout            = wa_layout
        IMPORTING
          et_fieldcat         = i_fieldcat[]
        CHANGING
          cs_variant          = wa_variant2
        EXCEPTIONS
          wrong_input         = 1
          fc_not_complete     = 2
          not_found           = 3
          program_error       = 4
          OTHERS              = 5.
      IF sy-subrc EQ 0.
        "Do nothing.
      ENDIF.
    endform.  
    AT SELECTION-SCREEN.
    CASE sscrfields-ucomm.
    *When Display Variant button is clicked
        WHEN c_fc01.
          PERFORM f_f4_for_variant.
        WHEN OTHERS.
      ENDCASE.
    form F_F4_FOR_VARIANT .
      CLEAR: wa_variant1,
             wa_variant2.
      wa_variant1-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = wa_variant1
          i_save     = 'U'
        IMPORTING
          e_exit     = v_variant_exit
          es_variant = wa_variant2.
      PERFORM f_select_alv_variant.
      IF v_variant_exit EQ 'X'..
        PERFORM f_get_default_variant.
      ENDIF.
    endform.
    Thanks in Advance,
    Anjana

    Let's discuss based on something. On that program, I don't have any issue, check it.
    INCLUDE <icon>.
    TABLES sscrfields.
    DATA wa_variant1 TYPE disvariant.
    DATA wa_variant2 TYPE disvariant.
    SELECTION-SCREEN FUNCTION KEY 1.
    PARAMETERS dummy.
    INITIALIZATION.
      DATA wa_functxt TYPE smp_dyntxt.
      wa_functxt-icon_id = icon_variants.
      wa_functxt-quickinfo = 'CHOOSE'.
      wa_functxt-icon_text = 'DISP VAR'.
      sscrfields-functxt_01 = wa_functxt.
      PERFORM f_get_default_variant.
    FORM f_get_default_variant.
      CLEAR: wa_variant2.
      wa_variant2-report = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = ' '
        CHANGING
          cs_variant = wa_variant2
        EXCEPTIONS
          not_found  = 2.
    ENDFORM.                    "f_get_default_variant
    AT SELECTION-SCREEN.
      PERFORM at_selection_screen.
    *&      Form  at_selection_screen
    *       text
    FORM at_selection_screen.
      CASE sscrfields-ucomm.
    *When Display Variant button is clicked
        WHEN 'FC01'.
          PERFORM f_f4_for_variant.
        WHEN 'ONLI'.
          DATA gt_output TYPE TABLE OF t000 WITH HEADER LINE.
          SELECT * FROM t000 INTO TABLE gt_output.
          DATA lo_table TYPE REF TO cl_salv_table.
          TRY.
              CALL METHOD cl_salv_table=>factory
                IMPORTING
                  r_salv_table = lo_table
                CHANGING
                  t_table      = gt_output[].
            CATCH cx_salv_msg.
          ENDTRY.
          DATA lo_layout TYPE REF TO cl_salv_layout.
          lo_layout = lo_table->get_layout( ).
          lo_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
          DATA ls_layout_key TYPE salv_s_layout_key.
          ls_layout_key-report = sy-repid.
          lo_layout->set_key( ls_layout_key ).
          DATA l_variant TYPE slis_vari.
          l_variant = wa_variant2-variant.
          lo_layout->set_initial_layout( l_variant ).
          DATA lo_functions_list TYPE REF TO cl_salv_functions_list.
          lo_functions_list = lo_table->get_functions( ).
          lo_functions_list->set_all( ).
          lo_table->display( ).
      ENDCASE.
    ENDFORM.                    "at_selection_screen
    FORM f_f4_for_variant .
      CLEAR: wa_variant1, wa_variant2.
      wa_variant1-report = sy-repid.
      DATA v_variant_exit TYPE flag.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = wa_variant1
          i_save     = 'U'
        IMPORTING
          e_exit     = v_variant_exit
          es_variant = wa_variant2.
      IF v_variant_exit EQ 'X'..
        PERFORM f_get_default_variant.
      ENDIF.
    ENDFORM.                    "F_F4_FOR_VARIANT

  • Working with LDB without selection screen

    can' we take input through file without any selection screen when we are working with LDB?
    Please focus on this.
    Regards
    vamsi.

    Hi,
    yes, u can make use of :
    SET PARAMETER ID command.
    SET PARAMETER ID pid FIELD dobj.
    Effect:
    This statement sets the content of the SPA/GPA parameter specified in pid to the content of the data object dobj. For pid, a flat character-type field is expected that can contain a maximum of 20 characters, which cannot be exclusively blank characters. pid is case-sensitive. For dobj, a flat, (as of release 6.10 character-type) field is expected, whose binary content is transferred in an unconverted format.
    If the SPA/GPA parameter specified for the current user in pid does not yet exist in the SAP memory, it is created. If the SPA/GPA parameter has already been created for the current user, its value is overwritten.
    In a program, SPA/GPA parameters can only be created or assigned values if a name exists for them in the table TPARA. The extended program check reports an error if it can statically determine that a name specified in pid is not contained in the database table TPARA. ist.

  • How to set default variant for selection screen

    Hi,
    I want to make one variant as default for selection screen for one user.
    For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
    I am not seeing any way to do this. please help me..
    Thanks
    Srini

    Hi,
    If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
    This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
    Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
    This will solve your problem and you can make n number of variants and assign it to different users.
    Regards,
    Arpit

  • Transaction Variant for Selection Screen

    Hi, experts!
    A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
    Any hints are more than welcome!
    Regards,
    Thomas

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Variant for selection screen with the Table control entries in another Tab

    Hi Guys,
      The requirement is to create a variant for the two tabs on a selection screen.
      First tab contains the select options and the second contains table control for making entries.
      So will it be possible to create a variant when the user makes entries in the fields in one tab and the table on other tab?

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Execute transction without selection screen

    Hi,
    I've created a transaction in SE93 and i use it with a variant for the selection screen. When i run the transaction, the selection screen is displayed and the values of my variant are setted into the fields.
    I don't want to display the selection screen, I want to skip it and display directly the first dynpro of my program.
    Does someone know how to do it ?
    Thanks

    Hi,
    Instead of creating 2 transactions and creating a program to call the original transaction. I would suggest you create a program write a *SUBMIT USING SELECTION-SET vari *
    So create just one original transaction which will call the program created above which will intrun submit the original program.
    Program A is original with all the selection screen.
    Create a variant for this program
    Program B
    Submit 'A' using selection-set vari.
    Create T-code ZABC for program B.
    regards,
    Advait
    Edited by: Advait Gode on Feb 2, 2009 3:02 PM

Maybe you are looking for

  • How Does Apple Determine What Posts Are Not Allowed to Remain?

    Apple has deleted 2 posts that, while not favorable to Leopard, do not seem to violate any of the rules. I noticed that not all posts are favorable (naturally) but remain posted. Does Apple just search for the poster's user name and remove on that ba

  • Pointer disappears on a black background

    Is there a way to change the color of, or outline, the pointer when working in an app's panel that, unfortunately, has a black background? Changing the size doesn't help. Thanks!

  • Events in lo cockpit

    hi friends, i hope every is doing good. i have got a doubt regarding LO Cockpit. when we are using LO Cockpit you can find some events under the extract structure. is they are similar like in ABAP or any difference. if they related to abap when they

  • PROCESS FLOW FOR LOOP IN BUSY STATE

    Hi, I have designed a process flow, in which FOR loop has been incorporated,within the loop FTP activity along with check of file exsistence is done, if file does not exsist ,it again tries to perform successful FTP, else map the file to table and as

  • Selecting unique fields

    Now i know Distinct selects unique rows but i will try my best to explain what i mean. I have a table with 3 fields, module, modulepart and lecturer. I want to select only the records where module and modulepart are diffrent so there can be 2 rows wi