on 03-30-2007 6:18 AM
Hi ,
my scenario is RFC->XI->JDBC. I made necessary settings(RFC destination,
sender RFC adapter,sender agreement and Integration design
objects).Then I wrote following code;
-
CALL FUNCTION 'BAPI_BUS2054_GETDATA'
IN BACKGROUND TASK
DESTINATION DEST
EXPORTING
I_PROJECT_DEFINITION = P_POSID
I_LANGUAGE =
I_MAX_ROWS =
TABLES
IT_WBS_ELEMENT =
ET_WBS_ELEMENT = IT_TAB1
ET_RETURN = IT_TAB_R
EXTENSIONIN =
EXTENSIONOUT =
.
COMMIT WORK.
-
When I executed this program I got no errors and it was processed
successfully.However inbound message payroad(t-cd:SXI_MONITOR)in XI
was empty,like this;
-
<?xml version="1.0" encoding="UTF-8" ?>
<rfc:BAPI_BUS2054_GETDATA xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<I_LANGUAGE />
<I_MAX_ROWS>0</I_MAX_ROWS>
<I_PROJECT_DEFINITION>210Z001000</I_PROJECT_DEFINITION>
<ET_RETURN />
<ET_WBS_ELEMENT />
<EXTENSIONIN />
<EXTENSIONOUT />
<IT_WBS_ELEMENT />
</rfc:BAPI_BUS2054_GETDATA>
-
So I executed program again in debugger mode, and there are no records
in ET_WBS_ELEMENT...
Then,for the verification I rewrote my code like this and executed again;
-
CALL FUNCTION 'BAPI_BUS2054_GETDATA'
EXPORTING
I_PROJECT_DEFINITION = P_POSID
I_LANGUAGE =
I_MAX_ROWS =
TABLES
IT_WBS_ELEMENT =
ET_WBS_ELEMENT = IT_TAB1
ET_RETURN = IT_TAB_R
EXTENSIONIN =
EXTENSIONOUT =
.
-
It finished successfully and there are records in ET_WBS_ELEMENT...
How can I get return table record 'in background task'? Does anyone
have ideas?
Best Regards,
Yuk
Hi,
>>>>How can I get return table record 'in background task'? Does anyone
have ideas?
no, you cannot get any return table if you use async call - background task
if you want to return something to your RFC you need to call it in a sync mode
(otherwise there's no chance of getting anything back from XI)
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your reply.However I got new error message...
I delete 'in background task' from the source code and retry execution. Then my
application system(ERP2005) returned following error message;
-
Runtime Errors CALL_FUNCTION_REMOTE_ERROR
Short text
"call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryException:
What happened?
Error in the ABAP Application Program
The current ABAP program "Z_BAPI_RFC_CONNECT" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The error occurred during an RFC call to another system.
In the target system, a short dump has been written as well.
More detailed information on the error cause can be found there.
Error analysis
An error occurred when executing a REMOTE FUNCTION CALL.
It was logged under the name "RFC_EXTERNAL_ABORT"
on the called page.
Trigger Location of Runtime Error
Program Z_BAPI_RFC_CONNECT
Include Z_BAPI_RFC_CONNECT
Row 21
Module Name START-OF-SELECTION
Line SourceCde
1 *&----
:
20
>>>>> CALL FUNCTION 'BAPI_BUS2054_GETDATA'
22 * IN BACKGROUND TASK
23 DESTINATION DEST
24 EXPORTING
25 I_PROJECT_DEFINITION = P_POSID
26 * I_LANGUAGE =
27 * I_MAX_ROWS =
28 TABLES
29 E_WBS_ELEMENT = IT_TAB1
30 ET_WBS_ELEMENT = IT_TAB1
31 ET_RETURN = IT_TAB_R
32 * EXTENSIONIN =
33 * EXTENSIONOUT =
34 .
35
36
37 COMMIT WORK.
38
39
40 IF WA_TAB1 <> ''.
-
This message is proccessed in XI but status is 'system error-Restart Not Possible'.
Does anyone have ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.