‎2007 Jun 27 12:35 PM
hi ,
i have a requirement of developing a ALV report. i should fetch data from one view i.e, CAUFV for fields AUFNR,SOWRK,AUART,GSTRP,RSNUM and from 4 other tables for six fields. so i dont understand how to deal with view and how to declare internal tables.
warm regards,
kiran.
points will be awarded.
‎2007 Jun 27 12:42 PM
Declare the internal table as
data: begin of itab occurs 0,
fld1 type field1(From view)
fld2 type field2 (from view)
.
.
fld3 type field3(from table1)
.
.
end of itab.
and select values of these fields from the respective view and table values.
‎2007 Jun 27 12:42 PM
Declare the internal table as
data: begin of itab occurs 0,
fld1 type field1(From view)
fld2 type field2 (from view)
.
.
fld3 type field3(from table1)
.
.
end of itab.
and select values of these fields from the respective view and table values.
‎2007 Jun 27 12:42 PM
Hi,
Create a local Structure or a Zstrucutre in the Dictionary SE11 with the fields that you require. (Use the same field names as you want to read from view and other tables)
In your program create one internal table of this type.
DATA: itab type table of <your-type>.
From the view read as follows.
SELECT AUFNR SOWRK AUART GSTRP RSNUM INTO CORRESPONDING FIELDS OF itab.
Then Read data from these four tables using FOR ALL ENTRIES and ITAB.
Then update the ITAB from the FOUR tables using LOOP AT ITAB and READ TABLE ITAB1 etc.
Regards,
Sesh
‎2007 Jun 27 12:43 PM
hi.
data:begin of itab occurs0,
AUFNR type CAUFV -AUFNR
SOWRK type CAUFV-SOWRK
AUART type CAUFV -AUART
GSTRP type CAUFV -GSTRP
RSNUM type CAUFV -RSNUM
end of itab.
Reward all helpfull answers.
Regards.
Jay
‎2007 Jun 27 12:58 PM
Hi Kiran,
This is data base view. so we can apply select statement with out any tense. just apply select query on tha tview as same as on table with the required fields.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar.