Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problems when copying a SAP QUERY

Former Member
0 Likes
3,493

I am trying to copy the SAP query /SAPQUERY/AM/01 to a new query. I am using SQ01. the first message I get is "object can only be created in package of namespace /SAPQUERY/". I click the green checkmark and the "create object Directory Entry" box appears where you enter the information to create a transport. I am unsure what package to use. When I select our custom package for our ABAP programs, I get the following "Object AQQU/SAPQUERY/AMZAMINV cannot be assigned to package ZABAP. ZAMINV is the copied query and ZABAP is the custom abap package. I checked all of the custom packages and the only one that I see that would make sense is one that is labelled "Customer development class". Does this query need to be assign to a package. I am not sure what to do next. any help would be appreciated.

thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,727

I found this while checking the forum

<i>Queries do not require a transport request and when they are created, they do not get created inside of a package or development class. If you take the generated program name of the query and check it in SE38, you will see no Object Directory Entry. You can transport queries and infosets from system to system using program RSAQR3TR</i>

would I just save the query as a local object and then using RSAQR3TR transport this to our QAS and PRD? environments?

I am trying to copy the SAP query /SAPQUERY/AM/01 to a new query. I am using SQ01. the first message I get is "object can only be created in package of namespace /SAPQUERY/". I click the green checkmark and the "create object Directory Entry" box appears where you enter the information to create a transport. I am unsure what package to use. When I select our custom package for our ABAP programs, I get the following "Object AQQU/SAPQUERY/AMZAMINV cannot be assigned to package ZABAP. ZAMINV is the copied query and ZABAP is the custom abap package. I checked all of the custom packages and the only one that I see that would make sense is one that is labelled "Customer development class". Does this query need to be assign to a package. I am not sure what to do next. any help would be appreciated.

thanks in advance

12 REPLIES 12
Read only

Former Member
0 Likes
2,727

One thing I can think of is goto /SAPQUERY/AM user group(SQ03 transaction) and click "Assign Users and Infosets". There give your user id and come back to SQ01 and try to copy the query.

Thanks.

Read only

Former Member
0 Likes
2,728

I found this while checking the forum

<i>Queries do not require a transport request and when they are created, they do not get created inside of a package or development class. If you take the generated program name of the query and check it in SE38, you will see no Object Directory Entry. You can transport queries and infosets from system to system using program RSAQR3TR</i>

would I just save the query as a local object and then using RSAQR3TR transport this to our QAS and PRD? environments?

Read only

0 Likes
2,727

Hi Tim,

There are 2 ways to transport the SAP queries. one way is using RSAQR3TR program and another way is using transport requests.

If you want to use RSAQR3TR program to transport queries,follow below steps.

Goto SQ01 --> Environment --> Query Areas.

2 work areas will be displayed.

Standard Area (Client-specific)

Global Area (Cross-client)

With Standard Area, you can save query as local and use RSAQR3TR to transport to next systems.

With Global Area, you create a change request and transport to next systems.

<b>The standard queries are all in Global area, so you need to create a change request and its the best way to write or copy an sap query . Always you will have track of transports just like your SE38 programs.</b>

Even if you want to save your query as $TMP, it will not allow.

Hope I have not confused you.

Thanks.

Read only

0 Likes
2,727

Hi Tim,

here are the steps to copy standard SAP query.

1. First you need to create a Z user group and assign your user id.

2. Goto SQ02(create infoset) and copy the standard Infoset /SAPQUERY/AM01 to 'Z' infoset and assign this infoset to the user group which u created in step 1. It will ask for change request. create a request.

3. Goto SQ01(create SAP query) and click the

Query --> copy.

a pop up will appear "Copy a query". There you give in

From line --> Query as 01 and User group as /SAPQUERY/AM

A query will be created.

All the best.

Thanks.

Read only

0 Likes
2,727

Quick question, If I don't want to restrict the users and want this report to be available to everyone then how can I assign Z group to all the users?

Regards

Manish

Read only

Former Member
0 Likes
2,727

lal 008 - thanks for taking the time to help me with this. Yes I am still a little confused.

when I copy my query, will it be in the global area as well?

we have 4 development environments. I develop in one and the BA test in another. I am thinking that I would have to create this query in the global environment correct?

how do you do this process? when you copy a standard query, do you save it as a local object? do you use the RSAQR3TR program to do the transport? how do you create a transport?

Read only

0 Likes
2,727

It should be in Global area. When it is in Global area and when u try to save a query or Infoset or User group it will ask to assign a package and change request.

You will create ur query in DEV and transport to QA or whatever the system where BA tests. which BASIS can help u to transport to other system as any other SE38 program.

Most of the times we don't use RSAQR3TR program. Its just how you want to do it.

If you want to use RSAQR3TR program then have STANDARA AREA settings. then it will not ask for any transport request while saving. It just saves. Then goto RSAQR3TR program to transport.

either way will work. Global setting and create a request or Standard settings and use RSAQR3TR program to transport.

Read only

Former Member
0 Likes
2,727

lal 008

you mentioned

It should be in Global area. When it is in Global area and when u try to save a query or Infoset or User group <b>it will ask to assign a package</b> and change request.

what package do you assign it too?

do you have a custom package where you handle SAP QUERIES?

Read only

0 Likes
2,727

Yes assign your custom package. You can choose the custom package for ABAP development or sometimes if you have many queries u can create a new custom package and assign. It totally depends on your project standards.

Read only

Former Member
0 Likes
2,727

for the package I had to enter

/SAPQUERY/AM

Is this correct?

a) do I have to worry about any upgrades wiping out my query?

b) what is the package that I should enter?

c) do I have to create a custom package to store SAP QUERIES?

Read only

0 Likes
2,727

The package would be ZABAP while creating the change request.

a.When you copy the SAP query, you should mention /SAPQUERY/AM for User group.

b. Upgrades - This is just like any other custom SAP query. and I'm not sure about upgrades for custom queries.

c. You can either create custom package for SAP queries or you can assign ZABAP which you specified in your first note.

Thanks.

Read only

Former Member
0 Likes
2,727

Hi Timothy and lal,

Sorry for interrupting but I would like to give some idea on the same.

1. You can simply create your User Group (SQ03) so that

u can add your query and infosets to your User Group.

2. What I get from your conversation is you are using the program to transport query, Instead of this u can simply download the query and Infosets even User Group.

3. After this You have to just UPLOAD the query or infoset on the required server (All this are in $tmp local Development ).

4. From that query you can simply change the Package and create Request for your developments.

Please Note that for downloading your query and infoset should be in Standard Area.

If you are Interested in the same Please Do Reply me I can get back to you.

Regards,

Ranjit Thakur.

Please Mark The Helpful Answer.