‎2011 Sep 30 11:16 AM
Hi
i declared
DATA : ms_charg_bestand TYPE RANGE OF mchb-charg,
ms_werks_bestand TYPE RANGE OF mchb-werks.
FORM CHARGEN_BESTAND
TABLES
CR_WERKS_BESTAND STRUCTURE MS_WERKS_BESTAND
CR_CHARG_BESTAND STRUCTURE MS_CHARG_BESTAND .
PERFORM CHARGEN_BESTAND TABLES MS_WERKS_BESTAND MS_CHARG_BESTAND.
While doing perform statement .It is throwing one error that MS_WERKS_BESTAND MS_CHARG_BESTAND are no longer structures.So how to solve the issue.
‎2011 Sep 30 11:32 AM
Hi,
Just try to using LIKE instead of STRUCTURE in declaration.
This will solve the issue.
‎2011 Sep 30 11:32 AM
Hi,
Just try to using LIKE instead of STRUCTURE in declaration.
This will solve the issue.
‎2011 Sep 30 11:33 AM
Hi,
Avoid using TABLE identifier in your form parameter..
You can try like this:
TYPES : ts_charg_bestand TYPE RANGE OF mchb-charg,
ts_werks_bestand TYPE RANGE OF mchb-werks.
DATA: ms_werks_bestand TYPE ts_werks_bestand,
ms_charg_bestand TYPE ts_charg_bestand.
FORM CHARGEN_BESTAND
USING
CR_WERKS_BESTAND TYPE TS_WERKS_BESTAND
CR_CHARG_BESTAND TYPE TS_CHARG_BESTAND .
PERFORM CHARGEN_BESTAND USING MS_WERKS_BESTAND MS_CHARG_BESTAND.
Hope it helps,
Kr,
m.
‎2011 Sep 30 11:33 AM
‎2011 Sep 30 11:36 AM
Hi,
Instead of STRUCTURE, make use of LIKE or TYPE addition.
Regards,
Danish.
‎2011 Sep 30 11:36 AM
Hi,
Actually you have declared ms_charg_bestand & ms_werks_bestand as range tables,
Please change the coding as give below.
TYPES :
ms_charg_bestandtype TYPE RANGE OF mchb-charg, " Table type
ms_werks_bestandtype TYPE RANGE OF mchb-werks.
DATA : ms_charg_bestand TYPE RANGE OF mchb-charg, " Range table
ms_werks_bestand TYPE RANGE OF mchb-werks.
FORM CHARGEN_BESTAND
TABLES
CR_WERKS_BESTAND type MS_WERKS_BESTANDTYPE
CR_CHARG_BESTAND type MS_CHARG_BESTANDTYPE .
PERFORM CHARGEN_BESTAND TABLES MS_WERKS_BESTAND MS_CHARG_BESTAND.
Surely, it will work
Thanks,
Leo
‎2011 Sep 30 11:46 AM
Hi,
Well... better without using that TABLES parameter, which is an obsolete form of formal parameter typed as internal table with header line.... better go with USING and declare the header line locally within the form...
Kr,
m.
‎2011 Sep 30 12:59 PM
Try this ....
types : begin of ts_werks_bestand,
ts_werks_bestand TYPE mchb-werks,
end of ts_werks_bestand.
types : begin of ts_charg_bestand,
ts_charg_bestand TYPE mchb-charg,
end of ts_charg_bestand.
DATA: ms_werks_bestand TYPE table of ts_werks_bestand,
ms_charg_bestand TYPE table of ts_charg_bestand.
FORM CHARGEN_BESTAND
USING
CR_WERKS_BESTAND TYPE TS_WERKS_BESTAND
CR_CHARG_BESTAND TYPE TS_CHARG_BESTAND .
PERFORM CHARGEN_BESTAND USING MS_WERKS_BESTAND MS_CHARG_BESTAND.