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
Labels in this area