‎2007 Apr 18 11:15 AM
Hi Experts,
See this code:
LOOP AT T_EDPAR .
CLEAR T_LIKP_LIPS .
READ TABLE T_LIKP_LIPS WITH KEY KUNNR = T_EDPAR-KUNNR
BINARY SEARCH.
IF SY-SUBRC EQ 0 .
MOVE T_EDPAR-KUNNR TO T_LIKP_LIPS-SNDPRN.
MODIFY T_LIKP_LIPS TRANSPORTING SNDPRN .
ENDIF.
ENDLOOP.
Wheni done Extended syntax check for this giving an error (Problematic statement)
like this:
Indirect Index Access to Internal Table T_LIKP_LIPS
Outside a LOOP, this causes a short dump
What may be the problem?
‎2007 Apr 18 11:19 AM
change modify statement to this
MODIFY <b>TABLE</b> T_LIKP_LIPS TRANSPORTING SNDPRN
‎2007 Apr 18 11:19 AM
change modify statement to this
MODIFY <b>TABLE</b> T_LIKP_LIPS TRANSPORTING SNDPRN
‎2007 Apr 18 11:20 AM
use like this
LOOP AT T_EDPAR .
CLEAR T_LIKP_LIPS .
READ TABLE T_LIKP_LIPS WITH KEY KUNNR = T_EDPAR-KUNNR
BINARY SEARCH.
IF SY-SUBRC EQ 0 .
MOVE T_EDPAR-KUNNR TO T_LIKP_LIPS-SNDPRN.
MODIFY T_LIKP_LIPS <b>INDEX SY-TABIX</b>.
ENDIF.
regards
shiba dutta
Message was edited by:
SHIBA DUTTA
‎2007 Apr 18 11:21 AM
Aling with chandu's suggestion, you should also make this change to avoid run time dumps:
LOOP AT T_EDPAR .
CLEAR T_LIKP_LIPS .
READ TABLE T_LIKP_LIPS WITH KEY KUNNR = T_EDPAR-KUNNR
BINARY SEARCH.
IF SY-SUBRC EQ 0 .
MOVE T_EDPAR-KUNNR TO T_LIKP_LIPS-SNDPRN.
MODIFY <b>table</b> T_LIKP_LIPS TRANSPORTING SNDPRN <b>index sy-tabix</b>.
ENDIF.
ENDLOOP.
‎2007 Apr 18 11:25 AM
‎2007 Apr 18 11:21 AM
Hi,
try this
data lv_tabix like sy-tabix.
LOOP AT T_EDPAR .
CLEAR T_LIKP_LIPS .
READ TABLE T_LIKP_LIPS WITH KEY KUNNR = T_EDPAR-KUNNR
BINARY SEARCH.
IF SY-SUBRC EQ 0 .
lv_tabix = sy-tabix.
MOVE T_EDPAR-KUNNR TO T_LIKP_LIPS-SNDPRN.
MODIFY table T_LIKP_LIPS index lv_tabix TRANSPORTING SNDPRN .
ENDIF.
ENDLOOP.
‎2007 Apr 18 11:22 AM
hi,
do this way
data : lv_tabix like sy-tabix.
LOOP AT T_EDPAR .
<b> lv_tabix = sy-tabix.</b>
CLEAR T_LIKP_LIPS .
READ TABLE T_LIKP_LIPS WITH KEY KUNNR = T_EDPAR-KUNNR
BINARY SEARCH.
IF SY-SUBRC EQ 0 .
MOVE T_EDPAR-KUNNR TO T_LIKP_LIPS-SNDPRN.
MODIFY T_LI<b></b>KP_LIPS client specified index lv_tabix TRANSPORTING SNDPRN .
ENDIF.
‎2007 Apr 18 11:23 AM
LOOP AT T_EDPAR .
CLEAR T_LIKP_LIPS .
READ TABLE T_LIKP_LIPS WITH KEY KUNNR = T_EDPAR-KUNNR
BINARY SEARCH.
IF SY-SUBRC EQ 0 .
MOVE T_EDPAR-KUNNR TO T_LIKP_LIPS-SNDPRN.
MODIFY <b>table</b> T_LIKP_LIPS <b>index sy-tabix</b> TRANSPORTING SNDPRN .
ENDIF.
ENDLOOP.
‎2007 Apr 18 11:27 AM
Try this :
"U are looping t_EDPAR and modifying T_LIKP_LIPS it is not correct ", chk follwing logic:
loop at T_LIKP_LIPS.
read table T_EDPAR with key kunnr = T_LIKP_LIPS-kunnr binary search.
if sy-subrc ....
.
.
." Rest is ok.
endloop.
Reward if Helps.
Jogdand M B
‎2007 Apr 18 11:27 AM
Hi,
Use TABLE Keyword while Modifying.
The line to be changed is determined by the fact that the content of the table key matches the content of the corresponding components in the wa work area. For tables with a key that is not unique, the first entry that is found is changed.
Or else use
MOVE T_EDPAR-KUNNR TO WA.
MODIFY TABLE Itab from WA TRANSPORTING comp1.
with regards,
Jay