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

SQ01 Sap Query - additional fields doesn't appear

Former Member
0 Likes
5,628

Hi everybody,

i've created a SAP Query with transaction SQ01 but one of my additional fields doesn't appear when i execute my Query.

My query shows the G/L account number and the field status Group (table SKB1)

I just need to display equally the text field of "field status Group" but it doesn't work.

When i look at the parameters i can see that it makes the link between the table T004G and SKB1 in order to find the textfield but the field stay blank.

For information T004g is a Pooled table.

Is someone could help me?

Thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,002

Yes Santosh, it would be great if you could show me the steps to insert Data retrieval in my query.

Thanks a lot

Hi everybody,

i've created a SAP Query with transaction SQ01 but one of my additional fields doesn't appear when i execute my Query.

My query shows the G/L account number and the field status Group (table SKB1)

I just need to display equally the text field of "field status Group" but it doesn't work.

When i look at the parameters i can see that it makes the link between the table T004G and SKB1 in order to find the textfield but the field stay blank.

For information T004g is a Pooled table.

Is someone could help me?

Thank you

4 REPLIES 4
Read only

santosh_patil6
Explorer
0 Likes
3,002

hi,

Since T004G is a pooled table you cannot use a table join.

However you can achieve what you want by using a Data Retrieval program inside your query.

let me know if you need the steps for that.

Regards,

Santosh

Read only

Former Member
0 Likes
3,003

Yes Santosh, it would be great if you could show me the steps to insert Data retrieval in my query.

Thanks a lot

Read only

0 Likes
3,002

Hi,

First you need to create a structure in Data Dictionary - SE11. This structure will contain all the fields that you want to display in the query output.

Example - Name the Strucutre as zz_infoset01

fields of the structure( for your requirement )

BUKRS

SAKNR

FSTAG

FSTTX

Go to T-code SQ02

1) Enter the Infoset name - zinfoset01 press create

2) Enter a Short Description - G/L Infoset - 01

3) select radio button - "Data retrieval by program"

and in "data structure" enter zz_infoset01

4) select "Integrated program" radio button

5) In the next screen click on the "Data reading program" push button(on the application toolbar)

6) An Editor will open with the following code

REPORT rsaqdvp_template .

*

----


  • declarations

  • (insert your declarations in this section)

----


DATA:

zz_infoset01 TYPE zz_infoset01 ,

it_data TYPE STANDARD TABLE OF zz_infoset01 WITH HEADER LINE.

----


  • selection screen statements

----


  • (define your selection-screen here)

  • !! the following comment MUST NOT BE CHANGED !!

*<QUERY_HEAD>

----


  • read data into IT_DATA

----


  • (select your data here into internal table IT_DATA)

----


  • output of the data

  • (this section can be left unchanged)

----


LOOP AT it_data.

zq01 = it_data. .

  • !! the following comment MUST NOT BE CHANGED !!

*<QUERY_BODY>

ENDLOOP.

7) when you insert your code in the sections it will look like this

REPORT rsaqdvp_template .

*

----


  • declarations

  • (insert your declarations in this section)

----


Tables:SKB1,

t004g.

DATA:

zz_infoset01 TYPE zz_infoset01 ,

it_data TYPE STANDARD TABLE OF zz_infoset01 WITH HEADER LINE.

----


  • selection screen statements

----


  • (define your selection-screen here)

  • !! the following comment MUST NOT BE CHANGED !!

*<QUERY_HEAD>

*These will be the input parameters for the query

parameters: sp_bukrs like skb1-bukrs,

sp_saknr like skb1-saknr.

----


  • read data into IT_DATA

----


  • (select your data here into internal table IT_DATA)

*get all the G/L for com code and G/L in selection screen

SELECT bukrs saknr fstag

INTO TABLE it_data

FROM skb1

WHERE bukrs = sp_bukrs

AND saknr = sp_saknr.

----


  • output of the data

  • (this section can be left unchanged)

----


*for every G/L get the status text from t004g for lang 'EN'

LOOP AT it_data.

SELECT SINGLE fsttx

FROM t004g

INTO it_data-fsttx

WHERE spras = 'EN' "Language

AND bukrs = it_data-bukrs

AND fstag = it_data-fstag.

zz_infoset01 = it_data. .

  • !! the following comment MUST NOT BE CHANGED !!

*<QUERY_BODY>

ENDLOOP.

😎 Save and generate the Infoset.By clicking on the generate button.

9) Now assign the Infoset to the query in SQ01 and select the output list fields.

let me know if you need more info. Also award points if helpful.

Regards,

Santosh

Read only

Former Member
0 Likes
3,002

Thank you very much Satosh for this answer. it's very nice to you to share your knowledge with other developers.

Regards.