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

SLIN error

Former Member
0 Likes
1,338

Hi experts,

I am using ECC6.0. I am craeting a type like: -

TYPES : BEGIN OF gt_t08.

INCLUDE STRUCTURE zsdmmp02. (Ztable)

TYPES : rc(1) TYPE c,

END OF gt_t08.

In SLIN, it is causing a error message :-

The current ABAP command is obsolete

Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary

types (not "LIKE" or "STRUCTURE").

How to remove the error. There is one way in place of include structure i can explicitly write all the fields of zsdmmp02. But later on if the structure of zsdmmp02 gets enhanced, then again i will have to add one field.

Is there any other way to do it?

thanx in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,051

Hi Sachin,

U can use the statement as given below:

TYPES dtype { {TYPE tabkind OF [REF TO] type}

| {LIKE tabkind OF dobj} }

[WITH key] [INITIAL SIZE n].

If Helpful reward with some points.

Regards,

Pulokesh

8 REPLIES 8
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,051

Hi

try to code as follows.

TYPES : BEGIN OF gt_t08.

INCLUDE STRUCTURE zsdmmp02. (Ztable)

Data : rc(1) TYPE c,

END OF gt_t08.

Regards,

Sreeram

Read only

0 Likes
1,051

Hi sreeram,

TYPES : BEGIN OF gt_t08.

INCLUDE STRUCTURE zsdmmp02. (Ztable)

Data : rc(1) TYPE c,

END OF gt_t08.

It's not working friend. Syntax error - Between "TYPES BEGIN OF name" and "TYPES END OF name" only TYPES statements are allowed.

regards

Read only

Former Member
0 Likes
1,052

Hi Sachin,

U can use the statement as given below:

TYPES dtype { {TYPE tabkind OF [REF TO] type}

| {LIKE tabkind OF dobj} }

[WITH key] [INITIAL SIZE n].

If Helpful reward with some points.

Regards,

Pulokesh

Read only

0 Likes
1,051

Dear Pulokesh,

I have to add one field into internal table(which includes a Z table) like: -

TYPES : BEGIN OF gt_t08.

INCLUDE STRUCTURE zsdmmpp02.

TYPES : rc(1) TYPE c,

END OF gt_t08.

using the below code how can i use?

TYPES dtype { {TYPE tabkind OF [REF TO] type}

| {LIKE tabkind OF dobj} }

[WITH key] [INITIAL SIZE n].

regards

Read only

0 Likes
1,051

Dear Sachin,

Currently I am workin on both BW and SRM modules which are on SAP NetWeaver BI 7.0 platform. I tried ur code, but its working fine. Since I donnt have access to ECC6.0, I am uanble to visualize the error. Below i am enclosing a sample code. Please try it out, and do tell me whether it works or not.

TYPES : BEGIN OF GT_T08,

RC(1) TYPE C.

INCLUDE STRUCTURE zsdmmpp02.

TYPES: END OF GT_T08.

or

TYPES : BEGIN OF GT_T08,

RC TYPE CHAR1.

INCLUDE STRUCTURE zsdmmpp02.

TYPES: END OF GT_T08.

OR.

DATA: T_ZTEST TYPE zsdmmpp02.

TYPES : BEGIN OF GT_T08,

RC(1) TYPE C.

INCLUDE STRUCTURE T_ZTEST.

TYPES: END OF GT_T08.

I think the last sample code will surely work properly since it is not showing any SLIN error in my system. Eagerly waiting for your reply. If Helpful then reward points.

Regards,

Pulokesh

Message was edited by:

Pulokesh Karmakar

Read only

0 Likes
1,051

Dear Sachin,

Have u tried the sample codes that i have provided to u. The last one should surely work in ECC6.0. If helpful please reward with some points. Eagerly waiting for your reply.

Regards,

Pulokesh

Read only

0 Likes
1,051

Dear pulokesh,

Thanks a lot!!!

Below code is working fine: -

DATA: T_ZTEST TYPE zsdmmpp02.

TYPES : BEGIN OF GT_T08,

RC(1) TYPE C.

INCLUDE STRUCTURE T_ZTEST.

TYPES: END OF GT_T08.

Full marks to you!!!

regards,

Read only

0 Likes
1,051

Dear Sachin,

Lot of thanks to you for providing points. Hope to share more experience.

Regards,

Pulokesh