Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Bapi For Production Confirmation ?

Hi,

I am using "BAPI_PRODORDCONF_CREATE_TT" for production confirmation.

I need to also pass the corresponding goods movement for the order operation. How to achieve this. and also what are the mandatory fields to be supplied for good movement.

Regards,

Navneeth K.

Tags:
Former Member
Former Member replied

Hi Bothra,

Follow the sample code.

DATA : BEGIN OF TIMETICKETS OCCURS 0.

INCLUDE STRUCTURE BAPI_PP_TIMETICKET.

DATA : END OF TIMETICKETS.

DATA : BEGIN OF GOODSMOVEMENTS OCCURS 0.

INCLUDE STRUCTURE BAPI2017_GM_ITEM_CREATE.

DATA :END OF GOODSMOVEMENTS.

*DATA : LINK_CONF_GOODSMOV TYPE BAPI_LINK_CONF_GOODSMOV.

DATA : DETAIL_RETURN TYPE BAPI_CORU_RETURN OCCURS 0 WITH HEADER LINE.

DATA : RETURN TYPE BAPIRET1 OCCURS 0 WITH HEADER LINE.

DATA : POST_WRONG_ENTRIES LIKE BAPI_CORU_PARAM-INS_ERR.

DATA : TESTRUN LIKE BAPI_CORU_PARAM-TESTRUN.

DATA: BEGIN OF LINK OCCURS 0.

INCLUDE STRUCTURE BAPI_LINK_CONF_GOODSMOV.

DATA: END OF LINK.

DATA: BEGIN OF PROPOSE OCCURS 0.

INCLUDE STRUCTURE BAPI_PP_CONF_PROP.

DATA: END OF PROPOSE.

DATA : BEGIN OF LINK_CONF_GOODSMOV OCCURS 0.

INCLUDE STRUCTURE BAPI_LINK_CONF_GOODSMOV.

DATA : END OF LINK_CONF_GOODSMOV.

LOOP AT TIMETKT.

MOVE-CORRESPONDING TIMETKT TO TIMETICKETS.

APPEND TIMETICKETS.

LOOP AT BAPI_ITAB1 WHERE SRL = TIMETKT-SRL.

MOVE-CORRESPONDING BAPI_ITAB1 TO GOODSMOVEMENTS.

CONF_QUAN_UNIT.

CONF_ACTI_UNIT1.

APPEND GOODSMOVEMENTS.

ENDLOOP.

PROPOSE-QUANTITY = 'X'.

PROPOSE-ACTIVITY = 'X'.

PROPOSE-DATE_AND_TIME = 'X'.

PROPOSE-GOODSMOVEMENT = 'X'.

APPEND PROPOSE.

CALL FUNCTION 'BAPI_PRODORDCONF_GET_TT_PROP'

EXPORTING

PROPOSE = PROPOSE

  • IMPORTING

  • RETURN =

TABLES

TIMETICKETS = TIMETICKETS

GOODSMOVEMENTS = GOODSMOVEMENTS

LINK_CONF_GOODSMOV = LINK_CONF_GOODSMOV

DETAIL_RETURN = DETAIL_RETURN.

.

.

CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'

EXPORTING

POST_WRONG_ENTRIES = '0'

  • TESTRUN =

IMPORTING

RETURN = RETURN

TABLES

TIMETICKETS = TIMETICKETS

GOODSMOVEMENTS = GOODSMOVEMENTS

LINK_CONF_GOODSMOV = LINK_conf_goodsmov

DETAIL_RETURN = DETAIL_RETURN.

if return-id is initial.

commit work.

endif.

I think it will be helpfull to u.

Regards

Srimanta

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question