cancel
Showing results for 
Search instead for 
Did you mean: 

unable to send structure data type as import parameter in RFC

Former Member
0 Kudos

I have one RFC to web service scenario.My sending RFC is as follows:

FUNCTION ZIXI_001_EMP_DET.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(EMP_DET) TYPE ZIXI_EMP

*" VALUE(OFFER_DT) TYPE ZXI_OFFER_DATA

*"----


ENDFUNCTION.

Here ZIXI_EMP is a structure with following details:

EMP_ID INT4 INT4 10 0 Natural Number

NAME STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters

SAL INT4 INT4 10 0 Natural Number

and ZXI_OFFER_DATA is another structure with following details:

REQ_ID STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters

PRICE STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters

QTY STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters

After configuring everything in IR and ID, I called the RFC from R3 system with following data:

EMP_DET:

EMP_ID 15

NAME XYZ

SAL 5.000

OFFER_DT:

REQ_ID A235

PRICE 50

QTY 3

but when I am checking in sxmb_moni, payload only containing first field of each structure. i.e.,

<?xml version="1.0" encoding="UTF-8" ?>

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

- <EMP_DET>

<EMP_ID>15</EMP_ID>

<NAME />

<SAL>0</SAL>

</EMP_DET>

- <OFFER_DT>

<REQ_ID>A235</REQ_ID>

<PRICE />

<QTY />

</OFFER_DT>

</rfc:ZIXI_001_EMP_DET>

Why this is happening I don't know. is there any constraint with SAP XI 3.0 that we can not pass values using structure?...

Or any configuration needs to be done?

Please help....

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, Nayan

¿have your modify your function after begin imported to IR and created communication channel?

Sometimes it's necesary to stop - start RFC channel to recognize changes in import RFC parameters.

Regards,

Carme

santhosh_kumarv
Active Contributor
0 Kudos

>>is there any constraint with SAP XI 3.0 that we can not pass values using structure?

No. Also ur receive a value for one of the field, so this is not a problem

>>Or any configuration needs to be done?

No explicit config required....

Do this.

1. Put a breakpoint in ABAP code before the RFC call and check if the Internal Table that u pass has the table contents as expected.

2. Check If RFC destination from ECC to PI is set to Unicode if your PI is a unicode system.

~SaNv...

Former Member
0 Kudos

I have checked in ABAP program using break point and structure variable contains all the values before calling the RFC.

So RFC is being called with all the given values populated in the structure.

It seems to me any other problem....

Unicode is already checked.....

Former Member
0 Kudos

Hi Carme,

I haven't made any changes to the RFC after importing it in IR..

santhosh_kumarv
Active Contributor
0 Kudos

do a start-stop of the RFC adapter and try...

~SaNv...

Former Member
0 Kudos

Hi Santosh,

Actually the comm channel is being used in another RFC scenario and it is working fine ... but in other RFC scenario we are sending data with simple data type ... no structure is sent through that.

But in my present scenario due to the structure data type , we are unable to get all the field values in runtime.

santhosh_kumarv
Active Contributor
0 Kudos

Guess I got it... U should define the structure as Tables parameter and not as Import Parameter...

should be like

FUNCTION ZIXI_001_EMP_DET.
*"----------------------------------------------------------------------
""Local Interface:
*" TABLES
*" EMP_DET STRUCTURE ZIXI_EMP
*" OFFER_DT STRUCTURE ZXI_OFFER_DATA
*"----------------------------------------------------------------------
ENDFUNCTION.

~SaNv...

Edited by: Santhosh Kumar V on Mar 18, 2010 6:35 PM

Former Member
0 Kudos

Hi Santosh,

That means you are trying to say that structure type in the import parameter will not work ..we have to use that as table?...

santhosh_kumarv
Active Contributor
0 Kudos

>>That means you are trying to say that structure type in the import parameter will not work ..we have to use that as table?...

Yes. I have worked creating a RFC like this.

~SaNv...

santhosh_kumarv
Active Contributor
0 Kudos

How was his resolved....!!! Iu2019m interested to know......!!

~SaNv...

Former Member
0 Kudos

Hi Santosh,

Actually in RFC destination UNICODE radio button was not selected. After selecting UNICODE radio button it worked fine.

Thanks for your help..

Nayan