SAP ABAP Query
Hi,
Standard aging analysis report (RFDOPR10) displays only the customer line items. But the client also wants to display the offsetting line item details. I am a functional person and I am trying to write a query to generate offsetting line items from Table BSEG. (in SQ01). I am using Logical Database - DDF, which has BSID and BSEG table. I am trying to apply the logic,
For Example - If the accounting document has 4 line items(1,2,3,4) and the line item in BSID table is 2, then select items 1,3,4 from BSEG table for the documnet number and output as separate line items.
I dont have ABAP knowledge to write code. Kindly help with your valuable inputs to create a query to get offsetting line item details.
Thanks & Regards
Sri.
thanks for the support
Similar Messages
-
SAP ABAP Query not generated after upgrade
Hi All,
Our client has upgraded from 4.6c to ECC 6.0
In the upgraded server some SAP Queries have not been generated and others have generated. I wanted to know why all are not generated .
I also wanted to know if any table name exists which maintains query with generated program name
Please let me know your learnings on SAP/ABAP Query if any
Thanks in advanceI forgot to mention that FM will just give u the report name..wont generate it.
I dont think the report name is saved in any tables... it is generated ...
but u can derive the report name..if u know the user group and query name.. by concatenating those ..
for details..look into the code for that FM -
SAP / ABAP Query - using logical database
Hi ,
We have a mandate to implement SAP Query using only Logical Databases (LDB ) .
We understand that there are several issues using this approach .
1 ) Paralled tables in MM need to be displayed on separate lines .
2 ) Statistics based on fields from 2 different tables cannot be produced eg: EKPO ( PO Number ) and EKKN . (Cost Center )
Please share your experiences .
Thank you in advance .
Kishore
KishoreAdeel,
I do appreciate your experience and respect you for knowledge on SAP Query.
Joining tables seem simple to IT experts but not so for end users. SAP Query is an end-user tool and users seem to need a simple user-friend, drag-and-drop solution to extract information using SAP Query based on a pre-defined infoset. Various SAP conferences have been advocating the use of SAP delivered Logical Databses to create infosets in order to harness the various advantages of LDBs.
In MM there are several LDBs (e.g. ELM, EBM etc) to create queries on EKPO and EKKN. The problem arises when you use the same LDB to extract information from more than the above two tables e.g. EKPO, EKET, EKKN and EKBE. SAP expects you to display fields on multiple lines and also does not allow producing statistics based on fields from two parallel tables say EKKN and EKBE. Moreover, multi-line reports cannot be produced in the ALV/SLV format.
We are also looking for best practise solutions in providing SAP Query to MM or FI users based on SAP delivered Logical Databases.
Pascal -
SAP ABAP query based on Infosets
Hi All,
We have requirement where in we will be joining 7 tables in Infoset . Dataset1
We have another 3 tables to be joined separately . Dataset2.
We need to compare the dataset 1 with dataset 2 and show the final data in output .
How can we achieve this in SAP query . If anyone has worked on this type of requirement .
Let me know ,
Thanks in Advance,
USRI believe that you can only use one infoset per query. To do any comparison, you'd need to build two separate queries and then compare the results in Excel, for example. 7 tables seems rather extreme to me though...
-
ABAP QUERY PROGRAM OUTPUT SHOULD DISPLAY FROM SAP SCRIPT.
THIS IS MY URGENT REQUIREMENT ...
I DONT KNOW ABAP QUERY PROGRAM ..
PLEASE SUGGEST ME A WAY ON THIS ....
Functional requirements
Introduction
The wish of the customer is a printable customer overview. All desired fields will be shown in a new query called ZZADDRSS_CO. Double entries are taken for granted because of the data taken from the sales area and because of multiple contact persons. The customer accepts this. It should be made possible that the user creates and saves its own variant.
A second overview is needed, another ABAP will be developed for this requirement. This ABAP will show all the customer data and this list will have the possibility to be printed.
Solution
New Query ZZADDRESS_CO
The desired fields of attachment 1 need to be shown in the query.
The selection criteria are shown in attachment 2.
The column names of the additional data have to changed in the query.
Customer Overview.
Functional specification.
On behalf of this customer overview a standard SAP transaction will be used (transaction VC/2).This transaction will be extended.
The fields are shown on screen with the described headers. Printing of the overview will be done via SAP script. The script makes use of a fixed layout of the data.
The selection criteria are specified in attachment 2.
The layout of the customer overview and the SAP Script are specified in attachment 3.
Specification.
The next steps need to be performed.
1. A routine per infoblock need to be created in Include RV77UNNN. In this routine the data is retrieved and written down to the screen and script,
Example LST1_901 . In include RV77SNNN you can find the standard infoblocks.
2. Adapt via transaction SE16 table TFRM.
3. Create a new view in the customizing (sales and distribution- Sales support-sales summary-Assign Reporting Views).Assign the new view to the infoblocks.(Example view 001 is assigned to block 901).
4. In customizing it is not possible to assign the correct window and element to the infoblock .so this is done via SE16 in table T182A.
5. Adapt script. Copy script SD-SALES-SUMMARY to a Z-SALES_SUMM.
Assign this new version to the new view in customizing. Create in the main window the element who writes the data on behalf of the print.
Attachment 1 Desired fields
Header: Address
~ Customer number KNA1-KUNNR
~ Title KAN1-ANRED
~ Name1 ADRC-NAME1
~ Name2 ADRC-NAME2
~ Name3 ADRC-NAME3
~ Name4 ADRC-NAME4
~ PO Box ADRC-PO_BOX
~ PO Box POSTAL CODE ADRC-POST_CODE2
~ PO Box city ADRC-PO_BOX_LOC
~ Telephone no1 ADR2-TEL_NUMBER 1ST RECORD
~ Telephone no2 ADR2-TEL_NUMBER 2ND RECORD
~ Fax number1 ADR3-FAX_NUMBER 1ST RECORD
~ Fax number2 ADR3-FAX_NUMBER 2ND RECORD
~ E-mail ADR6-SMTP_ADDR
~ Search item ADRC-SORT1
~ Notes ADRT-REMARK
Header: control data
~ VAT registration number KAN1-STCEG
Header: Payment transactions
~Bank country key KNBK-BANKS
~Bank key KNBK-BANKL
~Bank Account number KNBK-BANKN
Header: Marketing
~ Industry key KNA1-BRSCH
~ Industry code 1 KNA1-BRAN1
~ Industry code 2 KNA1-BRAN2
~ Industry code 3 KNA1-BRAN3
~ Industry code 4 KNA1-BRAN4
~ Industry code 5 KNA1-BRAN5
~Annual sales, currency, year KNA1-UMSA1, KNA1-UWAER, KNA1-UMAH
~ Yearly no of employees, year KAN1-JMZAH, KNA1-JMJAH
~ Fiscal year variant KNA1-PERIV
~Legal status KNA1-GFORM
Header: Correspondence
~ Our account number at customer KNB1-EIKTO
Header: sales
~ Sales office KNVV-VKBUR
~ Customer group KNVV-KDGRP
~ ABC-classification KNVV-KLABC
Header: Invoice
~Tax classification KNVI-TAXKD
~Terms of payment key KNVV-ZTERM
~
Header: Contact Persons
~Title KNVK-ANRED
~Name KNVK-NAME1
~Advertising material KNVK-NMAIL
~Martial Status KNVK-FAMST
~Notes KNVK-PARAU
~Function KNVK-PAFKT
~Department KNVK-ABTNR
Header: Partnerroles
~Personnel Number KNVP-PERNR
~Name of employee PA0001-ENAME
Header: Additional Data
~Attribute 1 KNA1-KATR1
~Creation date KNA1-ERDAT
~Attribute 2 KNA1-KATR2
~Change date of field KNA1-KATR2 CDHDR-UDATE
~Attribute 3 KNA1-KATR3
~Attribute 4 KNA1-KATR4
~Attribute 5 KNA1-KATR5
~Attribute 6 KNA1-KATR6
Attachment 2 Selection fields
~Customer number
~Sales office
~Personnel Number
~Sales Organization (default NL01)
~Industry key
~Industry codes (1 till 5)
~ABC- classification
~Creation date
~Attribute 1
~Attribute 2
~Attribute 3
~Attribute 4
~Attribute 5
Attachment 3 Customer overview + SAP Script
Customer master data sheet: 11490 Page1
Requested by karen Dunnewold Date: 25.08.2004
Address
(Default SAP script ADDRESS statement)
Title
Name1
Street + number
PO Box city
Country
Search term: ADRC-SORT1
Telephone 1: ADR2-TEL_NUMBER 2: ADR2-TEL_NUMBER
Fax 1: ADR3-FAX_NUMBER 2: ADR3-FAX_NUMBER
E-mail: ADR6-SMTP_ADDR
Notes: ADRT-REMARK
PO BOX
ADRC-PO_BOX
ADRC-POST_CODE2 ADRC-PO_BOX_LOC
T005T-LANDX (T005T-LAND1 = ADRC-COUNTRY)
Control data
VAT registration number: KNA1-STCEG
Payment transactions
Country: KNBK-BANKS Bank-key: KNBK u2013 BANKL Bank account: KNBK-BANKN
Marketing
Industry KNA1-BRSCH Industry Description
Industry code1 KNA1-BRAN1 Industry Description
Industry code2 KNA1-BRAN2 Industry Description
Industry code3 KNA1-BRAN3 Industry Description
Industry code4 KNA1-BRAN4 Industry Description
Industry code5 KNA1-BRAN5 Industry Description
Figures
Annual Sales KNA1-UMSA1, KNA1-UWAER in KNA1-UMAH
Employees KNA1-JMZAH in KNA1-JMJAH
Legal status KNA1-GFORM description
Customer master data sheet 11490 Page 2
Requested by karen Dunnewold Date: 25.08.2004
Contact Persons
KNVK-ANRED
Mailings: KNVK-NMAIL Notes: KNVK-PARAU
KNVK-ANRED
Mailings: KNVK-NMAIL Notes: KNVK-PARAU
Correspondence
Our account number at customer KNB1-EIKTO
Sales
Sales office KNVV-VKBUR Description
Customer group KNVV-KDGRP Description
ABC-classify KNVV-KLABC
Currency KNVV-WAERS
Invoice
Terms of payment key KNVV-ZTERM Tax classification KNV1-TAXKD
Description
Partner (Leave SAP default)
Partnerrole Number Name
KNVP-PARVW KNVP-KUNNR NAME1
KNVP-PARVW KNVP-KUNNR NAME1
Additional data
Attribute1 kna1-katr1 Description
Attribute2 kna1-katr2 Description
Attribute3 kna1-katr3 Description
Attribute4 kna1-katr4 Description
Attribute5 kna1-katr5 Description
Attribute6 kna1-katr6 Descriptionhi narayana
i think u need to write a driving program and a provided with a smatform u sit along with the SD consultant.
ur further views can be shared.
Rgs,
Venkat. -
What is the diff between ABAP Query and SAP quary?
Balu,
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.
Check out these links.
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.
Kindly reward points by clicking the star on the left of reply,if it helps.Kindly close your previous threads if your problem is solved and reward points for helpful answers.
Don't forget to reward if useful... -
How to put ABAP Query Report to SAP Area Menu or Create transaction code for ABAP Query Report? Kindly help me.
ThanksPlease see the following thread. It should do what you need.
Re: How to create TCode for Sapquery
Once you get the tcode created, use SE43N to add the custom tcode to your area menu.
<i><b>
Kindly reward points if helpful.</b></i>
Regards,
Minami -
Is it possible to write an abap code be SAP SQL query.(ECC 6)
hello guys,
Is it possible to write an abap code be SAP SQL query.
Scenario : table A has a field say f1 of length 10 and table B has a field say s1 of lenght 20. in sap sql i am able to link all the other tables but i am not able to link
table Af1 --->Table Bs1. as the length doesnot match. so is it possibel that using abap code I can pick 10 characters from table A field f1 adjust it to 20 characters using abap and map it to field s1 of table B.
Please let me know how to accomplish this if possible.
thanks in advance!!Herm,
Adding code is done in the infoset.
Please do following:
> Goto SQ02
> Type in the infoset that the basis for your query, <change>
> Press <code> OR <shift><f8>
> Tou'll see 4 tabs: Extras, Selections, Code, Enhancements.
> GoTo tab Code
> Choose the coding section (<f4> gives you an overview)
> Enter the code.
You may set a breakpoint to see what the query in SQ01 will do with it.
Succes!
Frank -
How to retrieve ABAP query field metedata using SAP JCO?
How can I retrieve all field details (such as field name, field description, output length field type) using SAP JCO for an ABAP Query?
I have query name, user group, query area and infoset name with me.
ThanksHi,
Please use the DDIF_FIELDINFO_GET (standard) Function Module to retireve the details which you have mentioned.
Thanks,
Arun -
Diff between sap query and abap query
diff between sap query and abap query
Hi,
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,
vasavi.
reward if it is helpful. -
What is Abap Query and SAP query
hi
i don;t know about ABAP and SAP query . what is the different between ABAP and SAP query.. if any example is there please tell me
thanks
pauldharmaHi Dharma,
chk these links:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40bec8da-4cd8-2910-27a9-81f5ce10676c
http://jelajahsap.wordpress.com/2008/01/07/an-example-of-abap-query/
Thanks,
Keerthi -
Hi,
I just want to know the difference between SAP Query & ABAP Query.
How to procede with these two methods,Which method is used for which purpsoe.
In which cases SAP Query is prfered or in which cases ABAP Query is prefered.
Thanks in Advance,
Irfan HussainHi Irfan,
This is what sap help says,
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.
Regards,
Ravi -
Gross Salary Report Need to develop in ABAP Query -sap-hr
Dear Experts,
i need to create salary report through ABAP-query.
i have following below stops.
1)Create user group thorugh SQ03.
2) Having problem in creating Infosets,as i need to use PNPCE as ldb and p9001,p9002,p9008,p9000,p90402.but when i am created infoset it is showing in order p9000,p9001,p9002,p9008,p90402.and i am not finding any where join condition,how will i join these.
Didnt find any tutorials..for HR abap-query
please advice.
Thanks & Regards
AnwarDear Experts,
i need to create salary report through ABAP-query.
i have following below stops.
1)Create user group thorugh SQ03.
2) Having problem in creating Infosets,as i need to use PNPCE as ldb and p9001,p9002,p9008,p9000,p90402.but when i am created infoset it is showing in order p9000,p9001,p9002,p9008,p90402.and i am not finding any where join condition,how will i join these.
Didnt find any tutorials..for HR abap-query
please advice.
Thanks & Regards
Anwar -
SAP HR : ABAP Query / Infotype enhancement / Field in Q0168 & not in P0168
Hi all,
There is a field in the structure Q0168-CSTDT, the field can be seen in the PA20/30 screen under the costs tab.
This field is not there in the P0168 structure.
The requirement is to add this to the ABAP Query.
What steps should be taken ? Do we need ABAP coding ?
Thanks
RahulHi,
Use Fm : HR_BEN_GET_KEY_DATE to get the Benefit Cost Calculation Date ..
Look at include MP016840 for the same.
Look for F1 on the field in pa20/pa30 , you'll get an idea on how this field is calculated.
Regards,
Srini. -
Query About the SAP ABAP Module
Hello My name is Anuj Chaturvedi. I have doing a MCA Course(VITH semester). I want to do a SAP ABAP Module. So Please suggest me that ii is gud for me? Also tell me something more about the ABAP Module. Kindly reply me soon.
Thanks
Anuj ChaturvediHello My name is Anuj Chaturvedi. I have doing a MCA Course(VITH semester). I want to do a SAP ABAP Module. So Please suggest me that ii is gud for me? Also tell me something more about the ABAP Module. Kindly reply me soon.
Thanks
Anuj Chaturvedi
Maybe you are looking for
-
Error while creating a RFC model for WD for Java
Hi, While trying out the example(TutWD_FlightList_Init.zip) for model programming in the NDS,I got the following error when I try to create a model: Plugin Name Web Dynpro Model Editor Services Plugin Id com.sap.ide.webdynpro.service.modeledi
-
Extended Analytics Flat File extract in ANSI
Hi, Version: EPM 11.1.2.1 The Flat file extract using Extended Analytics from HFM is exported in UNICODE format. Is there any option to get the export in ANSI code format? Thanks, user8783298
-
Create min(date) for Customer in BMM layer
Hi guys, I need help in creating a first order date for a customer. I want to do this in BMM layer and use directly in reports. How should i create this? Any help Appreciated.
-
Buffered Function Modules for EKKO, EKPO, EKBE, EKES etc
Hi, Could you please let me know of some buffered function modules for reading data from EKKO EKPO EKBE EKES EKET? Regards, Suraj
-
ActiveX-Control in C++ LoadFile does not work
I tried to use the ActiveX Control in my C++ Application. But when i try to call "LoadFile", it does not work. Everytime i call it i get a "false" as response, but i don't know why it is not possible to open that file. I tried everything i could imag