cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Lookup - BAPI-TABLE Parameters problem

Former Member
0 Kudos

Hello All,

I had a scenario where i need to export parameters and am supposed to get import parameters from BAPI between source and target structures.

like -


source --> BAPI execution = result --> target

We had succeeded in getting those but the only problem is with TABLE parameters in that BAPI.

How can we achieve it.

Faster reply would be appreciated.

Thanks & regards

Reddy

Accepted Solutions (0)

Answers (2)

Answers (2)

VijayKonam
Active Contributor
0 Kudos

HP,

A table is nothing but a message type having 0..unbound cardinality. Just use the message type of the tables and map..!!

VJ

Former Member
0 Kudos

Hi VJ,

Its not a simple source-target mapping .

For Ex :

Source-Bapi-Idoc

Source will send some parameters to BAPI and bapi will execute it and respond with values in table parameter of the bapi and result would be assigned to idoc-field.

For this i am using RFC Look up with sample code as :

String rfcxml ="<ns0:Z_BAPI xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">" +

" <A>" + A + "</A>" + --- Export parameters

" <B>" + B + "</B>" + --- Export parameters

//" <TABLE><FIELD1>" + FIELD2 + "</FIELD1></TABLE>" +

//" <TABLE><FIELD2>" + FIELD2 + "</FIELD2></TABLE>" +

//" <TABLE><FIELD3>" + KDMAT+ "</FIELD3></TABLE>" +

// "<FIELD1>" + FIELD1 + "</FIELD1>" +

"</ns0:Z_BAPI> " ;

Passing A & B as export parameters and getting TABLE-FIELD1&2&3 as response.

I hope some problem in the syntax.

Regards,

HP

prateek
Active Contributor
0 Kudos

You can directly pass the data in table structure from XI. Define the datatype same as that of RFC and thats it. Map the same fields.

Regards,

Prateek

Former Member
0 Kudos

HP ...can you provide me with some details of your RFC Lookup ? Im looking for the same scenario.

Thx,

Gordon