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

regarding report

Former Member
0 Likes
548

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

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.

4 REPLIES 4
Read only

Former Member
0 Likes
526

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.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
525

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

Read only

Former Member
0 Likes
525

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

Read only

Former Member
0 Likes
525

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.