Skip to Content
0
Former Member
Apr 24, 2007 at 11:27 AM

clarification

21 Views

Hi ,

Can i maintain loop's like this.

Please help me.

**************************************************************

FORM fetch_data1.

SELECT zztono boedate impdpsno impdpdat zzpladate totdtyval

zzintrst zzdtyval zzkunnr bondno docno ZZPLASLNO

INTO CORRESPONDING FIELDS OF TABLE it_itab

FROM /ivl/zmb_behdr

WHERE doctype EQ 'GBOE'

AND boedate IN s_boedt

AND boestat NE 'X'.

SELECT actvalu FROM /ivl/zmb_bedut

INTO it_bedut

WHERE doctype EQ 'GBOE'

AND docyear = /ivl/zmb_behdr-docyear

AND docno = /ivl/zmb_behdr-docno .

LOOP AT it_bedut.

CASE it_bedut-dutcode

WHEN 'BCD'.

MOVE it_bedut-actvalu to it_itab-bcd.

WHEN 'CVD'.

MOVE it_bedut-actvalu to it_itab-cvd.

WHEN 'ZCES'.

MOVE it_bedut-actvalu to it_itab-zces.

WHEN 'ZHCS'.

MOVE it_bedut-actvalu to it_itab-zhcs.

WHEN 'ZEDC'.

MOVE it_bedut-actvalu to it_itab-zedc.

WHEN 'ZHDC'.

MOVE it_bedut-actvalu to it_itab-zhdc.

WHEN 'SAD'.

MOVE it_bedut-actvalu to it_itab-sad.

ENDCASE.

ENDLOOP.

APPEND it_itab.

SORT it_itab.

LOOP AT it_itab.

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'

exporting

input = it_itab-ZZPLASLNO

IMPORTING

OUTPUT = it_itab-ZZPLASLNO.

.

w_dtyval = it_itab-zzdtyval.

CALL FUNCTION 'FI_ROUND_AMOUNT'

EXPORTING

amount_in = w_dtyval

company = '1970'

currency = 'INR'

IMPORTING

amount_out = w_dtyval

  • DIFFERENCE =

  • ROUNDING_UNIT =

.

it_itab-zzdtyval = w_dtyval.

MODIFY it_itab.

SELECT SINGLE bondregnno

INTO it_itab-bondregnno

FROM /ivl/zmb_bndmas

WHERE bondno = it_itab-bondno.

SELECT SINGLE kvgr3 INTO it_itab-kvgr3

FROM knvv

WHERE kunnr = it_itab-zzkunnr

AND kvgr3 IN s_kvgr3.

IF sy-subrc = 0 .

MODIFY it_itab TRANSPORTING bondregnno kvgr3.

w_duty = w_duty + it_itab-zzdtyval.

w_int = w_int + it_itab-zzintrst.

w_tot = w_tot + it_itab-totdtyval.

ELSE.

DELETE it_itab.

CONTINUE.

ENDIF.

ENDLOOP.

DESCRIBE TABLE it_itab LINES w_hdline.

ENDFORM. " fetch_data

******************************************************************

Please help me in this

Thanks