Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: How to Fetch ausp-objek value based on the ausp-atwrt,atinn,atzhl,mafid,klart

$
0
0

Hi Ravi,

 

Is this Select successful ?

 

SELECT werks
       ART_GRP
from ZPUT_SITE_PRE_VN
into table it_site
 
where werks in s_site
  
and  ART_GRP in s_artgrp.

 

If yes, it means you have data in IT_SITE.

 

Below is not needed since already IT_SITE will be having art_grp values in second field which hopefully you would have declared of type ausp-atwrt.


LOOP AT it_site ASSIGNING <fs>.
<fs>
-atwrt = <fs>-art_grp.
ENDLOOP.

 

-> After  above select put a break point and see values in debugger whether they match with the DB values of AUSP-ATWRT.

 

-> While matching the values consider leading zeros also i.e '000016' is different from '16'. Need to use conversion exits in this case.

 

Finally the query seems correct -

 

select objek
         atinn
         atzhl
         mafid
         klart
         atwrt
   
from ausp
   
into table lt_ausp
   
FOR ALL ENTRIES IN it_site-------------*here also data present in it_site
   
where atinn EQ lc_atinn----------Z012
     
and atzhl EQ lc_atzhl-------1
     
and mafid EQ lc_mafid------O
     
and klart EQ lc_klart------026
     
and atwrt EQ it_site-atwrt.

 

 

-> Ask in case of doubts.

 

BR.


Viewing all articles
Browse latest Browse all 10425

Trending Articles



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