‎2007 Jul 13 2:22 PM
i am a functional developer and i am just trying to get the fields in structure FAGL_S_RFSSLD00_LIST to use in this query. Is it possible.
If yes what is the way to do it.
I have the program generated like this when i created the infoset
REPORT RSAQDVP_TEMPLATE .
*
----
declarations
(insert your declarations in this section)
----
data:
FAGL_S_RFSSLD00_LIST type FAGL_S_RFSSLD00_LIST ,
it_data type standard table of FAGL_S_RFSSLD00_LIST .
field-symbols: <struc> type FAGL_S_RFSSLD00_LIST .
----
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 assigning <struc>.
move-corresponding <struc> to FAGL_S_RFSSLD00_LIST .
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_BODY>
I just need to know what i should fill in the query head and body if I need all the fields in the structure to be selected for the Query
‎2007 Jul 13 2:49 PM
Hello Krishna,
The structure FAGL_S_RFSSLD00_LIST should be available in data dictionary (SE11).
REPORT RSAQDVP_TEMPLATE .
*
----
declarations
(insert your declarations in this section)
----
TABLES: FAGL_S_RFSSLD00_LIST "<----
inserted.
DATA: it_data type standard table of FAGL_S_RFSSLD00_LIST .
field-symbols: <struc> type FAGL_S_RFSSLD00_LIST .
----
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)
example:
SELECT <your list of fields>
FROM <your table name>
INTO TABLE IT_DATA
WHERE <Your filter criteria based on selection screen>.
----
output of the data
(this section can be left unchanged)
----
loop at it_data assigning <struc>.
move-corresponding <struc> to FAGL_S_RFSSLD00_LIST .
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_BODY>
ENDLOOP. "<----
inserted
-
In SQ02 create the info sets with 'program' options. provide the program name and the
Structure name FAGL_S_RFSSLD00_LIST also in SQ02.
generate the infosets and in SQ01 create the query with the fields you want to display in the list .
Message was edited by:
Amarjit Singh
‎2007 Jul 13 4:10 PM
it seems it only works with Tables but not structures. is there a way to make it work for structures.
Could you please clarify.
Thanks
krishna
‎2007 Jul 13 4:28 PM
No it works for structure also.
Here in my code
Tables: <----
does not mean a SAP table.
It is a work area. A stracture to hold the records of your data retrieve from a SAP database table.
You may retrieve data from any SAP tables but finaly your data should be passed to a structure which you define in the info sets.
If you need any help please let me know.
Regards,
A.Singh
‎2007 Jul 16 3:13 PM
If that is the case, could you please provide me detailed exact code for the below. I am having some code errors
As for the select statement, I would need all the fields from structure FAGL_S_RFSSLD00_LIST
REPORT RSAQDVP_TEMPLATE .
*
----
declarations
(insert your declarations in this section)
----
data:
FAGL_S_RFSSLD00_LIST type FAGL_S_RFSSLD00_LIST ,
it_data type standard table of FAGL_S_RFSSLD00_LIST .
field-symbols: <struc> type FAGL_S_RFSSLD00_LIST .
----
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 assigning <struc>.
move-corresponding <struc> to FAGL_S_RFSSLD00_LIST .
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_BODY>
endloop.
‎2007 Jul 16 4:04 PM
Hello Krishna,
Could you tell me the table (not structure) from which your want to fetch the records.
Regards,
A.Singh
‎2007 Jul 16 4:23 PM
The above listed structure is the one which provides me with Gl balances.
My problem is there is no way i can do some complex calculations using a query if I take the information from tables. I need to fetch gl balances and these are only stored in structures.