Attaching Abap Query to a T-code
Hi ,
I am attaching a T-code to an Abap query.
I used the following :
Parameter Transaction.
In transaction field: START_REPORT.
CHECK: Skip First Screen.
D_SREPOVARI-REPORTTYPE AQ
D_SREPOVARI-REPORT 'ZASSETS_SSFL'
D_SREPOVARI-EXTDREPORT 'ZAM001'
But I am getting an error message saying user group ZASSETS_SSFL has not yet been created.
Please suggest.
Are the quotes creating an issue?
Hey Newbie ,
You have done almost right.
Program name will be the "AQFKSYSTQV000006DELIVERY======"
Now you need to select the package in which the object ie query will be stored.
3 ways .
1) choose already existing package ie press f4 and select the package z* ie starting with zname.
2) If you want it in another package then create it .
there are 2 ways to create a package.
One is Through SE80.
Other one is SE21(package Builder).
->How to create a package?
Goto SE80 Transaction or SE21
Select Package and below give the package name and click on enter.
then u get a pop up asking to create package. Click yes. then u get a pop up Package Builder: Create package
Give the description and the Application component and click on create.
3) If you dont want this object to be moved to QAS then give the package name as $TMP which is a local package this wont allow the objects which is stored in it to move to other servers.
If you still face any problems in that , pls revert, happy to help you.
Regards,
Vvieks
"Grow and help others to Grow"
Similar Messages
-
ABAP Query - Differences in generated code after upgrade
Hi all,
We have upgraded to ECC 6. from 4.6C. We are experiencing differences between the behaviour of some queries in different systems. This can be as subtle as some of the output parameters not appearing on the selection screen (such as the options within the output format box, i.e. ABAP list, ABC analysis etc), to actual syntax errors in queries where there is no difference between the infosets and queries in the two systems.
A pattern I have noticed is that there are big differences in the generated code behind the query transaction.
In production, where we have the problems, the generated code contains a lot of include programs starting with /1BCDWB/, I am not sure what these are, but the generated code in the systems that work don't have these. I am not sure what is triggering the code to generate differently, but I think if I can find out then it will point me in the right direction.
any help appreciated.
StephenStephen,
I have noticed the queries are generated with two different formats. One is very compact and has multiple different includes each for data, selection screen, various selection screen events, etc. Other is a single big non-modular program.
We have also noticed generated program template gets reset to the non-modular kind, if additional code is added in the selection-screen code section of the infoset. They do not return to the original even after you undo the changes. -
hi
experts,
i am developing a report using abap query .(stand t code is s_alr_87012277 it contain more fields but i want only 4 fields , i found 2 but remaining 2 are from structure)
my problem is that debit and credit amount is in structure
how i can get data from structure(FAGL_S_RFSSLD00_LIST )
solbm = debit.
habbm = credit.
report is like
op.
gl acc no, discription, credit amount,debit amount.Hi ajay,
try to use with logical database SDF.
assign the logical database name in info set.
gl acc no - SKA1-SAKNR
debit. - Field: um02h
credit. - field: um02s
discription - SKAT-TXT20
regards,
sateesh. -
Hi,
I want to execute Abap Query using a Transaction Code. Please help me out to run a query using Transation code.
Thanks in Advance
John VikramGOTO the transaction 93.
Create a transaction code that is required to run a query from your report.
give short text, choode program and selection-screen.
SAVE.
This is the way to run a query from a report using tcode.
Reward points if useful.
Or if you need more help, pls reply back. -
Attach a transaction code to abap query program
Hi!
I have developed a report with ABAP query in development server with transaction codes SQ01, SQ02 AND SQ03 respectively.
program is generated from SQ01 and i also got the program name from SQ01.
Now how to attach a transaction code with the program that is generated from ABAP query and transport it to production server
successfully.
points to be rewarded .
regards
Amithiiii
go to
sq02 ->
Select Environment -> Query Areas..
Select Standard Area (Client specific)
(If Query does not exist in Standard Area then You will have to copy that Query From Global Area to Standard Area.)
For Coping Query From Global To standard first select that query from list.
Now select Environment-> Transports
In next screen select Copy Global to standard radio button.
Check Overwriting allowed (only with import/upload/copy)
Remove Check for Test Run
Select Transport InfoSets and queries radio button
Fill Infoset and Query with corresponding names.
Now Press Execute button.Copy Log will be displayed.
Now Query exist in Global & Standard Area.
Go to SQ02 .
Select Environment -> Query Areas..
Select Standard Area (Client specific)
Select Infoset from list.
Select Download radio button
Check Overwriting allowed (only with import/upload/copy)
Remove Check for Test Run
Select Transport InfoSets and queries radio button
Click on Execute button
same way you can upload sap query..from one system to another
regards
twinkal
Fill Infoset and Query with corresponding names. -
How to find T-Code assigned to ABAP Query...
Hi All,
I have ABAP query, Infoset and user grp with me.
Can anybody let me know, how to find the T-code assigned to this ABAp Query.
Regards,
SanjayHi.
In SQ01 tcode .. Check the Program attached to the SAP Query .
Then Goto Tcode SE93 and Open this Program.
There you can find the (Transactions)Tcodes created for this program.
Note: You can also check in TSTC table using the Program name. It a Tcode is already created for ur Query then it will be in TSTC.
REWARD IF HELPFUL, -
Creting t.code for ABAP query and Transport it TO Production and run it .
Hi Friends
Thanks for ur reply ,
The requirement is that i want to create tcode for abap query and that query can be regenearted ,
in case of regeneration programe name i got answer programame name will be change, i created and modified query but i saw the same programe name ,,, may be it changed when it is trasnported if so then what ??
and also pls give me solution for asiging tcode for query which is going to be regenerated.
thanks and regards
farukhHi farukh,
1. If any query is re-generatred,
then some MANUAL INTERVENTION
is absolutely required.
2. Hence, what we prefer is this :
1. Generate first query.
2. Copy the code to a Z Program
3. Attach tcode to THIS z program.
4. Transport
3. Now,
whener the query is generated again,
AGAIN COPY THE CODE
TO OUR Z PROGRAM (2ND STEP ABOVE)
(which has already been created)
AND TRANSPORT JUST THIS Z PROGRAM.
REST WILL TAKE CARE OF ITSELF.
4. In such cases,
ONLY COPY-PASTE IS REQUIRED.
(and it takes not more than 15 SECONDS)
regards,
amit m. -
Getting error while assigning ABAP Query to Tr.Code
Hi Guys,
There is a problem iam facing with ABAP query while transporting which need to solved asap. It will very greatfull if u guys can resolve this problem.
My problem is, I created one ABAP Query with Name ASSETOVERVIEW. I had transported this even, now when iam going to assign it to one transaction code with se93 lets say ZAOR. I need to give its description and program name in se93 right. now my question is what is program name i need to give in se93. Bcoz in SQ01 where i created the query, there is no name as 'program name' rather there is 'Name' in that we will create the query name i.e, ASSETOVERVIEW. In se93 u give tr.code and when u see down there will be radiobuttons in 'start object',in that i had checked program and selection screen (report transaction) is this right button i had checked or any other i need to check?. I had assigned this name i.e,ASSETOVERVIEW and development class and then when i check the name for syntax check its giving "'ASSETOVERVIEW' does not exist". I don't understand what program name i need to give.
If u guys can help me out with this problem it will be very much appreciable and definetly can get the reward points.
Thanks for as usual help in advance.
Regards.Hi omer,
1. Just run the query.
2. one selection screen will come
3. then using SYSTEM---->STATUS, (from menu)
look for the program name
4. the program name will be something wired foramt.
/asdfasdf/asdfdas etc.
5. Give that name in se93.
regards,
amit m. -
Generation of program code for the ABAP Query
Dear all,
In the creation of the ABAP query, in the final step of SQ01, Query- more functions- generate program is made.
Why the program code is generated for the ABAP query? please give the logical explaination for the same.
Thanks and Regards,
PrashPrash,
a) Do you mean Program code does not have significance in query creation?
No it does not mean this. All queries run based on an ABAP program. In the standard query editing process, when you save and execute the query, you will automatically re-build the existing ABAP program as necessary. You do not need, though, to execute the menu steps you outlined in order to build, maintain, or execute the query. It is only there for special purposes, as outlined above by Jürgen
b) Can we see the program code generated in any transaction?
From any screen, System > Status. Place your cursor on the field in "Program (screen)". Double click.
Rgds,
DB49 -
ABAP Query Code for Count Function
Hi,
I have an ABAP Query and just created a new field which requires ABAP Code to do the following :-
The report is for Purchase Orders and Purchase Requisitions. 2 Purchase Orders may have the same requisition, so what I want to do is count the number of the same requisitions in the report
e.g.
PO Req Count
45000001 10015 2
45000020 10015 2
Can some one please provide with the full code? Points will be awarded
ThanksHi,
No errors in the below code but it is bringing a value 0 even though there are duplicates in the table which is suggesting to me that the code is not working.
Any help would be appreciated. Thanks
DATA : BEGIN OF itab OCCURS 0,
aufnr LIKE ekkn-aufnr,
END OF itab.
DATA : count(2) TYPE p.
DATA : no_of_records(3) TYPE p.
Clear no_of_records.
select aufnr from ekkn into itab.
endselect.
SORT itab BY aufnr.
LOOP AT itab.
ADD 1 TO count.
AT END OF aufnr.
IF count GE 2.
ADD count TO no_of_records.
ENDIF.
CLEAR count.
ENDAT.
ENDLOOP.
*WRITE :/ 'Good Bye'.
DUPLICATES = NO_of_records. -
Select from KONV using Additional Code in ABAP Query
I'm attempting to modify an ABAP Query Infoset (using transaction SQ02) that already has a join in it between tables VBAP and VBAK, and two additional alias tables on KONV (to get price history for sales documents). I wish to get history of all PN00 records from KONV. I can get ONE record with the following code in the Record Processing of the Extras element in my Infoset:
SELECT SINGLE KBETR KPEIN KMEIN KDATU
INTO (PN00_PRICE, PN00_PER, PN00_UOM, PN00_DATE) FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = VBAP-POSNR
AND STUNR = 198
AND ZAEHK = 01.
But we have many counters (field ZAEHK) for the PN00 condition and I want to have a new row for each PN00 record in KONV. I've tried some loop syntax, but I've not been able to get any code to function or return more than one row for each sales order item row (VBAP-POSNR).
Thanks for any hints.
Dan GallagherChange it like this
SELECT KBETR KPEIN KMEIN KDATU
INTO (PN00_PRICE, PN00_PER, PN00_UOM, PN00_DATE)
FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = VBAP-POSNR
AND STUNR = 198.
..... do something with this record and store
ENDSELECT. -
ABAP Query - Not showing the required changes through Z T.Code
Hi,
I have a ABAP Query for OPEN DELIVERY QUANTITY (T.Code - ZABC). I change something in QUERY and activate. After that i execute it, and saw required changes.
But when i execute it with the T.Code - ZABC, it does not show the changes. Even i Save and Test with the SQ01 t.code.
Please tell me, what is the problem in it. Why not showing the required changes through T.Code - ZABC.
Regards...HI,
Dear, it seems that you have changed the query in SQ02 and then just save it and not generated.
or may be after generation again clicked on SAVE button.
So untill unless you will not generate the query, it won't work.
Secondly, by chanegs in the query, i don't think it changes the name of the main program.
Regds,
Anil -
Adding code in ABAP Query(ABAP HR)
I have created an ABAP Query for getting the Absence details of employee within a specified period.I am populating the fields
Employee number, Organization Unit,Absence start date,Absence hours, Absence enddate.
If an employee is in leave for 10 days, this information will be stored in PA2001 table,and this table is not Organization specific.
During the specified period(20 days), if an employee is under two Organization units(5 days in 1st Org Unit,15 days in 2nd Org Unit). The query is extracting two records for the same employee, because of two Organization units. And while populating the data, the query is getting the Absence information from PA2001 table, and this is causing overlapping of data. So it is showing the Absence details for that employee as 40 days(20 days in 1st Org Unit and 20 days in 2nd Org Unit,Instead of total 20 days). So i would like to add validation over here after extraction of data from the PA2001 table,before displaying the data.
I have tried adding the code in the infoset, at END OF SELECTION Event,but i am not able to change the list, as i am not able to access the tables used by the Query.
Can anybody suggest me where to add the code in the Query, so that i will be able to solve this issue, instead of changing the code in the Report program generated by the Query.you can look at BAPI_PTIMEOVERVIEW_GET
this gives the output back for the selected period so you don't get alle the records back from you're pa2001 table. (only this overview doesn't take into considerationd the distiction the difference between leave and illness)
further on if you consider using the pa2001 table you can loop through the begda and endda and add 1 day for each record and programm the logic how you want to intrepet each day you'reself
I use the data from perws which comes from the function HR_PERSONAL_WORK_SCHEDULE
(which is also used in the BAPI mentioned above)
and from PA0001 you can retrieve how long somebody was in 1 org unit !!
LOOP AT it_2001 WHERE begda BETWEEN i_begda AND i_endda
OR endda BETWEEN i_begda AND i_endda.
h_datum = it_2001-begda.
IF it_2001-awart BETWEEN '0100' AND '0199'.
WHILE h_datum <= it_2001-endda.
READ TABLE it_perws WITH KEY datum = h_datum.
IF sy-subrc = 0.
* you're logic
ENDIF.
CALL FUNCTION 'FKK_DTE_ADD'
EXPORTING
i_base_date = h_datum
i_periode = 'D'
i_period_factor = 1
* I_USE_FACCAL = ' '
* I_WORKDAY_INDICATOR = '-'
IMPORTING
e_datum = h_datum
* EXCEPTIONS
* ERROR_OCCURED = 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.
ENDWHILE.
kind regards
arthur de smidt
Edited by: A. de Smidt on Jul 16, 2008 8:47 AM -
ABAP Query Execution via Custom Transaction Code - Not working
We have created an ABAP Query in our DEV client and we then created a transaction code to run that query. We have done this because the customer does not want anyone to have access to SQ01, SQ02 in production. This works great in DEV but we can not get it to work in production.
The ABAP Query was exported to our Prod client successfully. I say exported because you do not do direct transports with queries.
We then transported the new transaction code to run the query to production and it was successful.
However, when we run the transaction is production we get a sys dump stating it can not find the query.
We believe the problem is the TRDIR table is missing an entry for the program in production (it has an entry in DEV).
I would have thought that the export on the query would have brought in this entry -but obviously not.
Any suggestions on how we can get this entry into the production client? Did we miss a step on the export that would do this? We want to only bring over this entry - not the entire TRDIR table for obvious reasons (size (1.5 million entries, programs not ready for production, etc.).
Please help!
Thanks.
ScottHi,
The above solution will work if you assign the transaction in one server, If you want this will not work in quality/production boxes when transported the query..the program name will not be the same in all the servers...
For this. Do the below:
In SE93, Create a Paramter Transaction
-> Transaction = Start_report
-> In default values, give the below details:
D_SREPOVARI-REPORTTYPE = AQ
D_SREPOVARI-EXTDREPORT = Name of the Query
D_SREPOVARI-REPORT = User Group
Save the transaction..Now if the program is generated with different names in the quality/proudction, this will still work..
Regards
Vijay Hebbal -
ABAP Query: add field on layout based on Company code
Hello Experts,
I currently working on ABAP Query report for asset master issues and would like one more field added to layout for Company code XXXX . Is it possible to add fields to this layout based on company code .
Thanks in Advance
NupurHello Andreas,
I'm asking is that possible to change ABAP Query report layout based on Company code.
For Instance:
Company code :1111
Layout should : A B C D E F
other than 1111.
layout should : A X Y Z F
My scenario is :
ABAP Query is working fine but users from UK wants some more fields on the layout but rest of the country users other than UK, they don't want such changes.
Regards,
nupur
Maybe you are looking for
-
GATT interfacing application in Linux? (using gatttool)
I am using CC2540 Bluetooth Low-Energy development board. And today I was trying to connect to it using hcitool and gatttool. I used following commands to scan and connect with hcitool: $ sudo hcitool lescan [sudo]LE Scan ... 78:C5:E5:6C:8A:01 (unkno
-
Boot options with Bluetooth keyboard
I have an Intel iMac that came with a bluetooth keyboard and mouse. There are a variety of options that can be used when you boot the Mac, such as hold down the C key to boot from a CD/DVD, hold down the option key to choose the boot drive, etc. When
-
Can't upload any music. Please help
Tried the sync function of Blackberry software - no luck "no media card detected" "make sure MTP and Mass sstorage are enabled" they are! Tried using USB and My Computer but the device doesn't show up. Help please!
-
I have a table with columns 'data', 'data_type', 'date', 'time'. There are a limited number of 'data_type'. I need to get the most recent 'data' with respect to 'date' and 'time' for earch 'data_type'. My statement (w/ 1000 maximum rows returned): SE
-
Hello, Can somebody send to me, by mail attachment, a sample file used by DATALOAD to load items into Oracle Applications 10.7 NCA? An Excel Macro would be good too. Pascal