‎2006 Oct 31 10:29 AM
hi sapiens,
is there any syntax for using same subroutine for different internal tables of different structures .
thanks,
‎2006 Oct 31 10:39 AM
Hi ramesh,
This worked for me:
data: it_mara type table of mara,
it_marc type table of marc.
perform example tables it_mara.
perform example tables it_marc.
&----
*& Form example
&----
text
FORM example TABLES P_IT_MARA." STRUCTURE any.
ENDFORM. " example
Regards,
Ravi
‎2006 Oct 31 10:32 AM
Hi ramesh,
1. If we want to use the FIELDNAME
inside the subroutine,
then its not possible.
(it will give syntax error when we do
itab-fieldname,
inside the subroutine)
2. However, if fieldsymbols and other such things are used,
then still it can be done.
regards,
amit m.
‎2006 Oct 31 10:34 AM
hi,
try that sample:
perform pack_kunnr: tables ktab using kwa kdid,
tables atab using adrwa adid.
FORM pack_kunnr TABLES tab type table
USING WA kunden_id.
loop at tab into wa.
...A.
‎2006 Oct 31 10:35 AM
FORM DEMO USING P TYPE ANY TABLE.
...
READ TABLE P WITH TABLE KEY (KEY) = 'X' INTO WA.
...
ENDFORM.
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db984635c111d1829f0000e829fbfe/content.htm
‎2006 Oct 31 10:39 AM
Hi ramesh,
This worked for me:
data: it_mara type table of mara,
it_marc type table of marc.
perform example tables it_mara.
perform example tables it_marc.
&----
*& Form example
&----
text
FORM example TABLES P_IT_MARA." STRUCTURE any.
ENDFORM. " example
Regards,
Ravi