Skip to Content
0
Former Member
Jun 18, 2009 at 09:36 AM

BAPI_PRODORDCONF_CREATE_TT (Goods Movement Problem)

1092 Views

Hello All,

I have problem with BAPI_PRODORDCONF_CREATE_TT, when i executed the Program, the confirmation is success but the Goods Movement Failed ...and no error ..

i check COOIS, for List : Items ..... GR Qty 0 ...

List : Order headers --> Conf. Qty : 60

REPORT zipp_conftt.

TABLES : afru.

DATA: i_raw LIKE zpp_prod_ord OCCURS 0 WITH HEADER LINE.

DATA: i_tt LIKE bapi_pp_timeticket OCCURS 0 WITH HEADER LINE.

DATA: i_gm LIKE bapi2017_gm_item_create OCCURS 0 WITH HEADER LINE.

DATA: i_ret LIKE bapiret1 OCCURS 0 WITH HEADER LINE.

DATA: i_detret LIKE bapi_coru_return OCCURS 0 WITH HEADER LINE.

DATA: i_msg LIKE bapi_coru_return OCCURS 0 WITH HEADER LINE.

DATA: i_link LIKE bapi_link_conf_goodsmov OCCURS 0 WITH HEADER LINE.

SELECT-OPTIONS: s_budat FOR afru-budat.

*SELECT * INTO TABLE i_raw FROM zfi_balsheet.

SELECT * INTO TABLE i_raw FROM zpp_prod_ord WHERE create_date IN s_budat.

LOOP AT i_raw.

REFRESH : i_ret, i_tt, i_gm, i_detret, i_link.

i_tt-orderid = i_raw-prodordno.

i_tt-sequence = i_raw-sequen.

i_tt-operation = i_raw-oper.

i_tt-postg_date = i_raw-pk_prod_date.

i_tt-yield = i_raw-qty_result.

APPEND i_tt.

CLEAR i_tt.

i_gm-batch = i_raw-batch.

i_gm-move_type = i_raw-mov.

i_gm-entry_qnt = i_raw-qty_result.

i_gm-entry_uom = ''.

i_gm-prod_date = i_raw-pk_prod_date.

i_gm-quantity = i_raw-qty_result.

i_gm-PO_PR_QNT = i_raw-qty_result.

APPEND i_gm.

CLEAR i_gm.

i_link-index_confirm = '1'.

i_link-index_goodsmov = '0'.

APPEND i_link.

CLEAR i_link.

CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'

  • EXPORTING

  • POST_WRONG_ENTRIES = '0'

  • TESTRUN =

IMPORTING

return = i_ret

TABLES

timetickets = i_tt

goodsmovements = i_gm

link_conf_goodsmov = i_link

detail_return = i_detret

.

IF i_ret-type NE 'E'.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

COMMIT WORK.

READ TABLE i_detret INDEX 1.

IF sy-subrc EQ 0.

MOVE-CORRESPONDING i_detret TO i_msg.

APPEND i_msg.

ENDIF.

ELSE.

ROLLBACK WORK.

ENDIF.

ENDLOOP.

LOOP AT i_msg.

WRITE:/ i_msg-type, i_msg-message.

ENDLOOP.

Can anyone help me with step by step solution, im using ECC6 ?

is there configuration that have to be implemented regarding this BAPI ?

Regards,

Hendra