#1
|
|||
|
|||
AYUDA pls 'BAPI_GOODSMVT_CREATE'
hola estoy tratando de hacer un movimiento con la bapi BAPI_GOODSMVT_CREATE y el codigo de retorno no me trae nada (ni mensaje de error ni nada) en la tabla interna i_return ya no se k probar si alguien me da una manita se lo agradecere.
El codigo es el siguiente: * DATOS CABECERA CLEAR l_goodsmvt_header. l_goodsmvt_header-pstng_date = sy-datum. l_goodsmvt_header-doc_date = sy-datum. * l_goodsmvt_header-pr_uname = sy-uname. l_goodsmvt_code = '04'. REFRESH i_goodsmvt_item. CLEAR i_goodsmvt_item. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING INPUT = tab_out-matnr IMPORTING OUTPUT = tab_out-matnr. i_goodsmvt_item-entry_qnt = cant_rest . i_goodsmvt_item-material = tab_out-matnr. i_goodsmvt_item-plant = '0003'. i_goodsmvt_item-stge_loc = '0010'. i_goodsmvt_item-move_type = '311'. * Compruebo bloqueo de material por centro comprobar_bloqueo_marc i_goodsmvt_item-material i_goodsmvt_item-plant. APPEND i_goodsmvt_item. REFRESH: i_return. CLEAR i_return. clear ld_mblnr. CALL FUNCTION 'BAPI_GOODSMVT_CREATE' EXPORTING goodsmvt_header = l_goodsmvt_header goodsmvt_code = l_goodsmvt_code IMPORTING goodsmvt_headret = l_goodsmvt_headret materialdocument = ld_mblnr TABLES goodsmvt_item = i_goodsmvt_item return = i_return. |
#2
|
|||
|
|||
Hola,
supongo que después de llamar a la BAPI estas haciendo un commit work, no ? si no es así hazlo !, en teoria si hay algún problema debería devolerte error siempre. Saludos. |
#3
|
|||
|
|||
COMMIT WORK AND WAIT. si lo hago y no funciona . La verdad es que ya no se por donde tirar.
Saludos y gracias por el interes. |
#4
|
|||
|
|||
Bapi_goodsmvt_create
Prueba con lo siguiente, espero te sirva.
*---- Llenamos data de la Cabacera wa_goodsmvt_header-pstng_date = doc_date. wa_goodsmvt_header-doc_date = doc_date. wa_goodsmvt_code-gm_code = '03'. LOOP AT consuor. *---- Llenamos data del Detalle wa_goodsmvt_item-material = consuor-matnr. wa_goodsmvt_item-orderid = consuor-aufnr. wa_goodsmvt_item-plant = plant. wa_goodsmvt_item-stge_loc = stge_loc. wa_goodsmvt_item-batch = batch. wa_goodsmvt_item-move_type = move_type. wa_goodsmvt_item-entry_qnt = consuor-menge. wa_goodsmvt_item-entry_uom = entry_uom. APPEND wa_goodsmvt_item TO t_goodsmvt_item. AT END OF aufnr. CALL FUNCTION 'BAPI_GOODSMVT_CREATE' EXPORTING goodsmvt_header = wa_goodsmvt_header goodsmvt_code = wa_goodsmvt_code IMPORTING goodsmvt_headret = wa_goodsmvt_headret TABLES goodsmvt_item = t_goodsmvt_item return = t_return. IF t_return-type NE 'E'. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'W'. Saludos |
Herramientas | Buscar en Tema |
Desplegado | |
|
|