Application Development and Automation 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 only

Read Data-Structure via RFC for external c-code

Former Member
0 Likes
1,391

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
Read only

former_member225448
Participant
0 Likes
740

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
Read only

former_member225448
Participant
0 Likes
741

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

Read only

0 Likes
740

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?

Read only

athavanraja
Active Contributor
0 Likes
740

you can use RFC

BDL_FUNCTION_INTERFACE_GET to get the details.

Regards

Raja