Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to interpret "USING". Possible causes: Incorrect spelling or comma error

krishna_k19
Contributor
0 Kudos

Dear All,

     After moving the request from Quality to Production i'm facing this error " Unable to interpret "USING". Possible causes: Incorrect spelling or comma error  " .  Its working fine in Quality Server but it is appearing .

I checked is there any statement without statement ending or what.(Period symbol, its not there).

Is there any undeclared statements or what ,  this one also not appear.

  the error in the statement " DELETE IT_MG2 USING KEY SY-TABIX. "

Pls give some Suggestions.

Thanks & Regards,

Krishna


1 ACCEPTED SOLUTION

gaurab_banerji
Active Participant
0 Kudos

with implicit delete or modify, the reserved name LOOP_KEY must be specified after USING KEY and the statement must be statically visible within a loop.

5 REPLIES 5

gaurab_banerji
Active Participant
0 Kudos

with implicit delete or modify, the reserved name LOOP_KEY must be specified after USING KEY and the statement must be statically visible within a loop.

0 Kudos

Dear Gaurab,

   i kept that statement in Loop only.

LOOP AT IT_MG2 INTO WA_MG2 WHERE AUFNR = WA_ZLAYITEM-AUFNR

                              AND   MATNR = WA_ZLAYITEM-MATNR.

*     AND  BWTAR = WA_ZLAYITEM-FABSKU. "Kri 12.03.13

           IF SY-SUBRC EQ 0.

               WA_FINAL-MENGE = WA_FINAL-MENGE + WA_MG2-MENGE.

               WA_FINAL-DMBTR = WA_FINAL-DMBTR + WA_MG2-DMBTR.

               DELETE IT_MG2 USING KEY SY-TABIX.

            ENDIF.

        ENDLOOP .

  Rgds,

Krishna

0 Kudos

you should just use

Delete it_mg2 index sy-tabix.

Suggestion: Do not use index directly. Please use another variable with sy.tabix value for dletion.

LOOP AT IT_MG2 INTO WA_MG2 WHERE AUFNR = WA_ZLAYITEM-AUFNR

                              AND   MATNR = WA_ZLAYITEM-MATNR.

*     AND  BWTAR = WA_ZLAYITEM-FABSKU. "Kri 12.03.13

l_f_index = sy-tabix.

** no need of sy-subrc check.

wa:_....

delete it_mg2 index l_f_index.

clear: l_f_index.

endloop.

0 Kudos

Hi Madhu ,

         then it should not work in Quality na , how it is working in Quality server & why it is coming dump while opening the t.code itself.

Rgds,

Krishna

0 Kudos

Quality? It will work in any system...using sy-tabix directly is dangerous. Always assign it just after the loop before any statement.

Do not worry abt sy-subrc in a loop as it is always 0 if it enters the loop.