Is it possible to execute a code in my program based on a click event in SAP B1?

Hi!, everybody
I may be doing some wishful dreaming, but I ask my question nevertheless. We never know...
My pictures are self explanatory, but I explain my requirement below:
I have a grid which is populated by a query. Briefly, it is a list of Invoices to be reconciled.
The user selects the invoice to be reconciled by selecting the row. Then he presses the Reconcile? button.
This is what the Reconcile? button does:
         It colors the background of the selected row Red - just to indicate all rows which have already been selected (because reconciliation has to be
         done one row at a time).
         Then it opens the Internal Reconciliation screen in SAP B1 to allow the user to reconcile his items.
Ideally, I should color the  selected row Red only after the user has done his reconciliation.
         If he decides not to proceed, he can cancel, and the selected row will not be colored red.
         But I don't know how to do this. (Is it possible???). So I color the selected row assuming the user will proceed with the recon.
Can anyone tell me if I can fire my program (color the background red) only if the user clicks the reconcile and OK buttons in SAP B1?
Thanks
Leon Lai

Hi Pedro,
Your VB.NET code finally runs without syntax error.
However, I still have a problem. The program does not behave as intended.
See the attached picture.
And my code is below.
I am sure you are very near the correct solution.
So, please tell me what is not working in my code.
I notice you have removed the lines concerning Handler. Is this the problem?
My objective is to display the Reconciliation Completed MsgBox (or row coloring in the real project) if the Reconciliation is successful.
Best Regards,
Leon
Option Strict Off
Option Explicit On
Module SubMain
    Friend WithEvents Action As ABC = New ABC()
    Public Sub Main()
     Action.Reconcile()
    End Sub
    Private Sub OnReconcileComplete(ByVal sender As Object, ByVal e As EventArgs) Handles Action.ReconcileComplete
        MsgBox("Reconciliation completed")
    End Sub
End Module
Dim BPForm2 As SAPbouiCOM.Form
Public Event ReconcileComplete As EventHandler
    Private Sub RaiseReconcileComplete(ByVal e As EventArgs)
        RaiseEvent ReconcileComplete(Me, e)
        '//Dim Handler As EventHandler = Me.ReconcileComplete
        '// If Not Handler Is Nothing Then
        '//  Handler(Me, EventArgs.Empty)
        '// End If
    End Sub
    Public Sub Reconcile()
        SBO_Application.ActivateMenuItem("9459")
        '// 9459 = Modules -> Business Partners -> Internal Reconciliations
        BPForm2 = SBO_Application.Forms.ActiveForm
        Dim oCode As String
        oCode = "LV10010"
        Dim oBPCode As SAPbouiCOM.EditText = CType(BPForm2.Items.Item("120000008").Specific, SAPbouiCOM.EditText)  ' 120000008 = Business Partner Field
        oBPCode.Value = oCode
        BPForm2.Items.Item("120000001").Click()
        RaiseReconcileComplete(New EventArgs())
    End Sub

Similar Messages

  • Is it possible to execute SAPGUI scripts from java program?

    Hi everyone..
         I need to develop an java applications that executes the SAPGUI script or any technique that execute set of transaction as client.
         Is it possible to execute SAPGUI scripts from java program? if so, how it can be achieved? is there any other technique to achieve above mention scenario?.
         it will be more helpful, if docs related to that are shared..
         Thanks in advance

    Oh, bummer. Would be much more convenient if I could just use iTunes for everything. Can't stand WMP. I wonder if WinAmp might be a good compromise?
    Thanks for this answer . . .
    Sharon

  • Executing a webservice through Java Program

    Hi,
    I need to execute an webservice in my java program.
    I also have the requirmnet of executing a BAPI.
    I am using JCO for executing BAPI.
    Can anyone help me out in executing a webservice in Java Program.
    Regards
    Praveen

    Hi,
    Check
    http://help.sap.com/saphelp_nw04/helpdata/en/24/d0ff2f5d872a468b4643e1fa740569/frameset.htm
    and
    http://java.sun.com/developer/technicalArticles/J2EE/j2ee_ws/
    for consuming a WS
    Check http://help.sap.com/saphelp_nw04/helpdata/en/76/4a42f4f16d11d1ad15080009b0fb56/frameset.htm for BAPI called from Java
    Eddy
    PS. Which type of SDN Ubergeek/BPX suit are <a href="/people/eddy.declercq/blog/2007/05/14/which-type-of-sdn-ubergeekbpx-suit-are-you">you</a>?

  • Is it possible to execute a transaction by calling a irpt page?

    Hi,
    Is it possible to execute a transaction by calling a irpt page?
    If possible, is there a sample code (.irpt code) for MII 12.1?
    Thanks.

    You can use a SERVLET Tag in your irpt to execute an xacute query.
    Here is the help file from 11.5 but this works in all the versions.
    [http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Report_Generation.htm|http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Report_Generation.htm]

  • Is possible to execute the same executable vi more than 1 time (like notepad, for example)?

    I have a Labview executable file that use serial ports to communicate with other devices. I need to execute the same "file.exe" more than 1 time, to control different devices simultaneously. When I double click on an executable been executed (from windows explorer), the file under execution comes to front. Is possible to execute the same file more than 1 time (like notepad, for example)?

    Not the answer you are looking for I know..but still: Copying the application to another location is one possibility...if it has a different path it will execute separately.
    (OR - build control of multiple devices into one and the same application... If you do not want to redesign the code to handle multiple instruments in the same VIs, you could clone the VIs within the same application...)
    MTO

  • Is it possible to execute OS level commands through Oracle APEX?

    Hi,
    I would like to know if it is possible to execute OS level commands, say executing any command in command prompt using Oracle APEX.
    Thanks!

    Welcome to Oracle Forums!
    Please acquaint yourself with the FAQ and forum etiquette if you haven't already done so.
    Always state
    <ul>
    <li>Apex Version</li>
    <li>DB Version and edition</li>
    <li>Web server used.I.e. EPG, OHS, ApexListner Standalone or with J2EE container</li>
    <li>When asking about forms always state tabular form if it is a tabular form</li>
    <li>When asking about reports always state Classic / IR</li>
    <li>Always post code snippets enclosed in a pair of &#123;code&#125; tags as explained in FAQ</li>
    </ul>
    I would like to know if it is possible to execute OS level commands, say executing any command in command prompt using Oracle APEX.If by OS you are referring to the client side, then NO.
    Cheers,

  • Client not modifiable message while executing t-code ops7 and ops6

    Hi Guru's,
    I am getting "Client not modifiable message while executing t-code ops7 and ops6" in Unit test and Quality client.
    Pleae help me to resolve the error.
    Regards
    Sasikanth Reddy

    Hi
    Copy of the information I found regarding this issue:
    It is possible to allow the maintenance of 'Customizing'-tables in a       
    production client, even if the client is set to 'not modifiable'.          
    Normally this should be the case for tables TCJ04 (responsible person)     
    and TCJ05 (applicant).                                                                               
    Please could you check the settings in your system and change it if        
    necessary:                                                                               
    Transaction SE11:                                                                               
    Table TCJ04: delivery class should be set to 'C'                           
          TCJ05: delivery class should be set to 'C'                                                                               
    Transaction SOBJ -> Maintain                                                                               
    Position on V_TCJ04: Category should be 'CUST' field 'current settings'    
    should be marked.                                                                               
    Position on V_TCJ05: Category should be 'CUST' field 'current settings'                                                                               
    Please also check that your client is defined as 'PRODUCTIVE' via          
    transaction SCC4 (field client role).                                                                               
    I would also recommend that you review the attached notes with reference   
    to the usage of customizing setting "current settings": Nr. 77430,         
    Nr. 135028, Nr. 356483. These are also relevant for your release.          
    Kind regards,
    Zhenbo

  • Intel Galileo board - is it possible to run LabView code

    Hello,
    can anybody tell me, if it is possible to run Labview code on Intel Galileo board (http://www.intel.com/content/www/us/en/do-it-yourself/galileo-maker-quark-board.html) ?
    This board is Arduino "compatible", but runs x86 architecture and Linux. So it is possible tu run LabView Linux runtime on this board (and LabView code)? If answer is yes, can anybody provide howto?
    I'm not interested in LINX (https://www.labviewhacker.com/doku.php?id=libraries:linx:linx) which just access the Arduino board. It is just "comunication API" allowing to access arduino board but not to develop a code arduino can run.
    It would be great if there will be possibility to develop all code in for Arduino board in LabView (even with some limitations).
    Thank you for any answers
    Pepin 

    dkfire wrote:
    Hooovahh: The Intel Galileo board is like the Pi and BeagleBone Black boards.
    They run a "full" Linux. They can run normal compiled linux programs. 
    The Intel board is just a little smaller than the Pi/BBB, with "only" 400Mhz processor, but then it is a x86 processor and not a ARM like the two other boards.
    But I don't think that LabVIEW have any run-time enginen for this board.
    If that is the case then what is wrong with loading up the Linux Run-Time for x86 processors that NI has?  I have no idea what the process would be to bring over the installer or executable but if what you are saying is true then it seems more likely that it could work.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Executing Simulink Code on cRIO

    Hi everyone,
    I am wondering if anyone has a Mathworks Simulink model running on an RT target such as cRIO.
    In other projects I've done this on the past using LabVIEW 2010 SP1 and Simulation Interface Toolkit (SIT). You would compile a Simulink model as a DLL, OUT or RTDLL, and used it on a timed loop with SIT's VIs.
    What I am reading for LabVIEW 2014 talks about Model Interface Toolkit, but it always refers to running the compiled model on a Host PC.
    Does anyone know if it is possible to run DLL compiled with MIT on an RT target????
    Regards!
    g_l_u_p
    Solved!
    Go to Solution.

    A DLL is a Windows executable format. As such it only ever can run on Pharlap based RT targets. VxWorks based ones use the special .out format, while the new Linux RT are using ELF shared libraries, compiled either for the ARM (cRIO 906x and myRIO) or x64 (cRIO 903x) architecture. So unless your Simulink code can be compiled to either of these two shared library formats,  you can not execute the code on any of the non Pharlap based targets.
    Even the Pharlap ones pose some serious challenges. For one the Pharlap ETS OS is not a fully implemented Win32 API but a subset of this. DLLs that are compiled to run on an NT4 or 2000 system have a good chance to run on Pharlap. DLLs for newer Windows variants are likely to make use of either Win32 APIs that do not exist in Pharlap ETS or of Visual C runtime versions that are not available for the Pharlap OS. The Visual C 6 runtime was directly implemented in the Win32 API and basically didn't require any extra install if you were not running on Win95. NI ported the Visual C 7.1 and Visual C 9.0 runtime to their Pharlap targets but newer C runtimes than that are simply not supported. And Visual C DLLs and executables require different runtimes for each Visual C version. So unless your DLL is compiled with Visual C 6, 2003 (MSVC runtime 7,1) or 2008 (MSVC runtime 9.0) the DLL will likely not be compatible with the Pharlap RT system either. 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Class compiling/executing JAVA-Code??

    Hi!
    Stupid question: ;-)
    Is there a possibility to "parse" Java-Code into a JAVA-Class or to give JAVA-Code to a class that compiles the code and execute it?
    Thanks for answering!
    Mark Hauchwitz.

    background: we're running servlets and simply need to "parse" specialized/customized java-code for every customer into the servlet code. Source: database or whatever...
    How to get started?

  • When creating a custom SearchPlugin, is it possible to add more code such as uppercase conversion of the SearchText and IF statements that change the URL depending on what is typed?

    When creating a custom SearchPlugin, is it possible to add more code such as uppercase conversion of the searchTerms and IF statements that change the URL depending on the searchTerms? Every time I try to add something firefox doesn't want to add it as a search plugin. I need to create a more powerful search tool for personal use.

    I've found some external software applications that will do it, so that leads me to believe its not possible within ID CC.

  • Java run time error while executing JavaFX code

    Hi
    I copied the code from [http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx|http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx] while
    reading in [http://java.sun.com/javafx/1/tutorials/ui/overview/#controls|http://java.sun.com/javafx/1/tutorials/ui/overview/#controls] tutorial and paste it to my
    netbeans editor but i got following error.
    init:
    deps-jar:
    compile:
    jar:
    standard-run:
    # An unexpected error has been detected by Java Runtime Environment:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d94513f, pid=5152, tid=5996
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
    # Problematic frame:
    # V  [jvm.dll+0xd513f]
    # An error report file with more information is saved as hs_err_pid5152.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    BUILD FAILED (total time: 18 seconds)can anyone tell whether its netbeans fault or javaFX. I am using netbeans 6.5.1 on windows vista. I have added following plugin in netbeans for javaFX
    *JavaFX Kit
    *JavaFX SDK for Windows
    is anyone also getting this error for this code and have solution for this.

    You are correct the crash is causing due to ToggleButton and ProgessBar. the code is correct because i tried it on eclipse 3.4 and it worked fine.This is definitely netbeans error. because its giving error even if u try to execute javafx code with just one ToggleButton or ProgressBar. I tried the following simple code in netbeans 6.5
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.control.ToggleButton;
    import javafx.scene.control.ProgressBar;
    var toggle=ToggleButton {
                    translateX:50
                    translateY:50
                    text: "First"
                    width:100
                    height:20
    var progress= ProgressBar {
            progress: bind ProgressBar.computeProgress( 100, 30 )
    Stage {
        title : "Toggle Button Test"
        scene: Scene {
            width: 200
            height: 200
            content: [ toggle
    } When i just added toggle button to contents then button showed up in window but on clicking it window disappear and compiler gave crash error on the other hand when i added just progess bar it just throws the error.The same code is running fine on eclipse
    Is there any workaround in netbeans for this if its a bug and if not what should i do to correct it.

  • How do I execute some code when a line of a table control is selected?

    Hi,
    I would like to execute some code when a line of a table control is selected.  At the moment I have to select one or multiple rows and then press enter, this forces a screen refresh and my code is executed but I would like the code to be executed as soon as any line is selected.
    I've done something like this using ALV grids and object orientated code but is there a way of doing this in a normal non-OO table control?
    Thanks in advance.
    Gill

    Hi,
    U need to declare a char1 field for marking (mark field).  This will reflect with value 'X' in your tcontrol internal table for all the selected rows. 
    Now u need to handle the okcode for enter in your PAI.
    There u need to loop through the table for all marked fields.
    There after u can do what ever u want.
    Venkat.

  • I live in the UK but visit the US regularly. The price of a new MacBook Pro is much less in the US, and is where I plan to buy one. However, I have read that a US machine will not play UK DVD's. Is this true and if so is it possible to change the codes?

    I live in the UK but visit the US regularly. I plan to buy a MacBookPro in the US but have read that it will not play UK DVD's. Is this so? If so, is it possible to change the codes?

    All modern & new Macs can play both PAL and NTSC DVDs.  I do it all the time and it works perfectly.
    The DVD drive is set to its first region code when you first play a DVD in it.  So when you buy a Mac, whatever type of DVD you play first will determine the initial region code that is set.   If it's a PAL/Region 2 DVD it will set the DVD drive to region 2.
    The only thing you have to watch out for is if you have a collection of DVDs that have different region codes.  In those cases you may be faced with changing the region code in the DVD drive in order to play one or more of the DVDs; and as others have noted there is a limit to the number of times you can change the region code (most modern DVD drives allow up to 5 changes; the 5th change becomes the permanent change).  This is due to industry licensing practices.
    If you have DVDs that are Region 0 or All Regions you don't have to worry about region codes.

  • Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?

    Question:  Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?
    What I would like to do is to create a pdf with an Acknowledgement button that when click will report (via JavaScript) to the LMS (Learning Management System) that the end user viewed/acknowledged the pdf.
    Can this be down with JavaScript in this fashion?

    Thanks, (My fault, as I should have specified this.) Due to legacy reasons I need to use ie, and so I can't use the PrintPdf firefox plugin. So from reading the rest of that thread, the best method does seem to be to get hold of a copy of acrobat, and add a Print() script in each file, and open it in a new tab.
    At least it gives me somethigin to try anyway :-)

Maybe you are looking for

  • Unable to use iTunes balance to purchase items on games

    My father sent me an iTunes gift card to purchase GEMS for my Clash of Clans. Since I did not have an Apple ID, I, thus, created an Apple ID using the iTunes gift card as the payment method (this then act as "redeemed" iTunes gift card). Everything w

  • I am very disappointed

    I love my galaxy nexus but how can I love a phone that drops my calls regularly? I just got off the phone with Verizon technical support after a week-long struggle and they can't do anything for me. So when I first got my phone I had dropped calls an

  • Getting Javascript error on Production Server

    Hi, I am facing unusual problem as my one jsp file containing javascript is working fine on testing server.I put same code on production server ,here I am getting javascript alert for not saving my data.Putting some part of my JSP file for ur referen

  • Connecting two WRT54G wireless routers - how to configure

    Hi All, I have two WRT54G wireless routers. One is currently providing wireless access for several users at a local law firm. I need to connect a second wireless router for a user who works for another company in the same office. The second wireless

  • Gallery Woes in IE 6 & 7

    The gallery that I have here works fine in Firefox, Opera, Netscape 9, and Safari. However, in IE 6 and IE7, the galleries fail to load. Any ideas on this? Thanks! Joel