Application Development 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: 

Dispatching of Orders same as in CM25

Former Member
0 Kudos

Hi ,

I have a requirement to develop a custom report to DISPATCH the prod/planned orders same as it is done in CM25. Can anybody please let me know the logic behind the same or any FM or BAPIs or any related information .

I did Debugging but could not understand the logic.

Thanks in advance.

Adar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Please check the function module: CLOI_CHANGES_UPL_31. In the function you can assign method as DISPATCH.

See this document -> http://abaplog.wordpress.com/2007/05/

Regards,

Thitima

5 REPLIES 5

Former Member
0 Kudos

Hi,

Please check the function module: CLOI_CHANGES_UPL_31. In the function you can assign method as DISPATCH.

See this document -> http://abaplog.wordpress.com/2007/05/

Regards,

Thitima

0 Kudos

Hi Thithima,

Thanks for your reply, But I could not understand how does this FM would be helpful to me.

Can you please tell me in detail .I hope my requirement is clear to you.I need to dispatch the Order,operation on a particular date to a particular workcenter and on doing so the stauts of the order has to be changed to 'Dispatched' .

Regards,

Adar.

0 Kudos

You can change the details of operation by using table parameter 'CLOI_ORD_OPRU_IMP'. you will put data as


DATA: li_ord_opru_imp TYPE TABLE OF CLOIOPERU WITH HEADER LINE.

** if you want to change execution start date
    li_ord_opru_imp-aufnr = orderid.
    li_ord_opru_imp-aplfl = sequence.
    li_ord_opru_imp-vornr = operation.
    li_ord_opru_imp-field = 'SSAVD'.
    li_ord_opru_imp-value = EXEC_START_DATE.
    APPEND li_ord_opru_imp.

** if you want to change execution start time
    li_ord_opru_imp-aufnr = orderid.
    li_ord_opru_imp-aplfl = sequence.
    li_ord_opru_imp-vornr = operation.
    li_ord_opru_imp-field = 'SSAVZ'.
    li_ord_opru_imp-value = EXEC_START_TIME.
    APPEND li_ord_opru_imp.

** if you want to change work center
    li_ord_opru_imp-aufnr = orderid.
    li_ord_opru_imp-aplfl = sequence.
    li_ord_opru_imp-vornr = operation.
    li_ord_opru_imp-field = 'ARBPL'.
    li_ord_opru_imp-value = WORK_CENTER.
    APPEND li_ord_opru_imp.

** if you want to dispatch this operation
  li_ord_opru_imp-aufnr = orderid.
  li_ord_opru_imp-aplfl = sequence.
  li_ord_opru_imp-vornr = operation.
  li_ord_opru_imp-field = 'METHOD'.
  li_ord_opru_imp-value = 'DISPATCH'.
  APPEND li_ord_opru_imp.

** Please specify data in CLOI_IF_PAR [Interface Parameters]
DATA: lv_cloi_if_par LIKE CLOIIFPAR.
lv_cloi_if_par-commitflg  = 'C'.
lv_cloi_if_par-r3_version = '46'.
lv_cloi_if_par-metlog_req = 'X'.
lv_cloi_if_par-msglog_req = 'X'.
lv_cloi_if_par-msgobj_req = 'X'.
lv_cloi_if_par-ord_req    = 'X'.
lv_cloi_if_par-ordseq_req = 'X'.
lv_cloi_if_par-ordopr_req = 'X'.
lv_cloi_if_par-plord_req  = 'X'.


** in this example, i call this function by pattern.
  data: lv_ret_val LIKE CLOIRETVAL.
  CALL FUNCTION 'CLOI_CHANGES_UPL_31'
    EXPORTING
      CLOI_IF_PAR                = lv_cloi_if_par
    IMPORTING
      CLOI_RET_VAL               = CLOI_RET_VAL
    TABLES
      CLOI_ORD_OPRU_IMP          = li_ord_opru_imp
      CLOI_MAP_EXP               = CLOI_MAP_EXP
      CLOI_METHOD_LOG_EXP        = CLOI_METHOD_LOG_EXP
      CLOI_MESSAGE_LOG_EXP       = CLOI_MESSAGE_LOG_EXP
      CLOI_MSG_OBJ_LOG_EXP       = CLOI_MSG_OBJ_LOG_EXP
      CLOI_PLORD_EXP             = CLOI_PLORD_EXP
      CLOI_ORD_EXP               = CLOI_ORD_EXP
      CLOI_PLORD_OPR_EXP         = CLOI_PLORD_OPR_EXP
      CLOI_ORD_OPR_EXP           = CLOI_ORD_OPR_EXP
      CLOI_ORD_SEQ_EXP           = CLOI_ORD_SEQ_EXP
            .

Regards,

Thitima

0 Kudos

Hi Thithima,

Thanks alot for quick help,

Edited by: mydearsh on Oct 14, 2009 11:12 AM

0 Kudos

Hi Thitima,

How to achieve the manual dispatch functionality using the above FM?

Regards,

Niyaz