Application Development 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: 

How to define perform with table statement in ECC6.0

Former Member
0 Kudos

Hi all,

I am working on ECC6.0 version. I m using a perform to populate an internal table like this:-

PERFORM explode TABLES li_zmpsdtl

USING gs_matnr.

& its forms is defined as: -

FORM treat_one_item TABLES li_zmpsdtl STRUCTURE zmpsdtl

USING gs_matnr TYPE matnr.

doing some action..............

endform.

While performing SLIN it shows an 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"). "

If i use type in place of STRUCTURE then it is ok, but zmpsdtl should be defined as table type. :-

FORM treat_one_item TABLES li_zmpsdtl type zmpsdtl

USING gs_matnr TYPE matnr.

doing some action..............

endform.

is there any other option to do the same thing. i dont want to create any teable type.

Thanx in advance,

Sachin

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You have to use a global structure instead of a ddic structure after the STRUCTURE statement:

<b>DATA: gs_zmpsdtl TYPE zmpsdtl.</b>

FORM treat_one_item TABLES li_zmpsdtl STRUCTURE <b>gs_zmpsdt</b>

USING gs_matnr TYPE matnr.

...[/code]

2 REPLIES 2

Former Member
0 Kudos

You have to use a global structure instead of a ddic structure after the STRUCTURE statement:

<b>DATA: gs_zmpsdtl TYPE zmpsdtl.</b>

FORM treat_one_item TABLES li_zmpsdtl STRUCTURE <b>gs_zmpsdt</b>

USING gs_matnr TYPE matnr.

...[/code]

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Only precaution u have to take in ECC 6.0 is

Use Global Staructures in ur form while defining.

Regards,

Sreeram