‎2008 Apr 14 5:12 AM
Hi SAP Abap expert,
My roles is a functional, I'm in process to develop new report for 6 months total of consumption.
Table contain the data of consumption can be grap from MVER.
The Total for each Month can be grap from fields GSV01- GSV13.
let say, current month is GSV04, how can i tell the abapers to Grap GSV03 in SQL Statement
Please Help, just learning
‎2008 Apr 14 5:23 AM
Hi,
as u said that u want GSV03 field data. u can just tell him to grap the required field by giving the TABLE NAME and FIELD NAME.
tell him how the data is stored in these fields.i.e., each field contains monthly data GSV01-GSV13.
reward if helpful
raam
‎2008 Apr 14 5:50 AM
Hi,
Tell ABAPer to pick current month from system date with using
Function Module "DATE_TO_PERIOD_CONVERT"
where I_DATE = SY-DATUM
and I_PERIV = 'K1'
get month & year
Example month(MON) = 01 & Year(Y1) = 2008.
Now use the following code.
concatenate GSV MON into l_gsvbr
now from table mver select query
select ******* ***** ****** into table itab
where matnr = ****
and werks = ***
and gjahr = Y1.
loop at itab.
if l_gsvbr = GSV01.
l_gsv = itab-gsv01.
elseif l_gsvbr = GSV02.
l_gsv = itab-gsv02.
******
*******
*******
endif.
endloop.
If it is helpful pls reward me.
Regards
Srimanta
‎2008 Apr 15 4:01 AM
Hii Srimanta/Abapers
Thank for your quit reply
The report i would like to develop is like this
Material (MATNR) = ABC123
Current Month (System Month) = April
N-3 (MVER-GSV**) = March
N-2 (MVER-GSV**) = February
N-1 (MVER-GSV**) = January
if current month = <April>, how the program could determine for column N-3 is what month ? and also same with N-2 and N-1
please help