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

Re: Queries from the same table, but, different row

$
0
0

Hi Hasan,

 


I can see that with reference to zmmtwinfd-wtno you fetching some records in internal and in update statement you never used those records...what i understand from your question you need to copy value of  TRFNO to RFMBELNR field of all records where the field value rfwtno = WTNO. if my undrestanding is correct try using fallowing code..


if you have wtno from selection screen then

 

Select single tfrno from ztable into g_tfrno where wtno = s_wtno.

 

update ztable set rfmbelnr = trfno where rfwtno = wtno.

 

If you want all wtno in ztable then.

 

Select wtno tfrno from ztable into table it_ztable.


loop at it_ztable into wa_ztable.


 

update ztable set rfmbelnr = wa_ztable-trfno where rfwtno = wa_ztable-wtno.


Endloop.


Regards,

Shashikanth


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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