‎2008 Aug 07 9:46 AM
hi
i fetch data from table s034 but it take more time so have any soulation ? [already use pri.key in query then also take more time]
query is:-
select cmzubb cmagbb from s034
into corresponding fields of table
t_s031 where sptag > m_budat
and werks in ('2502','1001','2002')
and charg in bwtar
and charg NOT in ('S','X')
and matnr in matnr
and ( lgort = 'FG01' or ( lgort = 'FG02' AND werks
= '2002' ) ).
‎2008 Aug 07 9:54 AM
for table t_s031 change the declaration to..
DATA: BEGIN OF t_s031 OCCURS 0,
cmzubb type s034-cmzubb,
cmagbb type s034-cmzubb,
END OF t_s031 .
and in the select query...
remove corresponding fields of
That ll improve pervformance
‎2008 Aug 07 9:54 AM
for table t_s031 change the declaration to..
DATA: BEGIN OF t_s031 OCCURS 0,
cmzubb type s034-cmzubb,
cmagbb type s034-cmzubb,
END OF t_s031 .
and in the select query...
remove corresponding fields of
That ll improve pervformance
‎2008 Aug 07 10:01 AM
‎2008 Aug 07 10:05 AM
DATA: BEGIN OF t_s031 OCCURS 0,
cmzubb type s034-cmzubb,
cmagbb type s034-cmagbb,
END OF t_s031 .
hey in the previous post i have given the second declaration wrongly...declare the internal table like this......
‎2008 Aug 07 11:45 AM
‎2008 Aug 07 10:09 AM
hi do like this..
ranges: r_werks for t001w-werks,
r_logrt for mard-lgort .
r_werks-low = 2502.
r_werks-sign = 'I'.
r_werks-option = 'EQ'.
append r_werks.
r_werks-low = 2502.
append r_werks.
r_werks-low = 2502.
append r_werks.
r_werks-low = 2502.
append r_werks.
r_lgort-low = 'FG02'.
r_lgort-sign = 'I'.
r_lgort-option = 'EQ'.
append r_lgort.
r_lgort-low = '2002'.
append r_lgort.
select
cmzubb
cmagbb
from s034
into corresponding fields of table
t_s031 where sptag gt m_budat
and werks in r_werks
and charg in bwtar
and charg NOT in ('S','X')
and matnr in matnr
and lgort = 'FG01'
or logrt in r_lgort..
‎2008 Aug 07 10:11 AM
Your query is OK. Simply I would recommend you Create new index on table S034 with all these parameters which you have set in query condition.
Fields for Index Creation.
werks
charg
matnr
lgort
Also change ur query as per below. I also have doubt on bold condition(Highlighted).
select cmzubb cmagbb from s034
into corresponding fields of table t_s031
where sptag > m_budat
and werks in ('2502','1001','2002')
and charg in bwtar
and charg NOT in ('S','X')
and matnr in matnr
and ( lgort eq 'FG01' or ( lgort eq 'FG02' AND werks eq '2002' ) ).
rgds
rajesh
‎2008 Aug 07 10:46 AM
Hi krupa, use the logic below...
Types:
begin of x_s034,
CHARG type CHARG_D,
CMZUBB type MZUBB,
end of x_s034.
data:
i_s034 type standard table of x_s034.
select CHARG
CMZUBB
into table i_s034
from s034
where sptag > m_budat
and werks in ('2502','1001','2002')
and charg in bwtar
and charg NOT in ('S','X')
and matnr in matnr
and ( lgort = 'FG01' or ( lgort = 'FG02' AND werks
= '2002' ) ).
I think it will work
‎2008 Aug 07 11:07 AM
hi i do like :-
TYPES: BEGIN OF TY_S030,
cmzubb TYPE s034-cmzubb,
cmagbb TYPE s034-cmagbb,
END OF TY_S030.
DATA: T_S030 TYPE TABLE OF TY_S030 WITH HEADER LINE.
select cmzubb cmagbb from s034
into table T_S030
where matnr in matnr
and werks in ('2502','1001','2002')
and charg in bwtar
and charg NOT in ('S','X')
and sptag > m_budat
and ( lgort = 'FG01' or ( lgort = 'FG02' AND werks = '2002' ) ).
but it take time same not work