You have to excuse my question if this is a simple problem but I'm just getting into BAPIs.
I have been tasked with creating an application that will create goods movements in SAP through watching a database table. That in and of itself isn't that big of a task (I believe).
So using the SAP documentation on BAPIs I created a little test driver to try and do some test transactions on our company's test system. So I have the following code:
Set oBAPICtrl = CreateObject("SAP.BAPI.1")
Set oLogonCtrl = CreateObject("SAP.LogonControl.1")
oBAPICtrl.LogLevel = 9
oBAPICtrl.BAPIExceptionCodes = True
Set oBAPICtrl.Connection = oLogonCtrl.NewConnection
oBAPICtrl.Connection.Client = "800"
oBAPICtrl.Connection.Destination = TESTSYSTEM
oBAPICtrl.Connection.Language = "E"
oBAPICtrl.Connection.User = USERNAME
oBAPICtrl.Connection.Password = PASSWORD
oBAPICtrl.Connection.Logon 0, True
Set oGM = oBAPICtrl.GetSAPObject("GoodsMovement")
From there I started out testing against the GetItems which worked exactly as expected. So I next started working with the CreateFromData function and this is where I've encountered a problem that I'm having problems solving.
When I try to use the DimAs method to create the objects for the parameters sent in the CreateFromData method, 3 of the 5 calls fail.
i.e. take the following code
Set oGM_CFD_Code = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtCode")
Set oGM_CFD_Header = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtHeader")
Set oGM_CFD_Item = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtItem")
Set oGM_CFD_Return = oBAPICtrl.DimAs(oGM, "CreateFromData", "Return")
Set oGM_CFD_HeaderRet = oBAPICtrl.DimAs(oGM, "CreateFromData", "GoodsmvtHeadret")
Setting using DimAs against GoodsmvtCode, GoodsmvtHeader, and GoodsmvtHeadret fails and instead sets the corresponding objects to "Error 0"
I've turned on tracing to the highest level and still don't see anything that may lead to why these 3 calls are failing. At first I thought that there may be some form of typo, so I copied the named directly out of the tracing file and still the same result.
Can anyone give me some ideas as to why these are failing?
Advertisement
Replay
Hi Joe,
There isn't really a good forum to post this question. So failing that, the ABAP forum is probably the best as it attracts the most people.
In my experience, not many people who are doing much VB integration with SAP (I am sure there are lots, but I mean relative to Java,COM,XML,etc.), so I guess there isn't a deep pool of people who can address your question (as demonstrated by the lack of responses).
I did check the parameters of the BAPI to see if there was anything different with the three that failed, but they seem to be pretty straight forward to me.
As you had success with the Getlist, its clear that all your software layers are put together ok, the only possible explanation that comes to mind is some non-obvious bug in your code. All I can suggest doing is to cut out your code and start again. Sometimes typos are incredibly hard to spot (and not just in the parameter names), and it could be something is just missing somewhere. If the second time works then you can compare old with new.
Not really a very encouraging response but the best I can come up with at this point.
Brad
Hi gurus, i have a calcscript to clear data(replacing data with #missing) in particular combinations and aggregating the period dim by using Calc Dim. Problem is,when i cleared data first time in Halfyearly2 it is only clearing data For Idesc of H2 a
Hi Gurus, I'm having a problem, I've a query/report that should be executed every 2 wed of the Month and A BAPI is associated to the query,and It's not working properly .it's developed by some other developer went to TCode RSCRM_BAPI,RSRTRACE,MDXTE
Hi all, I was trying this scenario, /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi I had these q`s 1) suppose if the BAPI fails to
Can someone please tell how to fix this? I believe it may be a hardware issue, but when I reload the iMac, it goes away. When I put my HDD image back, the problem starts up again. Note: this is networked iMac (it is bound to a AD domain). This only h
Hello , I am using this bapi the problem i am facing BAPI_REQUIREMENTS_CHANGE. Problem - How to overwrite existing values.Hi Andre, Here is the description of the tables: table with the NEW content of: EBAN data: begin of xeban
Hi, I am running NW04sp10 and am trying to connect my WebDynPro to my R/3 backend app server - am running through the FlightChecking example using DevStudio 2.0.10. Have successfully created my meta + app data JCo's, they test and ping OK from the Co
Hi All, Can any one please help us in using the DropDownByIndex control. Say for example, i am using the DropDownByIndex for getting the Country list with its corresponding Country Code. When i select the Country Name the corresponding Country Code i
Dear all, I need a help in webdynpro using bapi scenario -> my form has 6 input fields, in that 4 are drop down boxes which gets the value from respective 4 bapis. -> 2 input fields should be in date picker which didnt get value from bapi
Hi Guys, Here's my problem: I'm triggering a WF from the Business objects BUS2032, event CHANGED (for sales orders). But the first step in the workflow is to block the order for delivery, so I'm using the BAPI BAPI_SALESORDER_CHANGE to modify the fie
Hello I recently upgraded an indigo ibook to OS X, and ever since, the display fades and is dim for a while, and then randomly returns to full level of brightness; furthermore, whenever the display is in this sad, dimly lit state, if I run the displa
hai, This is Guru i have to deliver material(eg:pk-100)for customer order. please tell me which bapi i have to call from my java program(using JCO)and what are the import parameters . help me to this. thanqqqqqq GuruHi Guru, Use BAPI_SALESORDER_CREAT
Hi All, I have been assigned to object wherein i need to insert bapi BAPI_GOODSMVT_CREATE in function module ZQM06_FM_TASK_GOODS_MOVEMENT. The problem is that i need to fill the structure that i can pass it to BAPI but the import parameters of FM ZQM
Hello All, I had a scenario where i need to export parameters and am supposed to get import parameters from BAPI between source and target structures. like - source --> BAPI execution = result --> target We had succeeded in getting those but the onl
Hi Friends, I am having a problem in BAPI when i am executing the program i am getting a error message like this, <b>Error message:</b> 144The field MARA-MEINS/BAPI_MARA-BASE_UOM(_ISO) is defined as a required field; it does not contain an ent
I have a problem with my new Apple Air. It usually takes few seconds for the laptop to be untouched in order to be locked. So, sometimes when the screen starts to get dim in order to lock, I immediately touch the keypad to avoid locking the laptop, t
Hi Experts, I am calling a BAPI from Webdynpro JAVA. I am passing a special charecter u2018 as input to BAPI. But I am getting a # as input in R/3.. Can any one explain why it is getting changed? Any inputs regarding this issue are appreciated. Than
Hello friends, I'am facing problem in creating BAPI. I've created and released BAPI function module successfully. I've also created Business Object type, included the function module in business object type, and released Method of this business objec
C1-01 got a problem. automatic off without dimming first d backlight? when the backlights will turning off and you hurry to turn it on coz you have not yet done of reading something,and you are both exactly and at the same time you press a key,well d
I am trying to create multiple wbs elements for a given definition using the bapi BAPI_BUS2054_CREATE_MULTI as per the documentation i have used BAPI_PS_INITIALIZATION first to initialize,then followed by BAPI_BUS2054_CREATE_MULTI and ending with BA