Call BAPI_USER_CHANGE from RFC in a visual basic application

Hi all,
we are developing a tool in order to update users info (SU01).
The BAPI involved is BAPI_USER_CHANGE.
We have a table which contains a set of actions. Each action change one field at time. So, if I nedd to change the first name and last name, I call the BAPI two times.
More or less it works but, some time, it seems that a buffer (some where) is not cleared and one user is filled with the data of the previous user in the table of actions.
To specify the USER ID we use:
            Set paramUserName = rfcFunction.Exports("USERNAME")           
            paramUserName.VALUE = USER_ID
To specify one filed value we use the structures (ADDRESS, LOGONDATA, DEFAULTS, ecc):
         Set paramFieldName = rfcFunction.Exports("ADDRESS")
         paramFieldName("FIRSTNAME") = "Wallace"
Of course we set the corresponding X in the fileld name involved of the structure ADDRESSX.
We have used other BAPI (eg. PRGN_RFC_DEL_AGRS_IN_COLL_AGR) which invold tables.
In such case we use the freetable statement to clear the table.
Is the a correspoind statement to clear a structure (like ADDRESS in BAPI_USER_CHANGE) ?
Where I can find a detailed documentation of SAP DLL used to make RFC calls ?
Thanks in advance.
Andrea

Do I need to call BAPI_TRANSACTION_COMMIT for each call of BAPI_USER_CHANGE of only once at the end.
In other words:
Case 1:
while not .eof actions
   BAPI_USER_CHANGE
   BAPI_TRANSACTION_COMMIT
wend
Case 2
while not .eof actions
   BAPI_USER_CHANGE
wend
BAPI_TRANSACTION_COMMIT

Similar Messages

  • Vi started from visual basic application

    Hi,
    I made a small visual basic application which has a "start loop", "stop loop",
    and "quit" button. It also has a text box. When I click "start loop", it
    calls
    a simple vi which generates a random number and sends it back to the
    text box of visual basic. This is done repeatedly until the "stop loop" button
    is pressed on the vb form. The problem is that when I run the program,
    the random numbers are updated correctly on the vb form but the form never
    gets the focus (no idle time) so I can never press the stop loop.
    Here is part of the code:
    Private Sub StartLoop_Click()
    ' this is the code for the "start loop" button
    RepeatLoop = True
    Do While RepeatLoop
    Call DoLVDataExchange
    ' the DoLVDataExchange con
    tains:
    ' Call vi.Call(paramNames, paramVals)
    Loop
    End Sub
    Private Sub StopLoop_Click()
    ' this is the code for the "Stop loop" button
    RepeatLoop = False
    End Sub
    Any suggestions welcome. Thanks for your help!
    Cyrille

    Cyrille wrote:
    >
    >
    > gets the focus (no idle time) so I can never press the stop loop.
    > Here is part of the code:
    >
    Check the vi.
    I have never done this with VB so I am not sure.
    In the VI you may need to add a "Wait MS" and wire in 200 (change to suit your
    needs)
    Or you may need to add this in the VB code
    It sounds like the thing is running full speed and you cant hit the
    button fast enough to stop the loop.
    Kevin Kent

  • Can we call report from rfc.

    Hi All,
    Can we call report from rfc.
    if it is possible please tell me the process.
    i know the process to call rfc from report and from rfc.
    but i dont know how to call report from rfc FM.
    Thank you.

    HI
    you call report from rfc.
    but you have to write the logic for that..
    ex: 1st of all you have to create the fm  in target system
    then you have to call that fm using that rfc
    and then you can call the report form the target system.

  • How can a Visual Basic Application be used to read a Netscape LDAP server?

    I would Like to know if Visual Basic (ON AN NT WORKSTATION) can be used to access a Netscape LDAP Server (ON UNIX). And If so, will any API calls be necessary? Is there any documentation on using Visual Basic with LDAP?

    Hi Ryan,
    yes you can use VB with the nsldap32v30.dll or nsldap32v30.dll. You can get this from the iplanet page . The dll is inside the LDAP C SDK. Then, there's a 3 or 4 year old vb sdk with the declarations of the LDAP functions; but this seems not to be available in the web.
    Please send me a mail, I'll send you the doc and a sample vb prog.
    remove the nospam.
    [email protected]

  • Excel Error: Microsoft Visual Basic Application: "Compile error in hidden module: Module 11

    i am enable to creat XML file in excel when ever try to creal the XML file it shows  Microsoft Visual Basic : "Compile error in hidden module MODULE 11
    can any one help me to solve this issue

    Hi,
    For the error message, this problem may occur when the following conditions are true:     
    The Microsoft Office Startup folder or the Microsoft Excel Startup folder contains either or both of the following Adobe Acrobat PDFMaker add-in template files:
    Pdfmaker.dot
    Pdfmaker.xla
    Norton AntiVirus software is installed.
    No full installed
    Please try the following methods:
    Method 1: Download the latest version of the add-in for Adobe Acrobat 5.0
    Method 2: Move the files
    Method 3: Visit the Symantec Web site for Norton Antivirus information   and product updates
    Method 4: Repair from the CD disk.
    For more detail information, please refer to the following link:
    http://support.microsoft.com/kb/307410/en-us
    Regards,
    George Zhao
    TechNet Community Support

  • Deploying Visual Basic Application using Acrobat Pro 9

    Hi,
    We had to modify an existing Visual Basic 6 application to merge 2 pdf files and to rotate 1. We used Acrobat Professional 9 to do so. Now we want to deploy this application. After deployment, we always get a 'Run Time error 429: ActiveX component can't create object' only when we use the new functionalities. So I presume something is missing in the deployment package linked to the Acrobat Pro.
    Can somebody tell me how to deploy a Vb application which uses some Acrbat references?
    Thanks,
    Peter

    After deployment, we always get a 'Run Time error 429: ActiveX component can't create object' only when we use the new functionalities.
    Looks like that your application can't find an installation of Adobe Acrobat.

  • Call transaction from RFC?

    Hi Experts,
    I need to call Different transactions from a RFC.
    I am looking for different approaches to achieve this.
    One Idea is RFC will take input parameters as
    -Transaction name
    -Field names to be updated with its values (as a table)
    Now in RFC, it should be able to update this transactionu2019s fields with the values provided in table parameter.
    RFC will fill up the BDC table with the needed data, and will call the needed transaction to update the data.
    Once the execution is complete, RFC will send back the different messages (error, info, and warning) through Table parameter.
    Now, I do not have much of ABAP experience so I need your help in following
    1)     Should I use BDC recording in RFC?
    2)     Can BDC send back all the messages encountered while calling the transaction?
    3)     Is there any other way to approach this requirement?
    Thank you in advance.
    Regards,
    Ashish Shah

    Hi Amitava,
    This RFC might be called from any WebBased application , like Portal , Visual Composer or WebDynpro for Java.
    One more idea , may be an extension to my current idea is:
    To add one more input parameter to RFC, a table with single field of type string.
    Populate this table with entire BDC recording for one particular transaction, and pass it as an input parameter of RFC.
    Once in RFC , this BDC recording can be used to populate BDC table and then pass this table to call transaction statement.
    Do you see any sense in this logic?
    Regards,
    Ashish Shah

  • Calling LSMW from RFC

    Hello, everyone.
    This is my first post, so i hope i'm doing it right.
    I'm using Transaction LSMW to create mass vendors with this input parameters:
    Project: FI
    Subproject: AP
    Object: VENDOR_02
    It works fine, with the standar steps and a plain text file.
    What i'm asked to do is create a WebService that uses this transaction to communicate BizAgi (a BPM) and SAP. The problem is that i don't know how to call this transaction from the RFC. are there any suggestions? Not sure if there's a bapi available for this and i think is not coherent to do a batch input to a transaction like this.
    It's my first time using this transaction so any help would be very appreciated.
    Thanks for everything.
    Luis Allende

    I think calling a workbench by RFC does not make much sense.
    Have a look into definition of periodic data transfer (there is a small box in step 1 of LSMW).
    This allows you to create a frame program which can be executed by a user who does not need to know the whole LSMW.
    This program can probably called by RFC
    http://help.sap.com/saphelp_nw70/helpdata/en/90/da31ba2e0411d2b43e006094b944c8/frameset.htm

  • Error when select sheet for Excel file from Excel 2013 with visual basic

    Dim AppXL As Object
    Dim MyWorkBook as Object
    Set AppXL = CreateObject("Excel.Application")
    Set MyWorkBook = AppXL.Workbooks.Open("E:\MyFile.xls)
    AppXL.Sheets("Sheet1").Select
    The above code run with no problem when use in machines with Excel 2007 and Excel 2010.
    But when run in machine with Excel 2013,  error with "Out of Range" occur. Kindly advise for any solution.
    TS Lim

    With your highlight on the AppXL.Workbooks.Open, I have solved the problem by re-position the statements.
    Below are the 2 situation which works in for Outlook 2007, 2010 and 2013
    Situation 1, work for Outlook 2007 and 2010 but d not 2013
    With AppXL  
        Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFile.xls")
    Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
      WorkBookFrom.Activate
        .Sheets("Sheet1").Select
        .Range("A1:IV65536").Select
        .Selection.Copy
            WorkBookTo.Activate
        .Sheets("Sheet1").Select
        .Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
        .Range("A1").Select
          WorkBookTo.Save
    End With
    Situation 2, work for Outlook 2007 and 2010 and  2013
    With AppXL  
        Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFiel.xls")
      WorkBookFrom.Activate
        .Sheets("Sheet1").Select
        .Range("A1:IV65536").Select
        .Selection.Copy
    Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
            WorkBookTo.Activate
        .Sheets("Sheet1").Select
    .Range("A1").Select
        .Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
          WorkBookTo.Save
    End With
    Thank you for indirectly  help me to solve the problem.
    TS Lim

  • Replacement visual basic applications that use Microsoft IE as control

    Years ago (~15) I wrote some VB applications that import IE as a component. While visiting some selected web pages, these applications would extract pertinent information and save them in a local (client side) database. Over the years IE has changed, OSes have changed and these applications are barley usable anymore. I am not interested in spending hundreds of dollars on new development environment with MS only to find that this can't even be done anymore.
    It has been almost as long since I even looked at HTML. My question to the community is: to write replacements for these apps, would it be best to write them as extensions to the browser ( is it even possible) or would I have to run a local web server and create web pages that interact with the local sever to get the job done. My preference would be to have these as standalone applications without a need for a local web server but if push comes to shove... Also these applications have to be interactive as some human interaction is inevitable. Any tips, opinions and pointers are welcome.

    Hi Bob, what's your budget?
    In order to write to disk, I think you will need either a browser add-on such as a Firefox extension, or a stand-alone application.
    You still can still manipulate Internet Explorer using the components of IE. (Example: I recently updated a VBA application in Word which grabs a webpage, parses it without displaying it in a window, then lays out the data in a document.) For full capability, though, you may need to learn VB.net or C#.
    Depending on the pages, a Firefox extension could be fairly lightweight, but you would likely would need to rewrite your code in JavaScript, as Firefox doesn't speak VB.
    Mozilla allows embedding of Gecko, the rendering engine in Firefox, into third party applications as described here: [https://developer.mozilla.org/docs/Gecko/Embedding_Mozilla]. However, unless there's a lot of time to learn this, you probably would be better off with one of the other options.
    Finally, I'm sure there are pre-built scraping tools you can configure to extract anything you want from any site. That would be simplest, but I couldn't being to guess at the cost.
    Anyway, I should note that this is not a developer-oriented website, so you probably should seek comments elsewhere as well.

  • Capturing Visual Basic applications

    Is there any way to capture table usages from VB projects which use OLE DB or any other technology not involving data controls?

    Hi Bob, what's your budget?
    In order to write to disk, I think you will need either a browser add-on such as a Firefox extension, or a stand-alone application.
    You still can still manipulate Internet Explorer using the components of IE. (Example: I recently updated a VBA application in Word which grabs a webpage, parses it without displaying it in a window, then lays out the data in a document.) For full capability, though, you may need to learn VB.net or C#.
    Depending on the pages, a Firefox extension could be fairly lightweight, but you would likely would need to rewrite your code in JavaScript, as Firefox doesn't speak VB.
    Mozilla allows embedding of Gecko, the rendering engine in Firefox, into third party applications as described here: [https://developer.mozilla.org/docs/Gecko/Embedding_Mozilla]. However, unless there's a lot of time to learn this, you probably would be better off with one of the other options.
    Finally, I'm sure there are pre-built scraping tools you can configure to extract anything you want from any site. That would be simplest, but I couldn't being to guess at the cost.
    Anyway, I should note that this is not a developer-oriented website, so you probably should seek comments elsewhere as well.

  • I have programmed a visual basic application using activex controls. WHen I run this application through internet, it appears a message box indicating that the measurement studio is a demo, but I have the correct license. What can I do?

    I run the application in a computer without measurement studio because my application is stored in a web server and I access to the application downloading it from a web page of that server.

    Have you included the lpk file with your control? I've attached the tool you'll need and here is a nice link that goes thru it step by step.
    Hope this helps
    Bilal Durrani
    Bilal Durrani
    NI
    Attachments:
    lpk.zip ‏74 KB

  • Excel Error: Microsoft Visual Basic Application: "Compile error in hidden module: Importedfunctions

    When i open excel 2010 i am getting the above mentioned error please help

    Firstly, You can check startup directory: c:\Users\UserName\AppData\Roaming\Microsoft\Excel\XLSTART\ 
    And remove files from it.
    Also  try to run excel in safe mode:  press ‘Win+R’   -> Enter  Excel.exe \Safe .
    If this issue goes away is safe mode, it  should  caused by some third party add-ins. Try to disable it.
    In addition, you can refer to the following KB:
    http://support.microsoft.com/kb/307410

  • Is it possible to call msync from within an EVB Application?

    Does anyone know how to run mSync from within an embedded visual basic application?
    Some sample code or documentation would be particularly welcome.

    The following is taken from the Windows CE documentation that ships with 9i Lite:
    Table 3-16 ISyncOption Public Properties
    username -> Name of the user.
    password -> User password.
    syncParam -> Synchronization preferences. See Section 3.7.2.4, "COM Interface SyncParam Settings" for more information.
    transportType -> Type of transport to use. Only "HTTP" type is supported currently. The default value is HTTP.
    transportParam Parameters of the transport. See Section 3.7.1.5, "Java Interface TransportParam Parameters" for more information.
    syncParam documentation is (also taken from the same document):
    The syncParam is a string that allows support parameters to be specified to the synchronization session. The string is constructed of name-and-value pairs, for example:
    "name=value;name2=value2;name3=value3, ...;"
    The names are not case sensitive, but the values are. The field names which can be used are listed in Table 3-17.
    Table 3-17 COM Interface SyncParam Settings
    "reset" -> N/A Clear all entries in the environment before applying any remaining settings.
    "security" -> "SSL" "CAST5" Use the appropriate selection to choose either SSL or CAST5 stream encryption.
    "pushonly" -> N/A Use this setting to upload changes from the client to the server only, download is not allowed.This is useful when data transfer is one way, client to server.
    "noapps" -> N/A Do not download any new or updated applications. This is useful when synchronizing over a slow connection or on a slow network.
    "syncDirection" -> "SendOnly" "ReceiveOnly" "SendOnly" is the same as "pushonly". "RecieveOnly" allows no changes to be posted to the server.
    "noNewPubs" -> N/A This setting prevents any new publications created since the last synchronization from being sent, and only synchronizes data from the current publications.
    "tableFlag [Publication.Item]" "enable" "disable" The "enable" setting allows [Publication.Item] to be synchronized, disable prevents synchronization.
    "fullrefresh" -> N/A Forces a complete refresh.
    "clientDBMode" -> "EMBEDDED" "CLIENT" If set to "EMBEDDED", access to the database is by conventional ODBC, if set to "CLIENT" access is by multi-client ODBC.
    Example 1
    The first example enables SSL security and disables application deployment for the current synchronization session:
    "security=SSL;noapps;"

  • Help me plz: Connect to tuxedo from visual basic 6.0 client application

    Hello everyone,
    i have a big problem
    i try to connect my visual basic application 6.0 to the tuxedo, but i dont know how to use tpinit and tpcall in vb environnement.
    that my code:
    Private Declare Function tpinit Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" _
    (ByVal vlTpInfo As Long) As Integer
    Private Declare Function TpTerm Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpterm" () As Integer
    Private Declare Function TpCall Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpcall" _
    (ByVal vsServiceName As String, ByVal vlBufPtr As Long, ByVal vlBufLen As Long, _
    ByRef rlReplyBufPtr As Long, ByRef rlReplyBufLen As Long, ByVal vlFlags As Long) As Integer
    Private Declare Function TpAlloc Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpalloc" _
    (ByVal vsTpType As String, ByVal vsTpSubType As String, ByVal vlSize As Long) As Long
    Private Declare Sub TpFree Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpfree" (ByVal vlBufPtr As Long)
    Option Explicit
    Type tpinfo_type
    username As String
    cltname As String
    passwd As String
    flags As Long
    datalen As Long
    data As String
    End Type
    Dim tpinfo As tpinfo_type
    tpinfo.username = "cajat05"
    tpinfo.passwd = "cajat05"
    tpinfo.cltname = "VB6"
    tpinfo.flags = 110
    tpinfo.data = "NMLRS 55502022"
    tpinfo.datalen = 14
    Dim ret_init As Integer
    Dim ret_tpalloc As Long
    ret_tpalloc = TpAlloc("tpinfo", "", 9000)
    MsgBox "ret_tpalloc = " & ret_tpalloc
    'ret_init = tpinit(900)
    'MsgBox "ret_init = " & ret_init
    Dim s As String
    If ret_init = 0 Then
    msgbox "good"
    Else
    msgbox "not good"
    End If
    Can any one send me the code he made for a similar case ?
    Thank you in advance.
    Edited by: user3465258 on 2 août 2010 14:57
    Edited by: user3465258 on 2 août 2010 15:44
    Edited by: user3465258 on 2 août 2010 18:00

    As an alternative you may want to consider writing a "C" DLL that is callable from VB. The DLL would make the Tuxedo "tp" calls and check all the return codes and the functions defined in the DLL would simplify the interface to VB. I have done this successfully in the past.
    Harvey

Maybe you are looking for

  • I've been trying to install iTunes 11.1 with no success.

    Today, i've spent countless hours trying to figure out the issue and i can't seem to get it.  I initially attempted to update my girlfriends iphone using itunes 10... and it said i needed 11.1 to update the iphone.  so i attempted to use the itunes u

  • Does the power cord have a surge protector built in?

    Does the "brick" at the end of the power cord have a surge protector built in? I'm wondering whether it's ok to keep my Macbook plugged in and charging during a thunderstorm or not.

  • IPad 1 won't connect to Comcast Xfinity TG862G/CT Wireless Gateway

    Hi all, So I had my Comcast service set up a couple weekends ago (new employee, switching from FiOS). The tech originally brought me a DOCSIS 2.0 eMTA and I attached my own separate Netgear WNR3500U Router, and connected without issue. Connected devi

  • Oracle Provider for OLE DB Error

    Hello all. Can anyone help me understanding why using a statement like select * from openquery( linkservername, 'select * from table' ) fails with Server: Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'OraOLEDB.Oracle' reported an error. [OLE/D

  • Standard programs to upload / update infotypes

    Please provide updates for this question: What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) . I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs before going ahead wi