Skip to Content
1

BAPI_ALM_CONF_CREATE with zero actual work

May 25, 2017 at 06:15 PM

143

avatar image

Hi experts,

Currently I'm using BAPI_ALM_CONF_CREATE to create confirmation on a PM maintenance order. Some of the operations have zero (0) hours in actual work like this:

DATA: timetickets TYPE TABLE OF bapi_alm_timeconfirmation,
      return TYPE TABLE OF bapi_alm_return,
      timeticket TYPE bapi_alm_timeconfirmation.

* Operation 0010 has planned work of 10
timeticket-orderid = 'XXXXXXXXXX'.
timeticket-operation = '0010'.
timeticket-act_work = 0.
timeticket-plant = 'XXXX'.
timeticket-work_cntr = 'XXX'.
timeticket-un_work = 'H'.
timeticket-fin_conf = 'X'.
APPEND timeticket TO timetickets.


* Operation 0020 has planned work of 5
timeticket-orderid = 'XXXXXXXXXX'.
timeticket-operation = '0020'.
timeticket-act_work = 3.
timeticket-plant = 'XXXX'.
timeticket-work_cntr = 'XXX'.
timeticket-un_work = 'H'.
timeticket-fin_conf = 'X'.
APPEND timeticket TO timetickets.


CALL FUNCTION 'BAPI_ALM_CONF_CREATE'
* EXPORTING
*   POST_WRONG_ENTRIES       = '0'
*   TESTRUN                  =
* IMPORTING
*   RETURN                   =
  TABLES
    timetickets              = timetickets
   detail_return            = return
          .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

The confirmation created with non zero value is created normallly. But the confirmation with zero actual work is taking the value of the operation planned work (in this case 10H).

If I create the confirmation on IW41 with zero value, the result does not change.

I'm on version 6 EhP5

This happens only when the "Calculate Performance" indicator is set

Any ideas?

conf1.png (40.2 kB)
conf2.png (33.1 kB)
conf3.png (33.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Peter Atkin Jun 01, 2017 at 07:35 AM
0

Victor,

I had a similar issue a few years back and raised an OSS Message. In theis case the answer from SAP was to use the second actual work field i.e. TIMETICKETS-ACT_WORK_2.

Give it a try.

PeteA

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello Peter,

Thank you very much for your answer.

Both ACT_WORK and ACT_WORK_2 are QUAN fields (initial value 0,0) and share the same unit UN_WORK. In that case there is no difference on using one or another when I want to send zero values.

0

It was worth a try...

There are quite a few OSS Notes for BAPI_ALM_CONF_CREATE, have a look at those.

PeteA

0

Hi Peter,

We checked a lot of notes and could not find any to apply for our particular issue.

0