Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

Structure in Complex Type with Function Import and Cardinality 0..n

$
0
0

We are trying to use a complex type as the return type for a function import with cardinality 0..n. If the complex type is referenced to an ABAP structure, we dont get back any values. If i remove the ABAP structure reference, we get the correct output with multiple rows.

 

Is this a known bug or we are doing something wrong?

 

While debugging the framework code, came across a section which checks for "conversions" and if this is true, treats the complex type as a structure, ignoring the cardinality.

 

IF lo_complex_type->get_no_conversion( ) = abap_false.

 

          ASSIGN cr_data->* TO <ls_source_structure>.

          lo_struct_descr ?= lo_complex_type->create_data_descriptor( ).

          CREATE DATA lr_target_struct TYPE HANDLE lo_struct_descr.

          ASSIGN lr_target_struct->* TO <ls_target_structure>.

 

          /iwbep/cl_mgw_data_helper=>convert_complex_property_outb(

            EXPORTING

              io_complex_type     = lo_complex_type

              is_source_structure = <ls_source_structure>

            CHANGING

              cs_target_structure = <ls_target_structure>

          ).

 

          cr_data = lr_target_struct.

 

This code isnt executed if its a complex type without ABAP structure.

 

Gateway: IW_BEP SP8

 

Regards,

Parag.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>