2007 May 07 7:20 AM
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
2007 May 07 8:32 AM
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]
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
2007 May 07 8:32 AM
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]
2007 May 07 8:35 AM
Hi
Only precaution u have to take in ECC 6.0 is
Use Global Staructures in ur form while defining.
Regards,
Sreeram