Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_PRODORDCONF_CREATE_TT

Former Member
0 Likes
800

Hi

I would like to do confirmation as well as MIGO 261 using BAPI_PRODORDCONF_CREATE_TT. here is how i did it but material document is not created and confirmation is saved.

data: return type bapiret1.

data: i_timetickets type table of BAPI_PP_TIMETICKET with header line.

DATA: I_DETAIL TYPE TABLE OF BAPI_CORU_RETURN WITH HEADER LINE.

i_timetickets-conf_no = '4061'.

i_timetickets-orderid = '000001000853'.

i_timetickets-operation = '0010'.

i_timetickets-work_cntr = '31258'.

i_timetickets-plant = 'US19'.

i_timetickets-yield = '5'.

i_timetickets-conf_quan_unit = 'ST'.

i_timetickets-scrap = ''.

i_timetickets-dev_reason = ''.

APPEND i_timetickets.

CLEAR i_timetickets.

i_timetickets-conf_no = '4061'.

i_timetickets-orderid = '000001000853'.

i_timetickets-operation = '0010'.

i_timetickets-work_cntr = '31258'.

i_timetickets-plant = 'US19'.

i_timetickets-yield = ''.

i_timetickets-scrap = '1'.

i_timetickets-conf_quan_unit = 'ST'.

i_timetickets-dev_reason = '101'.

APPEND i_timetickets.

CLEAR i_timetickets.

i_timetickets-conf_no = '4061'.

i_timetickets-orderid = '000001000853'.

i_timetickets-operation = '0010'.

i_timetickets-work_cntr = '31258'.

i_timetickets-plant = 'US19'.

i_timetickets-yield = ''.

i_timetickets-scrap = '1'.

i_timetickets-conf_quan_unit = 'ST'.

i_timetickets-dev_reason = '103'.

APPEND i_timetickets.

CLEAR i_timetickets.

i_timetickets-conf_no = '4061'.

i_timetickets-orderid = '000001000853'.

i_timetickets-operation = '0010'.

i_timetickets-work_cntr = '31258'.

i_timetickets-plant = 'US19'.

i_timetickets-yield = ''.

i_timetickets-scrap = '1'.

i_timetickets-conf_quan_unit = 'ST'.

i_timetickets-dev_reason = '104'.

APPEND i_timetickets.

CLEAR i_timetickets.

DATA: I_GM TYPE TABLE OF BAPI2017_GM_ITEM_CREATE WITH HEADER LINE.

I_GM-MATERIAL = '000000000200090301'.

I_GM-PLANT = 'US19'.

I_GM-STGE_LOC = '0001'.

I_GM-BATCH = '0000003109'.

I_GM-MOVE_TYPE = '261'.

I_GM-ENTRY_QNT = '5'.

I_GM-ENTRY_UOM = 'PC'.

I_GM-ORDERID = '000001000853'.

APPEND I_GM.

CLEAR I_GM.

I_GM-MATERIAL = '000000000200090301'.

I_GM-PLANT = 'US19'.

I_GM-STGE_LOC = '0001'.

I_GM-BATCH = '0000003101'.

I_GM-MOVE_TYPE = '261'.

I_GM-ENTRY_QNT = '75'.

I_GM-ENTRY_UOM = 'PC'.

I_GM-ORDERID = '000001000853'.

APPEND I_GM.

CLEAR I_GM.

CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'

  • EXPORTING

  • POST_WRONG_ENTRIES = '0'

  • TESTRUN = 'X'

IMPORTING

RETURN = return

TABLES

timetickets = i_timetickets[]

GOODSMOVEMENTS = I_GM[]

  • LINK_CONF_GOODSMOV =

DETAIL_RETURN = I_DETAIL[].

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

In I_detail i am getting a message Confirmation of order is saved but i think i should have get confirmation saved (Goods movements:2 , failed:0) message. Also i donot under stand what i should pass to LINK_CONF_GOODSMOV if i have to pass something. Please suggest me something ASAP.

Thanks in advance.

Rajesh.

3 REPLIES 3
Read only

Former Member
0 Likes
623

In the link table you have to pass something like this: (if you want to do the goodsmovemnt with the first confirmation)

clear i_link.

i_link-index_confirm = '1'. " Index of the confirmation with the goodsmovement

i_link-index_goodsmov = '1'.

append i_link.

clear i_link.

i_link-index_confirm = '1'.

i_link-index_goodsmov = '2'.

append i_link.

Another problem that can ocurrs is that you have to specify more fields in the goodsmovent table as the field val_type.

Regards,

Read only

0 Likes
623

So index_goodsmov will be increased as many MIGOs we are doing.

Read only

0 Likes
623

I think so