SQ01 problem
HI,
i have to create a simple query using tables VBAK and VBAP...but this query should contain top 100 most materials sold between date1 and date2.
How can i do this? I mean where i put the query which group materials and make a count ?
Thank you.
hi,
You need to create a 'Ranked list' in SQ01 for displaying top 100 records of materials on price basis. For this, click on 'Ranked list button'. Give 100 as input in 'No of places' tab . Give the sequence number as 1,2,3 etc. in 'No' tab for the fields which you want to display . Choose the radio button 'Crit' , as criteria , for the field base on which you selecting top 100 records, for example in you case it is sold price of materials. Check the checkbox 'ASC' for displaying records in ascending order . You need to give the appropriate unit in 'UNIT' tab. Thus it creates your ranked list. Now you can choose the output sequence by pressing CTRL + F4. Rest other conditions like fields only in particular dates , that you can do it in infoset for that query.
Similar Messages
-
Hi All,
I have a requirement to create adhoc query in which I cannot use logical database PNP in infoset, so I have to use joind for different infotype tables.
I have to create an infoset in SQ02 for quite a few tables, PA0000, PA0001, PA0002, PA0006, PA0041, PA00105 and just a few to name.
1. Now, how do I create join? If I put a join on pernr of each table then it will bring me multiple rows of history of all infotypes involved.
2. How do I put dates on selection screen, there will be begda and endda in each infotype, I would need only records that are active from each infotype.
3. Do I need to join on begda and endda on each infotype? I dont think so.
Most importantly, can it be acieved through SQ01 or I am barking up the wrong tree?
Thanks for help, and I will award points for all usefull answers.
~ Monkey.First make yourself clear what you have to do if you do not use LDB:
1. Time calculation and split handling
This will be the first challenge. Imagine 5 Infotpyes with 3-5 time intervals each and its split calculation and handling.
2. Authorization check.
You have to ensure that authorization check is done right the same as in the rest of HR. Of course with direct selects you have to reprogram everything that is there for PA and PD side
THese two points alone are several years of development.
3. Special handling
There are some infotypes and fields that have special handling like repeat fields, indirect evaluation, calculated/derived values
4. Automatic text recognition
This is done with no effort at all in an HR InfoSet. Imagine you need to get all the texts by yourself and again with the correct time etc.
So to be honest I think your approach is simply not feasible.
Instead you should examine the query closer.
No there is not always an inner join. If there is no data the fields are empty but the pernr of course is processed.
Only if you select for this field then the pernr is skipped if the condition does not match.
Further there are a lot of switches available please see [note 305118|https://css.wdf.sap.corp/sap/support/notes/0000305118] and the attachment HR_QUERY_GENERATOR_SWITCHES_EN.PDF for documentation of the same.
Again you should invest time what the tools already can instead of trying to develop everything again.
Regards,
Michael -
Code order in sq02, Problem in the selection fields in sq01
Hi all,
I'm writing a query with sq01 and sq02.
In sq02 I have some joined tables, and 2 extras fields named: "TIME" and "LEFT_ER".
in this fields I wrote a code to calculate something from fields in the tables.
The problem is:
1. When I write the code in the coding section "Additional field/structure" for each field, If I want to use this fields in the selection fields (in sq01) the query can't find any record.
But if I run this query without any selection in this fields, I get all the records, with my calculated fields.
2. I tried to write this code in the coding section "Record processing", and it seems that I can use this fields in the selection fields (in sq01), and get all the records I wanted.
But in the sq02 I get a Warning messages:
"Access error in code for additional field *GET******
*GET****** has sequence number 00
Access to LEFT_ER with sequence number 00"
In this case my field LEFT_ER has no code.
And when I change the order of the sequence number, I didn't get the Warning message, but I could not use my fields in the selection fields (in sq01), like at the beginning.
HELP ME PLEASE.
Itzhak.
Message was edited by: Itzhak TanamiHi,
i've an idea .
pls define your help-fields :
1) as sel-option : s_f1 for bseg-dmbtr
and
2) as calculate-field : c_f1 for bseg-dmbtr
so for event e.g. GET BSEG .
you <b>1st</b> calculate your field .
e.g.
if bseg-shkzg = 'H'.
c_f1 = Bseg-wrbtr * -1.
else.
c_f1 = Bseg-wrbtr.
endif.
and 2nd your restriction from sel-screen:
<b>check c_f1 in s_f1.</b>
good luck
Andreas -
SQ01 help for listing not used problem codegroup and code in notifications
Hi ,
I am making a query through SQ01 to find out how many damage codes created for a particular notification type are not being used .
In infoset I used QMEL which lists problem code group and problem code and as a bonus we also get codegroup text . When I test this query , I get damage code group and code used in all the notifications . I want solution for the following
1)How to list only distinct damage codegroup and damage code (Not per notification wise)
2)Which second table I have to use to get problem code short text
3)Which table I have to add in infoset and how join has to be created so that I get list of Damage codegroups and codes not used in notification .
NPBHi Pete ,
1)How to list only distinct damage codegroup and damage code (Not per notification wise)
I have output like
problem code group Problem code grp text Problem code Problem code text
MRTR Transformer problems 1 I need table here
MRTR Transformer Problem 1
MRTR Transformer problem 2
I need distinct output like
problem code group Problem code grp text Problem code Problem code text
MRTR Transformer problems 1 I need table here
MRTR Transformer problem 2
2)Which second table I have to use to get problem code short text
I need problem code table
3)Which problem code group and code not used
Suppose for notification type X I have configured damage catalog Q and Q has MRTR , MRAM , MRGT as code groups and each of them have their own codes (say 1 to 5)...If notifications are created only for MRTR and code 1 , 5
I need not used output like
MRTR 2
MRTR 3
MRTR 4
MRAM *
MRCT *
How can I achieve this using sq01,02 etc
NPB
Edited by: Narasimha Bhat on Feb 1, 2011 4:54 PM -
Very Urgent...problem while creating SQ01
Hi Friends,
When I'm trying to create sq01 it is throwing the error like"the User Nanditha is not assigned to any user group".
Pl help me to resolve this issue.
Thanks in advance.
NandithaGOTO SQ03
Enter the User group & also the User i.e. Nandita & the Infoset (optional), click on change --> tick the check box for all the User groups you want to assign the User.Save the details
SKR -
Problem in changing SAP query ME80FN in transaction SQ01
Hi,
I have added two new fields in list layout of the transaction ME80FN. When I execute this transaction it is executing ABAP QUERY REPORT ME80FN.
I added two new fields in infoset SAPQUERY/ME80FN via transaction SQ02.
Then trying to change the QUERY ME80FN via transaction in SQ01. It is saying locked by some user.
Can any one help me how to resolve this what to be done.
Thanks,
JWalaHi
I found this in another forum. It is simple to do it:
1. Go to SQ02 transaction (Infoset: Initial Screen)
2. Select or Highlight the Infoset corresponding to the query.
3. Go to --> Query Directory --> (you will see the infoset in the name being displayed) Execute.
4. Select the Query you would want to unlock.
5. Click on Cancel Edit lock button or Edit --> Cancel edit lock or Shift + F6
Done...!!!! Query is unlocked
José M Mercado -
SQ01 mass generation of quries problem
i need a sample code or FM for mass generation of SQ01 quries.bcz aftter changing in client i have to regenerate again all quries..so i want some workaround so i can perform this task in one go. any idea?
Hi,
i do not understand why this post is marked as "answered".
The recommended ABAP RSAQR3TR is not usable for the requested mass generation of queries.
(It only covers the transport aspect (export/import))
Can you please give us a short explanation or correct the status to "not answered"
There are two posts regarding the mass-generation of queries, but none of them contains a solution.
SQ01 - Generate program
Query - Mass generation
(The first one is at least a chance and usable via CATT or SE37)
Best regards
Christian -
SQ01 local field division problem.
i have a report in sq 01 and i want to divide two fields
so i pick local field and try to do it..but result not correctly but addition and substraction working fine.
any one tell me how perform division in sq01 local fieldI realize this post is very old, but the solution may help somebody else down the road.
Within the infoset, the setting for "Fixed Point Arithmetic" must be turned on (checked).
This is turned off by default when converting an SQVI into a Query within SQ00 or SQ01.
To turn on "Fixed Point Arithmetic". Go into infoset change mode in SQ02. Click Goto in the menu path and then Global Properties. Click on the setting for "Fixed Point Arithmetic" at the very bottom of the pop-up box. Regenerate the infoset. -
Hi to all,
I am working on SQ01 Queries, I need to change the priority of the feilds. let say example material number will dispay last on the bottom of theb screen. it needs to display in top of the screen. How we will change the priority of the input feilds. can any one help.
Thanks,
VamsiDear vamsi s
Its my suggestion that if you will make the reports by one of the reporting tool SQVI
Its very user friendly and easier to make the reports rather then Queries
Please let me know for more info
Regds
shailesh -
SQ01 DIsplay Problem (Can v write abap code ) Sql Query
Hi
Need help in SQL Query
I generated one sql query which has the following output in general .
Customer name description amount
asrq1 sharekhan Amount payed 10
asrq1 sharekhan Amount Advance 20
asrq1 sharekhan Amount due 30
but i need the output in the following way
Customer name AMount payed Amount Advance Amount Due
asrq1 sharekhan 10 20 30
and iam new this sql query but came to know we can write code ..but iam unable to initiliaze to write
a peace of code as i dont know what are the select-options defined ..i saw in the include but didnt got it
% comes prefix of select-options,and iam unable to get he internal table which is displayed in the query .
can anyone help me in this answers will be awarded points.First, I will suggest to go for ABAP report for this kinda requirement.
If you really want to go for it through SQ01, even then you will have to write some ABAP to display the records in one row. You will need to create three custom fields.
I will give Psudo for one field:
Field Name := ZAmountPayed
Select Amount_Payed into varAmountPayed from Table Where Emp# = '12345'
ZAmountPayed := varAmountPayed
Convert the above into relative ABAP code and create 2 more similar fields, and you should be all set.
You have to know the table names and any other calculations to get the right data. -
SQ01, SQ01 - Sql Query Dislplay problem
Hi
Need help in SQL Query
I generated one sql query which has the following output in general .
Customer name description amount
asrq1 sharekhan Amount payed 10
asrq1 sharekhan Amount Advance 20
asrq1 sharekhan Amount due 30
but i need the output in the following way
Customer name AMount payed Amount Advance Amount Due
asrq1 sharekhan 10 20 30
and iam new this sql query but came to know we can write code ..but iam unable to initiliaze to write
a peace of code as i dont know what are the select-options defined ..i saw in the include but didnt got it
% comes prefix of select-options,and iam unable to get he internal table which is displayed in the query .
can anyone help me in this answers will be awarded points.and transaction FBL5N does not work in your company because ... ???
-
SQ01 / SQ02: Query problem
Hello experts,
I'm creating one query about email addresses of customers. But I also want to display customers without email address.
The tables involved in query are: KNA1 and ADR6.
Table ADR6 contains the email address of customer, but not all customers have the emails address informed. Therefore not all customers have record in this table.
I joined table KNA1 and ADR6 by fields KNA1-ADRNR and ADR6-ADDRNUMBER as Left Outer Join.
When I execute query, the customers without any record in ADR6 are not displayed in the list.
How could I display on the query list also the customers without record in ADR6 ? (Displaying BLANK as e-mail address).
Thanks
JuanJuan,
What selection criteria u have taken? as i tried here the blank field are also coming and i have only taken customer number.
Thanks,
Raja -
Performance tuning for ABAP Query (created from t-cd SQ01)
Hello all,
We created ABAP Query report from transaction SQ01.
But the generated report has an appropriate SQL statement which causes performance problem.
To solve this issue, I guess the easiest way is;
0. Give up to use it.
1. Copy it to another object in the customer namespace.
2. Ajust SQL statement.
But I'm wondering if there're appropriate ways to adjust SQL statement of Query.
Could anybody give me any better idea?
Thank you
YukoYou can try this: Create 2 ranges, for objnr and cdtcode and fill like:
ra_objnr-sign = 'I'.
ra_objnr-option = 'CP'.
ra_objnr-low = 'OR*'.
append ra_objnr.
ra_code-sign = 'I'.
ra_code-option = 'CP'.
ra_code-low = 'CO*'.
append ra_code.
SELECT objnr udate utime
FROM jcds
INTO TABLE it_jcds
WHERE objnr IN ra_objnr
AND stat = l_tj02t
AND cdtcode IN ra_code
AND inact = space
Regards,
John. -
Problem with logical database DDF in ABAP query
Hi All,
I have created an ABAP query via the transaction SQ01 using the logical database DDF to retrieve customer master data from tables KNA1 & KNB1. The selection screen used is the screen 903 of the logical database DDF. But now the problem is that when I execute the query, I am getting a blank value in the tax code4(KNA1-STCD4) field though there is value in the KNA1 table for this particular field. This field was added to the table by means of a customizing include. Can anyone suggest a way to get around this problem so that I can view the content of the field STCD4 in the query.
Thanks and regards,
Sarath.I think it's not used by DDF.
so you must check it with:
check kna1-bran1 in s_bran1.
A. -
SAP Query (SQ01) - create and save queryies
Hi Expert;
We wanted to implement SAP query reporting (SQ01) tool, and already developed custom HR infoset and user groups and transported to QAS. We experienced the problem that we can not directly "save" any queries in SQ01. We pretty much have the client opened up and set at "Changes without automatic recording". But keep getting a "transport object create" dialog upon "save" query. But in Adhoc (PQAH), we don't encounter same problem. We wanted our users be able to create and save any queries directly without creating any local objects. Is there another setting that needs to be set?
Thanks for any information that you can provide. Points will be awarded.
HelenHello Helen,
in SQ01 you can save queries like in HR Ad Hoc Query (or Infoset query as it is called outside HR).
However this is only possible in the "Standard Area" not in the "Global Area". However as Ad Hoc Query is based on the SQ0x basics it only hides this effect.
If you are doing HR specifics you should consider the documetnation on the special HR switches:
http://service.sap.com/~form/sapnet?_SHORTKEY=01200252310000076208&
In general if you are new to the topic you should consider the courses BC407 for Query Basics and HR580 for reporting in HR.
Also to get a feeling for the different types of reporting with the InfoSet Query you can look at the following documentation:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/a8/2e7237a323427ee10000009b38f8cf/frameset.htm
HR Reporting Tools -> Sap Query -> InfoSet Query -> Calling InfoSet Query.
Or you can book a special training if you need a contact let me know your email adress
Best regards,
Michael
Maybe you are looking for
-
I Recently purchased a book from iTunes and according to my bank account the payment was successfull but now when I try to sownload anything it says there was a payment issue with my last purchase! How do I fix this? Do I have to pay again??
-
Showing text overflow in a long document
Hi everyone, I'm creating a long document. I want to send a proof to a publisher, but a few pages contain too much text for the layout I created. I want to send the document as is, in pdf form, but want to show how much text cannot fit in these textb
-
How to use SP_transaction_notification in SQL to provide SAP warnings?
Hi Guys, I use SP_transaction_notification in SQL to block certain event and give error messages on sap screens. Anyone knows how to provide a warning only using the same technique? For example if a user doesn't enter customer reference number on a
-
Hi all! I'm sure this is something simple, but I just can't seem to get it and have been beating my head against a wall for several days...Help! :) I have a clob that contains the following: <?xml version="1.0"?> <PARMS> <P_BOOK_TYPE_CODE>ASSETS INTE
-
The DNS name that you specified is already in use.
Hi, I am a new in Windows Azure. Can You help me please? When I try to create new VM and input samething in DNS box, I get this message "The DNS name that you specified is already in use." I have tried many random texts, but without success. Pls help