Skip to Content

Introduction

The first usual improvisation requirement in self-made Infoset Queries by beginners, is often the requirement of calling other reports from ALV output, just the same way we do in Standard reports.  In ABAP-coded Z Report Programs, there are several techniques of achieving this by syntax like Call Transaction, Submit etc.

The very objective of this documentation is to achieve the same. This topic was briefly discussed in the document 10 Useful Tips on Infoset Queries. But, when the author experienced few exceptions in the technique suggested there and found a solution subsequently, he got the idea of having an exclusive document on this topic.

This document has assumption that readers have working knowledge in developing Infoset Queries.

Here we Start

We have seen earlier, that for enabling Report Calling from the ALV output of an Infoset Query, we need to do these steps in SQ01.

Note: If your Report Assignment option is found disabled, then the reason and setting to restore is here: How to make ‘Report assignment‘ available in ‘SQ01’

Click here on   then on then select  TR (Transaction Code) or RT (Report Program),

  1. When we select TR we need to put only the Transition code.

     


Example:

IE03 if our ALV lines are having Equipment field and we want Equipment Master display upon clicking on the ALV row.

If we have a Maintenance Order Number in the ALV, and we want to have Display Order Screen upon clicking on this row, then we give the Tcode IW33 here.

     2.  In the other case, when we want to call List Reports like IW37 , then we need to select RT in the Report type, where we need to give the

          Program  name (in this case RIAFVC20) in the Report field  and the variant name.

        

So far, it looked very much OK, until I found recently that few field names like EQUNR, MATNR, DOKNR etc, do not exhibit the desired behaviour.


Few cases  where this call report was not working are discussed here.

In one of my Queries, I have Material number (MATNR) in the ALV output, for which I used Report Type TR with Tcode MM03, for the purpose of  Material Master Display. What happened here, was no Material number was passing to the MM03 initial screen, so the display interrupted, In another case, the first attempt display was coming, but the next attempt on different material line in the ALV, the material master display of the first attempt was repeating. Broadly there is a technical problem in passing the Material number.

Another such case was with the Tcode CV03N  (Display of DMS Document) , where the DOKNR, DOKAR field values were not passing to the CV03N initial screen.

Here is the solution I worked-out, using the QU Report Type of Report Assignment


We are taking the MM03 case

As mentioned above, the report Type QU (Query), in the Report Assignment came to rescue.

This option has 3 fields.

First field (User Group):  You know, your User Group.

Second field (Query): We need to develop a simple query for this field.

Third field (Variant): Optional.

So, what required was that a simple Infoset query using MARA table (Material Master) to be created.

And this Query name, was given in the field 2 above.

Let’s see the steps of creating the simple Query for Report Assignment purpose.


SQ02

We are Creating an Infoset (I named it MM03) with Direct read of table option.

This is because, we use only one table.

Select this default option, and Continue.

With this the Key field MATNR is added to the Field Group folder in the Infoset.

And in the Infoset Code Section, give the following code

/wp-content/uploads/2014/02/untitled2_398211.jpg


  Generate Infoset and do not forget to assign it to your User Group.


SQ01

Create a Query (Say MM03) using the above Infoset.

Note:

This query name is going to be used in the Report Assignment.

Go to Basic list screen and Tick the MATNR field in the List fields column.

/wp-content/uploads/2014/02/untitled1_398212.jpg

Save the Query.



Testing.


Here we are examining, the behaviour of 3 cases of Report Assignment)  in the ALV output of an Infoset Query.

We know that when multiple Call report assignments are there in the query, then the options appear as a menu as shown above, upon clicking on a row.

  • Here the first option in the menu namely Display PM Order, is that where I used report type TR and given Tcode IW33,
  • Second one, namely Report Assignment MM03 is through Report Type QU with Query field value MM03 (created as explained above)
  • Third one was the option which was malfunctioning i.e., Report Type TR and Tcode MM03

Now when tested, the first option with TR report-type works satisfactorily, without any problem, passing the Order number (AUFNR) correctly everytime.

The third option, again with report type TR works erratically, unable to pass material number (MATNR) correctly.

The second option is our solution to the erratic behaviour of MM03 through TR report type. i.e., through QU report type. This works very correctly like the first case.

In the case of Display Equipment (IE03) , the above method would work, with the following code in SQ02.

PARAMETERS:

EQUNR LIKE EQUI-EQUNR.
SET PARAMETER ID ‘EQN’ FIELD EQUNR.
CALL TRANSACTION ‘IE03’ AND SKIP FIRST SCREEN.
EXIT.

So that is about the Problems and the Solutions

As referred in the beginning, another parameter which gave trouble in calling reports through report-type TR was, DOKNR (DMS document number).

I have solved this issue too in a similar manner.  The transaction called was CV03N. The code used in the Infoset is given below.

draw.JPG

Note

See the Syntax used  PARAMETER ID  in the syntax used in both the cases above.

The Parameter Id used in MM03 case was, MAT,  and in the CV03N case was CV1  and CV2.

MAT is the Parameter Id for field MATNR, CV1 is for DOKNR and CV2 is for DOKAR.


This parameter-id is the key factor for any Call report to function properly.

Where do we get this?

For example for MATNR, place cursor in MATNR field of any screen, and press F1 on key-board. The pop-up has this value.

Similarly for any other field.

That’s everything I think, about this document.

The author hopes that this document also will be useful to the members, the way the  other documents by the author, in the series of Infoset-queries.

Thank you

Jogeswara Rao K



05/11/2015:

A tip in this context of Report Assignment.

Recently I made 3 ALV reports using Query for Equipment, Functional Location and Material BOMs . And then I was trying to use Report Assignment in the SQ01 of Equipment BOM. i.e., I was trying to call ALV report of Material BOM, when we click on the Component material field of Equipment BOM ALV. My issue was it was not taking to that report. I analyzed the reason to be:The BOM Component field (IDNRK) does not have a ParameterId on which the Report Assignment function depends.


What I did:

I created a user field MATNR in the Infoset Query by giving data type MARA-MATNR which has a Parameter Id MAT, and then equated that to BOM component (IDNRK) field. Means I gave code in the Code area of this user-field MATNR as: MATNR = STPO-IDNRK.

Then I took this user-field to SQ01 and then to List fields (ALV). Now I thought that the ALV has PID, and the Report Assignment would work. But it was not working. Then  I realized the reason to be that as long as IDNRK field is there in ALV it would not work. I removed the IDNRK field from ALV. I already have the values of BOM component material values in my user-field MATNR. But then I had to remove the text field also associated with IDNRK field from the ALV. Now it worked. Now it is taking me to the Material BOM report assigned in the Report assignment when I click on any ALV line of the Equipment BOM, when that material has got a BOM of it own.

But I lost the Component Description field which I had to remove alongwith IDNRK field from the ALV. So what I did was I created another user-field MAKTX in SQ02 and in its code retrieved the Description field from MAKT table. ( Select single maktx from makt into maktx where matnr = stpo-idnrk.). Now I took this MAKTX field also to SQ01 and then to List. So I got back the lost fields also and finally made the Report assignment to work.


Again with a view not to lose this information by memory erosion and for the benefit oft he forum I’m preserving here.

Regards

KJogeswaraRao


To report this post you need to login first.

16 Comments

You must be Logged on to comment or reply to a post.

  1. Akhilesh Singh

    Hi Jogesh,

                       This is very useful documents for Functional Guy’s which that we can able to generate such kind of report.

    Thanks for sharing…Keep it up..!!!

    (0) 
  2. Olivier MORAND

    Hello

    That’s a great job.

    I’m now on an EHP7 system and calling IE03, the equipment number is not transfered to the called transaction. Same issue with IW33.

    Any idea?

    (0) 
    1. K Jogeswara Rao Post author

      Hello JOSEPH,

      I have already dealt this case: See this section of the post.

      So far, it looked very much OK, until I found recently that few Parameters like MATNR, DOKNR etc, do not exhibit the desired behaviour.

      Yours is exactly the same case I illustrated for MM03 in the above section. Work in similar lines, develop a simple query for Display Equipment and use it here.

      The code part in SQ02 will be:

      PARAMETERS:

      EQUNR LIKE EQUI-EQUNR.
      SET PARAMETER ID ‘EQN’ FIELD EQUNR.
      CALL TRANSACTION ‘IE03’ AND SKIP FIRST SCREEN.
      EXIT.

      Good luck

      KJogeswaraRao





      (0) 
      1. Olivier MORAND

        Ok, thanks a lot.

        I probably missed this part.

        I’ve read that it doesn’t word for MATNR, and other fields. But in you example IE03 seemed to be ok.

        10 Useful Tips on Infoset Queries

        Tips2. You mentionned IE03.

        Maybe to be more accurate on my issue, here are the steps:

        Run my query / run report IE03, SAP stays on the first screen of IE03 with equipment number blank and error message to fill in an equipment number.

        Now go to IE03, display the first equipment number found.

        Go back to the query / Run it / Run report for IE03, IE03 is displayed but with the equipment number just displayed before with direct IE03 and NOT with the one from the query line.

        Thank you very much for your help.

        Regards

        Olivier

        (0) 
          1. Olivier MORAND

            Maybe to be more accurate on my issue, here are the steps:

            Run my query / run report IE03, SAP stays on the first screen of IE03 with equipment number blank and error message to fill in an equipment number.

            Now go to IE03, display the first equipment number found.

            Go back to the query / Run it / Run report for IE03, IE03 is displayed but with the equipment number just displayed before with direct IE03 and NOT with the one from the query line.

            I will have a look now with your method.

            I let you know.

            Thanks

            Olivier

            (0) 
          2. Olivier MORAND

            It works!!

            thanks.

            I’ve just changed the transaction code in the ABAP code of the info-set because I use a transaction which calls IE03 witha default transaction variant.

            The result is great!!

            Regards

            Olivier

            (0) 
  3. Alex Cotoara

    Thanks a lot for sharing this with us.

    I find your article very good in content and organized.

    It helped me in one of the current tasks

    Many thanks again !

    Alex

    (0) 
    1. K Jogeswara Rao Post author

      Thank you Alex,

      Such feedbacks give the author more satisfaction compared to the scores he gets through the RATINGs and LIKEs for the article.

      Regards

      (0) 
  4. Brian Conforto

    Hello,

    Congratulations and thanks for this useful information.

    is it possible to have a conditional formatting for a field?

    Example: if field > 10 then color = red.

     

    Regards,

    Brian

    (0) 

Leave a Reply