07-23-2009 6:01 AM
Hi friends,
I have a small issue in my program. Actually i selected a condition records in my internal table. Its contain knumv, kschl, kbetr. My problem is, I need to add KBETR value according to the condition type ZSPR + ZMIT. But this internal table contains ZWDC or ZWD0 (Condition types) i no need to calcualte anything just i need to put zero value for that.
So for that if i use Read statmenet how it will work? bze first i need to consider zspr value after i need consider zmit value. finally i need consider two more condition type ( ZWDC and ZWDO), can any how help this simple logic?
Mohana..
07-23-2009 6:54 AM
Do Like this
You can loop at the internal table where condition type = ZSPR or condition type = ZMIT .
inside loop.
Use if condition
if wa-kschl = ZSPR or wa_kschl = ZMIT.
take variable where u wnt to store
total = wa-kbetr + total.
endif.
endloop.
Best regards,
raj S
07-23-2009 6:44 AM
You can loop at the internal table where condition type = ZSPR or condition type = ZMIT etc..
inside loop.
use case for condition type .
... do processing here ..
endcase.
endloop.
07-23-2009 6:54 AM
Do Like this
You can loop at the internal table where condition type = ZSPR or condition type = ZMIT .
inside loop.
Use if condition
if wa-kschl = ZSPR or wa_kschl = ZMIT.
take variable where u wnt to store
total = wa-kbetr + total.
endif.
endloop.
Best regards,
raj S
07-23-2009 6:54 AM
Hi,
Loop Internal table itab which Its contain knumv, kschl, kbetr.
Then Using If ENDif and Case Stmt u can add the value.
Loop at itab into wa_itab.
if wa_itab-kschl EQ 'ZSPR'
addition Logic
elseif wa_itab-kschl EQ 'ZMIT'
addition Logic
elseif wa_itab-kschl EQ 'ZWDC '
addition Logic
elseif wa_itab-kschl EQ 'ZWDO'
addition Logic
endif.
Endloop.
Same with Case Stmt
Thanks & Regards,
SShreeMohan