Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3441

ASSIGN COMPONENT from a table to a dynamic table

$
0
0

every body,

     there is a very interesting thing,i didn't use before.

     in a programe,i want to transfer data from a internal table to a dynamic table,and the table tb_data may be diffrent every time,so i coded follow:

 

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE     EXPORTING       IT_FIELDCATALOG = IT_FLDCAT     IMPORTING       EP_TABLE        = DREF.   ASSIGN DREF->* TO <GT_DYN_TABLE>.   ASSIGN COMPONENT 0 OF STRUCTURE TB_DATA[] TO <GT_DYN_TABLE>.

not used work area and assign filed one by one,the <GT_DYN_TABLE> get structure and has all data from TB_DATA.but the <GT_DYN_TABLE> is diffrent with DREF now.


ps,i don't want the table <GT_DYN_TABLE>  has the same fileds with tb_data,maybe one field more,is there any solution?


Viewing all articles
Browse latest Browse all 3441

Trending Articles



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