on 05-08-2018 9:23 AM
Hi All,
I've a requirement where I'm creating dynamic entity set whose names and structure will be derived from a table. So far, I'm successful in creating metadata of MPC class. But to send data back to service requires a structure, in this case a deep structure (Structure that may include multiple dynamic entries of Structure and Table).
I tried adding a structure inside structure but I don't understand field symbol completely. I made a R&D and found field symbol can add structures of same type or can append to a table. Can someone help on it.
My structure is:
ABC
| - A
| - B
| - C
| - D
| - E
| - F (Dynamic)
| - G (Dynamic)
| - (Table) (Dynamic)
Use RTTC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Horst, Thanks for reply. I read about RTTC but my main requirement is as follows:
I've a table that maintains structures and entity set and node for structure to be added.
I fetch details from table and had already created Metadata successfully in MPC class, but I'm unable to declare data for the same. I need to append structures on runtime (I don't know which structure will be appended with what name) it will create a service data to be sent in er_entity. Kindly help.
Hi Umang,
Field-symbols example:
DATA: gt_xpto TYPE STANDARD TABLE OF ty_xpto.
...
DATA: lo_xpto TYPE REF TO data.
...
GET REFERENCE OF gt_xpto INTO lo_xpto.
...
CALL FUNCTION 'Z_TEST_REF_DATA'
EXPORTING
it_xpto = lo_xpto
...
* EXPORTING parameter (it_xpto) should be defined as TYPE REF TO data.
* Function Module code
...
assign it_xpto->* to lt_table.
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.