2007 Sep 04 10:56 AM
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
2007 Sep 04 3:46 PM
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
2007 Sep 04 3:34 PM
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
2007 Sep 04 3:46 PM
Yes Santosh, it would be great if you could show me the steps to insert Data retrieval in my query.
Thanks a lot
2007 Sep 04 4:42 PM
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
2007 Sep 05 7:55 AM
Thank you very much Satosh for this answer. it's very nice to you to share your knowledge with other developers.
Regards.