Skip to Content
0
Former Member
Jul 20, 2007 at 07:12 AM

about views

23 Views

am using blow code 8 times in the program with different condition, which can'b changed, coz b4 that am coalculating some field to pass them in where clause.

i have decided to create a new custom view,

1. can i get better performance

2. can i declare an internal table with that view like we do with db table? if so how?

3. i want to create view with required fields only if i use select *, will it effect later? is it advisable to use * in this case?

SELECT

a~lgnum

a~tanum

a~bwart

a~bwlvs

a~bdatu

a~bzeit

a~qdatu

a~betyp

a~benum

b~tapos

b~werks

b~matnr

b~vltyp

b~nltyp

b~vlenr

b~nlenr

b~nsola

b~nista

b~meins

b~wdatu

b~wenum

a~mjahr

b~wepos

b~zeugn

INTO TABLE gt_ltap

FROM ltak AS a INNER JOIN ltap

AS b ON atanum = btanum

AND algnum = blgnum

FOR ALL ENTRIES IN gt_matnr "MB

WHERE a~lgnum EQ p_lgnum

AND a~qdatu GE gw_ref-l_date

AND b~matnr EQ gt_matnr-matnr "MB

AND b~pquit EQ 'X'

AND b~vltyp IN gr_vltyp

AND b~nltyp IN gr_nltyp

  • AND b~vlenr IN gr_vlenr

AND b~werks EQ p_werks.

waiting for responce.