Hi Lakshman,
Thanks for your reply.
As you said, i am using deep structure .I have tried to use the method of create_deep_entity to display all the entities associated with main entity set. But i got stuck.
Below is the information about my objects i created .
ztest_str1 -- parent structure(contains child) , ztest_str2 -- child strucutre
![strucutres.JPG]()
ztest_deep -- rfc fm
![FM.JPG]()
and i have created association between the parent and child strucutre (but there are no matching keys)
I modified Define Method in MPC_EXT and created deep structure in TYPES as below.
![define method.JPG]()
![define structre fields in mpc_ext.JPG]()
i redefined create_deep_entity method in DPC_EXT and written the below code
data :
ls_output type ZCL_ZTEST_DEEP_MPC_EXT=>ts_new ,
lt_output type table of ZCL_ZTEST_DEEP_MPC_ext=>ts_new ,
ls_name3 type ZCL_ZTEST_DEEP_MPC_EXT=>ts_name3,
lt_name3 type table of ZCL_ZTEST_DEEP_MPC_EXT=>ts_name3.
data : ls_str1 type ztest_str1.
* Upon match, access data from IO_DATA_PROVIDER
io_data_provider->read_entry_data( IMPORTING es_data = ls_output ).
* Move data into structure
" Header data
ls_output-id = '1' .
ls_output-name1 = 'ABCDEF'.
ls_output-name2 = 'XYZ123'.
"Item data
ls_name3-value1 = '1234'.
ls_name3-value2 = '5678'.
ls_name3-value3 = '9876'.
ls_name3-value4 = '1111'.
append ls_name3 to lt_name3.
*DATA LS_STR1 TYPE ZTEST_STR1.
*DATA LT_NAME3 TYPE STANDARD TABLE OF ZTEST_STR2.
CALL FUNCTION 'ZTEST_DEEP'
EXPORTING
ls_str1 = ls_str1
TABLES
lt_name3 = lt_name3
.
copy_data_to_ref(
EXPORTING
is_data = ls_output
CHANGING
cr_data = er_deep_entity
).
While trying to execute the gateway, i got no values found in entityset.
Did i miss anything in expanding the entity or FM declaration ?
Please help ![]()