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
743

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 RESB (MATNR,MENGE,PSMNG), RSDB(BANFN,BNFPO) etc for six fields. so i dont understand how to deal with view and how to declare internal tables.

so can anybody send how the declaration will be and how the select statement will be.

warm regards,

kiran.

points will be awarded.

5 REPLIES 5
Read only

Former Member
0 Likes
691

Hi,

View is nothing but a temporary transparent table .U can use diz view as a table itself.. select query and internal table declaration is asusual.

Regards,

Ashok...

Read only

Former Member
0 Likes
691

Hi,

Internal table declaration

This may be your final internal table of this query...

data : begin of itab occurs 0 ,

aufnr type CAUFV -AUFNR,

sowrk type CAUFV -SOWRK,

auart type CAUFV -AUART,

gstrp type CAUFV -GSTRP,

rsnum type CAUFV -RSNUM,

matnr type resb-MATNR,

menge type resb-MENGE,

psmng type resb-PSMNG,

banfn type RSDB-BANFN,

bnfpo type rsdb-BNFPO,

end of itab.

Select statemant.

just fetch needed fields frm caufv and with the corresponding fields os caufv fetch values from other 2 tables...

Regards,

Ashok...

Read only

Former Member
0 Likes
691

first of all you should declare view in your report.........

you can use your view as same like structure........

and for better purpose you should select require fields from select tables with where conditions and then collect them to a one internal table.

finally as per your requirment you should use your ALV functions

and pass proper parameter.

if you get confusion again reply to me.

Read only

Former Member
0 Likes
691

Hi

declare the view like

TABLES: viaufks. " PM Order Details

CLEAR: i_ord.

REFRESH: i_ord.

SELECT aufnr " PM Order No

equnr " Equipment Number

tplnr " Functional Location

auart " Order Type

aedat " Order Date

swerk " Maintenance Plant

werks " Plant

ktext " Order Text

kokrs " Controlling Area

objnr " Object Id

kostl " Cost Center

INTO TABLE i_ord

FROM viaufks

WHERE aufnr IN s_aufnr AND

equnr IN s_equnr AND

tplnr IN s_tplnr AND

swerk IN s_swerk AND

aedat IN s_date AND

auart IN s_auart.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
691

HI.

No diffrence between view and table whilde doing select quary.

Reward all helpfull answers.

Regards.

Jay