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

How to transfer data to work area. If internal table and work are have different structures.

$
0
0

HI,

 

I am trying to pass data from an internal table to work area. Work area and internal table having different number of fields and structure.

 

I have an excel sheet with entries from different table. another another sheet giving corresponding name of table.  I have to modify the database table according to those entries.

.

I have used dynamic data creation for this purpose.

 

Please find the program attached below:

 

it_tables: contain table names

it_entries: contain table entires

 

   LOOP AT it_tables INTO wa_tables.

     tabname = wa_tables-tab_name.

 

     CREATE DATA w_dref TYPE STANDARD TABLE OF (tabname).

     ASSIGN w_dref->* TO <i_tab>.

     CREATE DATA w_dref LIKE LINE OF <i_tab>.

     ASSIGN w_dref->* TO <wa>.

 

lv_count = lv_count + 1.

 

     READ TABLE it_entires INTO <wa> INDEX lv_count.


the above read statement is not able to pick up entry. Since it_entries is made of 15 columns of 50 length and wa structure is same as table

name provided in second sheet.


Kindly help!


Any other way I can update tables, will also be great.


Awaiting your expert replies!.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



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