Skip to Content
0
Former Member
Oct 22, 2008 at 02:34 PM

please validate me in my statements.

23 Views

1). Do i need to use CLEAR : sy-subrc. In my below code ?

SORT gt_knvp BY kunnr vkorg.

LOOP AT gt_bstnk_storeno_kunnr INTO wa_bstnk_storeno_kunnr.

READ TABLE gt_knvp INTO wa_knvp

WITH KEY kunnr = wa_bstnk_storeno_kunnr-sold_to

vkorg = wa_bstnk_storeno_kunnr-brd_idfr

BINARY SEARCH.

IF sy-subrc = 0.

wa_bstnk_storeno_kunnr-kunn2 = wa_knvp-kunn2.

MODIFY gt_bstnk_storeno_kunnr FROM wa_bstnk_storeno_kunnr.

ENDIF.

CLEAR : sy-subrc. -


?

ENDLOOP. " LOOP at gt_bstnk_storeno_kunnr INTO wa_bstnk_storeno_kunnr.

2). Do I need to use IF Sy-subrc = 0 ?

ENDIF

CLEAR : sy-subrc. ---? In my below code ?

IF NOT wa_869_input_rec-store_no IS INITIAL.

LOOP AT gt_vbpa INTO wa_vbpa

WHERE kunnr IN r2_shipto

AND parvw = 'WE'

AND ( name2+7(10) = wa_869_input_rec-store_no

OR j_3astcu = wa_869_input_rec-store_no ).

LOOP AT gt_vbak INTO wa_vbak

WHERE vbeln = wa_vbpa-vbeln

AND ( bstnk = wa_869_input_rec-po_no

AND kunnr IN r1_soldto )

AND vkorg = wa_869_input_rec-brd_idfr

AND kunn2 = wa_vbpa-kunnr

IF Sy-subrc = 0 ?

wa_vbeln-sign = 'I'.

wa_vbeln-option = 'EQ'.

wa_vbeln-low = wa_vbak-vbeln.

wa_vbeln-high = ' '.

APPEND wa_vbeln TO r3_vbeln.

CLEAR : wa_vbeln.

ENDLOOP. " LOOP AT gt_vbak INTO wa_vbak

ENDIF

CLEAR : sy-subrc. ---?

ENDLOOP. " LOOP AT gt_vbpa INTO wa_vbpa

THANKS IN ADVANCE.

Edited by: sam kumar on Oct 22, 2008 4:34 PM