‎2010 Feb 04 10:34 AM
Hi,
In a subroutine
FORM add_dates TABLES t_approvalsdone STRUCTURE z11.
.
.
.
sort t_approvalsdone by name1.
ENDFORM.
Here its giving a Extended program Check error as below
"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".
Internal Message Code: MESSAGE G/B
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)"
Syntax error is given when declared as
FORM add_dates TABLES t_approvalsdone type z11.
If i declare this as FORM add_dates TABLES t_approvalsdone .
then syntax error is given in sort statement saying "no structure, hence no field called name1".
How to handle this please? We have to be free from EPC error also.
Thanks
Meenakshi
‎2010 Feb 04 10:38 AM
Hello,
I generally create a table type & then decalre the formal param as TYPE <tabletype> like this:
TYPES: ty_approvalsdone_t TYPE STANDARD TABLE OF z11.
DATA: it_approvalsdone TYPE ty_approvalsdone_t.
PERFORM add_date CHANGING it_approvalsdone.
FORM add_dates CHANGING t_approvalsdone TYPE ty_approvalsdone_t .
.
.
.
sort t_approvalsdone by name1.
ENDFORM.This is standard coding practice.
BR,
Suhas
‎2010 Feb 04 10:38 AM
Hello,
I generally create a table type & then decalre the formal param as TYPE <tabletype> like this:
TYPES: ty_approvalsdone_t TYPE STANDARD TABLE OF z11.
DATA: it_approvalsdone TYPE ty_approvalsdone_t.
PERFORM add_date CHANGING it_approvalsdone.
FORM add_dates CHANGING t_approvalsdone TYPE ty_approvalsdone_t .
.
.
.
sort t_approvalsdone by name1.
ENDFORM.This is standard coding practice.
BR,
Suhas