Can we call the window in runtime in SAP Scripts  ?

Hi
Can we call the window (without placing the window in the layout at design time) in runtime in SAP Scripts 
Thank You

Hello,
Calling a window at runtime is not posible.
Let me know what u want to do exactly.
Regards

Similar Messages

  • Object Referenced Error When calling the Windows Form during Runtime

    Hi,
    I am getting  Object reference errors when running windows form during runtime. In debugging mode in MS Visual studio 2005, I am not getting this error. I'm calling the window form from menu and called the window in a thread as suggested in one of forums . I don't see anyone in the forum mentioned this problem I have. Any help would be deeply appreciated. Below are the error and code samples.
    ERROR Message
    Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Project1.Loadxml.Loadxml_Load(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Edited by: Albert Tio on Feb 16, 2011 9:55 AM

    Here is the code.
    Option Strict Off
    Option Explicit On
    Friend Class GetEvents
        Public WithEvents SBO_Application As SAPbouiCOM.Application
        Public SboGuiApi As SAPbouiCOM.SboGuiApi
        Public oForm As SAPbouiCOM.Form
        Public oDBDataSource As SAPbouiCOM.DBDataSource
        Public oCompany As SAPbobsCOM.Company
        Public RS As SAPbobsCOM.Recordset
        Public oPrev_Bank As String, oPrev_AcctType As String
        Public oLoadXml As Loadxml
        Public Sub SetApplication()
                 'Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi
            ' by following the steps specified above, the following
            ' statment should be suficient for either development or run mode
            sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
            ' connect to a running SBO Application
            SboGuiApi.Connect(sConnectionString)
            ' get an initialized application object
            SBO_Application = SboGuiApi.GetApplication()
        End Sub
        Public Sub SetCompany()
            Dim ret As Long
            Dim MsgStr As String
            Dim Cookie As String
            Dim ConnStr As String
            Try
                oCompany = New SAPbobsCOM.Company
                Cookie = oCompany.GetContextCookie
                ConnStr = SBO_Application.Company.GetConnectionContext(Cookie)
                '//before setting the SBO login context make sure the company is not connected
                If oCompany.Connected = True Then
                    oCompany.Disconnect()
                End If
                ret = oCompany.SetSboLoginContext(ConnStr)
                If Not ret = 0 Then
                    Exit Sub
                End If
                ret = oCompany.Connect
            Catch ex As Exception
                SBO_Application.MessageBox(ex.Message)
            End Try
            MsgStr = ""
            If Not ret = 0 Then
                oCompany.GetLastError(ret, MsgStr)
                SBO_Application.MessageBox(MsgStr)
            Else
            End If
        End Sub
        Public Sub New()
            MyBase.New()
            ' set SBO_Application with an initialized application object
            SetApplication()
            SetCompany()
            AddMenuItems()
        End Sub
        Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
            Dim myThread As New System.Threading.Thread(New System.Threading.ThreadStart(AddressOf LoadXmlMainThread))
            Try
                If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
                    'SBO_Application.MessageBox("My sub menu item was clicked")
                    '// Create a form to be launched in response to a click on the
                    '// new sub menu item
                    myThread.SetApartmentState(System.Threading.ApartmentState.STA)
                    myThread.Start()
                    'Loadxml.ShowDialog()
                                End If
            Catch ex As Exception
                SBO_Application.MessageBox("1." & ex.Message)
            End Try
            'If (pVal.MenuUID = "MyGoToMenu") And (pVal.BeforeAction = False) Then
            '    SBO_Application.MessageBox("My GoTo Menu was clicked")
            'End If
            'If (pVal.MenuUID = "MySecondGoToMenu") And (pVal.BeforeAction = False) Then
            '    SBO_Application.MessageBox("My Second GoTo Menu was clicked")
            'End If
        End Sub
        Private Sub LoadXmlMainThread()
            'Dim lLoadxml As New Loadxml
            Try
                oLoadXml = New Loadxml
                oLoadXml.WindowState = FormWindowState.Maximized
                oLoadXml.ShowInTaskbar = True
                oLoadXml.TopMost = True
                oLoadXml.Activate()
                Application.Run(oLoadXml)
            Catch ex As Exception
                SBO_Application.MessageBox("2." & ex.Message)
            End Try
        End Sub
        Private Sub AddMenuItems()
            '// Let's add a separator, a pop-up menu item and a string menu item
            Dim oMenus As SAPbouiCOM.Menus
            Dim oMenuItem As SAPbouiCOM.MenuItem
            Dim i As Integer '// to be used as counter
            Dim lAddAfter As Integer
            Dim sXML As String
            '// Get the menus collection from the application
            oMenus = SBO_Application.Menus
            'Save an XML file containing the menus...
            'sXML = SBO_Application.Menus.GetAsXML
            'Dim xmlD As System.Xml.XmlDocument
            'xmlD = New System.Xml.XmlDocument
            'xmlD.LoadXml(sXML)
            'xmlD.Save("c:
    mnu.xml")
            Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
            oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
            oMenuItem = SBO_Application.Menus.Item("43520") 'moudles'
            Dim sPath As String
            sPath = Application.StartupPath
            'sPath = sPath.Remove(sPath.Length - 3, 3)
            If sPath.EndsWith("\") = False Then
                sPath = sPath & "\"
            End If
            '// find the place in wich you want to add your menu item
            '// in this example I chose to add my menu item under
            '// SAP Business One.
            oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
            oCreationPackage.UniqueID = "MyMenu01"
            oCreationPackage.String = "Unbridle Menu"
            oCreationPackage.Enabled = True
            oCreationPackage.Image = sPath & "unbridle.bmp"
            oCreationPackage.Position = 15
            oMenus = oMenuItem.SubMenus
            Try ' If the manu already exists this code will fail
                oMenus.AddEx(oCreationPackage)
                '// Get the menu collection of the newly added pop-up item
                oMenuItem = SBO_Application.Menus.Item("MyMenu01")
                oMenus = oMenuItem.SubMenus
                '// Create s sub menu
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
                oCreationPackage.UniqueID = "MySubMenu"
                oCreationPackage.String = "Unbridle Monitoring"
                oMenus.AddEx(oCreationPackage)
            Catch er As Exception ' Menu already exists
                'SBO_Application.MessageBox("Menu Already Exists")
            End Try
        End Sub
    End Class
    Public Class Loadxml
        'Inherits System.Windows.Forms.Form
        Public sBPpath As String
        Public sGLpath As String
        Public sBillpath As String
        Public bRun As Boolean
        Private Sub Loadxml_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.TextGL.Text = System.Configuration.ConfigurationSettings.AppSettings("GLAcctDownloadPath").ToString()
            Me.TextBP.Text = System.Configuration.ConfigurationSettings.AppSettings("BPAcctUPloadPath").ToString()
            Me.TextBill.Text = System.Configuration.ConfigurationSettings.AppSettings("BillUPloadPath").ToString()
            Me.NotifyIcon1.Visible = False
        End Sub
    End Class

  • How can i change the window scroll bar property at runtime...???

    hi all ,
    can i change the Window's (Forms window) "Show horizontal scroll bar property" at runtime, i mean programatically... Is there any property which i can set....??
    Thanx in advance
    Regard's
    Prasad

    There is no property there for your required task.
    Hassan

  • How to hide the window of Runtime Parameter Form?

    I have a form and I call a report from this form.I have passed some parameters to this report.Before the browser of reports appear the window of Runtime Parameter Form.I want to hide this window of Runtime Parameter Form but I don't know how.
    Please help me!

    When calling the report, set the property PARAMFORM to NO. IF you using parameter list to pass values to report you can do as follows:
    ADD_PARAMETER(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');

  • I am trying to install windows 7 on my macbook pro 13", when i run bootcamp it tells me that there is not a windows support software available for my computer. Where can i get the windows support software for my macbook?

    I am trying to install windows 7 on my macbook pro 13", when i run bootcamp it tells me that there is not a windows support software available for my computer. Where can i get the windows support software for my macbook?

    Apple only supports Windows on certain hardware.
    http://www.apple.com/support/bootcamp/
    Apple provides their framework for Windows to run on a Mac, a piece of software called a Hybrid MBR that bridges the gap between how Windows reads the drive partition table (MBR) and EFI/GUID partition table that Mac's use.
    It doesn't mean Windows can't run on your Mac, a third party solution called rEFIt will also bridge the gap and allow booting of more that just Windows, Linux as well for a triple booting computer.
    Your hardware has to meet the other requirements the second and third operating system needs as as being able to install drivers that will work for your hardware, especially the fans or they will run loud and fast by default.
    http://refit.sourceforge.net/
    This above is a advanced procedure which requires knowledge how computers and various operating systems, drive formats and so forth work.
    I even admit I don't know everything myself, but I experiment on a separate piece of Mac hardware (out of warranty/AppleCare) designed for this purpose so in case something screws up I'm not taking down my only machine and can use the other to get online and find solutions.
    There is a very high potential for losing your data if your using advanced/non-Apple methods to install Windows on your only Mac where Apple doesn't support it. Also one shouldn't be doing this on Mac hardware that is under AppleCare or warranty as it might be voided. Proceed at your own risk and education.

  • How many times can i call the start()

    Hi All:
    I would like to know how many time you can actually call the start(),
    cuz my app is doing some really strange things,
    here is a fragament of my code:
    private void spawnThreads()
    ListIterator it = _vWorker.listIterator();
    while ( it.hasNext() ) {
    ClientWorker client_worker = (ClientWorker) it.next();
    client_worker.start();
    ClientWorker is another Thread, and in the run() of the ClientWorker, I have
    public void run() {
    Runtime rt = Runtime.getRuntime();
         try {
         // Start the timer
         Process child = rt.exec(_fileName);
         // gobble any error or output streams
    StreamGobbler errorGobbler = new
    StreamGobbler(child.getErrorStream(), "ERROR");
    StreamGobbler outputGobbler = new
    StreamGobbler(child.getInputStream(), "OUTPUT");
    errorGobbler.start();
    outputGobbler.start();
    child.waitFor();
                                            } catch (IOException e) {
                   System.err.println("IOException starting process!");
              } catch (InterruptedException e) {
                   System.err.println("Interrupted waiting for process!");
    I have a couple of cmd files to execute, so This spawnThreads() will be called a couple of times,and the funny thing is , it will execute the first cmd files, and that is it, it won't execute the 2nd or the 3rd cmd files, it will start the thread, but then the run()won't actually gets invoked,,,so I am just wondering if anyone of you has encountered this problem, perhaps you could lend me some insight on this?
    thanks,

    Yes, you can run the start() of a Thread more than once,
    here is my Test App,
    public static void main(String[] args) throws Exception {
    Vector vec = new Vector();
    for (int i=0;i<4;i++){
    ClientThread ct = new ClientThread();
    vec.add(ct);
    ListIterator it = vec.listIterator();
    while(it.hasNext()){
    ClientThread ct = (ClientThread)it.next();
    ct.start();
    and as you have already guessed it the run() of ClientThread simply does system.out.println()
    and here is the output
    run started
    run started
    run started
    run started
    so..yeah..I don't really have any idea what is happening to my app and why it is not executing any cmd files after executing the very first cmd file

  • How to call the windows popup  on SRM  portal

    Hi ,
    how to call the windows popup on SRM portal.
    For example when I hit "Check" on the shoppoing cart screen I get a popup  saying  that "Shopping cart Test has no errors and can be orderd".
    I am looking to thorw a popup which has got "yes" and "no" options ( like function module POPUP_TO_CONFIRM in GUI ) and based on the users choice the logic follows through.
    Thanks,
    krishna.

    Is this thread still valid? If not, please close the thread.
    If so, as no response has been submitted, please rephrase your question and/or provide further information to describe your requirement.
    Thanks
    Jason
    SDN SRM Moderator Team

  • How can we call the method of used controller?

    Hi All,
       i created two WDA Applications.( like YWDA1,YWDA2 ) . i am using the component WDA2 in WDA 1.and displaying the one view of WDA2 as popup window in WDA1 on action of one of the input element in the view of WDA1 by using the method l_window_manager->create_window_for_cmp_usage
    I have a button on the view of WDA2 which has appear in the popup window...how can i call the method which has binded to that button....and where should i code that...and i need to assign selected value in the popup window to input elemetn of view  WDA1
    Please help me to resolve this....
    Regards,
    Ravi

    You can not directly call view's event handler from other component.
    create a method in component controller of the second component and in the button click call the component controller method. ( also make the method as interface so that you can call it from other components )
    Now, you can call the interfacecontroller's method
    DATA: l_ref_INTERFACECONTROLLER TYPE REF TO ZIWCI__VSTX_REBATE_REQ_WD .
      l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_<comp usage name>( ).
      l_ref_INTERFACECONTROLLER->Save_Rr(
        STATUS = '01'                       " Zvstxrrstatus
    save_rr is the method of second component controller

  • How can I reget the Windows 10 10061 auto upgrade?

    hi pros...
    I install Windows 10 10061 yesterday,
    and then restore to windows 10 10041,
    after that
    I can't cat the Windows 10 10061 autoupdate again,
    I want to reinstall 10061,
    How can I reget the autoupgrade again?
    Thanks

    On Sat, 25 Apr 2015 13:09:27 +0000, david hk129 wrote:
    excerpt:
    For those that did not know, you can switch between slow and fast ring updates in PC Settings > Update and Recovery > Preview Builds. Everyone is on the slow ring, by default. If you want to see the build right as it becomes available, you will want
    to be on the fast ring.
    http://www.winbeta.org/news/windows-10-technical-preview-do-you-prefer-slow-ring-or-fast-ring-poll
     <http://www.winbeta.org/news/windows-10-technical-preview-do-you-prefer-slow-ring-or-fast-ring-poll>excerpt:
    It turns out, there's actually two different upgrade paths for preview builds. The default setting is what Microsoft calls "Slow Ring," with another setting called "Fast Ring."
    http://www.cnet.com/how-to/change-to-the-fast-ring-for-more-frequent-windows-10-preview-updates/
    If you counter by saying those 2 sites are incorrect, I would rather believe them than you.
    If you counter by saying those 2 postings are old and outdated, you will have to produce something that says the contrary.
    Once again, you've totally missed the point, and I'm not going to continue
    this discussion as I'm tired of the childish name calling and personal
    attacks from you.
    Facts:
    1. The OP must have been on the Fast ring or he wouldn't have been
    offered 10061 in the first place.
    2. Your suggestion was to switch from the Slow ring to the Fast ring as a
    solution to his problem.
    3. I pointed out that he had to be on the Fast ring in the first place.
    4. You took exception to that and called me names.
    5. You made the bald, untested statement that rolling back to 10041 put him
    back to the Slow ring.
    6. I actually tested this and proved that this is not the case. A roll back
    from 10061 to 10041 resulted in me still being in the Fast ring.
    7. You post links to two web sites that have stories that have absolutely
    nothing at all to do with whether or not a roll back changes one from the
    Fast ring to the Slow ring. A roll back should put you back in the ring you
    were in prior to the upgrade. Since the OP went from 10041 to 10061
    through Windows Update, he must have been on the Fast ring when still
    running 10041. It stands to reason that a roll back would result in him
    still being in the Fast ring after the roll back is complete.
    It is great that you post here but posting baldly incorrect, untested
    advice based on nothing more than supposition doesn't help anyone when it
    is clearly wrong.
    Paul Adare - FIM CM MVP
    "I am truly free only when all human beings, men and women,
    are equally free." -- Mikhail Bakunin

  • How can i detect the windows version

    Hi,
    How can I detect the windows version from Forms 6i?
    I was used get_application_property(operating_system); But it only return MSWINDOWS, MSWINDOWS32, WIN32COMMON.
    Any function or way can return the exact windows version(98/ME/NT/XP)?
    Regards, Wing

    You may use Win_Api_Environment API call to get windows version.
    I have sample code on my home PC if you need code send mail at [email protected]

  • How can I change the window size of iTunes?  Used to be easy before installing Mavericks.

    How can I change the window size of iTunes on my iMac?  Used to be easy before installing Mavericks.

    If you want to make the itunes tab so you can see the dock
    you press the
    esc
    button if your in full screen mode
    if you want to get into full screen mode you press the arrows facing away from eachother in the top right corner
    there is another way to get to the normal tab if your in full screen
    make the curser go right up to the top of the screen and it will show the apple tab
    it will have two arrows facing together highlited in blue
    if u tap that it will take you to the normal tab

  • Windows vista home premium service pack 2.error measage __(the windows installer service could not be accessed.this can occur if the windows installer is not correctly installed .contact your support personnel for assistance )no error nurber

    windows vista home premium service pack 2。error measage __(the windows installer service could not be accessed.this can occur if the windows installer is not correctly installed .contact your support personnel for assistance )no error nurber

    Hi Abdallah,
    According to your description, could you please post the summary and detail logs for further analysis? By default, the logs can be found in: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log.
    Usually, the error occurs when the Windows Installer Service is not running or the Windows Installer registry settings are corrupted.  I recommend you reset the Windows Installer Service settings in the registry and restart the Windows Installer Service,
    then reinstall SQL Server 2008 R2. For more details, please review this similar
    article.
    Thanks,
    Lydia Zhang

  • HT5639 i use boot camp to install windows 8.1 but in the middle of the installation it is stop,how can i install the windows again?

    i use boot camp to install windows 8.1on my mac but in the middle of the installation it is stop,how can i install the windows again?
    why it`s stop?

    What is your exact machine and what's the error

  • I have a MacBook 10.5.8 with Boot Camp. I can only operate the Windows side. When I move into MacOS it does not open.

    I have a MacBook 10.5.8 with Boot Camp. I can only operate the Windows side. When I move into MacOS it does not open.

    Your phrasing is not clear. How do you reboot into Mac OS? /can you describe the process step by step?
    Usually, you should do like this:
    - while in win, restart
    - immediately after chime, press option or alt key
    - wait for 2-3 seconds, you should see the boot options
    - select Mac OS partition
    If you have performed all these steps, and, after choosing Mac OS partition, you cannot boot into Mac OS, then your system is corrupt and should be reinstalled.

  • Can we call a window of one smartform in another smartform

    can we call a window of one smartform in another smartform?

    hi
    No it is not possible
    regards
    vijay
    reward points if helpful

Maybe you are looking for

  • How to reassign new chart of accounts to company code

    I created company code, assigned fiscal year K4 to 4040 co. code. Later on I created Open/Close Posting period/Assign Company code to Fiscal Year. I prepared new chart of accounts 4040 for Canadian company. When I tried to assign 4040 chart of accoun

  • How to check the visibility of a Web Dynpro input field

    Hi, In my application, one input field could be set as invisible by 1, Component Configuration: The 3rd tab "Web Dynpro Built-in" -> Views and There Elements -> Visibility (Check the radio: No) 2, Administrator configuration: While the Web Dynpro is

  • Bubble chart gradient fill in obiee 11g

    when see the bubble chart in obiee 11g i have't find any gradient fill option. how i can apply gradient style to bubble chart. bethamsetty

  • Can't write to temp directory

    hi! i'm trying to install Oracle9i enterprise edition on a Windows XP Pro system. once i click setup, it gives me a message saying that the installer can't write to the temp directory?! on checking the temp directory, i found that it's marked as read

  • HD Images ( 1920x1080 ) exported from iMovie09?

    Hello, I was able to use iMovie HD to export a full HD movie to a sequence of images (every frame) with full resolution (1920x1080). The function seems still available in iMovie09, however, the highest image resolution I can get is 960x540 no matter