‎2007 May 29 11:12 AM
Hi All!
We are using function 'BAPI_PRODORDCONF_CREATE_TT' but not fully sucessfully.
We call this function to make a completion confirmation with a goods movement.
Right now we are doing some test trying to get the same results that if we use COR6N.
We enter a proc order, then put a qty into yield, click Goods movement (the matr is batch managed) and then enter a batch (movement type 101 by default). Then save. Everything is ok and is I check in table MSEG there is an entry for the confirmation with the batch I used.
Now, when we try this with the bapi the qty is confirmed but in MSEG the batch that appears is different than the one we passed to the BAPI. This is how we are calling the funciton:
CALL FUNCTION 'BAPI_PROCORDCONF_CREATE_TT'
EXPORTING
POST_WRONG_ENTRIES = '0'
TESTRUN = 'X'
IMPORTING
return = wa_bapiret1
TABLES
timetickets = i_timetickets[]
goodsmovements = i_goodsmovements[]
link_conf_goodsmov = i_link_conf_goodsmov[]
detail_return = li_detail_return[] .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = li_ret
.
i_timeticket one entry with fields informed: orderid, phase, plant, yield, conf_acti_unit1
i_goodsmovements one entry with material plant resource stg location, batch, mov type
(values as in COR6N)
i_link_conf_goodsmov[] two cases:
1.if we place an entry such as
i_link_conf_goodsmov-INDEX_CONFIRM = 1.
i_link_conf_goodsmov-INDEX_GOODSMOV = 1.
Then no entry appears in table MSEG, in COR3 delivered qty is not increase but in COR6N the already confirmed quantity IS increase
1.if we place no entry then
Then an entry appears in table MSEG but the batch is not the one in i_goodsmovements, in COR3 delivered qty is increase and in COR6N the already confirmed quantity also increases
So our problem is that when we use i_link_conf_goodsmov to make the bapi use the batch we specify then it does not seem to work. success is returned from bapi in both cases.
I would really appreciate it anyone can shed some light in this. (points will be given of course!)
‎2007 Jul 04 1:21 PM
Wilson , did you solve the problem? I'm in the same status...
‎2014 Oct 09 8:48 AM
Hi Alberto,
We are facing same problem.
While we are passing batch through BAPI it is considering running batch not considering inputed batch.
Thanks
Ram Mittal