‎2006 Mar 09 10:31 AM
I would like to post a production order confirmation by using the function BAPI_PP_TIMETICKET, however, an error "Total confirmation quantity not equal to planned confirmation quantity" is raised.
However, when I did it manually in CO11N, I could save the transaction successfully despite "Total confirmation quantity not equal to planned confirmation quantity" since it was only a warning instead of error.
I would like to know how can I do the same using this function (or using other function?)? i.e. create the confirmation even though "Total confirmation quantity not equal to planned confirmation quantity". Thanks!
‎2006 Mar 09 1:54 PM
Hi,
To get Total Confirmation Qty :
Use function :CO_R0_DET_TOTAL_ACTIVITY
Then:
For Production order confirmations Please use Function :
BAPI_PRODORDCONF_CREATE_TT'
Need More help Please let me know.
Regards,
Lanka
‎2006 Mar 09 1:54 PM
Hi,
To get Total Confirmation Qty :
Use function :CO_R0_DET_TOTAL_ACTIVITY
Then:
For Production order confirmations Please use Function :
BAPI_PRODORDCONF_CREATE_TT'
Need More help Please let me know.
Regards,
Lanka
‎2006 Mar 09 4:39 PM
I just wonder how can I perform production order confirmation with confirmed quantity greater than planned quantity.
Thanks!
(I can do it using C011N...however can do it using BAPI_PRODORDCONF_CREATE_TT)
‎2006 Mar 09 4:46 PM
Hi ,
It is Total Planned Qty. TYPO Error.
May be this code is Help ful :
this is a Sample Code Only :
CALL FUNCTION 'CO_DB_AFVG_SELECT_SINGLE'
EXPORTING
APLZL_IMP = WA_AFRU-APLZL " afvc-aplzl
AUFPL_IMP = WA_AFRU-AUFPL " afvc-aufpl
IMPORTING
AFVGD_EXP = XAFVGD
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
CLEAR XTTL_ACTIV.
XAFVGD-MGVRG = VAL. " Confirmed Qty that you have selected or Yield Qty
CALL FUNCTION 'CO_R0_DET_TOTAL_ACTIVITY'
EXPORTING
ACT_AFVGD = XAFVGD
ACT_FLG_CONSIDER_CONF = 'X'
ACT_QUANTITY = XAFVGD-MGVRG "P_YIELD_QTY
ACT_DATUM = SY-DATUM
ACT_ARBID = WA_AFRU-ARBID
ACT_WERKS = WA_AFRU-WERKS
IMPORTING
EXP_ACTIVITIES = XTTL_ACTIV
EXCEPTIONS
DIVISION_BY_ZERO = 01.
*--populating BAPI tables
-
_____ Add values to BAPI tables
APPEND ZBAPI_PP_TIMETICKET.
CLEAR ZBAPI_PP_TIMETICKET.
CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
EXPORTING
POST_WRONG_ENTRIES = '0'
TESTRUN = ' '
IMPORTING
RETURN = ZRETURN
TABLES
TIMETICKETS = ZBAPI_PP_TIMETICKET
DETAIL_RETURN = ZBAPI_CORU_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'W'.
Need More help . Please let me know.
Regards,
Lanka
‎2006 Mar 09 5:16 PM
Thanks for your reply.
But I think I need to clarify my question.
I have an order with article output quantity = 3.
In the first time I confirm the operation 0010. I put 3 into the yield quantity. (this works well)
After that I need to confirm the operation 0010 one more time, then I get the error mentioned above.
However, I can do it (confirm operation 0010, each time with yield quantity = 3), yet I get the mentioned error too, but it displayed as warning only, I can get through it by pressing enter and create the confirmation successfully. So I wonder if it can also be done using the BAPI functions.
Sorry for my long reply. Thanks!
‎2006 Mar 09 5:29 PM
Hi,
Check the Order via CO03 What may be the Total Qty and f any scrap Qty is maintained.
If no scrap then yield qty = Total Qty
If scrap Qty maintained then Yield Qty = Total Qty- Scrap.
you can't create Confirmations more than total qty.
Regards,
Lanka
‎2006 Mar 10 12:58 AM
But as I have mentioned above, I can have yield qty greater than the production order output qty.
In my case, qty of production order = 3
I can post confirmation of a operation many times using t-code CO11N.
Confirmation 1: yield qty = 3, activity time = 2 HR
Confirmation 2: yield qty = 3, activity time = 1 HR
So I just want to know whether "you can't create Confirmations more than total qty" is only applied to the BAPI function.
Thanks a lot!
‎2006 Mar 10 1:13 AM
Hi ,
I understand your scenario. Earlier we had same issue.
Activity time is not considering completely.
BAPI won't allow to create more than confirmation qty. When you are actually doing confirmation via CO11 this is considering the activity time.
If you want ot use BAPI.
First call the activity function by passing the yield qty and this will provide you the activity time (complate) then pass this to BAPI and create Confirmation.
Regards,
Lanka