Application Development 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: 

Issue with BAPI_PROCORDCONF_CREATE_TT : For 531 Mvt Type posting

former_member182760
Participant
0 Kudos
333

Hi Folks,

I want to do both scrap confirmation and by-product receipt using follwing code . Each time I am getting confirmation created message but

but by-product receipt using 531 movement type is not happening. Please help.

* for timetickets data

  gwa_timetickets-orderid      = qals-aufnr.
  gwa_timetickets-phase        = gwa_afvc-vornr.
  gwa_timetickets-fin_conf     = 'X'.
  gwa_timetickets-clear_res    = 'X'.
  gwa_timetickets-postg_date   = sy-datum.
  gwa_timetickets-conf_text    = gwa_timetickets-dev_reason.
  gwa_timetickets-plant        = qals-werk.
  gwa_timetickets-yield        = gwa_timetickets-yield.
  gwa_timetickets-scrap        = gwa_timetickets-scrap.
*  gwa_timetickets-conf_quan_unit = 'TON'.

  APPEND gwa_timetickets TO gt_timetickets.
  CLEAR gwa_timetickets.

* for goodsmovement data
  gwa_goodsmovements-material  = gv_dmat.
  gwa_goodsmovements-plant     = qals-werk.
  gwa_goodsmovements-stge_loc  = gwa_mseg-lgort.
  gwa_goodsmovements-batch     = qals-charg.
  gwa_goodsmovements-move_type = gc_531.
  gwa_goodsmovements-entry_qnt = gv_qnty.
  gwa_goodsmovements-entry_uom = gv_unit.
  gwa_goodsmovements-orderid   = qals-aufnr.
  gwa_goodsmovements-mvt_ind   = 'F'.
  gwa_goodsmovements-line_id   = '1'.
  gwa_goodsmovements-parent_id = '1'.

  READ TABLE gt_resb INTO gwa_resb WITH KEY matnr = gv_dmat werks = qals-werk aufnr = qals-aufnr BINARY SEARCH.
  IF sy-subrc EQ 0.
    gwa_goodsmovements-reserv_no = gwa_resb-rsnum.
    gwa_goodsmovements-res_item  = gwa_resb-rspos.
*    gwa_goodsmovements-activity  = gwa_resb-vornr.
  ENDIF.

  APPEND gwa_goodsmovements TO gt_goodsmovements.
  CLEAR gwa_goodsmovements.

* for link_conf_goodsmov data
  gwa_link_conf_goodsmov-index_confirm  = '1'.
  gwa_link_conf_goodsmov-index_goodsmov = '1'.

  APPEND gwa_link_conf_goodsmov TO gt_link_conf_goodsmov.
  CLEAR gwa_link_conf_goodsmov.

CALL FUNCTION 'BAPI_PROCORDCONF_CREATE_TT'
    EXPORTING
      post_wrong_entries = '2'"space
      testrun            = space
    IMPORTING
      return             = gwa_return1
    TABLES
      timetickets        = gt_timetickets
      goodsmovements     = gt_goodsmovements
      link_conf_goodsmov = gt_link_conf_goodsmov
      detail_return      = gt_detail_return.

1 ACCEPTED SOLUTION

former_member182760
Participant
0 Kudos
77

Got the solution !!!

Bapi has been successfully executed. Error occured is standard error which has been tracked by COGI transaction. If you resolve that error, this process will be completed

1 REPLY 1

former_member182760
Participant
0 Kudos
78

Got the solution !!!

Bapi has been successfully executed. Error occured is standard error which has been tracked by COGI transaction. If you resolve that error, this process will be completed