on 01-28-2014 7:59 AM
I have created a scenario using RFC adapter at sender side.
Now in order to trigger the message/interface from ECC Side, I have to call remote enabled FM from ECC.
My questions is How to call that Remote FM i.e what rfc destination should be used? i.e whether ABAP Connection(Type 3) or TCP/IP Connection (Type T) should be used as destination.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Inaki,
Actually i am done with the configuration part and also tested the configuration in PI and it is working fine.
But my scenario is of type request-response i.e I am using RFC Adapter at Receiver side of request message and updating the database table, if sy-subrc is 0, I am calling the Remote enabled FM to trigger the response interface which i have configured in response Interface at Sender Side.
But the response interface in not triggering.
I hope the scenario is clear.
Heres my code of Request Interface( RFC at receiver side):-
FUNCTION ZRFC_PI_DOC.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(HEADER) TYPE STRING
*" VALUE(NAME) TYPE STRING
*" VALUE(ID) TYPE INT2
*"----------------------------------------------------------------------
TABLES: ZPI_DOC.
DATA: wa_data TYPE ZPI_DOC.
wa_data-name = name.
wa_data-id = id.
MODIFY ZPI_DOC FROM wa_data.
IF sy-subrc eq 0.
commit WORK.
data: stat TYPE c LENGTH 10 VALUE 'Updated'.
CALL FUNCTION 'ZRFC_PI_DOC_RESPONSE'
in BACKGROUND TASK DESTINATION 'LCRSAPRFC'
IMPORTING
STATUS = stat
.
ENDIF.
ENDFUNCTION.
Hi Ankit,
I havent clear your scenarios, correct me if im wrong, you have the next scenarios:
1. ??? - RFC (ZRFC_PI_DOC) (async?).
2. RFC - ??? (ZRFC_PI_DOC_RESPONSE) (sync?).
First of all, for the second scenario you should assure that you have synchronous service interfaces and later to check the monitoring (sxi_monitor or RWB) if there is an exception.
Regards.
Hi Inaki,
Your are absolutely correct about my scenarios.
My First Sceario i.e request is working perfectly and tables are being updated, but,
in case 2, I am using async comm (i.e in background task) as per your suggestion i have change it to sync (ie. removed in background task from Function Call). still the response interface is not triggering so unable to see any entry in sxi_monitor for response interface.
Regards,
Ankit
Hi Ankit,
I guess this is your answer: SAP Note 730870 - RFC Adapter FAQ Q7:
Q 7: Can there be multiple function module calls within one
transaction for RFC sender channels?
A: RFC Adapter only supports one call within one transaction
(sometimes also called LUW). If an attempt is made to place a second
call within the same transaction, an exception is raised. This is done
because within XI there is no transactional context between messages
and each RFC call is wrapped into one message.
So that is why the second function module is not called. Use a report to call the two function modules separately.
Regards,
Mark
Hi Mark,
I have created a report and created a transaction and called it from First FM as
function zrfc_pi_doc.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(HEADER) TYPE STRING
*" VALUE(NAME) TYPE STRING
*" VALUE(ID) TYPE INT2
*"----------------------------------------------------------------------
tables: zpi_doc.
data: wa_data type zpi_doc.
wa_data-name = name.
wa_data-id = id.
modify zpi_doc from wa_data.
if sy-subrc eq 0.
commit work.
call transaction 'ZRFC_DOC_RESPONSE'.
endif.
endfunction.
But still its not triggering the interface.
Hi Ankit,
What I meant was that there are no other function or transaction calls inside your FM e.g
function zrfc_pi_doc.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(HEADER) TYPE STRING
*" VALUE(NAME) TYPE STRING
*" VALUE(ID) TYPE INT2
*"----------------------------------------------------------------------
tables: zpi_doc.
data: wa_data type zpi_doc.
wa_data-name = name.
wa_data-id = id.
modify zpi_doc from wa_data.
if sy-subrc eq 0.
commit work.
endif.
endfunction.
And in your report, use them separately
Call Function ZRFC_PI_DOC.....
Call Function ZRFC_PI_DOC_RESPONSE...
Hope this helps,
Mark
Hi,
I didnt know the restriction pointed by Mark, thanks Mark.
Ankit, you can set the two first service interfaces for the scenario 1 async and the two service interface for the scenario 2 sync (dont forget to do the mapping for the response in the operation mapping).
Also you can study the possibility of using an ABAP proxy instead a RFC adapter for the ZRFC_PI_DOC_RESPONSE and you wont have that restriction.
Regards.
Hi Inaki,
After investigation of ST22 in PI system i found that i was getting a dump
The function module "ZRFC_PI_DOC_RESPONSE" is called,
but cannot be found in the library.
But I have imported the FM in Imported Objects RFCs in ESR.
What can be the issue?
Also when i am running a report in ECC calling FM it is throwing a dump "JCO.Server could not find server function 'ZRFC_PI_DOC_RESPONSE"
Regards.
Hi Ankit,
If you want to follow with the RFC in the second scenario you should to check that the RFC metadata exists in PI, in other words you should import the RFC in PI like other RFC, a little trick is to create the RFC empty in the ECC system with the import and export parameter defined, in this way you can import the RFC directly in PI, obviously in the ECC you must call the PI interface and not the dummy ECC RFC.
Regards.
I think i came to conclusion that i cannot create such kind of scenario using RFC Adapter where different ESR Objects is created for request and response.
The probable solution as suggested are:
1) Using Outbound proxies to trigger response interface.
2) Create a sync scenario where request and response are both maintained in Service Interface (SI)
If in future any one reads this thread and found that it is possible to create such scenario, please mention the solution in the thread.
Thanks guys for ur help.
Regards,
Ankit Negi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit:
'RFC_SENDER_DS' of type 'T' in the SAP R/3 system itself
Check below doc for more information
http://saptechnical.com/Tutorials/XI/RFC2JDBC/Index.htm
Regards
GB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.