Sorry, maybe I misunderstood the point.
I thought that you have everything in dynamic table <lfs_table> and you want that same Data to be in
et_data[] or something.
If everything in method is ok, I dunno I don't get it.
For instance, I have a method where I have to get from method a table line (structure) with changing structure
CALL METHOD ZCL_MY_METHOD=>GET_MY_PRICE
CHANGING CH_DATA = ls_prices
EXCEPTIONS
NO_DATA = 1
MULTIPLE_RECORDS = 2
DATA_INCOSISTENCY = 3
others = 4.
Methods signature is like:
class-methods GET_MY_PRICE
changing
!CH_DATA type ANY
exceptions....
So whatever structure I create and fill in my method actually gets put out in CH_DATA and gets captured in ls_prices
For instance like in C++ if pointer gets out.
Ok..let me give You 30 minutes so I'll build up example..
Here it is
Key is that with What type you call method, that type you get out.
Try this method in SE24 in some dummy class and see.
or call from sam proggy
DATA: lt_vbap2 type VBAP_T, lt_vbak2 type VBAK_T.
CALL METHOD ZCL_MY_METHOD=>GET_PRICE
CHANGING CH_DATA = lt_vbap2
....
...or
CALL METHOD ZCL_MY_METHOD=>GET_PRICE
CHANGING CH_DATA = lt_vbak2
....
Hope it helps, otherwise sorry for misunderstanding.