14 Replies Latest reply: Dec 10, 2013 11:57 AM by Bruno Esperança RSS

Passing internal table with a field of type string to & from BAPI

Ansberry Kevin
Currently Being Moderated

Hello ABAP gurus,

 

I have a simple BAPI which has to send back an internal table.

 

Internal table structure is as follows

 

 

 

DATA: BEGIN OF itab OCCURS 0,

        config_id(8),

        blobdata like zstring,

END OF itab.

 

where zstring is a string of variable length.

 

 

When I try to activate the BAPI I get a message

 

"itab" must be a flat structure. You cannot use internal tables, strings, references or structures as components.

 

However, just for testing, I changed blobdata to type of char and I can successfully activate and use the BAPI.

 

But, our requirement is to pass a string of variable length.

 

How can I resolve this issue? I have searched sdn and other blogs but didn't help so far.

 

Any feedback on this will be highly appreciated.

 

Thanks

Ram

Actions