Class to run standard SAP Query
Hi,
Could you help me with finding standard SAP class to run query created in SQ01?
Thank you
Hi,
You can create the TCode for the Sap Query and use to run query.
refer the links to create tcode for sap query..
how to create a tcode for abap query
tcode for sap query
Similar Messages
-
How to edit a standard SAP Query
I need to do authority check for satndard SAP Query....How to do it
If you put code similar the following in the Infoset ---> Extras -> Code -> Start of Selection it should work
CALL FUNCTION 'SD_ORGDATA_AUTHORITY_CHECK'
EXPORTING
I_VKORG = P_VKORG
* I_VTWEG =
* I_SPART =
I_ACTVT = '01'
EXCEPTIONS
NO_AUTHORITY = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
So, if the user does not have the proper authorization, it will exit the program. You will need to check with your Security administrator to verify what value to use for the Activity Code. -
Hi guys,
I need to modify the transaction ME80FN, which is a SAP Query. I want to make a clone of the SAP Query, if isn't possible to modify the program AQZZ/SAPQUERY/MEME80FN========. I haven't deal with SAP Queries before. Can anyone please tell me the steps to accomplish this?
Thanks,
RaulieHaven't worked with queries, but I think you should be able to make a copy on SQ01...anyway, querys are still ABAP programs, so you could the copy the code of AQZZ/SAPQUERY/MEME80FN======== paste it on a Z program and make the needed modifications...
Greetings,
Blag. -
Retrieve a corrupted standard SAP query (SQ01)
Hi experts,
We have an standard query that is giving a dump because an user has modified and transported it to consolidation and production systems.
I don't know if there's a way to compare versions and retrieve versions. Right now we have accessed to client 000 and we are analysing if it's feasible to retrieve the 000 version. The query is defined as GLOBAL (client independent) and it's assigned to an standard package /SAPQUERY/FIAQ.
I'm on the right way or maybe there's another solution that we're not taking into account?
More ideas would be appreciated.
Ismael
Message was edited by:
Ismael MateoThanks for the answer Barry, this is clear.
But the problem is that all the systems are overwritten with the modified version (Development, Consolidation and Production) and we don't have the original version anywhere, therefore we can't export/import it.
As the query is a global query (not client dependent), a modification in the query also affects to the other clients. In this case this modification has been transported to all systems as well...
To correct that situation we want to identify the changes done by the user or retrieve the old version.
One solution would be to create one transport request from an external SAP system, with the same SAP version(ECC 5.0), and transport it to our system.
Before trying with this solution we want to know if there's any SAP standard tool to retrieve/compare query versions. -
Fastest way to run the SAP query Infoset
I get runtime error with below code, can anyone suggest fastest output. Same logic as below: Thanks in advanced!
TABLES: LIPS.
SELECT SINGLE *
FROM LIPS
WHERE VGBEL = EKPO-EBELN
AND VGPOS = EKPO-EBELP
AND MATNR = EKPO-MATNR.
IF SY-SUBRC = 0.
DELIVERY = LIPS-VBELN.
STORLOC = LIPS-LGORT.
CREATED_BY_DELIV = LIPS-ERNAM.
CREATED_DAY_DELIV = LIPS-ERDAT.
ELSE.
DELIVERY = ' '.
STORLOC = ' '.
CREATED_BY_DELIV = ' '.
CREATED_DAY_DELIV = ' '.
ENDIF.Hi Jay
I have also got the same problem as above , i have also used the same technique which you mentioned ie connecting EKKO TO EKES and then to LIPS .
But EKES is not having some PO No( EBELN ) but where as LIPS should select fields for that EBELN .
IF GT_EKPO IS NOT INITIAL.
SELECT *
FROM ekes INTO TABLE gt_ekes1 FOR ALL ENTRIES IN gt_ekpo
WHERE ebeln = gt_ekpo-ebeln AND
ebelp = gt_ekpo-ebelp .
IF NOT GT_EKES IS INITIAL.
SELECT *
FROM lips INTO TABLE gt_lips FOR ALL ENTRIES IN
gt_ekes1 WHERE vbeln = gt_ekes1-vbeln
and posnr = gt_ekes1-vbelp .
ENDIF.
ENDIF.
Please help me if you have any solution.
Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 5:51 PM -
Restricting standard SAP queries from seeing HR Data
Newbie back again with another question. When our system was implemented 2 yrs ago, supposedly HR Master Data was restricted from the majority of users. One of our SAP functional consultants just showed me how the Standard SAP Query can (if you know what to search for) pull up all HR master data.
Granted my user community isn't that knowledgeable (yet) but as the Security person, I'd rather they not be able too.
How do I restrict access to the Standard Query?The lastest release-when I look up my component list they say 604 to 700
view-quickview.
Query types-HR Infotype tables may be accessed by users of SQVI, SQ01, etc.
Which authority-checks - still researching. Part of my problem is that when the system was developed we had an HR expert and he was pretty hands on and not into sharing information. As often happens, he's moved on to other projects and I'm supposed to handle maintain and run with zero documentation or understand of his security model for HR. So I'm not sure if this was 1. by design and supposed to be managed inside HR some other way, 2. a gap 3. a bug.
My assumption is 2... it appears the SQVI is not using S_TABU_DIS in any assignments -
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 -
Sap Query custom field assigned to wrong field group (in extract)
Hello,
I want to add an extra field to InfoSet /SAPQUERY/MEBANF at EBAN level. I added a field in a normal way:
I fill it with a constant value. I adapted Sap Query:
In result, I got the value in new column but only for certain rows:
The value is there only for EBAN rows which have EBKN entries related.
I checked the program, and my new field is added to field group %fg07 with some other fields from table EBKN (not EBAN):
Fields from field group %fg07 are inserted to extract only in event get EBKN, so if there is no entries in EBKN, my field will not be inserted into extract:
I tried a lot of things (assigning my field to new field group in InfoSource, adding a field on EBKN level). I can say that every extra field created by me was assigned to field group &fg07.
Am I doing something wrong?
The target is to add new field in the document overview panel in ME2xN transaction. I know that there is user-exit EXIT_SAPLMEQUERY_002 where I can specify a Z* query. But this solution requires a copy of InfoSet and query to Z*. Adding a new field to standard Sap query is the fastest way.
Message was edited by: Rafal Matuszewski
Now I tried to append EBAN table with my Z* field. I regenerated InfoSet and query but the result is still wrong:
insert EBAN-GSFRG into %fg06.
insert EBAN-ZUGBA into %fg06.
insert EBKN-VBELN into %fg07.
insert EBKN-AUFNR into %fg07.
insert EBKN-KOSTL into %fg07.
insert EBAN-ZZDELIV_DATE_MRP into %fg07. <-- here again the Z* field is assigned to field group related to EBKN tableThanks Sandra
-
Hi All,
I have changed the standard sap query . i have written coding for newly added feilds in infoset(sq02 code part).
I want to join my internal table with standard internal table ( final internal table ) to incorporate changes.
Please guide me to merge both the internal tables.
Thanks in advance
SudhakarHi,
All other part remain same.Could you please tell me why we got that error any probable Opinion from your side...
thanks in advance.
Regards,
Moni -
Autorization issue with SAP Query and RPTQTA10
Dear all,
I am having some difficulties with autorisations in SAP Query and Report RPTQTA10.
in IT2006 I have a subtype 03 which should not be accessible for a group of users.
Also I have created a test employee with a sybtype of IT2006 which is allowd and one which is not allowed.
When I run some reports with that user I get a nice result with PT50. Only the allowed subtypes are being displayed.
When I try to run A SAP Query or report PRTQTA10, the employee is not visible and seems to end op in an error list.
Can someone shed some light on this issue?
Kind regards,
PatrickHallo,
Follow like this...
Role 1:-
authorization level: R, W (You should not give W, R. You should give either W or M, R, Any way it will not create any problem)
Infotype: 2006 -Ok
Pers area: * -Ok
Emp group: * -Ok
Emp sub group: * -Ok
profile: ALL*, ZBHR_OS etc etc -Ok
Subtype: 01, 02 - Keep only sub type 01, 02
fuction group: * -Ok
Role 2:-
authorization level: R, W (You should not give W, R. You should give either W or M, R, Any way it will not create any problem)
Infotype: 2006 -Ok
Pers area: * -Ok
Emp group: * -Ok
Emp sub group: * -Ok
profile: ALL*, ZBHR_OS etc etc -Ok
Subtype: 03 - Keep only sub type 03
fuction group: * -Ok
Then user who want only sub type 01 & 02 then assign role 1 and he will not have access to sub type 03
User who want only sub type 03 access, then assign role 2 only so that he will not have access to sub type 01 & 01
User who want sub type 01, 02 & 03 access, gibe Role 1 & Role 2
Hope it clarifies.
Regards,
Purnima -
SAP QUERY copied to z program.
Hi ,
There was an standard sap query ,system had generated a program for this ,this program is copied to a Zprogram and some modificationa had been done for the zprogram in_sap4.7_ version.Now they want this z program to be copied to ECC6.0.Here my question is as the z program is a copy of ssystem generated program,if we copy this program to ecc6.0 will it work or not?.I don't think it will work. in the generated program you can see some function modules also. those functions will be in SAP name space. Better recreate the same in ECC6.0, instead of copying the code.
-
Hi,
I am running my sap query and saving automaticaly into a file by using the 'file store' option. But i am running in background. I can see the result in the spool but how can i create the result in a TXT file directly.
Thanks for your help.
Regards,
CesarYou have to give your application Path like "/USR/folder or /temp/filename.txt .. if you`re running in background .
you can see the paths using Tr. AL11
Thanks
Saquib -
Standard variant of SAP query is loaded automatically
Hi!
I have created SAP query and standard variant via SQ01.
When I run my query (via transaction) values of variant are loaded automatically in a selection screen and in my case I need empty selection screen at the beginning and values should appear in a selection screen only after choosing a variant, but not before this.
Probably it is something about attributes of variant? Any ideas?
<b><REMOVED BY MODERATOR></b>
Mindaugas.
Message was edited by:
Alvaro Tejada GalindoHi,
What type of custom transaction code did you create?
Was Dialog Transaction or Report Transaction?
For your purpose, you can create with dialog transaction with specifying program name and screen number. If you want to execute with specific variant then choose report transaction.
Regards,
Ferry Lianto -
Hi,
I am doing SAP query, If I select Company Code, i need to get the resule of
GL a/c, Buss Area, Cost Center, Profit Center
For this in table joints i taken KNA1, KNB1, SKB1, CSKS
then also i could not run the report.
Rgds
sunficoHello
When you have chosen a query and a user group on the initial screen, you can execute the query online or in the background.
Executing Queries Online
Executing Queries in the Background
Improving Response Times
Interactive Functions for ABAP Lists
Direct Interaction
Check this link for further notes executing queries
http://help.sap.com/saphelp_erp2005vp/helpdata/en/b7/26ddebb1f311d295f40000e82de14a/frameset.htm
regards -
Slow running time of Standard SAP Reports
Hi Experts,
Standard PS reports (such as the one with the transaction code s_alr_87013558) are taking quite a lot of time to fetch the desired results. After further analysis we have found that the time in retrieving the data from certain standard tables is the root cause behind this issue.
Is there a way in which we can speed up the processing time for fetching the results?
Regards
VarunHi Varun,
Other than increasing the physical memory all other are standard SAP practices to increases the performance of the reports..
The standard reports will definitely fetch the data from COEP, COSP or RPSCO tables, and these are very heavy tables.
if you are taking help from ABAPer, he should be able to do some primary indexing on these tables to see the querying is faster..
On a lighter note.. wait for HANA upgrade..
Regards
Sammar
Maybe you are looking for
-
Magic Mouse One-Finger Swipe Works for one user but not the other
For the main account on my iMac, I can use a single finger swipe to move back and forward within Chrome. However the second user (also an administrator) cannot use this setting and must instead use the two finger swipe in settings. Both settings are
-
Help with inserting a light AE
hey guys, im sorry to be starting a thread about this here, but ive done quite a bit of search through google and on here and havent found anything, maybe i dont know the proper terminology for what im trying to do, youd think this would be relativel
-
Some how all are photos from Iphotos got places on the bookmarks bar. Anyone know how to remove them from here?
-
Why does my music continuously shuffle? can't fix.
tried to sync, have a ridiculous amount of problems when syncing my phone, generally have to back up, delete, restore just to get one new song on my phone which is just ridiculous. This time the songs just now continuously shuffle for a microsecond e
-
I am running Windows 2000 SP4 on a Compaq PC and have just begun to have problems with the JAVA Virtual Machine. All of a sudden, a message pops up that I need to download the java virtual machine. I have followed the links to download Sun's virtual