cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Adapter Settings - stage 3 problems

Former Member
0 Kudos

Hi Experts,

Mine is a RFC to FILE scenerio.I am facing a strange problem. I am sending some data to the RFC through a SE38 program, but only a part of the data is reaching the SXMB_MONI!

See the report program and the Remote function Module below. also the details of the structure is given below:

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 = 'arnab.rudra1gmail'.

it_final1-ID = 'ID'.

append it_final1.

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 RFC structure

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

But when checking the SXMB_MONI load , data is incomplete and cut.......Now many of you will suggest re-importing teh RFC in Integratio Repository, and reactivating the communication channel, but i hav done that several times,,,,still the data coming in is incomplete and shreded...i donno why...take a look at teh sxmb_moni output!!

- <rfc:ZRFC_XI xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

<USERNAME>RETAILDEV</USERNAME>

- <IT_FINAL>

- <item>

<NAME />

<TELEPHONE>rudra1</TELEPHONE>

<ADDRESS />

<EMAIL />

<ID />

</item>

</IT_FINAL>

</rfc:ZRFC_XI>

I know, that there is nothin getting stuck in the queue, and had there been anything wrong in the code, nothin would hav worked.....can u guys tell me where am i gettin stuck..

Regards,

Arnab

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Arnab,

I wont ask you to do any of the steps as I know I was the one who asked you to do that

My only guess, and I know you are going to cringe, is everything in the ABAP Report right?

Also, do you have COMMIT WORK at the end of your report?

You would need to have this.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I did exactly as instructed by u some time back, I believe I hav something or other there wrong in my SE38 report, ......I cant make that out, but dont you think, this is funny, only a part of the data is coming in, and not the full...if there was something wrong, entire load would have vanished!!!..and yes I hav used the COMMIT statement....take a look at the SE38 Code,

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 = 'arnab.rudra1gmail'.

it_final1-ID = 'ID'.

append it_final1.

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.

Is the loaction of commit work ok.....or do you want me to put it in the Remote Function Module??

Do you think I should put the question in ABAP forum, so that some Remote function Module expert can suggest something....

Pls suggest....

Arnab

bhavesh_kantilal
Active Contributor
0 Kudos

Arnab

I see you have Commit Work and after that you have it_final1.

Can you change this order? I am not much of a ABAP'er but I remember during my training days being explicitly told, make sure Commit Work is the last statement in the report.

Regards

Bhavesh

Former Member
0 Kudos

Bhavesh, sorry to bother you, did the same and also reduced the size of fields all to charecter 10. See the code and take a look at the output, this is aweful.!!

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'.

append it_final1.

CALL FUNCTION 'ZRFC_XI'

IN BACKGROUND TASK DESTINATION

'R32XIRFC'

EXPORTING

username = sy-uname

tables

it_final = it_final1

.

Clear it_final1.

Refresh : it_final1.

COMMIT WORK.

Now see the strange output..!!

<?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 ADDR</NAME>

<ADDRESS>ID</ADDRESS>

<EMAIL />

<ID />

</item>

</IT_FINAL>

</rfc:ZRFC_XI>

Former Member
0 Kudos

Hi

>Is the loaction of commit work ok.....

Yes, the placement of commit work is fine. It should be immediately placed after the RFC call.

Try this,

In the RFC destination which u have created in R/3, click on the Unicode Test button which is near to Test Connection button.

If it displays as "Target is a unicode system", then under the tab Special Options, make the Character width in Target system as Unicode, save it and then run your scenario again.

-Dava

Former Member
0 Kudos

Dava,

I remember , u solved my previous issue, well I went to SM 59, the TCP/IP connection that i made was R32XIRF, so as per instruction , I clicked on "Target is a unicode system" --- it says -- Target is a unicode system (charecter size 2). Then as per ur instruction I was looking for the part "then under the tab Special Options, make the Character width in Target system as Unicode, save it and then run your scenario again."

Under the special options there is nothing called "make the Character width in Target system as Unicode".....at least in my system ecc6.0. What i found out was " MDP and UNICODE tab -


communication type with Target system -- Unicode. I made it unicode and save it. Now, infact NOOO data is going from R/3 to XI!!!

Pls suggest something , I think we are going in the right way,,,just some very minor setting changes are required!!

Arnab

Former Member
0 Kudos

Cheeeeeeeeeeeeeeeeeeeeeeers Dava.. problem solved......wht hundreds could nt answer, u resolved in seconds, Many thanks buddy!!

Arnab.

P.S.: a million points from heart!!

Answers (0)