Abap query table link
Experts Im doing an abap query then I just link the tables adr2 , adr3 , adr6 and lfa1 and lfb1 in infosets "join button"..then show the fields that I need in sq01.But I was wondering why my data becomes times 4..it repeatedly display my data in FOUR times..
What do you think is the cause of that?
dear,
it depends on which table you selected first (Table join using basis table) and how do you insert next tables.
i am talking about the info-set creation step.
let's do a simple query.
run SQ02. type new infoset name and hit Create.
type name and type MARA for "Table join using basis table" radio button. Hit Continue.
now insert (add) tables: MARC, MCHA, CABN, CAWN
think about Inner Join or Left Outer Join !!'
say, if you need to display all materials (even if not exist on plant) set Left Outer Join. if you're after materials existing on plant keep default Inner Join.
friend, my example above is only the example.
make sure you undertsand how to build a sap query in general.
never set many tables at once. insert 2-3 tables, return to your query (SQ01) or create it, adjust it and test. step by step - table by table. add the new table in infoset, add the fields, generate it and come back to your query. adjust it and test.
good luck!
Similar Messages
-
ABAP Query - Table for Batch, Char values & desc.
Hi Gurus,
Looking for a Table join for requirement to fetch Characteristic description, char values & Batch no in ABAP query.
Thanks.dear,
it depends on which table you selected first (Table join using basis table) and how do you insert next tables.
i am talking about the info-set creation step.
let's do a simple query.
run SQ02. type new infoset name and hit Create.
type name and type MARA for "Table join using basis table" radio button. Hit Continue.
now insert (add) tables: MARC, MCHA, CABN, CAWN
think about Inner Join or Left Outer Join !!'
say, if you need to display all materials (even if not exist on plant) set Left Outer Join. if you're after materials existing on plant keep default Inner Join.
friend, my example above is only the example.
make sure you undertsand how to build a sap query in general.
never set many tables at once. insert 2-3 tables, return to your query (SQ01) or create it, adjust it and test. step by step - table by table. add the new table in infoset, add the fields, generate it and come back to your query. adjust it and test.
good luck! -
ABAP Query Shows duplicate records
Hi
I have a ABAP query which links the VIQMEL table(notifcation number) and the VBAK table(order & net value). The report outputs as:
Notification A Order 10 SO value 1000
Notification B Order 10 SO value 1000
Notification C Order 10 SO value 1000
Notification D Order 10 SO value 1000
The problem is the value is repeated 4 times when we only want it shown the once, is this possible to do and if so how can this be done?
thanks
JoeDesp09 wrote:
Hi
>
> I have connected
>
> EKKO-EBELN to EKPO
>
> EKPO -EBELN and EKPO-EBELP to the same of EBAN
>
> also EKPO-BANFN and EKPO-BNFPO to the same of EBAN
>
> EBAN-BANFN and EBAN-BNFPO to VBEP
>
> VBEP-VBELN to VBAK-VBELn
>
> VBAK-VBELN to VBPA-VBELN
>
> VBPA-ADRNR to ADRC-ADDRNUMBER.
>
> This is the first time I have created a query so if you can kindly explain the logic of the error it would help in my future reports.
>
> Thanks
> Priya
Hi Priya,
You can simplify the process if you make use of the LDB, which will fetch the same report with std LDB available in the system.
You can define multiple infosets and pull the fields for easier approach.
Regards
Shiva -
HELLO SD MASTERS,
I have created a ABAP QUERY by linking tables VBAK - VBAP - VBEP- LIKP -LIPS.
Data is not fetching when i combine all the tables.but data is fetching when first three sales order header,item & schedule line tables VBAK , VBAP,VBEP is combined.What would be the reason
Please help me out
REGARDS.
RAJESH KUMAR RAJUhi rajesh,
just make the link with primary and forien key fields of table which u have used.
regards,
seshu. -
Abap query, join between same tables
Hi,
I have an Abap Query (SQ01), I need to create a join between the same table (ESLL-ESLL) to obtain the services from a PO. The join is with the packno from ESLL to subpackno from ESLL (the same table). But I don't know how I can do that with Abap Query. Because the Infoset doesn't allow inserting the table two times.
Somebody can help me.
Thanks.
VictoriaHi:
I was able to create a query to retrieve the service lines entries using tables ESSR (Header) (service entry sheet number as input parameter), linked to package number to view ML_ESLL and then from the view the sup-package number linked to ESLL. That way I was able to retrieve all the service lines information from table ESLL only using SQ02 and SQ01, no ABAP.
I Hope this help.
Juan
PS: I know the post is old but may be there are people out there with no ABAP access who needs to create reports for Service Entry Sheets lines. All the join conditions are.
Table Table
ESSR EKKO
ESSR ML_ESLL
ML_ESLL ESLL
ESLL ESLH
Edited by: Juan Marino on Jan 23, 2012 10:53 PM -
Can we join two totals tables in ABAP Query
Hey Gurus!
Can we join two totals tables in ABAP query.
I am tyring to join FAGFLEXT with internal orders totals table.
Thanks
SHi,
Report painter majorily operates around characteristics and key figures.
ABAP query comes even more handy. The advantage is -
1. You can link many tables
2. Create selection screen as you like to have
3. User friendly report creation
4. Logic can also be coded.
5. Authorization can be set
I have written a article in SDN, which gives you an idea as to how to go about using ABAP query. Have a look on this - [Article - Practical Usage of ABAP Query|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f6b256-23be-2b10-8b93-cad83a617634]
Regards,
Sridevi -
Need to delete a table join in ABAP query
Hi
I have created an ABAP query with a join over AUFK, AFIH, AFKO, AFVV, AFVC and AFRU.
I need to delete the table AFRU from the join. I tried to delete the table in the edit option in the Join table option. I deleted the links between the table AFVC and AFRU and clicked on delete table option. I get the message Table AFRU not used. Please let me know if there is any method to delete the table.
Thanks and Regards,
Ajithu have to break the link between this table and other tables...U need to delete where conditions and then delete the join...
-
Hi all,
Can we use internal table in ABAP/SAP Query (Infoset - SQ02)? If yes, Pls guide me on the same.
Thanks in advance
Regards
Madhumathi Ato my knowledge u can't use internal tables in ABAP query...it is a mix of tables...
-
Hi,
I'm new to ABAP Query. I want to include a table and join with an existing table in abap query. how to do this?Hi
select lipsvbeln lipslfimg likp~wadat
into corresponding fields of table ltab_orders
from lips join likp on ( lipsvbeln = likpvbeln )
join vbfa on ( lipsvbeln = vbfavbelv )
where lips~matnr = matnr
and lips~vbeln in vbeln
and likp~vbeln in vbeln
and vbfa~vbelv in vbeln
and lips~werks in werks
and likp~wadat in datum
and vbfa~vbtyp_n = 'Q'
and vbfa~vbtyp_v = 'J'.
Thanks,
Neelima. -
Hi,
I have an requirment to create a abap query report .For that one i have to use a pooled table as join with another table?
Is that possible or not?
Reagrd
RickyHi,
You can use the tables in ABAP query but not in the direct join format.
For e.g.
Select "data" from BSEG into correspoding fields of table itab.
select "data" from <tablename>
into correspoding fields of table itab1
for all entries of itab
where <conditions>.
Thanks & Regards -
Need to create an ABAP query on 2 tables BSIK and BSAK
Hi,
I need to create an ABAP query which has the fields document no, doc date, amount in doc currency and some other fields from 2 tables BSIK and BSAK. Is it possible to write a single abap query to fetch the data from both the tables.
The selection screen fields are doc number, date and doc type.
I need to display invoices for open items and cleared items together.
Please let me know if this is possible.
Thanks and Regards,
AjithSee if this is anything like what you need:
REPORT ztest MESSAGE-ID 00.
TABLES: bkpf, bseg.
SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs,
s_belnr FOR bkpf-belnr,
s_gjahr FOR bkpf-gjahr,
s_blart FOR bkpf-blart,
s_budat FOR bkpf-budat.
DATA: BEGIN OF bkpf_int OCCURS 0.
INCLUDE STRUCTURE bkpf.
DATA: END OF bkpf_int.
DATA: BEGIN OF bseg_int OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA: END OF bseg_int.
DATA: BEGIN OF bsik_int OCCURS 0.
INCLUDE STRUCTURE bsik.
DATA: END OF bsik_int.
SELECT *
FROM bkpf
INTO TABLE bkpf_int
WHERE bukrs IN s_bukrs
AND belnr IN s_belnr
AND gjahr IN s_gjahr
AND blart IN s_blart
AND bldat IN s_budat.
SORT bkpf_int BY bukrs belnr gjahr.
SELECT *
FROM bseg
INTO TABLE bseg_int
FOR ALL ENTRIES IN bkpf_int
WHERE bukrs = bkpf_int-bukrs
AND belnr = bkpf_int-belnr
AND gjahr = bkpf_int-gjahr
AND koart = 'K'.
SORT bseg_int BY bukrs belnr gjahr buzei.
LOOP AT bseg_int.
MOVE-CORRESPONDING bseg_int TO bsik_int.
READ TABLE bkpf_int WITH KEY
bukrs = bseg_int-bukrs
belnr = bseg_int-belnr
gjahr = bseg_int-gjahr
BINARY SEARCH.
IF sy-subrc = 0.
MOVE-CORRESPONDING bkpf_int TO bsik_int.
APPEND bsik_int.
ELSE.
MESSAGE e001 WITH 'Error during read'.
ENDIF.
ENDLOOP.
Rob -
hi.
i need to create an ABAP/sap query. when i created the InfoSet i used logical db-pnp.
if i want to get only the employees which entered my organization during the last month where should i add the ABAP code, under which section => extras -> code. i have there several options - data, initialization, at selection-screen output etc, what to choose??????????
thanks,
AmiHi
Welcome to SDN forum
query has got some limitatins compared to Reports which we write using SE38
these queries are user specific and client specific and can't be transportable and you can't write your own code as you wish like reports
see the doc
http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Step-by-step guide for creating ABAP query
http://www.sappoint.com/abap/ab4query.pdf
ABAP query is mostly used by functional consultants.
SAP Query
Purpose
The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
Features
SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
All the data required by users for their lists can be selected from any SAP table created by the customer.
To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
use either SQ02 ans SQ01
or SQVI tr code
for more information please go thru this url:
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
http://goldenink.com/abap/sap_query.html
Please check this PDF document (starting page 352) perhaps it will help u.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
check the below link will be helpful for u
Tutorial on SQVI
once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
Regards
Anji -
Short Dump While selecting Variant for ABAP query
Hi,
ABAP query is going to short dump (CONNE_IMPORT_WRONG_COMP_LENG) while selecting a Variant. If i create and use variant then i am able to see Output of Variant.But not able to use Earlier created variants .
I think some mismatch between variant values and selection screen fields.Can anyone tell me how to rectify this ?
I am not able to debug the code as dump is coming in a System program(RSDBSPVD).Can anyone tell me which database table i can use to get values of the Variant.
Thanks in Advance.
Nirmala KHi nirmala,
chk the links:
http://help.sap.com/saphelp_webas620/helpdata/en/c0/980398e58611d194cc00a0c94260a5/content.htm
http://help.sap.com/saphelp_webas620/helpdata/en/c0/9803a7e58611d194cc00a0c94260a5/content.htm
regards,
keerthi. -
Hi friends,
I am using PNP LDB in SQ02 .
i am selecting AT SELECTION-SCREEN in "CODE tab" but it's not selected
How to use "F4 help function module" in ABAP Query(SQ02).
Thanks & Regards,
Vallamuthu.MHi
Why you are using SQ01/02 query? you can't get all the facilities what you use in general abap program report
Query is basically intended for functional consultants to get the data by joining the tables
it is Client specific and user specific
You can't use all the events and F4 help like thing in them.
see the doc
http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
Step-by-step guide for creating ABAP query
http://www.sappoint.com/abap/ab4query.pdf
ABAP query is mostly used by functional consultants.
SAP Query
Purpose
The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
Features
SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
All the data required by users for their lists can be selected from any SAP table created by the customer.
To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
use either SQ02 ans SQ01
or SQVI tr code
for more information please go thru this url:
http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
http://goldenink.com/abap/sap_query.html
Please check this PDF document (starting page 352) perhaps it will help u.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
check the below link will be helpful for u
Tutorial on SQVI
once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
<b>Reward points for useful Answers</b>
Regards
Anji -
Hello Friends,
I have used SQVI for ABAP query but look slike it is only for inner join.
Is there a way that I could do left outer join, or any other way.
Please suggest.
Sterhi Ster,
in SQVI there is this graphical tool to link the tables. Just right click the thin line between the two fileds and choose 'left outer join'
hope this helps
ec
Maybe you are looking for
-
Hey guys need some advice. Trying to purchase a MBP and can't decide between the i5 and i7. I prefer the 13in cause I'm a college kid and I don't want to lug around a 15in. I have a 13in i5 the 2011 model, but I'm looking for a faster MBP. I use it f
-
Apple LCD Keeps flickering a balck screen while coneected to my Powerbook
I have attached my apple 24inch LCD screen to my Mac Powerbook and the LCD keeps flickering a balck screen in intervals. Can any one help?
-
Hi, Anybody is aware of a STO history report? through which i can come to know how many open STO line items are there which do not have delivery lines. i know we can use table EKBE but it can only be used for single STO and not for multiple STO and
-
Best practices for the datapush in Blazeds?
Hello, Currently I'm working on the data push using Blazeds. I'm currently wondering about the best practices that needs to be followed to reduce the hits to the server when using Data push/Increase the performance, Could you please guide me or direc
-
Getwa not assigned in SAPLSLVC
Hi All! I have a problem at the execution of an ALV. I have automaticaly the "Getwa not assigned" dump. I checked the name of the fields that are in fieldcatalog as I saw on the internet and checked my internal table has the same field than the field