‎2009 Mar 17 7:58 AM
hi all
i am using the below BDC code to update the delivery picking qty, it works fine, but for few deliveries, It doesnt update the picking qty. The pattern of skipping the update is happing for the Item "900003".This happens very rarely, but need to be addressed. Can anyone suggest me the solution for this or an alternate solution(BAPI).
CALL FUNCTION 'DEQUEUE_EVVBLKE'
EXPORTING
MODE_LIKP = 'E'
MANDT = SY-MANDT
vbeln = lips-vbeln.
.
bdc_mode = 'N'.
PERFORM bdc_dynpro USING 'SAPMV50A' '4004'.
PERFORM bdc_field USING 'BDC_CURSOR' 'LIKP-VBELN'.
PERFORM bdc_field USING 'LIKP-VBELN' likp-vbeln.
PERFORM bdc_field USING 'BDC_OKCODE' '=VERP_T'.
PERFORM bdc_dynpro USING 'SAPLV51G' '6000'.
PERFORM bdc_field USING 'BDC_OKCODE' '=UE6VDIR'.
LOOP AT it_hukey.
PERFORM bdc_dynpro USING 'SAPLV51G' '6000'.
PERFORM bdc_field USING 'BDC_CURSOR' 'VEKP-EXIDV'.
PERFORM bdc_field USING 'VEKP-EXIDV' it_hukey-hu_exid.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPLV51G' '6000'.
PERFORM bdc_field USING 'BDC_OKCODE' '/03'.
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE' '=T\01'.
PERFORM bdc_dynpro USING 'SAPLJ3AD' '2010'.
PERFORM bdc_field USING 'BDC_OKCODE' '=T\02'.
PERFORM bdc_dynpro USING 'SAPLJ3AD' '2010'.
LOOP AT it_pick WHERE NOT pakmg IS INITIAL.
PERFORM bdc_field USING 'BDC_OKCODE' '=B1\POPO'.
PERFORM bdc_dynpro USING 'SAPLJ3AD' '2100'.
PERFORM bdc_field USING 'J_3ASZDI-POSNR' it_pick-posnr.
PERFORM bdc_field USING 'BDC_OKCODE' '=POSA'.
PERFORM bdc_dynpro USING 'SAPLJ3AD' '2010'.
l_qty = it_pick-pakmg.
CONDENSE l_qty.
PERFORM bdc_field USING 'J_3ASZDI-PIKMG(01)' l_qty.
CLEAR : it_del_pick,it_lips.
ENDLOOP.
PERFORM bdc_field USING 'BDC_OKCODE' '=SICH_T'.
CALL TRANSACTION 'VL02N' USING bdcdata
MODE bdc_mode UPDATE bdc_upd MESSAGES INTO messtab.
READ TABLE messtab WITH KEY msgtyp = 'E'.
IF sy-subrc NE 0.
MESSAGE s000(38) WITH 'Delivery ' likp-vbeln
'Picking is successful'.
PERFORM print_lbl_on_create.
.
REFRESH: bdcdata. CLEAR: bdcdata.
REFRESH messtab.
ELSE.
MESSAGE e000(38) WITH
'Delivery Picking failed'.
ENDIF.
thanks,
Raja
‎2009 Mar 17 8:19 AM
'9***' are batch split delivery for which there will be seperate screeen navigation will come.
are you handling that?
‎2009 Mar 17 8:27 AM
yes,
I recorded the usual flow of vl02n to update the pick qty, in my code also, it is handled with the screen
'SAPLJ3AD' '2010'., where in the Qty details are passed. This BDC program works fine for most of the deliveries , but for certail deliveries the third row is getting skipped during qty update.
tnx,
Raja