‎2007 Jul 16 9:12 AM
Hi All,
I have used loop statement..
loop at it_date.
loop at itmat. "where budat = it_date-date.
if itmat-budat = <b>it_date-date</b>.
PERFORM opbal_data.
PERFORM all_data.
PERFORM mat_data.
endloop.
endloop.
it_date-date contains from 01.05.2007 to 30.05.2007.
first time its executed correctly, 2nd time it_date-date ll not be increment in this loop like 02-05-2007.3rd time only its increment as a 03-05-2007.
please suggest me. How to use..
‎2007 Jul 16 9:17 AM
Hi TT ,
here u have to get internal table like
1/10/07
2/10/07
etc .
for this u have to use FM CSCP_PARA1_GET_PERIODS
which will return DATES.
regards
Peram
‎2007 Jul 16 9:17 AM
Here is your code ....
SORT it_date BY date.
SORT itmat BY budat .
[code]loop at it_date.
*loop at itmat. "where budat = it_date-date.
Read table itmat with key budat = it_date-date.
*if itmat-budat = it_date-date.
if sy-subrc = 0 .
PERFORM opbal_data.
PERFORM all_data.
PERFORM mat_data.
endif.
*endloop.
endloop.if this is not working place your full code .....
reward points if it is usefull ...
Girish
‎2007 Jul 16 9:38 AM
Hi,
This might work
loop at it_date.
loop at itmat. where budat IN it_date-date.
PERFORM opbal_data.
PERFORM all_data.
PERFORM mat_data.
endloop.
endloop.
Regards,
Shruthi R
‎2007 Jul 16 9:46 AM
Use the following logic...
loop at itmat.
read table it_date with key date = itmat-budat.
if sy-subrc = 0.
PERFORM opbal_data.
PERFORM all_data.
PERFORM mat_data.
endif.
endloop.
This will help u..
reward if helpful..
Cheers,
Sharadendu