cancel
Showing results for 
Search instead for 
Did you mean: 

Need EWM table/FM/Class name to read characteristic values assigned to batch

Former Member
0 Kudos

Hi All,

Is there any way to read characteristic values (Next Inspection Date ) assigned to batch from any EWM table/FM/Class?

Please let me know on this.

Thanks,

Ganesan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Ganesan,

Have you been able to find an FM for this?

I too am looking for the same thing. It would be great if you could help me with this.

Regards,

Nikhil

martin_ziehl
Explorer
0 Kudos

Hello Ganesan,

the batches in EWM are managed via class /SCWM/CL_BATCH_APPL.

You can e.g. use the following code snippet:

* // Constats

* // Variables

   DATA: lo_batch_appl TYPE REF TO /scwm/cl_batch_appl,

....

  * get batch application manager

   CALL METHOD /scwm/cl_batch_appl=>cleanup.

   TRY.

       lo_batch_appl = /scwm/cl_batch_appl=>get_instance(

                       iv_productno = lv_productno

                       iv_productid = lv_productid

                       iv_batchno   = lv_batchno

                       iv_batchid   = lv_batchid

                       iv_lgnum     = lv_lgnum ).

     CATCH /scwm/cx_batch_management.

       RAISE batch_error.

   ENDTRY.

* read batch attributes

   TRY.

       CALL METHOD lo_batch_appl->get_batch

*       EXPORTING

*         iv_no_classification =

         IMPORTING

           es_batch             = es_batch_attr

           et_val_num           = et_batch_val_num

           et_val_char          = et_batch_val_char

           et_val_curr          = et_batch_val_curr

*         ev_val_flg           =

       .

     CATCH /scwm/cx_batch_management.

       RAISE batch_error.

   ENDTRY.


Then you evaluate the characteristics:from et_batch_val_char


Best regards

Martin