RFC call from java webdynpro
Hi,
I'm creating a Java Webdynpro where I call RFC's from SAP.
For the images in the webdynpro, I call the standard SAP function 'CVAPI_DOC_VIEW'
When I execute the function in SAP, I get the url to the contentserver with the correct image.
After calling the same function in my Java Webdynpro, the url is empty.
I've checked the importing parameters after calling from webdynpro and SAP and they are the same.
After debugging, I saw that the function 'CVAPI_DOC_VIEW' is the problem. He's exporting an empty url after calling from the webdynpro.
Does anybody knows the possible fault and solution for my problem?
I'm not an ABAPer but the last time I've dealt with DMS from Web Dynpro an ABAPer wrote a custom function that gets the file content (XSTRING) by sending DMS parameters (documenttype, documentnumber, documentversion, documentpart).
After getting the XSTRING from my Web Dynpro Java, I convert it to byte[] and created URL by using WDResourceFactory.
Hope it helps...
Omri
Similar Messages
-
Asyncronic JCO RFC call from JAVA to ABAP
Hi,
Please could you provide a sample java code to establish JCO RFC call to ABAP?
Thanks.Hi Denis,
Import the model In NWDS for ABAP for RFC.
Please check here [Accessing ABAP Functions using the Adaptive RFC Model |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3?quicklink=index&overridelayout=true]
[Web Dynpro Model: Backend Access|http://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#section10 [original link is broken]]
Also check here /docs/DOC-8661#section10 [original link is broken]
Hope it helps,
Redards,
Arun -
CNTL_ERROR while calling a function module from Java webdynpro
I am calling a RFC function module from javawebdynpro app
which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
Any help on this is highly appreciatedGood catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
DATA:
SOURCEVAL TYPE /BIC/OIINVQTY,
SOURCEUOM TYPE /BIC/OIUSUOM,
USITM TYPE /BIC/OIUSITM,
TARGETUOM TYPE /BIC/OIUSUOM,
CONVERTED_COST TYPE /BIC/OIINVQTY.
DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
" get the Production UOM
SELECT SINGLE I~/BIC/USPRDUOM
FROM /BIC/PUSITM AS I
INTO PRODUCTION_UOM
WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
IF ( SY-SUBRC = 4 ). " no records found
"RAISE PARTNO_NOT_FOUND.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
" load the parameters
SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
USITM = SOURCE_FIELDS-/BIC/USITM.
" then you can call the FM
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCEVAL
PSOURCEUOM = SOURCEUOM
PUSITM = USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = CONVERTED_COST
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
" ... [do the rest]
Thanks for your help,
Dennis -
Duration of an Abap Function call from Java using Jco3
Hi guys!
I would like to use this discussion to get some refernces of the duration Timespan of an RFC call from Java to SAP. At the moment, i need at last about 200ms to call the Abap function. I'm just using one simple import and export parameter (so no deep structures). I think that the reason for my poor performance is, that the Java Tool and the SAP instance are not in the same network. So, i hope some of you have some data, how fast an RFC call from Java using Jco can be executed.
greetings, HannesHi Hannes,
I think you have already got the answer to your question - the network set-up you have is probably the bottleneck. Whenever I've worked with Java <-> ABAP and they are in the same network, I've had no performance problems at all.
Does your RFC contain any complex logic or business processes? Are you able to try and call something that does nothing, say it just accepts an input string and returns it straight away as an export. Do you have any scope for testing with your Java tool on the same network as the SAP system?
Cheers,
G. -
RFC Call from ABAP (R3) to Webdynpro EP
Hi experts,
I have a requirement to initiate a call from an ABAP program on R3 to a standard Portal (Webdynpro) API. Does anyone have any experience with this?
I understand that normally Portal (Webdynpro) applications will make the RFC call to ABAP via the established JCO connection. However there's very limited literature elaborating how the call can be made in the other direction i.e. from ABAP R3 to Portal
Anyone, please kindly advise how, if this can be done. Many thanks!
Best regards,
LionelHi,
I'm trying to make a RFC call from the ABAP program to a built in Java method residing on EP. It is part of a suite of methods provided by the UME engine.
Typically a call is made from a webdynpro program to a SAP ABAP function module. In this case, I'd like to make a call from the SAP ABAP report to the EP method.
Best regards,
Lionel -
Calling a Web Service from Java Webdynpro
Hi,
Can any one give me step by setp details on how to call a Web Service from Java Webdynpro ?
I tried creating a model using Import Web Service Model but when I completed creating the model, I got some errors as shown below.
Error The method setRouteGeometryLineArray(double[][]) in the type Trip is not applicable for the arguments (double[]) ComplexType_Trip.java WS_INVOKE/gen_wdp/packages/com/cintas/test/model/p1 line 249
thanks
SBKHi SBK,
I assume you may already have read the [help guide|http://help.sap.com/saphelp_nw70/helpdata/EN/81/12703e5da3e946e10000000a114084/content.htm] This gives a pretty good idea of how to do it (step by step).
Is there a typo in the error you pasted?
Error The method setRouteGeometryLineArray(double][) in the type Trip is not applicable for the arguments (double[]) ComplexType_Trip.java WS_INVOKE/gen_wdp/packages/com/cintas/test/model/p1 line 249
The square brackets [] after double in the method call appear to be reversed. Is that also in the code? or just a mistake here?
Hope this points you in the right direction.
BRgds,
Simon -
Making an RFC call from within the VM container
Hi all,
since a long time I am searching for information on how to implement an RFC call from within the VMC. The problem is that we have implemented several (p)functions in ABAP and we need to implement them in JAVA.
Now I am searching for a way how to just call the already existing pfunctions???
Is it possible to read CRM DB tables too?
Thank you in advance
BorisHi Freeto,
This may be due to the Network Failures.
If you have triggered a job then because of the Network fluctuations the system may not respond properly and cannot execute the job.
So, this is the cause for the failure.
Hope you understood.
With Regards,
Ravi Kanth -
Calling a java webdynpro component inside a SAP Workflow
Hi Experts ,
Is it possible to call a java webdynpro component inside a SAP Workflow from the task .
If yes please let me the procedures .
Regards
SarmisthaSomeone has posted this, Take a look if it helps you:
"1. Activate your service in transaction SICF;
2. Activate the WS_HANDLER in SICF (probably you have to do more in SICF, SAP notes will be given to you in your browser when you want to call the service);
3. Make the correct settings in WF_HANDCUST;
4. Do ofcourse SWU3 including webserver activities;
5. Define how you want to call the service via WF_EXTSRV including parameters;
6. Generate a task from your defined service in WF_EXTSRV;
7. Incorporate this task in your workflow definition;
8. Test your workflow. Here you probably get some errror messages that the service cannot be called by for instance inactive ICF services. Activate the correct paths in transaction SICF."
Regards, IA
<MODERATOR: For reference, that 'Someone' was Joost in [this thread|Re: Callback from WebDynpro to Workflow]>
Edited by: Mike Pokraka on Jun 19, 2008 4:52 PM -
I am trying to do an RFC call from Excel to SAP using VBA. RFC is working fine for most the RFC enabled Function Modules except DDIF_FIELDINFO_GET and DDIF_FIELDLABEL_GET.
What can be the reason for this?
Can someonme please help me with a macro code where these FMs are working.
Also can someone please help me with some tutorial on SAP connection with Excel.
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Nov 12, 2008 9:14 AMHello Jon.
DDIF_FIELDINFO_GET is not working for me either. But I have used another FM (/ZOPTION/LIVE_DDIF_FIELDINFO):
Public Sub RFC_FIELDINFO()
Dim Func As Object
Dim sapConn As Object
Dim tblFIELDTAB
Dim tblFIXED_VALUES
Dim intRow%
Dim intCol%
'* Sub : Call FM /ZOPTION/LIVE_DDIF_FIELDINFO *
'* Author : Holger Köhn *
'* Created : 23.08.2014 *
'* Changed : *
ThisWorkbook.Sheets("TEST").Activate
Cells.Select
Selection.ClearContents
ThisWorkbook.Sheets("TEST").Range("A1").Select
'* create RFC-Connection *
Set sapConn = CreateObject("SAP.Functions")
sapConn.Connection.RfcWithDialog = True
If sapConn.Connection.LogOn(1, False) <> True Then
MsgBox "Cannot Logon to SAP"
Exit Sub
End If
DoEvents
'* run FM /ZOPTION/LIVE_DDIF_FIELDINFO *
Set Func = sapConn.Add("/ZOPTION/LIVE_DDIF_FIELDINFO")
Func.Exports("TABNAME") = "AUFK"
Set tblFIELDTAB = Func.Tables("FIELDTAB")
If Func.Call = False Then
MsgBox Func.Exception
Exit Sub
Else
Application.ScreenUpdating = False
For intCol = 1 To tblFIELDTAB.ColumnCount
ThisWorkbook.Sheets("TEST").Cells(1, intCol).Value = tblFIELDTAB.ColumnName(intCol)
Next
If tblFIELDTAB.RowCount > 0 Then
For intRow = 1 To tblFIELDTAB.RowCount
For intCol = 1 To tblFIELDTAB.ColumnCount
ThisWorkbook.Sheets("TEST").Cells((intRow + 1), intCol).Value = tblFIELDTAB(intRow, intCol)
Next
Next
ThisWorkbook.Sheets("TEST").Activate
End If
Columns.AutoFit
Application.ScreenUpdating = True
End If
'* clear tblFIELDTAB *
Do Until tblFIELDTAB.RowCount = 0
Call tblFIELDTAB.Rows.Remove(1)
Loop
Set sapConn = Nothing
Set Func = Nothing
Set tblFIELDTAB = Nothing
End Sub -
Asynchronous RFC call from R/3
I need to make an asynchronous RFC call from R/3. I receive an error message in R/3 stating that my RFC destination can only be of type I (Internal) or type 3 (R/3 system). In order for it to reach XI I need it to be of type T (TCP/IP). Any help would be appreciated.
Here is the function call.
CALL FUNCTION 'Z_B2B_R3_FUNCTIONAL_ACK' starting new task 'SESSION1'
destination 'RFC2XMBSERVICE'
EXPORTING
MSG_TYPE = msg_type
ORDER_HEADER_RETURN = order_header_return
TABLES
RETURNCODE = i_return.
the RFC desitnation RFC2XMBSERVICE is of type TCP/IP which by default makes it synchronous.
Thanks,
Jimhi,
have you tried:
CALL FUNCTION 'Z_B2B_R3_FUNCTIONAL_ACK'
in background task
destination 'RFC2XMBSERVICE'
EXPORTING
MSG_TYPE = msg_type
ORDER_HEADER_RETURN = order_header_return
TABLES
RETURNCODE = i_return.
commit work.
Regards,
michal -
Excel sheet generation through RFC call from a BSP application
Hi,
I am calling a RFC FM ( in R3) in Event handler 'OnInputProcessing' of a BSP application in a SRM server.
That function submits a report program which geneates a excel sheet using download FM . Excel sheet is not getting generated.
But when i am calling this RFC FM (in R3) from a report program ( in srm server)
this is generating an ecel sheet.
I want to have call RFC from BSP application.
I tried the way of submit a program ( which contains RFC call) from BSP application ,but it is also not generating excel sheet.
My ultimate AIM is to generate excel sheet by trigerring CALL or submit from BSP
application.
can any one propose solution for it.
Useful answers will be rewarded.Hi,
Which FM is it. I guess that the download generated is a SAP gui oriented solution, which will never work in a web environment
Eddy
PS. Reward useful answers and earn points yourself -
RFC call from a Windows Service
Hi All,
I have created a simple windows service which is making an RFC call to R/3 system. This is not working. Whereas the same piece of code written in a windows application projects(exe) works properly. Does anyone had similer issues working with Windows services ? Is it a known issue of RFC calls from windows service ???
Thanks & Regards
Ganesh DattaHi Juergen,
After I put the debug statements I figured out that connection to R/3 system is unsuccessful.
I am using the SAP .Net Connector 2.0. I wrote a windows service which is manually started. Withing my service I am using Single sign on to connect .This is what was causing the problem. If I disable Single sign on and supply userID and password then connection is successful and also subsequent RFC calls.
I guess within windows service Single sign on does not work.
Thanks for your reply
Best Regards
Ganesh Datta -
Best approach for RFC call from Adapter module
What is the best approach for making a RFC call from a <b>reciever</b> file adapter module?
1. JCo
2. Is it possible to make use of MappingLookupAPI classes to achieve this or those run in the mapping runtime environment only?
3. Any other way?
Has anybody ever tried this? Any pointers????
Regards,
AmolHi ,
The JCo lookup is internally the same as the Jco call. the only difference being you are not hardcoding the system related data in the code. So its easier to maintain during transportation.
Also the JCO lookup code is more readable.
Regards
Vijaya -
Invoke MII Transaction thru RFC Call from SAP
Hi,
We want to get the data from Oracle DB table thru MII (12.0.2).
We need to use RFC call from SAP to MII.
Is it possible to invoke the MII transaction thru RFC by setting in Message Listener?
We have used iDoc messages but not tried with RFC.
How to do that?
Regards,
SenthilI feel MII doesn't have anything equivalent to RFC in ECC. You may try web services in an ABAP program
Hope the article below helps you
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9f101377-0c01-0010-269f-c3ee905d583b&overridelayout=true
Regards,
Musarrat -
Dll call from java using Jbuilder?
Please?
Does anyone know how I do dll calls from java (jubuilder).
I have tried but did not manage to get it wright???
/ thanks carlosResearch JNI (java native interface)
Maybe you are looking for
-
Business Event not triggering the SOA BPEL Process with OA Adapter
Hello Gurus, I am working on Business event "oracle.apps.per.api.employee.create_employee" and the event is getting triggered when creating an employee from EBS. The message has come till WF_BPEL_QTAB(I could seeit) and in "READY" status.We have a SO
-
Howdy, I upgraded my mac yesterday to 10.7, and have run into an interesting problem. I was using Flex Builder 3 before, using Flex SDK 3.2. After upgrading, I found that Flex Builder 3 is not compatible with Lion anymore, so I had to upgrade to Flas
-
Audigy SE Unable to Update to Latest Driv
Hi there I recently purchased an Audigy SE for gaming and when attempting to update the drivers the process fails. I have to alt ctrl del to get out of it (which was okay once, but the second time gave me the blue screen of death requiring me to remo
-
Output Type for Deleting Delivery Notes completely
Hello, I've a problem that in case of complete deletion of a delivery note I want to get message of deletion via IDOC DELVRY05. Normally the complete document will be deleted without any outbut determination. Where do I have to implement this? Is it
-
N86 problem....PLZZZZ HELP!!!!
i have bought this new nokia n86 8mp in jan and have been dealing with problems since then....first of all the colours of the phone crashed and the screen was replaced in 15 days from the date of purchase.,,,,then the colours again crashed and the ph