Skip to Content

bapi_prodordconf_create_tt confirmation without order reference

hello guys,

I have an requirement in which i need to confirm the order using bapi named as BAPI_PRODORCONF_CREATE_TT... confirmation of order is taking place successfully for the movement type 201... but the constraint is user doesn't want confirmation with respect to order reference as is it being display in tcode MB51 under column of ORDER.. please help me out with right approach so that i can create confirmation of order without order reference...i am sharing the below code which i am using right now:

ls_timetickets-orderid = ls_input_data-order_number.
ls_timetickets-yield = ls_input_data-yield.
ls_timetickets-scrap = ls_input_data-scrap.
ls_timetickets-fin_conf = ls_input_data-confirmation.
ls_timetickets-operation = ls_input_data-operation .
APPEND ls_timetickets TO lt_timetickets.

IF ls_input_data-indicator IS NOT INITIAL.
ls_link_good_mvmt-index_confirm = 1.
ls_link_good_mvmt-index_goodsmov = 1.
LOOP AT gt_gd_mvmt INTO ls_gd_mvmt WHERE order_number = ls_input_data-order_number.
ls_good_mvmt-material = ls_gd_mvmt-material.
ls_good_mvmt-plant = ls_gd_mvmt-plant.
ls_good_mvmt-stge_loc = ls_gd_mvmt-storage_location.
ls_good_mvmt-batch = ls_gd_mvmt-batch .
ls_good_mvmt-move_type = ls_gd_mvmt-movement_type.
ls_good_mvmt-val_type = ls_gd_mvmt-valuation.
ls_good_mvmt-entry_qnt = ls_gd_mvmt-withdrawl_qty.
ls_good_mvmt-entry_uom = ls_gd_mvmt-unit.
ls_good_mvmt-quantity = ls_gd_mvmt-withdrawl_qty.
ls_good_mvmt-base_uom = ls_gd_mvmt-unit.
"ls_good_mvmt-mvt_ind = 'F'.
ls_good_mvmt-costcenter = gv_kostl.
ls_good_mvmt-activity = ls_input_data-operation .
"ls_good_mvmt-orderid = ls_input_data-order_number.
APPEND ls_good_mvmt TO lt_good_mvmt.

APPEND ls_link_good_mvmt TO lt_link_good_mvmt.
ADD 1 TO ls_link_good_mvmt-index_goodsmov.

return = ls_return
timetickets = lt_timetickets
goodsmovements = lt_good_mvmt
link_conf_goodsmov = lt_link_good_mvmt
detail_return = lt_detail_return.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 06, 2017 at 10:10 AM

    Hello Jurgen,

    Please find below the revised requirement.

    We are using BAPI_PRODORDCONF_CREATE_TT to confirm a production order. For backflushing the assignment of the goods movements to a confirmation is effected via the LinkConfGoodsmov table. The index in the LinkConfGoodsmov-Index_Confirm field refers to the line of the associated confirmation in the Timetickets table and the index in the LinkConfGoodsmov-Index_Goodsmov field is referring to the associated goods movement in the Goodsmovements table.

    With this confirmation, movement 201 is posted for backflushing. Now our requirement is, in the goods movement posted for backflushing, production order nbr should not come in the order field of mkpf, as it is having some financial impact.

    Hope now you will have fair idea about our requirement..

    Add comment
    10|10000 characters needed characters exceeded

    • For me has a 201 movement nothing to do with a production order, a 261 would be logical to me for me for the consumption of components in your bill of material.

      Based on your requirement I guess that this is reason you do not want a reference to a production order for it either, but I wonder how you got this 201 movement at all for a production order.

  • Oct 06, 2017 at 08:03 AM

    First of all it is not really clear why tagged a question about a production order confirmation BAPI with MM and LE instead of MAN Production Planning (PP) which is for me the logical home of a production order confirmation.

    Further it is unclear what you want to tell with movement type 201 which is a goods issue to cost center and has nothing to do with a production order at all. For me does this sentence not make much sense "confirmation of order is taking place successfully for the movement type 201.."

    I think before we can discuss your coding we and you should first understand the business requirement.

    And especially before a BAPI comes into the game to automate things or to make it more comfortable for users, the process should already work with normal transactions as the BAPI can't really do something that an online transaction can't do . What transaction are executed today manually to achieve the same?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 07, 2017 at 02:12 AM


    A goods movement posted during an order confirmation will obviously carry a reference to the order.

    You should post your goods movement with BAPI BAPI_GOODSMVT_CREATE instead, in order to avoid a reference to the order.

    Otherwise, you can try to use BAdI WORKORDER_GOODSMVT to remove the reference to the order number, but I'm not sure that it will work, as I have never tested this scenario.

    At last, problems related to production orders should be opened to the correct TAG MAN Production Planning (PP).


    Add comment
    10|10000 characters needed characters exceeded

  • Oct 10, 2017 at 07:25 AM

    Hi Deepak,
    The used BAPI BAPI_PRODORCONF_CREATE_TT's main purpose is to execute confirmation for the production order, so that the main object is production order. If nothing is maintained into structure GOODSMOVEMENT, then backflush and auto GR is executed automatically. If at least 1 entry in entered into structure GOODSMOVEMENT, BAPI execution will ignore the automatic goods movements, but only execute the entered ones.

    Anyway, the related goods movements in BAPI_PRODORCONF_CREATE_TT are goods movements with reference to production order. If you expect seperate goods movement, you can consider BAPI_GOODSMVT_CREATE.

    best regards,

    Add comment
    10|10000 characters needed characters exceeded