cancel
Showing results for 
Search instead for 
Did you mean: 

Error in field level routine

former_member638921
Participant
0 Kudos

Hi All,

   I am getting the below error in field level routine.

E:Field "SOURCE_PACKAGE-/BIC/ZRNL_VTPO" is unknown. It is neither in one

of the specified tables nor defined by a "DATA" statement. "DATA"

statement.

Code in Start routine:

types : begin of ty_ztm_o46 ,

         

    /BIC/ZRNL_VTPO type /BIC/OIZRNL_VTPO,

   /BIC/ZINDX_TYP type /BIC/OIZINDX_TYP,

   /BIC/ZINDX_VAL type /BIC/OIZINDX_VAL,

    end of ty_ztm_o46 .

Data:  t_ztm_o46 type standard table of ty_ztm_o46,

       w_ztm_o46 type ty_ztm_o46.

if SOURCE_PACKAGE[] is not initial .

   select /BIC/ZRNL_VTPO

            /BIC/ZINDX_TYP

             /BIC/ZINDX_VAL

            

             from /BIC/AZTM_O4600 into table t_ztm_o46

                                   for all entries in SOURCE_PACKAGE

                                   where /BIC/ZRNL_VTPO =

                                   SOURCE_PACKAGE-ZRNL_VTPO .

      sort t_ztm_o46 by ZRNL_VTPO .

    endif.

Code at field:

read table t_ztm_o46 into w_ztm_o46 with key /BIC/ZRNL_VTPO = SOURCE_PACKAGE-/BIC/ZRNL_VTPO.

IF SY-SUBRC = 0.

  RESULT = w_ztm_o46-ZINDX_typ.

ENDIF.

Appreciate your inputs.

Thanks,

Naveen

Accepted Solutions (1)

Accepted Solutions (1)

anshu_lilhori
Active Contributor

In field level routine SOURCE_PACKAGE cannot be used,instead replace it with  SOURCE_FIELDS-/BIC/ZRNL_VTPO.

Regards,

AL

Answers (3)

Answers (3)

former_member976
Active Contributor
0 Kudos

Hi,

Anshu said correct.

wrtie below like this

from /BIC/AZTM_O4600 into table t_ztm_o46

                                   for all entries in SOURCE_FIELDS

                                   where /BIC/ZRNL_VTPO =

                                   SOURCE_PACKAGE-ZRNL_VTPO .

      sort t_ztm_o46 by ZRNL_VTPO .

Code at field:

read table t_ztm_o46 into w_ztm_o46 with key /BIC/ZRNL_VTPO = SOURCE_FIELDS-/BIC/ZRNL_VTPO.

IF SY-SUBRC = 0.

  RESULT = w_ztm_o46-ZINDX_typ.

ENDIF

Thanks,

Phani.

former_member182346
Active Contributor
0 Kudos

Hi,

I agree with AL finding - that will resolve the issue.

Also just to add,

Use binary search at the end of read statement will make it more fast, as you have already used the sort after select in start routine.

Regards,

VB

0 Kudos

And from you code it seems in your Source Package you dont have the Field /BIC/ZRNL_VTPO instead you have the Field ZRNL_VTPO. So try using SOURCE_FIELDS-ZRNL_VTPO.