2007 Jul 16 7:12 PM
hello friends,
i need to generate an abap query, in which
two fields from the table vbrp must be compared for each line item,
if in any line item they dont match, then i have to
show those documents where they didnot match.
can any plz shortly tell how to do.
can any one plz help.
2007 Jul 16 9:00 PM
do we need to use vbrk here,
out of ignorence i am asking , why do we need to use vbrk,
2007 Jul 16 7:20 PM
create an internal table of type VBRP : t_vbrp
data: t_vbrp type standard table of VBRP initial size 0,
wa_vbrp like line of t_vbrp.
select * from vbrp into table t_vbrp where ....... if u have some condition..
then
Loop at t_vbrp into wa_vbrp.
check wa_vbrp-fld1 ne wa_vbrp-fld2.
write:/ wa_vbrp.
endloop.
Regards
Prax
2007 Jul 16 7:22 PM
no no my friend,
i need to do this using only abap query.
any help.
2007 Jul 16 7:26 PM
2007 Jul 16 7:26 PM
Refer the links might be of some help -
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
http://www.sap-basis-abap.com/sapquery.htm
http://searchsap.techtarget.com/searchSAP/downloads/Teach_yourself_SAP_C20.pdf
Regards,
Amit
Reward all helpful replies.
2007 Jul 16 7:28 PM
thanks prax,
but where do i insert this code, i am not that strong in abapqueries.
2007 Jul 16 7:31 PM
What u r talking about Query using TCODE : SQ03/ SQ01 or simpe ABAP query using SELECT statement.. plz tell
Regards
Prax
2007 Jul 16 7:33 PM
2007 Jul 16 7:35 PM
Then it will be better if u go through some documentation first..
the link given by Amit may help u. or u can search in
Regards
Prax
2007 Jul 16 7:41 PM
prax i followed those links,
i created , user group, infoset,
and in sq01 i am unable to go ahead,
where to compare these two.
2007 Jul 16 8:09 PM
2007 Jul 16 8:39 PM
Hi,
I am able to Run thru the sq01 and also execute the query with VBRK and VBRP. I am trying to find abt comparing fields of VBRP. Can you tell which fields of VBRp You need to compare with VBRP.
Thanks,
Vamshi.
2007 Jul 16 8:58 PM
thanks vamshi,
i need to compare kzwI2 and kzwI4 fields in vbrp table.
if you can put down the code i can check with my code, to know wether mine works.
thanks again.
i was thinking like this:
select kzwI2 kzwI4 into table in_vbrp where kzwi2 <> kzwi4.
if sy-subrc = 0.
loop at in_vbrp.
write:\ in_vbrp.
endloop.
endif.
will this work.
2007 Jul 16 9:00 PM
do we need to use vbrk here,
out of ignorence i am asking , why do we need to use vbrk,
2007 Jul 16 9:05 PM
We need not use VBRK. We can define two aliases for the same table VBRP as a and VBRP as B.
Thanks,
Vamshi.
2007 Jul 16 9:40 PM
Follow the SDN link which Amit has send you. Abap Query by Author(s): Lakshmi Sailaja Nalam. PDF document.
Follow the steps and you will be able to create the abap query. instead of using VBRK and VBRP, Click the Aliases button on the application tool bar, name table VBRP as A and Againg VBRP as B.
Then click on th insert button on the application tool bar. This popup will ask for a table name. Give it as A once. call it again and provide b as tablename.
then u can see both the tables on the screen. Then use the join between which ever fields you want.
Again follow the steps from the document.
Thanks,
Vamshi.