09-22-2008 8:25 AM
Hi Experts,
I have written a Se38 progarm to execute a remote function module, so as to send some data out of the system. The receiving system is an XI system. Pls see below the code and the load at the XI end, I donno why and what mistake am I doing in the se38 program part, as a result of which, only part of the data is getting send to XI.
REPORT ZRFC_ADAPTER.
Data: it_final1 type standard table of zrfc_str with header line .
it_final1-NAME = 'ARNAB'.
it_final1-ADDRESS = 'ADDRESS'.
it_final1-EMAIL = 'EMAIL'.
it_final1-ID = 'ID'.
CALL FUNCTION 'ZRFC_XI'
IN BACKGROUND TASK DESTINATION
'R32XIRFC'
EXPORTING
username = sy-uname
tables
it_final = it_final1 .
break-point.
COMMIT WORK.
Clear it_final1.
I have seen in debugging mode, after removing the "
IN BACKGROUND TASK DESTINATION
'R32XIRFC'", that the internal table " it_final1 " is working fine......
The structure used in remote Function Module is
IT_FINAL LIKE ZRFC_STR -- in tables parameter. and the structure of ZRFC_STR is as follows!
NAME ZNAME CHAR 14
ADDRESS ZADDRESS CHAR 40
TELEPHONE ZTEL CHAR 20
EMAIL ZEMAIL CHAR 40
ID ZID CHAR 10
Note that , apart from a COMMIT WORK statement, there is no other coding done in the SOURCE CODE part of the remote Function Module.
The load in XI is showing as
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:ZRFC_XI xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<USERNAME>RETAILDEV</USERNAME>
- <IT_FINAL>
- <item>
<NAME>ARNAB</NAME>
<ADDRESS>EMAIL</ADDRESS>
<EMAIL />
<ID />
</item>
</IT_FINAL>
</rfc:ZRFC_XI>
Note that EMAIL is actually a content of field EMAIL and not ADDRESS. But I donno why, it is behaving like this,,
Pls note, this RFC has been imported completely in integration repository of XI, so we dont have to worry about any settings change or activities, left pending in XI.
I am very sure, something is missing in the se38 code, pls suggest!!
Regards,
Arnab .
09-22-2008 12:55 PM
you should do an APPEND to your internal table
like it is written now, you only fill the header of the table
09-22-2008 3:53 PM
Francois, I am so sorry, I missed out the part of the code, I did do the append part, but missed out at the time of copy pasting the same in SDN . Gud observation, but unfortunately, that was not at all the issue, ....still did nt make it!!!
09-22-2008 12:58 PM
09-22-2008 3:54 PM
Madhan, there is nothin to do wid the mapping as the loiad that I have displayed is the status of the load, before enteriing the mapping logic!!!!!
Edited by: Arnab Mondal on Sep 22, 2008 4:54 PM
09-23-2008 7:03 AM