Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
andrea_olivieri
Contributor

ABAP reports are widely used in ECC systems especially with transaction codes, but quite often a user needs to run an ABAP query. For this reason, when defining custom transactions, job steps an so on, calling the query generated report is preferred instead of invoke the query itself.

In this blog I would like to share with the SCN community the tool I developed to massively convert these kind of transactions.

Release Upgrade, the same old story

After a release upgrade, these transactions no longer work generating always the same ABAP short dumps:

  • The generated program does not exists.
  • The generated program mismatches the query definition.
  • Short dump of the type IMPORT_ALIGNMENT_MISMATCH in program SAPLAQRUNT

How can we solve this issues?

The SAP OSS Note 393160 - SAP Query: Using queries provides the guidelines for the conversion of such transactions. In brief it suggests to wrap the query call in a parameter transaction instead of running the query generated report.

The standard transaction REISSQMAIN has been created for our scope; we just need to create a parameter transaction and assign values to the below selection screen parameters:

  • Query Work Area
  • Query User Group
  • Query Name
  • Query Variant

Ok, I’ve to say that fixing this kind of issues is very simple :grin:

How should we manage the conversion in case our system contains a lot of transactions defined as above?

Here it comes the hard part!

For each transaction that dumps we should execute the below steps:

  1. Given the generated report name (you can get it from the short dump details), go to transaction SE37 and execute the function module 'RSAQ_DECODE_REPORT_NAME' to get: User Group; Work Area; and Query Name
  2. Create a parameter transaction that runs the REISSQMAIN transaction with the parameters returned as results of the FM processing in step 1

The ABAP query will be regenerated once the query call has been executed.

OK, now that you got it, repeat these steps for all transactions that might dumps! :cry:

The accelerator

During an upgrade project we discovered more than 400 transactions defined as above. For this reason I decided to develop a simple tool; in case you have a clear commitment from the customer, you can perform a mass conversion in few seconds.

The ABAP code that I’m sharing in this blog is quite “vintage”, but you should keep in mind that it was developed during the project, with the aim to speed-up this annoying activity, not to share high quality source code. The rule in my mind was: OK Andrea, develop it rude and... don’t worry about Doctor Zedge :wink:

Watch the video demo

The following video would show how the tool works; I know the quality is not excellent but let me say, the steps to follow are really for dummies 😉

How to download

Code is shared here using SAPLink.

ℹ Before to start the tool, don’t forget to "remote enable" both function modules in function group ZSDN_UPG_AQ as shown below

Remarks

The import in production of this tool is not required. After the first run in DEV, the scheduling of the tool as periodic job should avoid the spread of AQ* report transactions…

Related Discussions/Forums

Related Blogs

The superb blog Dragging SAP Query enabled folks into the development process by otto.gold provides a lot of technical stuffs.

Related Notes

393160 - SAP Query: Using queries

3 Comments
OttoGold
Active Contributor
0 Kudos

Hello,

nice blog! and thanks for a mention! When I wrote it, it didn't attract much attention so I concluded that either not many people are using queries or not many peoples are using queries correctly (also authorization wise etc. from my own experience) or the people that do use queries don't like to talk on SCN :smile: Anyway I will follow this blog of yours and hope for a nice discussion here :smile:

cheers Otto

Former Member
0 Kudos

Regards Otto Gold, I saw one of your discussions about to create an external abap editor. That was long time ago, i guess, the thing is that I like to learn new things about SAP. So if you have any blogs to follow or if don't mind to establish contact, I would be pleasure.

Right now i am working in a SAP template for abapers. it's something small for now.

But i dont have problem to share it.

andrea_olivieri
Contributor
0 Kudos

Ciao Otto,

first of all thanks for your comment. I am very pleased that you enjoyed my blog.

In my experience I have been involved in so many upgrade projects, so I had the fortune to deep dive into the code custom of several SAP ERP systems.

My response is that ABAP queries are widely used, mainly by "Power users" as well as by lot of "Lazy Abapers"...That's Incredible! They are so lazy that they're still using SQVI/SQ01 as kind of "robot" to generate ABAP code :shock: ignoring the existence of incredible tools shared by the SCN community members such as "ALV robot", "ABAP report wizard" and so on...

Best,

Andrea

Labels in this area