Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Read Data-Structure via RFC for external c-code

Former Member
0 Kudos

Hi!

Is there a way to read the data structure from a BAPI via RFC. My Problem is, that some of our customers have extended some functions in SAP and these extensions are somewhere in the middle of the structure. So, if I call the function from a C-Program the structure is different to my defined structure and I get wrong values. So I need a way to read the structure dynamically to make sure that I use the right structure definition!

Thanks,

Konrad

1 ACCEPTED SOLUTION

former_member225448
Participant
0 Kudos

Hellp Konrad,

you might use the function modules:

RFC_GET_FUNCTION_INTERFACE

and

RFC_GET_STRUCTURE_DEFINITION

to create an dynamic RFC interface.

If you find my answer useful, please don't forget the reward.

Regards,

Juergen

3 REPLIES 3

former_member225448
Participant
0 Kudos

Hellp Konrad,

you might use the function modules:

RFC_GET_FUNCTION_INTERFACE

and

RFC_GET_STRUCTURE_DEFINITION

to create an dynamic RFC interface.

If you find my answer useful, please don't forget the reward.

Regards,

Juergen

0 Kudos

Hello~

i have the same problem...

i used the function modules:

RFC_GET_FUNCTION_INTERFACE

and

RFC_GET_STRUCTURE_DEFINITION

but, i can not predefine the structure ,after call rfccallreceive, i can not use this format:

(structure*)ItGetLine(itab,i);

so, i used this format:

(unsigned char*)ItGetLine(itab,i);

the problem is that!!

ths size of typedef structure{} format is not same the size of sum of structure's element size.

how can i make the late bound c++ program?

athavanraja
Active Contributor
0 Kudos

you can use RFC

BDL_FUNCTION_INTERFACE_GET to get the details.

Regards

Raja