Application Development and Automation 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: 
Read only

problem ragarding structure

Former Member
0 Likes
802

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
776

Hi,

Just try to using LIKE instead of STRUCTURE in declaration.

This will solve the issue.

7 REPLIES 7
Read only

Former Member
0 Likes
777

Hi,

Just try to using LIKE instead of STRUCTURE in declaration.

This will solve the issue.

Read only

Former Member
0 Likes
776

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.

Read only

former_member186055
Active Participant
0 Likes
776

Hi Subrat,

Check this....

Regards,

Surya

Read only

Former Member
0 Likes
776

Hi,

Instead of STRUCTURE, make use of LIKE or TYPE addition.

Regards,

Danish.

Read only

Former Member
0 Likes
776

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

Read only

0 Likes
776

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.

Read only

Former Member
0 Likes
776

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.