Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9269

Re: Error: Internal Tables, Field symbol has not yet been assigned

$
0
0

To initialize field symbols you should use  keyword UNASSIGN instead of CLEAR.

 

And you can not use field symbol <fst_bsis_line> directly in the select statement. Instead put it in an internal table and then assign the contents to the FS as below:

 

tables: bsis.

types: begin of it_bsis_line,

   zuonr like bsis-zuonr,

   belnr like bsis-belnr,

end of it_bsis_line.

 

data: it_bsis type table of it_bsis_line,

       lv_i type i.

 

field-symbols <fst_bsis_line> type any table.

field-symbols <fs> like line of it_bsis.

UNASSIGN <fst_bsis_line>.

 

lv_i = 1.

select * up to 10 rows from bsis into CORRESPONDING FIELDS

                    OF table it_bsis where zuonr ne ''.

 

ASSIGN it_bsis  to <fst_bsis_line>.

 

loop at <fst_bsis_line> assigning <fs>.

   write:/ lv_i,' - ', <fs>-zuonr, ' - ', <fs>-belnr.

   lv_i = lv_i + 1.

endloop.

 

For further details refer:

Field Symbols (how to use practically??)


Viewing all articles
Browse latest Browse all 9269

Trending Articles



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