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

ABAP Query

Former Member
0 Likes
1,164

Hi All,

Will it be ok If I copy and mondify the code

autamaticaly generated for an abap Quary ??

Thnaks in advance for your reply.

1 ACCEPTED SOLUTION
Read only

michael_bennett1
Explorer
0 Likes
1,123

Hi John,

Thanks for the explanation. Ironically enough I just faced this situation myself. I wrote my own report using the logical database instead of using SAP Query, the main reason is not being able to "insert" the additional records from the cross company documents. On relection, without having tried, there should be no reason that you couldn't include the additional logic at the GET event for the BSID item, as you indicated, and then add these extra records to the field-groups that SAP Query uses (i.e. you should find an EXTRACT statement in the generated coding). That is to say you will need to EXTRACT the additional retrieved records to the defined FIELD-GROUPS in order to see them in the report. I haven't tried it but it should be possible.

As others have mentioned you might just find this easier i your own ABAP report.

Regards,

Michael

9 REPLIES 9
Read only

Former Member
0 Likes
1,123

Hi,

I tried that a very long time back. Can't remember if I had faced any particular problems. What's the harm in trying it out anyways?

Regards,

Anand Mandalika.

Read only

Former Member
0 Likes
1,123

when i copied an exat copy of query to a z-program,

I am getting different set of results from both sides.

Read only

michael_bennett1
Explorer
0 Likes
1,123

Hi John,

I agree with previous comment that technically you could copy and change a SAP Query report. Of course there is so much happening in such coding that you might find that a simple copy doesn't work.

I would offer that you can actually do a lot of "additional" processing in SAP Query using the existing features. For example, you can add fields, structures, additional selection criteria, coding at many reporting events (e.g. GET, GET LATE, SELECTION, DATA). The help in the SAP Library is quite good in terms of what you can do with InfoSet and queries.

If you want to reply with your specific issue I'll try to give my thoughts.

Regards,

Michael

Read only

0 Likes
1,123

Hi Michael,

This is customer Open Items aging report in iter company transactions.using LDB- KDF .

Data is fetched from LDB in the query.

But the new requirement is to handle inter company postings,in case a an inter conmapany document is found

fetch all the corresponding documents from the receving company codes.

Since we give co-code in selection screen, LDB will not process other company code documents,So I wrote select query in the right place in the info set to fetch the other company info,in Get event.

But the problem is the user wants to display all the line items coming under a document which is posted in different co-codes.

i.e like sub items of the original document info.

Thanks for your help.

Read only

0 Likes
1,123

I observed some line items is filtered while i am

exicuting the report from the query,but not in the correspoding z-report.

I have all the authorization in the development system.

any clues.

Read only

0 Likes
1,123

Hello,

I had a similar problem. The report generated by abap query was generated report: AQA2SU-TEAM=====PR_CHECK======

Copy the program with all the includes to a Z program and then make changes or transport it.

Regards,

Shekhar Kulkarni

Read only

0 Likes
1,123

Hello,

I had a similar problem. The report generated by abap query was generated report: AQA2SU-TEAM=====PR_CHECK======

Copy the program with all the includes to a Z program and then make changes or transport it.

There is also a way to add code or make changes to the query using SQ02.

Regards,

Shekhar Kulkarni

Read only

Former Member
0 Likes
1,123

Hi,

U can copy ABAP QUery into z-programs ,But u will get problem while Transport to testing ,Bcos the Logic or code generated by ABAP Query may not be compatible with Client <> Client.Better to write Own Program.

Read only

michael_bennett1
Explorer
0 Likes
1,124

Hi John,

Thanks for the explanation. Ironically enough I just faced this situation myself. I wrote my own report using the logical database instead of using SAP Query, the main reason is not being able to "insert" the additional records from the cross company documents. On relection, without having tried, there should be no reason that you couldn't include the additional logic at the GET event for the BSID item, as you indicated, and then add these extra records to the field-groups that SAP Query uses (i.e. you should find an EXTRACT statement in the generated coding). That is to say you will need to EXTRACT the additional retrieved records to the defined FIELD-GROUPS in order to see them in the report. I haven't tried it but it should be possible.

As others have mentioned you might just find this easier i your own ABAP report.

Regards,

Michael