Application Development and Automation 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: 
Read only

Syntax error in Update Routine

Former Member
0 Likes
446

Dear All,

While trying to update infoobject /BIC/ZGROSSPRI in an ODS in BI through an update routine, a syntax error is thrown when I am defining a variable of type tys_TG_1-/BIC/ZGROSSPRI.

For instance,

DATA: VALUE TYPE tys_TG_1-/BIC/ZGROSSPRI.

The error is :

E:Field "_ty_s_TG_1-/BIC/ZGROSSPRI" is unknown. It is neither in one of the

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

Below given is the code which I am using for the same. Kindly advise how to correct this error.

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code

Edited by: Suneeth Sebastian on Apr 7, 2010 4:11 PM

Edited by: Rob Burbank on Apr 7, 2010 1:19 PM

3 REPLIES 3
Read only

Former Member
0 Likes
413

Use code tags < > from your toolbar to format the code into something readable and you'll probably get more responses.

Read only

0 Likes
413

Dear All,

While trying to update infoobject /BIC/ZGROSSPRI in an ODS in BI through an update routine, a syntax error is thrown when I am trying to define a variable of type tys_TG_1-/BIC/ZGROSSPRI. How is it possible to define a variable of type target field(Infoobject) ?

For instance,

DATA: VALUE TYPE tys_TG_1-/BIC/ZGROSSPRI.

The error is :

E:Field "_ty_s_TG_1-/BIC/ZGROSSPRI" is unknown. It is neither in one of the

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

tys_TG_1-/BIC/ZGROSSPRI is already defined in the Class section as below

TYPES:

BEGIN OF tys_TG_1,

  • InfoObject: ZGROSSPRI Gross Price in Statistical Currency.

/BIC/ZGROSSPRI TYPE /BIC/OIZGROSSPRI,

END OF tys_TG_1.

Read only

matt
Active Contributor
0 Likes
413

I guess you've put your declaration in

*$*$ begin of 2nd part global - insert your code only below this line  *

*$*$ end of 2nd part global - insert your code only before this line   *

The problem is, that the type is in the PRIVATE section of the class definition, and the above points can only reference publicly defined types, as it is outside the class. Instead, define the variable in

*$*$ begin of global - insert your declaration only below this line  *-*

*$*$ end of global - insert your declaration only before this line   *-*

or in the METHOD compute_ block.

matt