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

Re: Issue with ABAP statement to read data from table

$
0
0

Hi Tom, 

Directly you cannot read the entries from a database table.  You need to fetch the data into internal table from there you can play around with the data using "READ" statement or any other what ever you want. 

 

So based on the inputs provided by you, you need to create an internal table and that table contains doc_no.  Fetch the data for required fields from CDHDR table using "SELECT" .

 

Loop at internal table.

 

then pass the document number value from field what you mentioned above example "001400090000061692014". Means please go through the below example code.

dATA: L_IDX TYPE SY-TABIX.

LOOP AT ITAB INTO WA_ITAB. 

      L_IDX = SY-TABIX.  

     WA_ITAB-DOCNO = FILED+8(10). 

      MODIFY ITAB FROM WA_ITAB INDEX L_IDX TRANSPORTING DOCNO.

ENDLOOP. 

 

Now you can use read statement using document number.  Because all the document numbers are now populated in the field DOCNO based on the above code. 

 

Hope it helps you. 

 

Cheers,

Krishna Chaitanya.


Viewing all articles
Browse latest Browse all 9067

Trending Articles



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