Skip to Content
0
Former Member
May 27, 2015 at 07:13 AM

Issue Routine - Start and field routine

21 Views

Hi All,

I am getting this error: Error: E:Implicit key specification is no longer allowed in the OO context. You must use an INDEX, KEY, or FROM specification. must use an INDEX, KEY or FROM specification..

I am working on a routine and i got this error while doing. In source i have data like this.

0rder Sales area Sales org Value 1001 A 100 900 1002 B 200 1000 1003 C 300 2000 1004 D 400 3000

In target i have company code which i am deriving by filtering sales are and sales org.

ex: If salesarea = A, B

AND SALESORG = 100,200 THEN COMPANY CODE = 2000 etc.

My code below.

Start routine global declarations:

TYPES: BEGIN OF TY_CC,

/BIC/ZDOC_NUM TYPE /BIC/OIZDOC_NUM,

/BIC/ZSALAREA TYPE /BIC/OIZSALAREA,

/BIC/ZSALESORG TYPE /BIC/OIZSALESORG,

/BIC/ZPRC_KA TYPE /BIC/OIZPRC_KA,

END OF TY_CC.

DATA: IT_DATA TYPE STANDARD TABLE OF TY_CC,

WA_DATA TYPE TY_CC.


Logic:


LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.

WA_DATA-/BIC/ZDOC_NUM = <SOURCE_FIELDS>-/BIC/ZDOC_NUM.

WA_DATA-/BIC/ZSALAREA = <SOURCE_FIELDS>-/BIC/ZSALAREA.

WA_DATA-/BIC/ZSALAREA = <SOURCE_FIELDS>-/BIC/ZSALAREA.

WA_DATA-/BIC/ZPRC_KA = <SOURCE_FIELDS>-/BIC/ZPRC_KA.

APPEND WA_DATA TO IT_DATA.

ENDLOOP.


field routine:


In field routine i mapped order number in source to company code in target and wrote the below code.


READ TABLE IT_DATA INTO WA_DATA.


IF WA_DATA-/BIC/ZSALESORG = '101' OR '102' OR '109' OR '107'.

AND

IF WA_DATA-/BIC/ZSALAREA = 'A' OR 'C' OR 'D' OR 'E'.

RESULT = '200'.

endif.

IF WA_DATA-/BIC/ZSALAREA = 'B' OR 'F' OR 'G'.

*

IF WA_DATA-/BIC/ZSALESORG = '105' OR '106' OR '108'.

RESULT = '300'.

endif.