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

Copy ABAP Query

bjorn-henrik_zink
Contributor
0 Likes
1,985

Hi,

I have copied an ABAP Query program AQ* to a custom Z* program. When executing the program via F8, I find that the selection screens differ. Anyone who can explain why? Is it possible to have the same selection screen in my custom Z* program?

Thanks.

/Elvez

Hi,

I have copied an ABAP Query program AQ* to a custom Z* program. When executing the program via F8, I find that the selection screens differ. Anyone who can explain why? Is it possible to have the same selection screen in my custom Z* program?

Thanks.

/Elvez

14 REPLIES 14
Read only

santhosh_patil
Contributor
0 Likes
1,700

hi,

In what way it is different..?

whether..

some selection fields are missing or

some selection text is missing..?

Read only

0 Likes
1,700

Hi SanthoshKumar,

nothing is missing, but other selection fields are displayed. Here is an example:

AQ* Selection:

Personnel number

Employment statu

Personnel area

Personnel subare

Employee group

Employee subgrou

Z* Selection:

Personnel number

Employment status

Company code

Payroll area

Pers.area/subarea/cost c

Employee group/subgroup

/Elvez

Read only

Former Member
0 Likes
1,700

this is the fault u copy abap query to a another program. it show the selection screen of z programm.

u genrate programm from abap query using sq01.

Read only

0 Likes
1,700

Hi Kishan,

the problem is that I want to control the name of the program. The reason for copying the sq01 generated program is that I don't want somebody to overwrite the program by mistake.

/Elvez

Read only

Former Member
0 Likes
1,700

Hi Elvez ,

SAP query Program is Client Dependent.

Regards

Prabhu

Read only

0 Likes
1,700

Hi Prabhu,

thanks for the infomation, both programs are run in the same client.

/Elvez

Read only

0 Likes
1,700

do one thing...

1) go to se38.

2)enter query program name which is genrated

3)copy programm to ur z programm with all include(using copy button in se38).

4) now execute.

it is workin.

Read only

0 Likes
1,700

Hi Kishan,

that is what I did. The program is working fine, but the selection screens differ.

/Elvez

Read only

0 Likes
1,700

it is fine with my system...

delete z programm and try once again.....

Read only

0 Likes
1,700

Did you change any of the selection criteria in your ABAP query?

/Elvez

Read only

Former Member
0 Likes
1,700

1) Execute the query from SQ01.

2) GO TO SE38.. you can see the name of the query program.

3) Press copy and make a new program.

rgds,

TM.

Read only

0 Likes
1,700

Hi Thomas,

that is what I did.

/Elvez

Read only

Former Member
0 Likes
1,700

hi ,

check the two include programs of that Copied Quety program.


include /1bcdwb/iq000000000051sscr.
include /1bcdwb/iq000000000051sscrat.
<b>*----------------------------------------------------------------
*    include /1BCDWB/IQ000000000051SSCR
*----------------------------------------------------------------

selection-screen begin of block qsel
                          with frame title text-s02.
select-options sp
include /1bcdwb/iq000000000051sscr.
include /1bcdwb/iq000000000051sscrat.
<b>*----------------------------------------------------------------
*    include /1BCDWB/IQ000000000051SSCR
*----------------------------------------------------------------

selection-screen begin of block qsel
                          with frame title text-s02.
select-options sp$00001 for mast-matnr.
select-options sp$00002 for mast-werks.
selection-screen end of block qsel.
selection-screen begin of block stdsel with frame title text-s03.
parameters %layout type slis_vari modif id lay.
selection-screen end of block stdsel.</b>
 for mast-matnr.
select-options sp[code]
include /1bcdwb/iq000000000051sscr.
include /1bcdwb/iq000000000051sscrat.
<b>*----------------------------------------------------------------
*    include /1BCDWB/IQ000000000051SSCR
*----------------------------------------------------------------

selection-screen begin of block qsel
                          with frame title text-s02.
select-options sp$00001 for mast-matnr.
select-options sp$00002 for mast-werks.
selection-screen end of block qsel.
selection-screen begin of block stdsel with frame title text-s03.
parameters %layout type slis_vari modif id lay.
selection-screen end of block stdsel.</b>
[/code]2 for mast-werks.
selection-screen end of block qsel.
selection-screen begin of block stdsel with frame title text-s03.
parameters %layout type slis_vari modif id lay.
selection-screen end of block stdsel.</b>

check ur selection screen with query selectino screen., first one for Selection Screen and second one for layout.

regards

Prabhu

Read only

bjorn-henrik_zink
Contributor
0 Likes
1,700

Dear all,

thanks for your contributions, however, I solved the problem myself. Here is what I was looking for:

1) <b>se38</b>

2) select <b>Attributes</b> and press <b>Display</b>

3) Press <b>HR report category</b>

4) Assign the <b>Master data rep. class</b>

Thats it.

/Elvez