cancel
Showing results for 
Search instead for 
Did you mean: 

Interoperation times in maintenance or service orders

Mishael
Participant
0 Kudos

Hello,

In work centre I added standard queue time (scheduling tab).

But when I reschedule the order, this waiting time is not taken in calculation.

Are these times (queue time and move time matrix) used in the service order schedule calculation?

I looked in customizing, without success (at this time...).

Best regards, Misha

Accepted Solutions (1)

Accepted Solutions (1)

peter_atkin
Active Contributor
0 Kudos

Misha,

I've never seen this field used in PM work centres before, so I'm assuming it doesnt work im PM/CS order operations..

What are you trying to achieve?

If you want a delay between operations, then create a FS relationship in the order operations and enter a Time Interval offset:

PeteA

Answers (2)

Answers (2)

Mishael
Participant
0 Kudos

My changes work with the BAPI_ALM_ORDER_MAINTAIN in BADIWORKORDER_UPDATE~BEFORE_UPDATE in if I add IN BACKGROUND TASK : CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN' IN BACKGROUND TASK.

Misha

Mishael
Participant
0 Kudos

It is a very bad idea because the BAPI call the BADI, and again the BADI call the BAPI and again ....

Another possibilities is to modify the memory like this :

  METHOD if_ex_workorder_update~at_save.
      FIELD-SYMBOLS <fs_afab_bt_from_nwbt> TYPE ANY TABLE.
      FIELD-SYMBOLS <wa_afab_bt> TYPE afabb.

      ASSIGN ('(SAPLNWBT)AFAB_BT[]') TO <fs_afab_bt_from_nwbt>.

      IF <fs_afab_bt_from_nwbt> IS ASSIGNED.

        LOOP AT <fs_afab_bt_from_nwbt> ASSIGNING <wa_afab_bt>.
            "Any code here... 
            <wa_afab_bt>-xxxx = xxxx 
            <wa_afab_bt>-vbkz = 'U'.

        ENDLOOP.

      ENDIF.
  ENDMETHOD.

After the end of execution, I retrieve the modifications in changes documents.

Regards

Mishael
Participant
0 Kudos

Hello Peter,

Thank you for you response.

I just try to add a standard queue time between operation like in production orders.

Yes, otherwise I can use the time interval in a relationship. But when we add some task lists in the service order we need to manually set this time interval and relationship between existing operation and added operation from task list. Or I need to develop a Z piece of code for that.

I suppose is the same for the move time matrix in work centrer.

Best regards,
Misha

peter_atkin
Active Contributor
0 Kudos

Misha

I couldn't get the Work Centre standard queue time to work in a PM order - I also tried the distribution keys on the Capacity tab, but that had no effect either.

Did you have any luck?

PeteA

Mishael
Participant
0 Kudos

Peter,

I had no luck on my side either.

I will try to add/change the relationship and populate the filed DAUER with the BADI WORKORDER_UPDATE in method BEFORE_UPDATE. But I do know if it possible to use the BAPI_ALM_ORDER_MAINTAIN or another BAPI or FM in this method.

I don't think it is possible to update the AFAB table in this way. What do you think?

Misha

peter_atkin
Active Contributor
0 Kudos

Misha,

It looks like you can use the IT_RELATION STRUCTURE option in BAPI_ALM_ORDER_MAINTAIN to create operation relationships including the operation intervals (DURATION_RELATION_UNIT and DURATION_RELATION)

PeteA

Mishael
Participant
0 Kudos

Peter,

I try to use BAPI_ALM_ORDER_MAINTAIN into BADI WORKORDER_UPDAT -> BEFORE_UPDATE.

It not work, the BAPI return error

I suppose it is not possible to change data with this BADI and I need to update in a second time.

Misha