‎2010 Apr 07 2:05 PM
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
‎2010 Apr 07 6:11 PM
Use code tags < > from your toolbar to format the code into something readable and you'll probably get more responses.
‎2010 Apr 10 9:28 AM
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.
‎2010 Apr 12 9:27 AM
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