SAP query HR
Hi All
I am trying to fetch records for wage type range between 8100 to 8214 for a particular finacial period .
I have written this provide statement.
e.g say a emp A which has 3 wage types 8110, 8150 , 8214 which are valid for the current period.
but this provide returns only one 8110. any idea how can I return all the three wage types.
provide * into wa_p0002 from p0002
into wa_p0014 from p0014 between pn-begda and pn-endda
where p0014-lgart between s_lgart-low and s_lgart-high.
rgds
C
hi ,
try this...
write the statment between provide , end provide.
provide * into wa_p0002 from p0002
* into wa_p0014 from p0014 between pn-begda and pn-endda
where p0014-lgart between s_lgart-low and s_lgart-high.
append wa_p0014 to t_poo14.
endprovide.
you are using work are..
always work area contains one field.
Regards,
Prabhudas
Similar Messages
-
Creation of SAP Query in SQ02 with Single Table With Condition
Hi All,
I want to Create SAP Query in SQ02 using single Table MCHA.
ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
i.e Suppose I am having actual data in MCHA table is like this for Material M1.
Plant Material Batch BatchCreationdate
P1 M1 B1 20.06.2007
P2 M1 B1 04.05.2009
P3 M1 B1 04.05.2009
But I want the Output of SAP Query is like this:
Material Batch BatchCreationdate
M1 B1 20.06.2007
That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
Please help me How write the code on single table in the SAP Query.
Thanks,
Kiran ManyamHi,
Your query should be like this:
Select MATNR CHARG HSDAT
from MCHA
into table t_mcha
where matnr = Materlal number from selection screen.
The structure of t_mcha should contain the fields that you select.
Then sort the table by date ascending
Sort t_mcha by HSDAT.
Hope this solves your problem.
Thanks,
Sowmya -
Hello ABAP Guru
I need a help here. trying to create SAP query joining three table VBAK VBAP KONV since KONV being cluster table I am not able to do that
thpough I am suceesfully establishe dthe link
VBAK-VBELN=VBAP-VBELN
VBAK-KNUMV=KONV-KNUMV & VBAP-POSNR=KONV-KPOSN
OSS msg says we have to write routine in sap query
but I never used that option
anyone has any clue on how to use cluster table in SAP query?
Thx
PraveenHi,
Inner Join can't be used for cluster tables.
Write a routine in SAP query as follows.
do inner join on vbak,vbap into internal table
itab.
select for konv for all entries itab .
Regards
Amole -
How to call SAP query in a program
Hi experts
I have created a query in SQVI its gives a result. Now i want this query to be used in my program. Is there any FM which gets the quary name and populates the result in iternal table. So that i can use that result.
I know without query you can write using the tables you can fetch the records but i just want to explore a new way to do things. If any body done such type let me know and also give some sample code or process how to achieve it.
Regards
VijayHi Siva
My final option is that only. That you can do any how. But my intension is to learn something new way. How to do copy the query and where to inject the code is there any example in wiki or artical for that. I want to something new. Old way of creating a report program is possible i want to do this way. If some body could help me out.
@ karthik
I have generated the SAP query and i got the program but when i view the code i dont find any select statment or where storing my input data. How to identity that i did in debug mode but am not sure where it pulls the data and where it put in internal table. Can you throw some light with example code or an article.
Regards
Vijay -
SAP QUERY report for vendor line items
Hi
I have created a SAP QUERY report for vendor line items with fields vendor no.,vendor name,amount,company code and period.But there is one line item i donot know from wher system is getting it picked with is not in that vedor account,when i compare with fbl1n.I checked the document number too...the same doc number is twice in my query report.One with correct amount and another with wrong one.How do i chk.Where did i go wrong in creating query.I used logical database KDF.
Please advise.i chked...how do we get the amount displayed in query...it just displays amount no debit credit symbol... i have selected BSEG-DMBTR field but no -/+ sign,how is it done in query,please suggest.
-
Hello everyone,
I need some help in creating a report in SAP Query based on user's processing Vendor Invoices and also Vendor Payments?
I would like to have the following columns to report on:
USNAM u2013 User Name (from BKPF)
BLDAT u2013 Document Date (from BKPF)
BELNR u2013 Document Number (from BKPF)
BUKRS u2013 Company Code (from BKPF)
BLART u2013 Document Type (from BKPF)
LIFNR u2013 Vendor Number (from BSEG)
NAME1 u2013 Vendor Name (from LFA1)
WRBTR u2013 Amount (from BSEG)
Vendor Invoice- I would like to restrict to only document type fields that are KA,KR,RC,RE,RN and ZE
Vendor Payment- I would like to restrict to only document type fields that are ZV,ZS,ZP,ZH and KZ
I have a few questions:
First is i am using a logical database (BRM as BSEG cannot be joined) to select my columns however i do not know how to pull the 'Vendor Name' from LFA1. I understand that this table is not in BRM but is there a way to add any extra tables to work along side the logical database?
Secondly, i have managed to report on all columns except the vendor name (from LFA1) and although i can restrict my output data based on document type fields, i need the report to only show the user's that have process vendor invoices & vendor payments only?
At the moment i have a list of restricted document type but cannot seem to jsut show only those users who have processed both in both processes. For example User A has processed a vendor invoice (which is shown) and the same user may have processed vendor payment (after searching through the long output list!)
I want all users who have doen one of the other process and only interested in those that have done both?
Any feedback is much appreciated and pelase let me know if i have not explained this problem properly (as i am a newbie in this area)
Many thanks
AmarHi Pascal,
Since the IT2501 is a "Simulated Time Infotype" you cannot look at the data in it, but you can confirm the data from the ZL cluster and the data from the employee. Since it is only this employee or a few employees, it is probably not the configuration of the time buckets for the IT2501, but you may want to make sure all time times are captured as you want. Then look at the time entries for this individual or individuals. Did they enter a time type that was not expected or configured? Is all their time approved and passed through Time Evaluation? Finally check the Master Data for the employee - is the Planned Working Time (IT0007) infotype correct or has it been recently changed? Is he in a special Cost Center (IT0027) or Project that is captured differently for time purposes?
Since it just one or a few individuals, I would suspect the Master Data and some inconsistant entry that affects the time cummulation for the IT2501.
Paul -
How can I define Double Click Processing in SAP Query ?
The first question is : How Can I define drill-down for SAP Query report ?
The second one : How can I program Double Click in SAP Query report for Different columns like ALV Grid processing ?you can attach a repot or at tcode etc in an SAP query using report assignment in SQ01 but as far as i remember you cannot attach multiple reports.
regards,
khusro habib -
How to find the report for the SAP query (Query exists in table AQLQCAT)
Hello Experts,
I need to find the tables used in the SAP Query but i don't have access to transaction SQ01,SQ02 and SQ03 to check the same.
Therefore i checked table AQLQCAT and got the SAP Queries in the system. Then searched for the reports that would have been generated for the same passing AQusergroupquery name* in transaction SE38.
But unfortunately the program does not exists for the given paramenter.
Could you please let me know how to get the report name for the SAP Query.
Secondly please suggest any other way of checking the tables used in the SAP Query.
Also the table name from where i can download the SAP Queries.
Thanks in advance.
Regards,
Rahul SinhaI suggest you a simple method.
Execute the query. When the selection screen is showed, go to menu and click to SYSTEM->STATUS.
Check the program name and double click it to access the program code.
Search for tables or functions into the source code in order to understand where data are taken.
If you do not find anything , go to the program atttribute and check for logic database, sometimes they are used....
Best regards. -
Error 'Unable to open file' when downloading SAP Query to Excel
Hi all
I'm running a SAP Query which is set to download straight to a spreadsheet (Pivot Table / Microsoft Excel). Intermittently it does not work - apparently at random (at least, I've can't recreate the error at will).
It does one of the following:
- Works ok, and creates the pivot table
- Gives an Excel error message 'Unable to open file', then returns to the 'save the data in a spreadsheet' popup when enter is pressed on the error.
- Does not issue error message, just goes to the 'save the data in a spreadsheet' popup.
In the last two cases, the excel pivot table sheet is not created.
Has anyone seen anything similar, or have any idea as to what is causing the problem?
Any help gratefully received!
Not urgent as I've found a way round - further testing seems to show that I don't get the error is Excel is already open - but in the past I've run many SAP query downloads without needing to open Excel first. I suppose it's possible that this is just something to do with the Excel setup at the user site
Message was edited by:
E GregoryHi,
Ensure that file name with same name and in same path should not be open while saving the data.
Award if it helps.
Jogdand M B -
Sales Order Text Lines in SAP Query
I have a requirement to output several text lines into a SAP query based around sales orders.
I have included some code to read the details into my query and get no syntax errors, however the report gives a blank output for each of the text fields included, despite there definitely being some text with the specified attribute ID and text object in the table STXL.
Where am I going wrong?
Please find the coding below for one of the text field I'm trying to extract:
TABLES:STXL.
DATA:
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
TDNAME LIKE STXL-TDNAME,
MYLINE LIKE TLINE-TDLINE,
ZE18_LINE(1200) TYPE C.
DATA:BEGIN OF LINES OCCURS 0.
INCLUDE STRUCTURE TLINE.
DATA:END OF LINES.
DATA:BEGIN OF MYHEADER.
INCLUDE STRUCTURE THEAD.
DATA:END OF MYHEADER.
CLEAR TDNAME.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = VBAP-VBELN
IMPORTING
OUTPUT = VBELN.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = VBAP-POSNR
IMPORTING
OUTPUT = POSNR.
CONCATENATE VBELN POSNR INTO TDNAME.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = 'ZAT2'
LANGUAGE = SY-LANGU
NAME = TDNAME
OBJECT = 'VBBP'
IMPORTING
HEADER = MYHEADER
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT FOUND = 4
OBJECT= 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT LINES.
MOVE LINES-TDLINE TO TEXT.
ENDLOOP.
ENDIF.Hi -
Please check in debuging.
check the value of TDNAME correctly populated with sales order no and sales order item.
You can cross check with the table STXH with TDNAME and see if any entries is available for TDID 'ZAT2' as your case.
Here are sample code.
DATA : lv_tdname TYPE tdobname,
lw_line TYPE tline,
li_line TYPE STANDARD TABLE OF tline.
CLEAR : lv_tdname , li_line[],
cocatenate w_vbak-vbeln w_vbap-posnr into lv_tdname.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ZAT2'
language = 'E'
name = lv_tdname
object = 'VBBP'
TABLES
lines = li_line
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
CLEAR lw_line.
loop at li_line INTO lw_line .
* Put your logic
endloop.
ENDIF. -
Report from SAP Query due by universe
Guys,
I create universe based on SAP Query.
Now I want to build BO report.
So I connect a Universe drag to window my objects, but when I push Run Query I receive error:
A database error ocured.
The database error text is:
The MDX query SELECT { [Measures].[D4M5A7PITT7CVVVC8GMZS6QIH] } ON COLUMNS , NON EMPTY [WLENTITY].[LEVEL01].MEMBERS ON ROWS FROM [Z_ROSDOB/REP_20081202071548] failed to execute with the error See RFC trace file or SAP system log for more details. (WIS 10901)
I can easily build reports based on other queries or cubes.Hi Roman,
This is normally a connection issue when connecting to RDBMS rather than infocubes. a couple of questions
Is you universe set up to pass through the authentication or is it using a specific logon?
Does the user running the report have the appropriate responsiblities to run the query?
Regards
Alan -
How to display long text in SAP Query ALV layout? It only show 129 char now
I have a SAP Query which show a remark field(Max length more than 500 char), but it only show max length 129 char now. In fact, the lenght of remark field text is more than 300, and i had debug the source code, the field text value do is correct, its length do is 376.
Do anybody can help me solve the issue, let the query ALV layout can show the long text field value?
thanks very much in addvance.Hi,
ALV can show only a restrict value length around 128 characters, many experts said that we can not extend. many suggestions is split text into some column.
Regards, -
Error while creating report from BW SAP Query
Hi
While creating a report from BW SAP Query, I get the following error.
"An error occured while creating a report template.No error"
On opening the same query in BEx Analyser, i can see the fields and output.
Help me on this issue.
Thanks
Eswari.Hello Garett,
I've the same problem and have tried now to get the data with MDX-Query. The error message below appears:
'No RFC-authorization for function group /Crystal/MDX for User ...'
So it seems to be a authorization problem. Which special authorization must be assigned to Crystal users in SAP BI?
Thank you for your help.
best regards
Oliver -
Assigning a SAP Query to Transport Request
Hi Friends
I have a SAP Query, now I want it to transport to the other system, while saving the query it is not prompting for transport request. Is there any possibility to assign that SAP Query to a transport request, if yes, please let me know the process.
Regards
PraveenDear All,
This regarding creation of SAP Query .
Situation:
Infosets and User Groups were created in a DEV SERVER CLIENT 200 and saved in a request ie.REQ01
Now i wanted to create a Query QU01 in the Same User Group in DEV SERVER CLIENT 210 so i tried creating a Infoset but i get this error message
Note: I am not able to create & save an Infoset.
Message no. TK414
Diagnosis
You cannot edit request D01K901880 of user X00012, since this request is reserved for changes in client 200. You are logged on to client 210.
Can anyone clear this error? what is the solution?
Thanking You
Andrew -
Could anyone provide the complete manual of SAP Query Creation
Hi,
Now I am learning to create SAP Query.
I viewed many questions and answers about SAP Query.
Some mentioned this,and some did that...
Could anyone provide a complete manual of SAP Query Creation for developers.
I can create SAP Queries step by step with it.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
useful
http://www.erpgenie.com/abap/code/abap47.htm
regards,
Prabhu
reward if it is helpful -
Question on creation of t-code for SAP query
Hello,
I posted a thread in here back on 06/20/2007 asking for help on creating a t-code for a SAP query. one of the responses that I recieved was
<i>"Sure, all you need to do is get the report name which is generated by the query. You can find this in SQ01, select the query and from the menu, Query, More Functions, Display Report name. Then go to Se93 and create the tcode with this report name."</i>
the report name was AQFKZFINANCE====GL_FRANCE=====.
I created the t-code using this name. I had it transported to my QAS system an now we are getting a error stating that the the program is not found.
When I check in SE38, I can see this program AQA0ZFINANCE====BP_RECON====== in both my development system and my QAS system.
Should I have created in the t-code using the AQA0ZFINANCE====BP_RECON====== instead of the AQFKZFINANCE====GL_FRANCE===== program?
Is there any reason why the program AQFKZFINANCE====GL_FRANCE===== would not be in QAS?
I do not have access to SQ01 in our QAS system so I cannot perfrom the process stated above.
thanks in advance for the help.Hi,
Please check this thread perhaps it may help.
Re: How to create TCode for Sapquery
Regards,
Ferry Lianto
Maybe you are looking for
-
Java null pointer exception in Executing interface
I am using MS Access as source table. I am populating this data into oracle target table. when i execute the interface I get the following error in in the LKM. java.lang.NullPointerException at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDri
-
How do I get Java script void (0) to work?
Hi, Ever since downloading the mountain lion i have found issues, particularly with St George Bank Bpay that I am unable to load some pages due to the Java Run Script Void (0) being shown..... How do I fix this? I know it isn't a bank issue as other
-
Read messageID without Java Mapping
Hello, is there a simple way to read the messageID and assign it to a target element without using a Java Mapping? Background is that I want to use a messageID as correlationID in a BPM send step. Maybe by using a UDF. Thank you for your help.
-
& (ampersand) in 10g form
Hi All, We have some issue about the & (ampersand) functionality in 6i forms which is not found in 10g form. We successfully convert the forms from 6i to 10g but when the users do their TESTING they found out that the & (ampersand) functionality was
-
Hi, I purchased Final Cut Express HD 3.5 a long time ago. Later I upgraded to Final Cut Express 4. I installed it without problem and without entering my serial number. Now I got a new motherboard for my Mac (because of a defect of the graphical proc