Creating a variant in my program?

Hi :
I developed a BDC program using call transaction, and also a tcode for this program.How can i add variants to this tcode.
from se38 when i enter program name and from menu bar im selecting variants tab, here im creating a new variant and saving it.
But when i execute my tcode, in selection screen i am not seeing variant option.
Do i need to add any code for creating a variant in my program?

You enter the selection-screen details in your program and hit the save button and next time you visit the program either thru custom tcode or thru se38 you will be able to see the variants u created
CALl the Transaction U have created fro the BDC. It will show the selection screen. There u fill the data for the field and SAVE button will be there in the menu click it will ask for Variant name give it and save.

Similar Messages

  • 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??

  • How to create a job thru ABAP program for calling a program with variant???

    Hello experts,
    can u give me step wise procedure to create jobs for  a program with a variant name thru ABAP???
    Also, can a transaction can be scheduled as a job to run in background with a variant name???
    Edited by: SAP USER on Jul 22, 2008 6:08 AM

    Hi,
    To create a job through ABAP program you can do the following.
    Go to Menu bar.
    In there, go to   SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
    Then give the JOB NAME and CLASS in the screen that comes up.
    This is how we schedule a program.
    Now, to create a variant for a program -
    First activate your program in SE38. Then execute it .
    Now, click on SAVE button. It will open up  the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
    Hope this helps.
    Regards,
    Hari Kiran

  • How to create a variant

    Hi :
       I developed a BDC program using call transaction, and also a tcode for this program.How can i add variants to this tcode.
    from se38 when i enter program name and from menu bar im selecting variants tab, here im creating a new variant and saving it.
    But when i execute my tcode, in selection screen i am not seeing variant option.
    Do i need to add any code for creating a variant in my program?
    Thanks.
    Raghu

    Hello,
    CALl the Transaction U have created fro the BDC. It will show the selection screen. There u fill the data for the field and SAVE button will be there in the menu click it will ask for Variant name give it and save.
    If useful reward.
    Vasanth

  • How to create a variant to a report from another program at run time

    Hi experts,
                   when i am using FM  :  /OSP/REPORT_CREATE_VARIANT to create a report variant from a program then i am getting  an error 'For object /OSP/ERPNR , number range interval 01 does not exist ', how should i avoid it or can any one help me out to create a report variant from another program at run time with the results of the program.so that i can execute the report from here with this variant

    If i understand you,
    - You can use a FM like [RS_CREATE_VARIANT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=rs_create_variant+&adv=false&sortby=cm_rnd_rankvalue] to create a variant and then use it in the [SUBMIT|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096d67543b11d1898e0000e8322d00/frameset.htm] statement USING SELECTION-SET.
    - But you may also use SUBMIT with WITH parameters which doesnt require variant creation and with much less programming efforts.
    - You can mix the two solutions also.
    So what is you actual requirement, also look at some documentation like [ Scheduling a Job: Full-Control Method|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096ce5543b11d1898e0000e8322d00/frameset.htm]
    Regards

  • Save/create a variant in user defined screen in dialog program

    is there a way to save/create a variant in user defined screen in dialog program?
    thanks...

    Few important tables for Variants:
    VARI - ABAP/4: Variant storage (similar to INDX)
    VARID - Variant directory
    VARINUM - Internal number assignment for variants
    VARIT - Variant texts
    TVARV - Table of variables in selection criteria
    TVARC - Variant conditions
    TVARUVN - Individual Variant Variable: Assignment TVARV
    TVARCT - Text for Variants Conditions
    TVARH - Header entries for screen variants
    TVARIND - Save screen variants
    Regards,
    Vishal

  • Creating Variant in Dialog Program Screen

    Hi All,
    Can I create Variant in Dialog Program screen.If yes, how can I do this?
    Thanks
    Saurabh

    dfsdf

  • How can I create a variant in CAT2 for all users?

    I am using SAP version 4.6c
    In the CAT2 screen I have a variant "Basic settings" if I change this it affects all users.
    I want to create another variant, so that the users can choose between them.
    But when I create another, it is only avilable for my own user. Can somebody tell me how to deploy it to all users?
    Thanks,
    /Finn

    Hi,
    I dont know about the CATS system. But when ur user selects the varaint, he should remove his own id and execute the query. This should display all the variants existing for that program. Then he can select the required variant.
    The user can also save this varaint under his own ID
    Hope it helps.
    Regards.
    Jay Gandhi

  • How to create a variant dynamically and get it?

    hi friends,
    I have to create variant dynamically when the user execute a report.
    i.e After entering all the details in selection screen and click on execute button. I have to create a variant with user entered details.
    When user clicks on Refresh Button in output, then i have to get this variant which i created dynamically and i have to pass it to SUBMIT statement..
    This process and all in same program.
    With example code will be helpful.
    Any helps will be appreciate......
    Regards,
    Shankar.

    Hi,
    Try this......
    Step 1:  Go to transaction SE38 to specify the Program name and select u2018Variantu2019 radio button and u2018Displayu2019.
    Then it will lead you to next screen u2018ABAP:Variants u2013Initial Screenu2019  Specify the variant which needs to be created . 
    Step2: Specify all those values which are static on the selection screen in this step. Then click u2018Variant Attributesu2019 to define selection variable for u2018any field' on the selection screen.
    Step 3: In this step, provide suitable meaning for the variant. As we need to define selection variable for u2018fieldu2019 item on selection screen, check the box under column in the selection screen below:
    Step 4: In the previous step, select u2018Selection Variablesu2019 on the menu. It leads to the next screen  As we have decided to create selection variable for u2018fieldu2019 item only, in this screen you get to see the variable as u2018fieldu2019. Here you are provided with three options.
    Now click the black arrow and you will be prompted with search help of different formulas for the selection variable
    Step 5: Find the suitable formula as select it. This will lead you to the next screen to enter the values . Save the variant and this will conclude the creation of dynamic variant with the help of selection variable. This variant can also be used in the background jobs.

  • How to identify the user who created the variant

    Hi All,
    Can anyone tell me how to identify the user who created the variant ?

    Hi Dear,
    For the same go to SE11 and view the table "VARID". This table give the details of the program,user,variant etc.
    From this table u can know which user created the variant. Hope this solve your purpose.
    Regards

  • Problem in creating transaction variant

    Hi all,
            I am trying to create transaction variant for F- 41 transaction . it's giving an error message .
    Variants are possible only for dialog transactions.
    Message no. MS417
    Diagnosis
    You cannot create variants for variant or parameter transactions.
    Procedure
    Variant transaction:   Adjust the variant
    Parameter transaction: Adjust the parameter(s)
    i need to disable the filed 'document type' .
    Guide me.
    Regards,
    Ravi

    Hi,
    You can copied  into SAP standard program to Zprogram and then use the Loop at screen....Endloop to disable the Documnet type.
    FYI...If you go for F.14 transaction there you find Sytesm----> status .. there you will  find SAP standard program. Make a copy to Zprogarm and try to disable it.
    Regards
    Thiru

  • What is variant in ABAP Program Process Block in Process Chain?

    I wrote an ABAP program:
    REPORT ZTEST,
    PARAMETERS:  PROC(80) TYPE C.
    I can test this PORGRAM from SE38, it shows me a pop-up screen for PROC and I can enter a value and execute.
    Now I want to call this  program ZTEST from a process chain. In Process Chain Selected a Process u201CABAP Programu201D. It asks me program name and Program variant, I entered Program Name as ZTEST and
    Program variant as a character string HELLO.
    When I execute Porcess Chain, ABAP Program errors saying that variant HELLO not found.
    What is Program variant in ABAP Program Process in Process Chain?
    Thanks,

    Dont get confused here.
    Variant name is not which you are pasing to the program.
    You enter some values inside the variant and you specify the program to take the input from the variant.
    Suppose you have to pass 10 parameters to a program.
    user1 creates a variant " hello1" which contains his own selection for the 10 values
    user2 creates another variant "hello2" which contain his own set of selecion values.
    When we use this program in PC, you can use the variant user1 or user2 as per our requirement.
    please check if you are giving variant as input or the proc value.
    Hope this helps,
    Sri....

  • To create a variant for a selection screen having invisible fields

    Hello All
    I am facing a peculiar problem. I have a screen for the program RSEIDOCB in which the following fields are hidden:
                    TAOUTPR FOR EDIDC-STATUS NO-DISPLAY,
                    STAINPR  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTRS FOR EDIDC-STATUS NO-DISPLAY,
                    STAINTA  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTES FOR EDIDC-STATUS NO-DISPLAY,
                    STAINTD  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTST FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTDT FOR EDIDC-STATUS NO-DISPLAY,
                    STAINBK  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTEI FOR EDIDC-STATUS NO-DISPLAY,
                    STAINEI  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTEX FOR EDIDC-STATUS NO-DISPLAY,
                    STAINEA  FOR EDIDC-STATUS NO-DISPLAY,
                    STAOUTDS FOR EDIDC-STATUS NO-DISPLAY,
                    STAINDS  FOR EDIDC-STATUS NO-DISPLAY.
    I want to create a variant for the above program having values for the fields. These fields are basically for specifying the various status of the idocs. I am unable to do to so at the moment. Please help me out. Suitable points will be provided.
    Regards
    Ankit

    Hi Ankit
    Follow these steps..
    1. in SE38 enter Program name 'RSEIDOCB'.
    2. Click on variants button
    3. enter variant name click on create
    4. in selection screen enter default values
    5. Click on attributes
    4. Enter meaning
    5. Press Shft + F4
    6. Bottom of Screen will popup invisible fields
    7. go down to screen
    8. select field and click on selection variables button
       (you to have to tick selection variable check box)
    9. here click on down arrow button very next to field
    10.you can choose values from list and assign to field.
    then save variant.
    Message was edited by:
            Perez C

  • Including Variant in a Program

    Hi all,
    We have a problem with MCEX12 queue. It gets choked frequently. We created a program to clear the choked queue in SMQ1. The job runs every 6 hours to clear it frequently. Recently, I noticed that another queue of ours 2lis_03_BF is getting choked.
    Instead of creating programs for each and every queue, is there a way that I could create a Variant in which I could include these queues and execute the variants according to the choked queue.
    Looking forward to the advice of the experts.
    Regards,
    S.P

    Hi SP,
       You can do this by creating a batch job.
       Create multiple variants from se38. While creating job from SM37 you can assign the perticular variant to the perticular program. Check with your basis people, if you dont have authorizations to do.
    Hope it Helps
    Srini

  • Create Dynamic variant for date field

    Hello all,
    I need to have the current month year displayed in my selection screen in format MM.YYYY and the field is of type SPMON (Period to analyze - month).
    and while saving the variant it is showing only 'T' (entries from TVARVC table)  in  "selection variable" field and not showing 'D' (Dynamic selection) for the above field.
    So,please help me in resolving this issue.
    Thanks in advance.

    hi
    good
    go through this code,i hope this ll help you to create the dynamic variant.
    Please find the sample using RS_CREATE_VARIANT (FM).
    It make use of other FM also , just have a look .
    Hope this may help you.
    REPORT ZEXAMPLE.
    DATA: JVARI_DESC LIKE VARID,
    RC LIKE SY-SUBRC,
    VARIANT_TEXT LIKE VARIT-VTEXT,
    JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
    SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
    JVARI_DESC-REPORT = SY-REPID.
    JVARI_DESC-VARIANT = P_VAR.
    JVARI_DESC-ENAME = 'EXAMPLES'.
    JVT-REPORT = SY-REPID.
    JVT-VARIANT = P_VAR.
    JVT-LANGU = SY-LANGU.
    JVT-VTEXT = 'FUNCTION EXAMPLES'.
    APPEND JVT.
    CLEAR SELPA.
    SELPA-SIGN = 'I'.
    SELPA-OPTION = 'EQ'.
    SELPA-KIND = 'P'.
    SELPA-SELNAME = 'P_VAR'.
    SELPA-LOW = P_VAR.
    APPEND SELPA.
    CHECK IF VARIANT EXISTS
    CALL FUNCTION 'RS_VARIANT_EXISTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    R_C = RC
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NO_REPORT = 2
    REPORT_NOT_EXISTENT = 3
    REPORT_NOT_SUPPLIED = 4
    OTHERS = 5.
    IF RC = 0 AND SY-SUBRC EQ 0.
    DELETE OLD VARIANT
    CALL FUNCTION 'RS_VARIANT_DELETE'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    FLAG_CONFIRMSCREEN = 'X'
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NOT_EXECUTED = 2
    NO_REPORT = 3
    REPORT_NOT_EXISTENT = 4
    REPORT_NOT_SUPPLIED = 5
    VARIANT_LOCKED = 6
    VARIANT_NOT_EXISTENT = 7
    NO_CORR_INSERT = 8
    VARIANT_PROTECTED = 9
    OTHERS = 10.
    IF SY-SUBRC NE 0.
    WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
    EXIT.
    ELSE.
    WRITE:/ P_VAR, 'DELETED'.
    ENDIF.
    ELSE.
    WRITE:/ P_VAR, 'DOES NOT EXIST'.
    ENDIF. " ALREADY EXISTS
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    CURR_REPORT = JVARI_DESC-REPORT
    CURR_VARIANT = P_VAR
    VARI_DESC = JVARI_DESC
    TABLES
    VARI_CONTENTS = SELPA
    VARI_TEXT = JVT
    EXCEPTIONS
    ILLEGAL_REPORT_OR_VARIANT = 1
    ILLEGAL_VARIANTNAME = 2
    NOT_AUTHORIZED = 3
    NOT_EXECUTED = 4
    REPORT_NOT_EXISTENT = 5
    REPORT_NOT_SUPPLIED = 6
    VARIANT_EXISTS = 7
    VARIANT_LOCKED = 8
    OTHERS = 9.
    IF SY-SUBRC EQ 0.
    WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    ELSE.
    WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    EXIT.
    ENDIF.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    TABLES
    VALUTAB = PARMS
    OBJECTS = OBJS
    EXCEPTIONS
    VARIANT_NON_EXISTENT = 1
    VARIANT_OBSOLETE = 2
    OTHERS = 3.
    IF SY-SUBRC NE 0.
    WRITE : / 'ERROR READING VARIANT CONTENTS.'.
    ELSE.
    CALL FUNCTION 'RS_VARIANT_TEXT'
    EXPORTING
    LANGU = SY-LANGU
    CURR_REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    V_TEXT = VARIANT_TEXT.
    WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
    LOOP AT PARMS.
    CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
    READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
    WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
    45 PARMS-KIND,
    PARMS-SIGN,
    PARMS-OPTION,
    PARMS-LOW,
    PARMS-HIGH.
    NEW-LINE.
    ENDLOOP.
    SKIP.
    ENDIF.
    some other approach....
    This function module selects the Selection Screen contents
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    curr_report = sy-repid
    TABLES
    selection_table = loc_int_tab
    EXCEPTIONS
    not_found = 1
    no_report = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
    LEAVE LIST-PROCESSING.
    ENDIF.
    Craete the variant VAR1
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    curr_report = sy-repid
    curr_variant = wf_variant
    vari_desc = loc_varid
    TABLES
    vari_contents = loc_int_tab
    vari_text = loc_varit
    EXCEPTIONS
    illegal_report_or_variant = 1
    illegal_variantname = 2
    not_authorized = 3
    not_executed = 4
    report_not_existent = 5
    report_not_supplied = 6
    variant_exists = 7
    variant_locked = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
    LEAVE LIST-PROCESSING.
    ENDIF.
    reward point if helpful.
    thanks
    mrutyun^

Maybe you are looking for