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

Calling Method SIMULATE_MATERIAL from BADI CKMLAVR_SIM

yasser_salah2
Explorer
0 Likes
1,134

Hi All,

I want to call method from BADI CKMLAVR_SIM to modify material data but i don't now how , I tried to create anew program with following code and called the method but give me error


Field Me is unknown it is neither in one of the specified table nor defined by a "DATA" statment.




DATA: ZIS_RUN TYPE CKMLRUNPERIOD OCCURS 0,

       ZIS_RUNPLANT TYPE CKMLRUNPLANT OCCURS 0,

       ZIS_CKMLHD TYPE CKMLHD OCCURS 0,

       ZCS_CKMLPP TYPE  CKMLPP OCCURS 0,

       ZCT_CKMLCR TYPE CKMLCR_SORTED OCCURS 0,

       ZCT_MLCD TYPE CKMCD_T_MLCD OCCURS 0,

       ZCT_CKMLKEPH TYPE MLCCS_T_KEPH OCCURS 0.

      

CALL METHOD me->SIMULATE_MATERIAL

   EXPORTING

     IS_RUN         = ZIS_RUN

     IS_RUNPLANT    = ZIS_RUNPLANT

     IS_CKMLHD      = ZIS_CKMLHD

*  IMPORTING

*    ED_PPCHANGED   =

*    ED_CRCHANGED   =

*    ED_MLCDCHANGED =

*    ED_KEPHCHANGED =

*    ET_DELMLCD     =

*    ET_DELKEPH     =

*    ET_INSMLCD     =

*    ET_INSKEPH     =

*    ET_PROTOCOL    =

   CHANGING

     CS_CKMLPP      = ZCS_CKMLPP

     CT_CKMLCR      = ZCT_CKMLCR

     CT_MLCD        = ZCT_MLCD

     CT_CKMLKEPH    = ZCT_CKMLKEPH

     .

1 ACCEPTED SOLUTION
Read only

ThangaPrakash
Active Contributor
0 Likes
1,054

Hello Yasser,

Define ME in your data declaration with the class.

or change your call method to

CALL METHOD <class name> => <method name>.

Regards,

Thanga

Hi All,

I want to call method from BADI CKMLAVR_SIM to modify material data but i don't now how , I tried to create anew program with following code and called the method but give me error


Field Me is unknown it is neither in one of the specified table nor defined by a "DATA" statment.




DATA: ZIS_RUN TYPE CKMLRUNPERIOD OCCURS 0,

       ZIS_RUNPLANT TYPE CKMLRUNPLANT OCCURS 0,

       ZIS_CKMLHD TYPE CKMLHD OCCURS 0,

       ZCS_CKMLPP TYPE  CKMLPP OCCURS 0,

       ZCT_CKMLCR TYPE CKMLCR_SORTED OCCURS 0,

       ZCT_MLCD TYPE CKMCD_T_MLCD OCCURS 0,

       ZCT_CKMLKEPH TYPE MLCCS_T_KEPH OCCURS 0.

      

CALL METHOD me->SIMULATE_MATERIAL

   EXPORTING

     IS_RUN         = ZIS_RUN

     IS_RUNPLANT    = ZIS_RUNPLANT

     IS_CKMLHD      = ZIS_CKMLHD

*  IMPORTING

*    ED_PPCHANGED   =

*    ED_CRCHANGED   =

*    ED_MLCDCHANGED =

*    ED_KEPHCHANGED =

*    ET_DELMLCD     =

*    ET_DELKEPH     =

*    ET_INSMLCD     =

*    ET_INSKEPH     =

*    ET_PROTOCOL    =

   CHANGING

     CS_CKMLPP      = ZCS_CKMLPP

     CT_CKMLCR      = ZCT_CKMLCR

     CT_MLCD        = ZCT_MLCD

     CT_CKMLKEPH    = ZCT_CKMLKEPH

     .

3 REPLIES 3
Read only

ThangaPrakash
Active Contributor
0 Likes
1,055

Hello Yasser,

Define ME in your data declaration with the class.

or change your call method to

CALL METHOD <class name> => <method name>.

Regards,

Thanga

Read only

ThangaPrakash
Active Contributor
0 Likes
1,054

Hello Yasser,

Did you check the above points, is your problem solved?

If yes please close the thread.

Regards,

Tp

Read only

0 Likes
1,054

Dear Prakash,

coud you please review this issue.