Creation of Variants

hi friends,
How to  create variants in webDynpro , as we have selection-screen variants in R/3.
Thanks&Regards,
janakiram.

Hi,
There is no such thing as variants in WDA, but you could possibly achieve partially similar functionality through some creative usage of customization/configuration of your application - assigning default values etc.
Regards,
Karri

Similar Messages

  • Mass Creation of Variants

    I have hundreds of products that all have the same variant configurations, and I understandably don't want to pay someone to manually go through the WebTools interface to create all the variants.  After looking through the WebTools database, I am planning on creating a little SQL script that will copy the variant information from one product to another. 
    1)  Select all records from Variant table where ConfigPartNo = 'itemtocopyfrom'
    2)  Create new rows in Variant table that match the previously selected rows, switching out the ConfigPartNo to 'itemtocopyto'
    3)  For each of the first selected VariantIDs in the Variant table, Select all the records in the PartsVariant table where VariantID = VariantID
    4)  Duplicate each of those rows, substituting the new VariantID of the parts created in step 2
    I can't find anyplace else that is affected by the creation of variants.  Will this work, or is there a better way to approach this?
    Thanks,
    Derek

    In case anybody else is interested, I whipped up this in Access VBA today.  Basically all the form does is have two list boxes filled with all the products in WebTools.  You can only select one from the FROM listbox, but you can select as many products in the TO listbox as you want.  This code then loops through all of the selected TO products, duplicating all the variants settings of the FROM column. 
    My code is only lightly commented and does very little error checking, but it does the job.  One thing to note if you end up using this code is that it doesn't check to see if it is duplicating variants, so if you click it twice or run it on a product that already has variants, it will add all of the variants from the FROM product.
    Depending on how much I need to use this, I may extend it a little more so that I can choose to copy only certain variant categories rather than all variant categories, but we'll see.  If I do anything significant, I'll hopefully remember to come post it here.
    If anyone is interested in the original Access database that runs this, just send me an email at derek AT seatability DOT com and I'll send it over to you.
    Dim SQL As String
    Dim con As ADODB.Connection
    Dim rsVariantFrom As ADODB.Recordset
    Dim rsVariantTo As ADODB.Recordset
    Dim rsPartsVariantFrom As ADODB.Recordset
    Dim rsPartsVariantTo As ADODB.Recordset
    Dim rsAutoVariantID As ADODB.Recordset
    Dim rsPartsMaster As ADODB.Recordset
    Dim CopyFromProductID As String
    Dim CopyToProductID As String
    Dim AutoVariantID As Integer
    Dim varItm As Variant
        CopyFromProductID = lstCopyFromPartNo.Value
        'Open Database Connection
        Set con = New ADODB.Connection
        con.ConnectionString = "Driver={SQL Server};" & _
                   "Server=server;" & _
                   "Database=database;" & _
                   "Trusted_Connection=yes"
        con.Open
        For Each varItm In lstCopyToPartNo.ItemsSelected
            CopyToProductID = lstCopyToPartNo.ItemData(varItm)
            Set rsVariantFrom = New ADODB.Recordset
            SQL = "SELECT * FROM Variant WHERE ConfigPartNo = '" & CopyFromProductID & "'"
            rsVariantFrom.Open SQL, con, adOpenForwardOnly, adLockReadOnly
            Set rsVariantTo = New ADODB.Recordset
            SQL = "SELECT * FROM Variant WHERE ConfigPartNo = '0'"
            rsVariantTo.Open SQL, con, adOpenDynamic, adLockOptimistic
            Do Until rsVariantFrom.EOF
                ' Copy all the old Variant Fields, only changing the ConfigPartNo to the new ProductID
                rsVariantTo.AddNew
                    rsVariantTo.Fields("ConfigPartNo").Value = CopyToProductID
                    rsVariantTo.Fields("Description").Value = rsVariantFrom.Fields("Description").Value
                    rsVariantTo.Fields("ImageURL").Value = rsVariantFrom.Fields("ImageURL").Value
                    rsVariantTo.Fields("MarketingText").Value = rsVariantFrom.Fields("MarketingText").Value
                    rsVariantTo.Fields("VariantType").Value = rsVariantFrom.Fields("VariantType").Value
                    rsVariantTo.Fields("DefaultPartNo").Value = rsVariantFrom.Fields("DefaultPartNo").Value
                    rsVariantTo.Fields("RequiredFlag").Value = rsVariantFrom.Fields("RequiredFlag").Value
                    rsVariantTo.Fields("SortOrder").Value = rsVariantFrom.Fields("SortOrder").Value
                    rsVariantTo.Fields("SynchFlag").Value = rsVariantFrom.Fields("SynchFlag").Value
                    rsVariantTo.Fields("SynchDate").Value = rsVariantFrom.Fields("SynchDate").Value
                rsVariantTo.Update
                ' Retrieve most recent Autoincrement / Identity value from connection
                Set rsAutoVariantID = New ADODB.Recordset
                SQL = "SELECT IDENT_CURRENT('Variant')"
                rsAutoVariantID.CursorLocation = adUseServer
                rsAutoVariantID.Open SQL, con, adOpenForwardOnly, adLockReadOnly, adCmdText
                AutoVariantID = rsAutoVariantID.Fields(0).Value
                rsAutoVariantID.Close
                Set rsAutoVariantID = Nothing
                Set rsPartsVariantFrom = New ADODB.Recordset
                SQL = "SELECT * FROM PartsVariant WHERE VariantID = '" & rsVariantFrom.Fields("VariantID").Value & "'"
                rsPartsVariantFrom.Open SQL, con, adOpenForwardOnly, adLockReadOnly
                'Return an empty recordset to add the copied PartsVariant rows
                Set rsPartsVariantTo = New ADODB.Recordset
                SQL = "SELECT * FROM PartsVariant WHERE VariantID = '0'"
                rsPartsVariantTo.Open SQL, con, adOpenDynamic, adLockOptimistic
                ' Copy all the old PartsVariant fields, only changing the VariantID to the new VariantID
                Do Until rsPartsVariantFrom.EOF
                    rsPartsVariantTo.AddNew
                       rsPartsVariantTo.Fields("VariantID").Value = AutoVariantID
                       rsPartsVariantTo.Fields("PartNo").Value = rsPartsVariantFrom.Fields("PartNo").Value
                       rsPartsVariantTo.Fields("DisplayText").Value = rsPartsVariantFrom.Fields("DisplayText").Value
                       rsPartsVariantTo.Fields("UseBaseFlag").Value = rsPartsVariantFrom.Fields("UseBaseFlag").Value
                       rsPartsVariantTo.Fields("BaseAdj").Value = rsPartsVariantFrom.Fields("BaseAdj").Value
                       rsPartsVariantTo.Fields("SortOrder").Value = rsPartsVariantFrom.Fields("SortOrder").Value
                       rsPartsVariantTo.Fields("SynchFlag").Value = rsPartsVariantFrom.Fields("SynchFlag").Value
                       rsPartsVariantTo.Fields("SynchDate").Value = rsPartsVariantFrom.Fields("SynchDate").Value
                    rsPartsVariantTo.Update
                    rsPartsVariantFrom.MoveNext
                Loop
                ' Close PartsVariant recordsets and destroy object
                rsPartsVariantFrom.Close
                rsPartsVariantTo.Close
                Set rsPartsVariantFrom = Nothing
                Set rsPartsVariantTo = Nothing
                rsVariantFrom.MoveNext
            Loop
            ' Set the master record of the item to be a Variant Master
            Set rsPartsMaster = New ADODB.Recordset
            SQL = "UPDATE PartsMaster " & _
                    "SET VariantMasterFlag = 'Y' " & _
                    "WHERE PartNo = '" & CopyToProductID & "'"
            rsPartsMaster.Open SQL, con
            ' Close Variant recordsets and destroy object
            rsVariantFrom.Close
            rsVariantTo.Close
            Set rsVariantFrom = Nothing
            Set rsVariantTo = Nothing
            Set rsPartsMaster = Nothing
        Next varItm
        con.Close
        Set con = Nothing

  • Delivery creation select variants must be checked

    Hi Gurus,
    in selection variants for delivery creation by batch were wrong on 2 points :
    date selection was too large (till D30 instead of D5)
    shipping point was incorrect.
    Please help me

    Goto T.Code SE38 and give the program name. You will find 4 options below and choose the variant and click the Change Button.
    You will be in the next screen, here you will have the option to change the variant, now click the change button and change the Shipping point.
    Once done save and back to the previous screen. Now press the Attributes button, this will take you to the screen where they have defined the Selection variable. You will find a Selection variable button on top of your screen, press that and this will take you to the next screen here you will find that the date has been maintained as D30, change this to D5 and save the variant.
    Lo! you are done. verify the date one more time before you run the job and that's it.
    Regards,
    Mani.

  • Creation of Variant BOM using Simple BOM

    Hi
    I am havign a production BOM, i wanted to create Variant BOM using Production BOM.
    Pls let me know, whether we have any Function modules for the same.
    Regards
    MD

    check SAP std.program to create variant BOM .
    <b>RCSBI030</b>
    Regards
    Prabhu

  • Creation of variant to paas on list of users using a table

    Hello All,
    I got a requirement to create a report in FI-GL  with the requirement for selection and layout  as follows and how to incorporate the same in the
    List of Users (through variant)  and Doc. Type (user input) :
    To exclude transactions, which are not manual journal entries, a table should be created with exclusions.
    *This table will contain two types of exclusions:*
    Document types which will never been used for manual journal entries, since their nature is system related (SAP R/3 standard). In principle, this table will be fixed
    List of Users
    which are not related to persons, but to automatic transactions. This table needs to be verified and updated on regular basis.
    Could any one suggest me how to do a vaiant for the user  through a table and that too this table should ba updated on regular basis.

    Hi,
    rcc50886 wrote:
    We have a situation where we need to allow particular users which are stored in a table.Why don't you simply revoke the CONNECT privilege of the users who shouldn't log in, or lock those accounts? AFTER LOGON triggers can cause huge problems when they don't work right, eg., if for some reason they become invalid.
    create table system.ALLOW_RESTRICTED_USERS (username varchar2(30), insert_date date default sysdate );
    CREATE OR REPLACE TRIGGER SYS.RESTRICTED_USERS_TRIG
    AFTER LOGON
    ON DATABASE
    DECLARE
    BEGIN
    IF DBMS_STANDARD.LOGIN_USER NOT IN (SELECT USERNAME FROM system.ALLOW_RESTRICTED_USERS)
    --  IF SYS_CONTEXT ('USERENV','SESSION_USER') NOT IN (SELECT USERNAME FROM system.ALLOW_RESTRICTED_USERS)
             THEN
                   RAISE_APPLICATION_ERROR (-20001, 'Unauthorized login');
           END IF;
    END;
    Warning: Trigger created with compilation errors.
    SQL> show error
    Errors for TRIGGER SYS.RESTRICTED_USERS_TRIG:
    LINE/COL ERROR
    3/3      PL/SQL: Statement ignored
    3/38     PLS-00405: subquery not allowed in this contextHow to use subquery on the above trigger ? or is there any better way to achive required results .... IN (x, y, z)           works in PL/SQL, but
    ... IN (SELECT ...)       only works in SQL.
    Don't use IN. Use some other way to query the table, some way that will return usable results no matter what (if anything) is in the table, like this:
    DECLARE
       username_found     allow_restricted_users.username%TYPE;
    BEGIN
      SELECT  MAX (username)
      INTO       username_found
      FROM       allow_restricted_users
      WHERE       username     = dbms_standard.login_user;
      IF  username_found  IS NULL
      THEN
         ...As mentioned already, don't create your own objects in Oracle-supplied schemas, especially SYS and SYSTEM.

  • Dynamic creation of variant

    Hi Friends,
          I need to schedule a report in background at runtime.... for that i got a function Module SUBST_SCHEDULE_GENERATOR
    in this function module, we need to pass variant, but as the report is a BDC and should run for different values at every run, values i can get at runtime.Here i need to create a variant for those values ........so that i can pass it to the FM.
    Is there any function module or any other way to create a variant at runtime.
    or is there any other way to create a background job snd in that  case how to pass screen fields..
    Thanks & Best regards
    Dev

    Try SUBMIT statement. Check code below.
    (Ref: SAP documenation.
    Sample:
    DATA: number TYPE tbtcjob-jobcount,
          name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            strtimmed            = 'X'
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.

  • Function Module for creation of variant in BADI

    I need to create a variant to store shipment no's which are coming in BADI. And variant need to be passed to a report which has to be run  Background. can anyone help me out how to do it. Can anyone know the function module for this.

    Hi Anirban,
    Use the bapi BAPI_BUSPROCESSND_CREATEMULTI to achieve the same.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Auth. resrict creation of variants in Selection screen of BEX

    Hi Gurus,
    Do you know how I can restrict users from creating variants in the BEX?
    Thanks!

    Hi,
    In NetWeaver  BI 7.0 authorization object S_RS_PARAM must be maintained for the user so that the user can create a variant.
    But in your case you want to restrict user from creating a variant.
    So, in that case authorization object S_RS_PARAM should not be maintained for the user to restrict them from creating variants in BEx.
    For reference check this link:
    http://help.sap.com/saphelp_nw70/helpdata/en/45/3e243c0fc9072fe10000000a155369/content.htm
    Hope it helps.
    Kind Regards,
    Mona

  • DYNAMIC CREATION OF VARIANTS

    Hi All,
    i want to run the report in the back ground and the selection screen having the date as selct-options
    and i want to put highest date as yesterday for every day when i run in back ground, then how can i create the variant dynamically where the highest date is varying.
    regards
    Krishna

    As per what i understand, you want the high value of the date field to be populated with yesterday's date.
    In that case, what should be the low value?
    There are 2 ways you can achieve this.
    1st Method
    1. Create a variable in TVARVC with TYPE as 'S'.
    2. Populate the same variable in the INITIALIZATION event of your program.
    3. Create a variant and use the Variable populated above.
    2nd Method
    1. Populate the date field with the reqd values in the INITIALIZATION event of your  
        program.
    2. Create a variant and in the variant, choose "Save field without values" for the date
        field in the selection screen.
    Hope this helps.
    Thanks,
    Balaji

  • Quick creation of variants F110

    Hi
    In TCODE F110 a variant needs to exist in order to run a payment program. Is there a quick way to create multiple variants for a particular program?
    Many Thanks

    Hello,
    Go to SE38, give program name SAPF110V
    select variants
    Click on variants
    Create one variant. Then copy to other variants and change wherever necessary.
    You mass transport them using program RSTRANSP
    Regards,
    Ravi

  • MB1B: Variant transaction is not showing the message of document creation

    Dear MM EXPERTS n GURUS,
    When we create any document using T-Code MB1B, on successful posting it gives a message: Message no. M7060, Document 4900556951 has been saved and is stored in the database.
    Now, we have created an variant of this Transaction (ZMB1B) and assigned this Z-Transaction to the user. Original Transaction (MB1B), has been blocked for that user, because - user should use only ZMB1B.
    Problem is that after saving the document in Z-Transaction, user come out to main screen (SAP EASY ACCESS Screen) with a message You are not authorized to use transaction MB1B Message no. S#077
    While document has been saved in database.
    Why it is not showing the message - Message no. M7060, Document 4900556951 has been saved and is stored in the database.
    Thanks in advance.
    DSC

    Dear GURUS n EXPERTS,
    As I have mentioned in my previous thread - After creation of Variant if I block or not assigned the original T-Code i.e. MB1B, system gives message  Message no. S#077 You are not authorized to use T-Code MB1B.
    If I don't block the or assigned the Original T-code, there is chance to user will use original T-Code instead of variant.
    How can we solve this problem.
    Please advice.
    With thanks,
    DSC

  • Variant Creation in Transaction MB51

    Dear All,
    I faced one Issue during creation of Variant in MB51 Transaction is like Below.
    In Posting date field From to To in that i required from date is fixed and To date is Dynamic (Current date - 3)
    So how can i set this?
    In Variants we can give dynamic date calculator to calculate date as we required.
    Does there is a option to add more selection option (ie if I have to add a Fixed date , Current date -3).
    Where I can do this?
    Regards,
    Murari Shah

    Hi,
    > In Posting date field From to To in that i required from date is fixed and To date is Dynamic (Current date - 3)
    Follow as following,enter your From date & Select Save as Variant, New window appears, there enter your Variant Name & Short Text,
    Now Select Posting date from the Selection Screen-Field Name, there go to 3rd last column for "Selection variable" in posting date line & press F4 over there & select "D: Dynamic date calculation",
    Now go to last column " Name of Variable" press F4, new screen appears, in that scroll down & double click on "Date - xxx, Date + yyy (work days)" or also you can use "Current date - xxx,current date + yyy", New window opens, here enter the values in numbers w.r.t. date,
    If you want to Consider today's date always then put 0 in the first field or you can put addition of no. off days as per your choice, then in second field put 3(system will add 3 days from today date),
    Then in field " Work days are determined according to factory calndr." enter "IN", press enter & save your variant, then execute again MB51 after coming out of all screens & check whether you requirement is achieved.

  • Background job is cancelled dut o variant not exist

    Dear friends,
    In my program I have created a variant using FM 'RS_VARIANT_CREATE', and after the creation of variant , i'm submitting the job immediately, but the job  get canceled with error message, specified variant is not defined.
    when i checked the VARID table the variant gets updated, the time differnce is approximately 8 sec for both varaint creation and job start timre. Can any one face this type of issue, could any one help on this.
    Thanks for your time.
    Best regards
    Kumar.

    Hi Kumar,
    Right after you create your variant use the statement COMMIT WORK AND WAIT.
    If it doesn't work you can do something like this
    While f_found = space.
    select * from varid
      where report = 'XYZ'
      and  variant = 'MYVAR'.
    if sy-subrc = 0.
      f_found = 'X'.
    else.
      wait up to 1 seconds.
    endif.
    endwhile.
    I still think try COMMIT WORK AND WAIT after calling RS_VARIANT_CREATE.
    Kind regards,
    Marius

  • How to create Variant Configuration Material Master in SAP PP

    Dear Friend's,
    Pl 's guide me for How to Create Variant Configuration Material Master.
    Give me step by step procedure for Creation of Variant Configuration.If some of you having screen shots for the same with one Example, that will be a very helpful to me for creating  VC.
    Thanks & Regards,
    Sandeep N.Theurkar

    Hi,
    Eg: Ford car.If a sale order is raised for fiesta lxi model the system should choose red colour & for vxi blue colour respectively.
    ie you need to define the characteristic and assign the values .
    This characteristic need to assigned to class.
    class need to be assigned to material master
    1. T.code : CT04(characteristic) FORD_MODEL, Choose single value & entry required tab & give the input as 01 - fiesta_lxi & 02 - fiesta_vxi.( characteristic values)
    2.Tcode: CT04, FORD_BODY( another characteristic)
    Choose single value , don't click entry required.
    01 - Red( characteristic values)
    02- Blue
    3. Create class T.code : CL02
    fiesta_class
    type : 300
    4. OBJECT DEPENDENCY:
    T.CODE : CT04
    FORD_MODEL
    CLICK VALUES TAB,
    IN FIESTA_LXI CLICK THE 'O' meant for Obj dependency, action & extra.
    Edit the dependecy,
    010 $Self.ford_body = '01'. & save
    Repeat the same for FIEST_VXI & instead of '01' give '02' for blue colour.
    , then create a ROH as ford_body. & a KMAT material for the car. .
    Then create a Super BOM with usage 3 & give component as ford_body
    Then use T.code cu41 (Create config profile)
    enter a profile name & class 300 & choose class assignment, choose fiest_class ,
    Use T.code cu50 to check the values.
    Then create a sale order.
    Pl. reward if helpful.
    Regards,
    nandha

  • Not authorization when create a global variant

    Hi developers,
    if i create a variant for execute a query in BI 7.0 with flag for user the system work, while I create a global variant I have problem with the authorization. There are specifics authorizations object for the creation of variant global or are necessaries particular objects.
    Can you help me ?
    Thanks in advance
    Domenico

    Hi Domenico,
    If its authorization problem, try and consult your Basis team. Specify them for which transaction (or) rather for which objects you are having the authorization issues. I guess they should help U with it.
    Hope this will help.
    Regards,
    Syed.

Maybe you are looking for

  • Flash player freezes in Firefox

    Flash player is causing Firefox to freeze for about 30 seconds whenever I access a website which uses flash. I am using the latest version of Firefox (v19.0.2) and the latest version of Adobe Flash (v11.6.602.171). This same problem has existing for

  • How can I install the pdf printer when Win 7 doesn't offer the choice?

    Hi, I have Acrobat 8.0 Pro, and in XP I used to have an Adobe pdf printer in my printer's dropdown list, so that it was possible to convert anything in any application into a pdf document. Now I had to change the system, and I try to install a pdf pr

  • SNMP questions

    Hello, I just started with SNMP Traps on Weblogic 6.1, and I'm afraid I have some questions. a) I configured a Guage monitor to monitor the JVM memory usage. But I can't get it working, it never sends out a trap. This is the config I'm using: <SNMPGa

  • How to extract register names & their addresses from .inc file of a microcontroller

    Hi, I want to extract register names to a dropdown and their corresponding addresses from .inc file in such a way that when I select a register from dropdown, it has to also show its address in a string indicator. However, only a part of .inc file co

  • Cannot change precision of digital display of a numerical control

    Hi, This may be a stupid question. But in the attched slider control, I am unable to set the precision of the digital display. I can only set the precision of the scale. What do I need to do? Thanks. Peter Attachments: Horizontal Fill Slide (numeric