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.

Similar Messages

  • How to create the Vote Form and Get the Result

    I have an assignment to create a website for voting and show the result online.  Anyone can tell me the steps to build such website???

    This tutorial uses jQuery and PHP
    http://code.tutsplus.com/tutorials/creating-a-dynamic-poll-with-jquery-and-php--net-57
    Nancy O.

  • How to create open file dialogbox and get path of selected file?

    Hi Experts!
    i want to use button like browse button. so that i can select image from that and display selected image in imagebox and the path is to be display in edit text.
    Thanking you
    vishwajit kumar

    Hi
    Use this code , for this you must include Imports System.Windows.Forms name sapce
    Private FileName As String
            Public Function showOpenFileDialog() As String
                Dim ShowFolderBrowserThread As Threading.Thread
                Try
                    ShowFolderBrowserThread = New Threading.Thread(AddressOf ShowFolderBrowser)
                    If ShowFolderBrowserThread.ThreadState = System.Threading.ThreadState.Unstarted Then
                        ShowFolderBrowserThread.SetApartmentState(System.Threading.ApartmentState.STA)
                        ShowFolderBrowserThread.Start()
                    ElseIf ShowFolderBrowserThread.ThreadState = System.Threading.ThreadState.Stopped Then
                        ShowFolderBrowserThread.Start()
                        ShowFolderBrowserThread.Join()
                    End If
                    While ShowFolderBrowserThread.ThreadState = Threading.ThreadState.Running
                        Windows.Forms.Application.DoEvents()
                    End While
                    If FileName <> "" Then
                        Return FileName
                    End If
                Catch ex As Exception
                    'SBO_Application.MessageBox("FileFile" & ex.Message)
                    MessageBox.Show(ex.ToString())
                End Try
                Return ""
            End Function
            Public Sub ShowFolderBrowser()
                Dim MyProcs() As System.Diagnostics.Process
                FileName = ""
                Dim OpenFile As New OpenFileDialog
                Try
                    OpenFile.Multiselect = False
                    OpenFile.Filter = "All files(*.CSV)|*.CSV"
                    Dim filterindex As Integer = 0
                    Try
                        filterindex = 0
                    Catch ex As Exception
                    End Try
                    OpenFile.FilterIndex = filterindex
                    OpenFile.RestoreDirectory = True
                    MyProcs = System.Diagnostics.Process.GetProcessesByName("SAP Business One")
                    If MyProcs.Length = 1 Then
                        For i As Integer = 0 To MyProcs.Length - 1
                            Dim MyWindow As New WindowWrapper(MyProcs(i).MainWindowHandle)
                            Dim ret As DialogResult = OpenFile.ShowDialog(MyWindow)
                            If ret = DialogResult.OK Then
                                FileName = OpenFile.FileName
                                OpenFile.Dispose()
                            Else
                                System.Windows.Forms.Application.ExitThread()
                            End If
                        Next
                    End If
                Catch ex As Exception
                    'SBO_Application.StatusBar.SetText(ex.Message)
                    MessageBox.Show(ex.ToString())
                    FileName = ""
                Finally
                    OpenFile.Dispose()
                End Try
            End Sub
            Private Class WindowWrapper
                Implements System.Windows.Forms.IWin32Window
                Private _hwnd As System.IntPtr
                Public Sub New(ByVal handle As System.IntPtr)
                    _hwnd = handle
                End Sub
                Private ReadOnly Property Handle() As System.IntPtr Implements System.Windows.Forms.IWin32Window.Handle
                    Get
                        Return _hwnd
                    End Get
                End Property
            End Class
    on the browse button click write this
    Dim oEditText As SAPbouiCOM.EditText = form.Items.Item("txtFlePath").Specific
           oEditText .String = showOpenFileDialog()
    for setting image to a picture box use this
    Dim oPictureBox As SAPbouiCOM.PictureBox = form.Items.Item("picInfo").Specific
    oPictureBox .Picture = "C:\image.png"
    Regards
    Arun

  • How do I create a new account and get stuff from the old account to the new account

    How do I create a new account and get stuff from the old account to the new account

    There are instructions on this page for creating a new account : Set up an Apple ID in iTunes
    Or if you don't want to give credit card details : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method
    But you won't be able to transfer purchases from your old account to it, all content that you download from the store will remain tied to the account that downloaded it.

  • How to create t-code for a table and how to create transaction variant???

    Hi,
    I have created a custom table zsark.
    Now my requirement is : I have to create a transaction variant zsark_var for sm30 and table zsark. I have to disable the output of the first screen. I have to assign the transaction variant to the transaction code of table zsark.
    Now,
    1.     how to create transaction code to a table. Can any one give me the 
                    staps??
    2.     how to create transaction variant for the above requirement???
    Thanks & Regards,
    Sarkar

    Hi
    1 Goto SE93 transaction
    2 Choose 5th option Transaction with parameters
    3 Give transaction : SM30, Check Skip Initial Screen Press Enter
    4 Goto Bottom left corner, click F4 select viewname, on right hand side give table name
    5 Press one more time F4, choose update , mark it X on right side.
    6 save the transaction.
    Thanks
    sandeep
    reward if helpful

  • How can I create a Face Time account.  I have an Apple ID and password.  When I Google how to create an account all I get is what I need for the system

    I have a 13" MacPro.  How can I create a Face Time account.  I have an Apple ID and password.  When I Google how to create an account all I get is what I need for the system

    You don't need to create an account.   Your use your Apple ID to log into Facetime.
    If you haven't already you will need to download the Facetime App from the Mac App Store.
    https://itunes.apple.com/us/app/facetime/id414307850?mt=12&ls=1
    FaceTime for Mac: Troubleshooting FaceTime - Apple Support

  • How do you create a podcast playlist and get all unplayed podcasts copied to it?

    How do you create a podcast playlist and get all unplayed podcasts copied to it?

    Creat a Smart Playlist in iTunes (File -> New Smart Playlist) that looks like the following:
    Once you have successfully done that you can set it up to sync to your iPod Shuffle from under the Shuffle's Podcast configuration tab/pane in iTunes.
    B-rock
    B-rock

  • How to create Invisible Element Dynamically?

    Dear All,
    I am trying to create a Form dynamically and for aligment prupose i need to create one InvisbleElement also dynamically.But i dont know why that is not reflecting in the Screen .The code is deploying properly without error but the Invisible Element is not getting created .The code i used is
    IWDInvisibleElement Invis1=(IWDInvisibleElement)view.createElement(IWDInvisibleElement.class,null);
    Invis1.setEnabled(true);
    Invis1.setVisible(WDVisibility.VISIBLE);
    thetransparent.addChild(Invis1);
    Can anyone please tell me if i need to set any property or if the method i am creating is wrong .Please guide me in the correct way.
    Thanks and Regards,
    Nishita Salver

    Hi,
    check "Dynamic Programming" part in below library file
    http://help.sap.com/saphelp_nw70/helpdata/EN/0f/f08841e3af1609e10000000a155106/frameset.htm
    or else,
    still you are getting Problem, create any other ui element and set its visibility to false. (dont know how far it will help you)
    regards,
    Pradeep
    Edited by: pradeep bondla on Jun 25, 2008 3:20 PM

  • How to create alv table dynamically by performing action on the button.

    Hi all,
    my requirement is to create alv table dynamically.
    that is i will create two buttons
    1) show alv table
    2) close alv table
    if user selects show alv table then the alv table should be displayed.
    and if user selects clsoe alv table then the alv table should be closed.
    to create alv table dynamically  i have followed this procedure.
    under view properties i have added salv_wd_table component. then under the action of showalvbutton i went to code wizard and i have selected instantiate used component component use salv_wd_table. the following code will be generated
    with this code i am unable to display alv table dynamically correct me where i went wrong kindly send me the necessary steps how to create alv table dynamically
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_salv_wd_table( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
      endif.
    to close table i have used the following code. with this code i am able to achieve the functionality to delete the alv table
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_salv_wd_table( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      else.
      lo_cmp_usage->Delete_component( ).
    endif.
    Thanks & Regards,
    Naveen
    Edited by: naveen.webhelp on Feb 10, 2011 5:52 AM

    Hi
    ALV table will be shown in the viewcontainerUI element.
    it is shown there empty if you dont fill the node bound to the data node of the interface controller of the comp usage
    SALV_WD_TABLE.
    and if you are not getting the table filled in the first place.
    then check have you mapped the DATA node to some node in the comp controller
    wht basically is your requirment is that you want to show ALV gird on click of one button and delete it on click of other button.
    there are many ways to do so.
    best way is control the visiblity of the viewcontainer UI element which containes the TABLE view of SALV_WD_table comp.
    create an attribute of type WDUI_VISIBILITY name say VIS.
    now go to the layout and bound hte visible property of the viewcontainer to this attribute VIS.
    then in the showalv grid button's eventhandler write
    wd_context->set_attribute(
    name = 'VIS'
    value = '02'
    and in the wddoinit and delete alv grid button's event handler write
    wd_context->set_attribute(
    name = 'VIS'
    value = '01'
    thanks
    sarbjeet singh

  • MMPV - Close period - How to create a variant

    Hello all,
    Transaction MMPV is used to close the MM period and open a new one. Currently, we run this transaction every month MANUALLY.
    We would like to create a variant that will open the new period automatically every month. The only problem is the period / year that changes every month (I do not know how to create a variant with changed values - if it is at all possible).
    How can we create a variant that will run every month to close the MM period ?
    Thanks for your help,
    Isaac

    Hello Isaac
    It is possible......But to make it happen you need to go with date field and not with Period and year.
    Steps -
    1 - Enter field FROM Comp Code and TO Comp Code
    2 - Enter the date (E.g - 05-Mar-2007)
    3 - Save as varient....Give the varient names as required.
    4 - Activate the 4th checkbox (Selection variable) in front of date field
    5 - Click on button 'Selection variable' at the top of screen.
    6 - Click on YELLOW light. This will turn it GREEN. Now you have 1st light as YELLO which was previously yello.
    7 - Click on the down arrow just below the yello light.
    8 - Select the appropriate option and save the varient.
    The day of batch job scheduling depends upon the options you selected in the 8th step.
    I hope it clarifies your dought and will allow you to create the varient as per your requirement.
    Best Regards
    Avinash

  • How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?

    Hi All,
    How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
    Assume Material is Pen.
    While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
    Kindly help me out.
    Thanks,
    Renjith Jose

    A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
    Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
    "Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
    hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
    Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

  • How to create a variant in ecatt?

    Hi all,
    I am new to Ecatt scripting. I hav a requirement from the user, that one ecatt is used for two sales org using two variants.
    I recorded as per the requirement ( first i created one basic script and called it in a master script ). Now I need to create two variants for the master script for the sales org.
    So could any one suggest how to create a variant in ecatt?
    Thanks in advance.
    Vijayakumar.G

    Hello Vijay,
    After recording parameterize everything whatever you want.
    In parameterization table leave the value field as empty, I mean don't give any value.
    Select the following in the menu,
    Utilities>Test configuration>Create
    Now, test configuration name will have the same of the test script name.
    Provide the details in the configuration tab. Then in the variants tab select the second radio button "Internal variants".
    In the variant table you can see the default variant "ECATTDEFAULT". You can make use of  this also. Otherwise you can also create your own variants by clicking "Insert variant" button.
    The variables whatever you have created in the test script will be there in the table. Now, Create variant and provide values for each variables.
    You can also select the variants which need to be executed.
    Now you can run the test configuration. It will be running number of times according to the created number of the variants.
    You can also create Test data for your test script and configuration.
    Try this, I hope it will help.
    Feel free to reward if it helps.
    Regards,
    Gopi
    Edited by: Gopinath K S on Oct 7, 2008 7:37 AM

  • How to create a variant in VA01

    Hi Gurus,
    Can you teach me how to create a variant in VA01?  I'd like to have a default value in the sold to party field.
    Thanks,
    Paul

    hi,
    To show a default sold-to-party in this field when the user creates a sales order (VA01) we can use a function exit .This function exit is located in enhancement no V45A0002 . Before we can choose the exit we have to create a project in CMOD after that enter V45A0002 in the enhancement field and click on the components . In the components you will see the exit EXIT_SAPMV45A_002 . This exit is used for our purpose.
    Double clicking on this exit will takes us to function builder (SE37) . This function exit has one exporting parameters and two importing parameters, we are interested in exporting parameter which is E_KUNNR of type KNA1-KUNNR i.e if we move the desired customer name to this structure(E_KUNNR) it will be shown in the field as the default value when we create the sales order. This function also contains a customer include ZXVVA04 . This include will be used to write our custom code .
    Double clicking on this include and it will prompt us that this include does not exists do you want to create this object ,select yes and the include will be created .In this include we can write our own code that will fill the field E_KUNNR.
    e.g. E_KUNNR = 301.
    Activate the include and Activate the project. Now when ever the SALES ORDER will be created , sold-to-party field will come up with a predefined customer .
    regards
    sadhu kishore

  • How to create a variant selection screen

    Hi experts,
    Can you tell me " How to create a variant selection screen ".
    Please it's urgent.........
    Thanks
    Basu

    Hi ,
    Goto your selection screen
    Make entries in the fileds od the selection screen
    press save button, it will ask you for the mane of the Variant
    Give the name of  the Variant and save it
    Variant is now created for the selection screen.
    Reward if useful.
    Regards,
    Shilpi

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

Maybe you are looking for

  • Cannot find Win 8.1 drivers for Satellite C50-A-1DV

    Hi. I re-installed windows 8.1 from a disk I have, but I'm having driver problems, namely finding certain driver support on the Toshiba website. It seem that my laptop isn't listed, or I can't find it in the support section for drivers. The drivers I

  • Excise Duties are not getting inventorised fully

    Dear Friends, User maintaining inventorise excise conditions like JMIP,JEC3, JSEI in PO . But they are changing it mannually during GR if there is any chage in invoice. But while excise posting the input values are not coming correctly. Sometimes it

  • Reading into plist files

    Hi, I'm building an app that relies heavily on reading plist files. I've got the basics down using System Events, for example: tell application "System Events" set plistFile to "/Library/Preferences/com.domain.prefs.plist" set returnVal to (value of

  • PS CC 2014 troubleshooting

    Hi,      I have just installed the trail for Adobe PS CC 2014, and when I boot it up it opens the Photoshop, and then says "Photoshop CC has stopped working" and then the program closes. I have re-installed it twice but it still lacks to work. Thanks

  • Where do I go for help if my mac Mail will not respond from Applications? I can move it to the dock but it does not respond.  Beach ball turns---

    ? My mac mail on the dock is checked as open, but it will not open and the box says application not responding.  the beach ball turns constantly on the unresponsive mail.  What can I do?