Problem passing an export parameters in rfc call using the function control
Hello,
I use SAP Remoute Function Control (wdtfuncs.ocx) in my C++ application. I can execute remote functions, if they don´t need any export parameters:
CSAPFunctions m_Functions;
CFunction f;
f.m_lpDispatch = m_Functions.Add("RFC_CREATE_DOCUMENT_MASTER");
f.Call();
How can I set the export parameters?
Any help appreciated.
regards,
Vladimir
check out this thread
Re: Sample code in ASP to connect SAP?
Regards
Raja
Similar Messages
-
Problem passing a table parameter in rfc call using the function control
I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
The SAP RFC Control is created with
Set sapFunctions=CreateObject("SAP.Functions")
Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
With sapMaterialUpd
<i>'set exports</i>
.Exports("PA_GLPUPDLEVEL") = "S"
.Exports("PA_VKORG") = "FI14"
<i>'append table row</i>
.Tables("IT_SALES_DATA_UPD").AppendRow
.Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
.Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
.Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
.Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
.Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
.Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
End With
<i>'call the function module</i>
If sapMaterialUpd.Call() = True Then
<i>'do something with the return tables here...</i>Else
Debug.Print sapMaterialUpd.Exception
End If
The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
The local logfile that the control generates shows that an exception occurs at the point of the call:
<i>10.02.2005 17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
Packing Parameter PA_GLPUPDLEVEL.
Packing Parameter PA_VKORG.
Packing Table 0.
Packing Table 1.
10.02.2005 17:54:20.766 *** Calling RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
10.02.2005 17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
10.02.2005 17:54:20.986 RFC Error: RFC_IO27
-Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
-Message:connection closed
-Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
10.02.2005 17:54:20.986 Function call finished.</i>
Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
sapFunctions.Connection = sapConnection
Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
With sapMaterialUpd
'set exports
.Exports("PA_GLPUPDLEVEL") = "S"
.Exports("PA_VKORG") = "FI14"
'do <b>not</b> append a table row, for testing only ;-)</b>
End With
<i>'call the function module</i>
If sapMaterialUpd.Call() = True Then
<i> 'do something with the return tables here...</i>
Else
Debug.Print sapMaterialUpd.Exception
End If
This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
Any hints are welcome!hi All partner,
who solved this problem , I meet it too and
can't clear it.
SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');
SAPitab := sapfunc.tables.item ('I_DNMO');
SAPitab.appendrow; SAPitab.value(1,'MANDT') := '220';
SAPitab.Value(1,'VBELN') := '2150000001';
SAPitab.Value(1,'POSNR') := '50';
SAPitab.value(1,'MATNR') := '19-99999-00';
SAPitab.value(1,'AUFNR') := '921241512001';
SAPitab.value(1,'DEDAT') := '2005/09/09';
SAPitab.value(1,'LFIMG') := '100';
IF SAPfunc.call = true then
begin
end
else
begin
showmessage('call fail!!') ;
end;
end;
RFC source code as below
FUNCTION z_get_sfcs_dn_mo.
""Local interface:
*" TABLES
*" I_DNMO STRUCTURE ZDN_MO
data: wa type zdn_mo.
LOOP AT i_dnmo.
wa-mandt = i_dnmo-mandt.
wa-vbeln = i_dnmo-vbeln.
wa-posnr = i_dnmo-posnr.
wa-matnr = i_dnmo-matnr.
wa-aufnr = i_dnmo-aufnr.
wa-dedat = i_dnmo-dedat.
wa-lfimg = i_dnmo-lfimg.
modify zdn_mo from wa.
insert into zdn_mo values wa. --dump at here
commit work.
ENDLOOP.
T/C: ST22 error message say at
insert into zdn_mo values wa. ---dump at here
the sapfunc.call returns fail.
Message was edited by: jorry wang -
Consuming an RFC Call Using the BAPI eWay
Greetings all,
We are trying to set up a scenario in which we have a custom RFC function that we are calling synchronously using the BAPI eWay. Here, an ABAP program calls an RFC which is like a proxy on the JCAPS server. On the JCAPS side, we are wanting to map the RFC onto a Web Service call and pass the results back as the exporting parameters of the RFC. While the examples demonstrate the use of an asynchronous function module such as IDOC_INBOUND_ASYNCHRONOUS, it is not clear to me how to work with synchronous calls. Any information would be greatly appreciated. Thanks.
Best Regards,
James Wood
Bowdark Consulting, Inc.
[email protected]I have a similar (if not identical) problem. Chris, your reply to James is talking about the process originating within JCaps. In my scenario (and it sounds like James' too), the process is originating from SAP. What I'm trying to do is this:
SAP calls to my JCD - this is the part that I'm having trouble with
My JCD does something with the data sent to it from SAP (call a database or whatever)
The JCD responds back to SAP so that the request/reply cycle can complete and the SAP program has what it needs
When I create an OTD object in JCaps using my RFC, there doesn't seem to be a way to make the JCD that I want to create use that OTD as a source for the input message.
James, if I'm way off base here, let me know and I'll go get my own thread. :)
Any help or direction would be appreciated. I've Googled this to death and have come up short. -
My iPhone 5 pairs with my automobile except it does not allow me to "pickup" calls using the car facility. I've contacted Acura RDX 2013 about this problem. It referred me Apple for a fix. My iPhone 4 worked with the car technology. Is there a fix for the iPhone 5 to allow call pickup via the Acura?
ThanksHI Friend,
Probably the problem it is because your iPhone 4 and your car have the same Bluetooth technology ( 2.1 ), but iPhone 5 has new Bluetooth technology ( 4.0 ).
http://www.apple.com/iphone/compare-iphones/ -
Facetime call using the same APpLe Id on iPad and Mac
The FaceTime call using the same apple ID with the new iPad and iMac cannot put through to myself. In this case I do not want to get a new apple ID for FaceTime what can I do? I want to use the current apple Id.
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime: Set-up, Use, and Troubleshooting Problems
http://tinyurl.com/32drz3d
I saw one post where a user said dust got inside the small microphone hole. Using a vacuum cleaner removed the dust and restored the audio.
Cheers, Tom -
A Runtime error: Generation successful, but you must call up the function
I used Professor Jim Menching's AIS materials in fall 2009 before ECC 6.04 was installed and everything worked plug-n-play without too many problems. I tested assigned client after my client provider migrated SAP from ECC 6.0 to 6.04.
I tried to proceeded "receive the product from the vendor" on page 13u2019s step 11 after creating an purchase order, as following:
Logistics> Materials Management > Purchasing > Purchase Order > Follow-on Functions > Logistics Invoice Verification (MIRO)
I tried to save it. However, I got an error message: "Generation successful, but you must call up the function". After I did it one more time, it becomes a runtime error! I am not savvy for dealing with unknown technical problem. Can anyone provide me with a solution to fix problem?
Thanks in advance.Picheng,
Thanks for the post. I forwarded your question to your hosting site for resolution since this is a technical issue ... and the technical team informed me the issue was already resolved. If you have further issues related to this specific issue please contact the UCC directly.
Best Regards,
Heather -
Can't answer iphone 4s calls using the button on the steering wheel of my Buick 2009 Enclave.
My iphone 4s is hooked up to my Buick Enclave 2009 using Blueetooth. I can activate Bluetooth via the button on the steering wheel and make voice calls with no problem. However when someone calls me, I can hear the phone ringing through the speakers and can see the number on the display but I can't answer the call using the answer button on the steering wheel. I have to reach over and touch answer on the phone and then I can continue the conversation via Bluetooh. Appreciate any help. Thanks.
The exact same issue is happening with my iphone 5. I don't believe it is the Life Proof case because I have had the pnone for several months and this just recently started happening, I took it to an Apple store and they claimed that this issue is new, that they have never seen it before. After about an hour of trouble shooting, they gave me a new phone.
The new phone worked fine (in the case) for about a week and then started having the same problem. I am on the Sprint network. I have an iphone 4s for work in the same case on the AT&T network and do not have any problems.
I am going to go back to the Apple store at my first opportunity. I wish I would have kept my old 4s which I had no problems with. -
When using the new controls of CVI 7 in my DLL it crash on the DisplayPanel call
I have a CVI DLL that was build under CVI 6. When I recompile it in CVI 7 everything works fine when I load the DLL from my application. But If I add a button on my uir file with the new CVI 7 style (no event code associated, just a plain button) my DLL crash and hang my main application on the DisplayPanel call. If I don't use the new controls (use the classic-style controls) everything works fine. I use LoadPanelEx to load my uir file. The returned panel handle is good (> 0) But when I call DisplayPanel it doesn't show me any error but just crash my DLL and jump back in the DLLMain function saying that my process is detaching and hang my main application.
I am running on Win2k. I have
LabVIEW 7 and LabVIEW 6.0.2 installed also. The main application that calls the DLL is made in Delphi 6.
I have re-installed the run-time engine from the CDs but this didn't do the trick. Is there something else that I must include with my DLL to use thoses new controls styles. The DLL is running from the same place where it was build.Hi,
I have created another cvi DLL and it create the same behavior in my application (crash on DisplayPanel). But if I do a standalone CVI executable with thoses new buttons everything is fine. Also I have created another application(in Delphi) to load the cvi-dll and it works fine in that one. So I would tend to say that it is in my application but on the other hand everything works fine if I don't put thoses LabStyle controls...Weird I know...
In shorts It is just crashing with a specific application but for any UI project that I create. If I don't put thoses buttons everything is ok...Any other advises would be helpful because I'm kind of out of ideas...
Gilles Hache -
Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help
Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.
-
I have a problem in using the function 'WS_DELIVERY_UPDATE'
I want to update the delivery document at the batch field (CHARG = '0000000605') by using the function 'WS_DELIVERY_UPDATE'.
Before update, this batch field is initial.
After having completely updated this delivery, I try to update this batch field again. However, I found the error message showing that 'Confirmed batch 0000000621 is different from batch 0000000605 for main item'.
How can I solve this problem to update this batch again? This error occurs when I use function
'WS_DELIVERY_UPDATE', 'BAPI_OUTB_DELIVERY_CONFIRM_DEC', and 'BAPI_OUTB_DELIVERY_CHANGE'.Check OSS 674567.
-
I have installed Adobe Reader 11.0.07 for Mac OS 10.9.3. Have asked this question numerous time without results. The problems I am having are: I cannot scroll using the side slider on downloaded PDF files, nor can I fill in fillable files. Also, and this is extremely irritating, I cannot re-initialize the same file or initialize and another PDF file after I have initialized the first file. If you cannot help please let me know if should use an earlier version of Reader or find anther company that has the appropriate software.
Perhaps you missed that you started a discussion at I have OS 10.9.2 and have downloaded latest version of Reader 11. I can no longer fill in form or scroll using the side bar. and you did not respond to the last post there.
-
How to make a SOAP call using the PI 7.1
Hi All,
Can you please tell me how can we make a SOAP call using the PI 7.1?
Thanks in advanceHello Shweta,
Could you please clarify your question? Do you mean you need to call some business system from PI via SOAP? Or do you need to test integration model using SOAP client?
If the requirement is to make a SOAP call to PI (send SOAP request to PI system), please refer to the guide which Stefan suggested in his post. The general procedure is the following:
1. generate concrete WSDL in PI (you can do it via PI's Integration Directory);
2. import generated WSDL to SOAP client (e.g. XML Spy described in the guide or soapUI which is free SOAP client);
3. create SOAP request message in the SOAP client and send it to the endpoint (in this case, it will be sent to PI).
This is general procedure for making SOAP calls to SAP PI using external SOAP clients. Please advise if specified steps should be described in more details or if there are any questions from your side regarding them.
If the question is about calling business system from PI via SOAP, then please refer to SAP Help, configuration of SOAP receiver::
http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm
My regards,
Vadim -
When I swipe up from the bottom of the screen to use control center I am not able to use the music controls for music or podcasts and music controls do not work on the lock screen either is anybody else having this problem???????
Not really sur easy you would be having that problem. Mine works. You might try RESET DEVICE
Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for device to restart (no data will be lost). Then try again and see if it makes a difference -
How to pass import/export parameters while event handler call in OOABAP?
Hi Experts,
Is it possible to use export parameter in set handler method?
Actually my requirement is while creating customer through XD01 after committing to data base i want that customer.
So i exporting customer no. in one of the badi before commit and importing in my custom class (zabc) after commit.
Using event TRANSACTION_FINISHED and checking KIND eq C.
My question is instead of using import export abap command is it possible to pass those parameters in ??
Sample : SET HANDLER zcl_sd_after_commit=>get_kunnr.
Regards,
Raj....Yes it can
but the event should be defined in the BADI so why do you need to do it?
CLASS MY_CLASS_1 DEFINITION FINAL.
PUBLIC SECTION.
METHODS GET_KUNNR IMPORTING KUNNR TYPE KUNNR.
EVENTS MY_EVENT EXPORTING VALUE(KUNNR) TYPE KUNNR.
ENDCLASS.
CLASS MY_CLASS_2 DEFINITION FINAL.
PUBLIC SECTION.
METHODS MY_METHOD FOR EVENT MY_EVENT OF MY_CLASS_1
IMPORTING KUNNR.
ENDCLASS.
CLASS MY_CLASS_1 IMPLEMENTATION.
METHOD GET_KUNNR.
RAISE EVENT MY_EVENT EXPORTING KUNNR = KUNNR.
ENDMETHOD.
ENDCLASS.
CLASS MY_CLASS_2 IMPLEMENTATION.
METHOD MY_METHOD.
WRITE KUNNR.
ENDMETHOD.
ENDCLASS.
So it can move KUNNR from class1 to class2
DATA: MY_OBJ_1 TYPE REF TO MY_CLASS_1.
DATA: MY_OBJ_2 TYPE REF TO MY_CLASS_2.
PARAMETERS: P_KUNNR TYPE KUNNR.
START-OF-SELECTION.
CREATE OBJECT MY_OBJ_1.
CREATE OBJECT MY_OBJ_2.
SET HANDLER MY_OBJ_2->MY_METHOD FOR MY_OBJ_1.
MY_OBJ_1->GET_KUNNR( P_KUNNR ). -
Table Values in Export/Import/Tables RFC calls
Hi
I know that using Adaptive RFC, the best practice is to use the Tables section of the function rather than the import/export.
However, in ECC6.0, when creating entries in the Tables section of the FM it tells me that this section is obsolete.
Should I start to use the export/import parameters instead?
Cheers
IanHi Ashu
Thanks for the reply but there is no code snippet. It is a 'best practice' question.
The document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de">Effective Web Dynpro - Adaptive RFC</a> details that table values should not be passed in the exporting/importing parameters of the R/3 RFC enabled function module. THey should always be added to the Tables section.
However, in ECC6.0, when adding entries into the Tables section of an R/3 function module, it says that this practice is obsolete.
Therefore, what is the current best practice for Adaptive RFC??
Cheers
Ian
Maybe you are looking for
-
Hi Guys, Does the JVM limit the amount of memory that a process uses when spawning using Runtime.exec() Basically we are trying to run the microsoft linker from Java (via Maven) and it keeps erroring with 'out of memory' this seems to happen when the
-
Logic 9.1.7 OSX 10.8.2 exs24 crashing logic
I'm using Logic 9.1.7 on Mountain Lion 10.8.2. I'm trying to open a session that has a exs24 instrument that is missing an audio file. The session crashes once it tries to load the exs24 channel. The reason I know that the missing file in the exs24 i
-
My up / down loads seem to be painfully slow since adding the airport card to my imac g5 and running it off the airport express. Would the addition of the base station improve speed or do i go back to the ethernet direct to modem route ? Thanks in ad
-
My Lightroom i s closed ???
Hi . I bought an fullversion of Lightroom in january 2014 . In april i bought a monthly photoshop cc with Lightroom as well ... After a couple of months i found out i didnt use photoshop that mutch so i canceld the monthly paying of photoshop cc and
-
Plz Help, the last night i downloaded ios8 on my 5s and it went to recovery mode after clicking installation. then downloaded the ios8 using itunes and loaded but cant find my apple ID as i forgot everything. the phone is useless and cant be activat