We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-newbies-l] SAP ABAP alv interactive report - query not working

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Question from damrutia on Jun 20 at 12:00 PM
Tables : GLPCA,VBRK,zbugr,ZPCTCTR (PRCTR type ZPCTCTR-PRCTR,VKBUR type ZPCTCTR-VKBUR,VKGRP type ZPCTCTR-VKGRP,
VTWEG type ZPCTCTR-VTWEG ,GR type ZPCTCTR-GR,)

slection screen :
select-options:
s_vbeln for vbrk-vbeln,
s_budat for glpca-budat,
s_poper for glpca-poper,
s_bukrs for glpca-rbukrs,
s_REFDOC for glpca-refdocnr,
s_PRCTR for glpca-rPRCTR,
s_ryear for glpca-ryear,
s_gr for zbugr-gr,
s_VTWEG for glpca-VTWEG,


Based on any of above selection I have to display series of interactive reports :

-------------------------------------------------------------------------------------------------------------------
ALV display 1 table ::zpctctr-vtweg, zbugr-gr, vkgrp, vkbur, prctr, vbrk-netwr(total for each refdocnr based on FKART-vbrk found against vbeln)
------------------------------------------------------------------------------------------------------------------

ALV display 2. table :: double click on netwr-vbrk column from display 1,below is list to be displayed.
--------------------------------------------------------------------------
fkart, refdocnr, vbeln, belnr-bkpf, fkdat-vbrk, netwr-vbrk (thr would be total at end of netwr column
-------------------------------------------------------based on fkart (addition or substraction)

Display 2. from display 2, when user clicks vbeln-vbrk -> call transaction(vf03)
when user click belnr-bkpf -> call transaction (fb03)


Below is 1st display query : select glpca~poper
glpca~usnam
glpca~RPRCTR
glpca~refdocnr
vbrk~vbeln
vbrk~netwr
zpctctr~vkbur
zpctctr~vkgrp
zpctctr~VTWEG
zpctctr~gr

into CORRESPONDING FIELDS OF TABLE it_tab1
from glpca
INNER JOIN vbrk

on glpca~refdocnr eq vbrk~vbeln

INNER JOIN zpctctr
on glpca~RPRCTR eq zpctctr~prctr

INNER JOIN zbugr
on zbugr~gr eq zpctctr~gr

where
glpca~budat in s_budat
and glpca~rbukrs in s_bukrs
and glpca~refdocnr in s_refdoc
and zpctctr~VTWEG in s_VTWEG
and vbrk~vbeln in s_vbeln
and glpca~poper in s_poper
and glpca~ryear in s_ryear
and glpca~RPRCTR in s_prctr
and zbugr~gr in s_gr.



Query 2 : display 2nd table

select
vbrk~fkart
vbrk~vbeln
vbrk~fkdat
vbrk~netwr
glpca~refdocnr
bkpf~belnr into CORRESPONDING FIELDS OF TABLE it_tab2
from vbrk
INNER JOIN glpca
on vbrk~vbeln eq glpca~refdocnr
INNER JOIN bkpf
on bkpf~belnr eq glpca~refdocnr
where vbrk~fkart eq 'f2'.

1st query is working fine & table is display but there is no records are fetched in 2nd internal table though is switching to alv display and all... but no data ...I am sure 100% missing something from query dnt know where plz if you can provide me some suggestions would be great
 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2014 Ziff Davis, LLC. and message author.
Ziff Davis, LLC. 28 E 28th Street New York, NY 10016
damrutia  
 
View this online
Ask a new question
 
In the Spotlight
Have a technical question? Need to find IT solutions? Ask your peers in the Toolbox for IT community.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language