Issues with infotype 0021 and view infotypes

Symptom

Some infotypes like infotype 0021, have infotypes views assigned in table V_T582V.

Cause

The query is not always aware that infotypes belong together as it is a general tool. Infotypes which we may consider related are not recognized as such by the ad-hoc.

We will take as example here infotype 0021 and 0397, but this also applies to any other view assigned to infotype 0021. You should be able to adapt the reply below for reporting on the other IT0021-related infotypes.

Example: if infotype 0021 has 2 datasets with values ‘A’, ‘B’ and infotype 0397 has 2 corresponding datasets with values ‘1’, ‘2’ the output is:

A 1
                    A 2
                    B 1
                    B 2

While this example is specific to IT0021 & IT0397, It confirms that the tool does not automatically ‘match’ infotypes.

Solution

Fortunately there is  a solution to this issue. By default, the query is not able to detect this relation between infotype 0397 and 0021. It treats them as complete independent infotypes. But this is of course only true from a database point of view.

But it can be configured to handle infotype views correctly following the instructions below:

– Change the infoset you are using for your query (SQ02).
– Use function GOTO->CODE->DATA
– Type in the following two lines:

*$HR$ [P0397]
    *$HR$ PRIMARY_INFTY = ‘P0021’

– Save and generate the infoset
– Goto query maintenance (SQ01)
– Generate your query by using function QUERY->MORE_FUNCTIONS->GENERATE PROGRAM

Afterwards, your query will handle infotypes 0397 and 0021 correctly.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.