cancel
Showing results for 
Search instead for 
Did you mean: 

Complex type in RFC call

Former Member
0 Kudos

Hi

I have created an A-RFC model with an input complex type

defined in data dictionary as:

structure

.attribute1

.attribute2

.table1

..structureT1

...attribute1T1

...attribute2T1

RFC Model generates 2 complex types ComplexType_structure and Complex_Type_table1. I bind this structures to the context of custom controller and I'm trying to populate them. But at runtime I have this error:

element table1 must exist and can not be null.

Any ideas?

Does Adaptive RFC support RFC with complex data types?

Thanks

Andrea

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Yes adaptive RFC does support complex data types. Well from the below depicted structure looks like you have a table1 containing a structure with 2 attributes. In other words in ABAP you have declared it as a line type.

Moreover where is the table declared in ABAP RFC, is it under the Tables tab or under the export tab. Please ensure it is declared under the tables tab.

How are you populating the table structure from your Front end.

You should be doing something like the following

if you see the model classes generated you will see that you have a class generated for Table1 and also for the StructureT1 under table1.

To populate the structure of Table1 you need to first

populate the structure

//

StructureT1 struct = new StructureT1();

struct.set<attr1>();

struct.set<attr2>();

Table1 tab = new Table1();

tab.add<struct>(struct);

//

then add this table to the main input node.

Hope that helps you. If you still have problems let me know and i can help you out. But do give me the names of the classes the model generates so that i can give you a exact code replica. (i dont have WEBAS with me currently). anyway will try to give something similar

regards

Ravi