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

Implicit enhancement spot an structure declaration

Former Member
0 Likes
1,636

Hi,

I a standard SAP standard Report i want to enhance a structure. The coding could look like this:

DATA: BEGIN OF struct1,

FIELD1 TYPE STRING,

FIELD2 TYPR STRING,

"""""""""""""""""""""""""""""""""""""""""""""""""

END OF struct1.

The line """"""""" indicates an implicit enhancement. Now i implement the enhancement spot, by adding a extra field:

DATA: BEGIN OF struct1,

FIELD1 TYPE STRING,

FIELD2 TYPR STRING,

"""""""""""""""""""""""""""""""""""""""""""""""""

$-Start: (61)----


$$

ENHANCEMENT 89 ZMYENHANCEMENT

ZFIELD3 TYPE TEXT255,

ENDENHANCEMENT

$-End: (61)----


$$

END OF struct1.

When activating the the enhancement i get the the error message "Comma without preceding colon".

Any advice on what i am doing wrong, or is this simply not possible.

Best regards,

Martin

2 REPLIES 2
Read only

Former Member
727

HI Martin,

Welcome to SDN

Use the below code inside your enhancement.

TYPES: ZFIELD3 TYPE TEXT255.

This solves your problem.

Reward points if you find it helpful.

Regards,

Prasanna

Read only

Former Member
0 Likes
727

Hi Prasanna,

it was almost correct, as it is a data declaration, i have to use

DATA:

instead of

TYPES:

But your hint made a diffrence!

Best regards,

Martin