Skip to Content
0
Former Member
Sep 08, 2007 at 10:48 AM

regarding error

42 Views

hi experts,

i m using this codes for production order confirmation:::::

*for time tickets:

data:TIMETICKETS LIKE BAPI_PP_TIMETICKET occurs 0 with header line.

move '700000000107' to timetickets-ORDERID.

move '0' to timetickets-SEQUENCE.

move '0010' to timetickets-OPERATION.

move sy-datum to timetickets-POSTG_DATE.

move '0000' to timetickets-DEV_REASON.

move '6000' to timetickets-PLANT.

MOVE 'SMAF' to timetickets-WORK_CNTR.

move '4' to timetickets-YIELD.

move 'MT' to timetickets-CONF_QUAN_UNIT.

move sy-datum to timetickets-EXEC_START_DATE.

move '6:00:00' to timetickets-EXEC_START_TIME.

move sy-datum to timetickets-EXEC_FIN_DATE.

move '6:00:00' to timetickets-EXEC_FIN_TIME.

move '' to timetickets-FIN_CONF.

append timetickets.

clear timetickets.

*____________________________________________________________________

*for goodsmovement:

data:GM_ITEM LIKE BAPI2017_GM_ITEM_CREATE occurs 0 with header

line.

**move statement for movement type 101.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '101' TO GM_ITEM-MOVE_TYPE .

MOVE '000000003000000196' TO GM_ITEM-MATERIAL.

MOVE '4' TO GM_ITEM-ENTRY_QNT.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'WFC1' TO GM_ITEM-STGE_LOC.

move 'F' to gm_item-MVT_IND.

move '0010' to gm_item-ACTIVITY.

APPEND GM_ITEM.

clear GM_ITEM.

**move statement for movement type 261.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '261' TO GM_ITEM-MOVE_TYPE .

MOVE '000000003000000195' TO GM_ITEM-MATERIAL.

MOVE '1' TO GM_ITEM-ENTRY_QNT.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'WFC1' TO GM_ITEM-STGE_LOC.

MOVE '1000007735' TO GM_ITEM-BATCH.

move 'F' to gm_item-mvt_ind.

move '0010' to gm_item-ACTIVITY.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

APPEND GM_ITEM.

clear GM_ITEM.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '261' TO GM_ITEM-MOVE_TYPE .

MOVE '000000003000000193' TO GM_ITEM-MATERIAL.

MOVE '1' TO GM_ITEM-ENTRY_QNT.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'WFC1' TO GM_ITEM-STGE_LOC.

MOVE '1000007727' TO GM_ITEM-BATCH.

move 'F' to gm_item-mvt_ind.

move '0010' to gm_item-ACTIVITY.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

APPEND GM_ITEM.

clear GM_ITEM.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '261' TO GM_ITEM-MOVE_TYPE .

MOVE '000000001000000389' TO GM_ITEM-MATERIAL.

MOVE '1' TO GM_ITEM-ENTRY_QNT.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'FCRM' TO GM_ITEM-STGE_LOC.

move 'F' to gm_item-mvt_ind.

move '0010' to gm_item-ACTIVITY.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

APPEND GM_ITEM.

clear GM_ITEM.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '261' TO GM_ITEM-MOVE_TYPE .

MOVE '000000001000000390' TO GM_ITEM-MATERIAL.

MOVE '1' TO GM_ITEM-ENTRY_QNT.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'FCRM' TO GM_ITEM-STGE_LOC.

move 'F' to gm_item-mvt_ind.

move '0010' to gm_item-ACTIVITY.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

APPEND GM_ITEM.

clear GM_ITEM.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '261' TO GM_ITEM-MOVE_TYPE .

MOVE '000000001000000391' TO GM_ITEM-MATERIAL.

MOVE '1' TO GM_ITEM-ENTRY_QNT.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'FCRM' TO GM_ITEM-STGE_LOC.

move 'F' to gm_item-mvt_ind.

move '0010' to gm_item-ACTIVITY.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

APPEND GM_ITEM.

clear GM_ITEM.

MOVE '700000000107' TO GM_ITEM-ORDERID.

MOVE '261' TO GM_ITEM-MOVE_TYPE .

MOVE '000000001000000392' TO GM_ITEM-MATERIAL.

MOVE '1' TO GM_ITEM-ENTRY_QNT.

MOVE '6000' TO GM_ITEM-PLANT.

MOVE 'FCRM' TO GM_ITEM-STGE_LOC.

move 'F' to gm_item-mvt_ind.

move '0010' to gm_item-ACTIVITY.

MOVE 'MT' TO GM_ITEM-BASE_UOM.

APPEND GM_ITEM.

clear GM_ITEM.

*_________________________________________________________________

*for LinkConfGoodsmov.

data:LINK_CONF_GOODSMOV LIKE BAPI_LINK_CONF_GOODSMOV occurs 0 with

header line.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '1' To LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '2' to LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '3' to LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '4' to LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '5' to LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '6' to LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

move '1' to LINK_CONF_GOODSMOV-INDEX_CONFIRM.

move '7' to LINK_CONF_GOODSMOV-INDEX_GOODSMOV.

append LINK_CONF_GOODSMOV.

clear LINK_CONF_GOODSMOV.

*_____________________________________________________________________

*for detail return.

data:DETAIL_RETURN LIKE BAPI_CORU_RETURN occurs 0 with header line.

data:PROPOSE LIKE BAPI_PP_CONF_PROP occurs 0 with header line.

data:RETURN LIKE BAPIRET1 occurs 0 with header line.

*______________________________________________________________________

*For calling of BAPI.

move '' to Propose-Quantity.

move '' to Propose-Activity.

move '' to propose-DATE_AND_TIME.

move 'X' to propose-PERSONNEL.

move 'X' to Propose-Goodsmovement.

append propose.

clear propose.

CALL FUNCTION 'BAPI_PRODORDCONF_GET_TT_PROP'

EXPORTING

PROPOSE = PROPOSE

IMPORTING

RETURN = RETURN

TABLES

TIMETICKETS = TIMETICKETS

GOODSMOVEMENTS = GM_ITEM

LINK_CONF_GOODSMOV = LINK_CONF_GOODSMOV

DETAIL_RETURN = DETAIL_RETURN.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = '2'.

loop at detail_return.

write:/ detail_return-message,

detail_return-conf_no,

detail_return-conf_cnt.

endloop.

*_______________________________________________________________________

refresh:DETAIL_RETURN,return.

clear:Return,DETAIL_RETURN.

*for calling of second BAPI.

CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'

EXPORTING

POST_WRONG_ENTRIES = '0'

IMPORTING

RETURN = Return

TABLES

TIMETICKETS = TIMETICKETS

GOODSMOVEMENTS = GM_ITEM

LINK_CONF_GOODSMOV = LINK_CONF_GOODSMOV

DETAIL_RETURN = DETAIL_RETURN.

COMMIT WORK AND WAIT.

*CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT = '4'.

*

loop at DETAIL_RETURN.

write:/ DETAIL_RETURN-message.

endloop.

after executing it is giving error::::

error>>>>

<b>Confirmations were created at header level for order 700000000107

0000000000 00000000

Confirmations were created at header level for order 700000000107</b>./

plz help me to solve this error so that after rectifucation i will confirm <b>activity</b>::;