Para poder dar una respuesta correcta se necesitarian mas datos
Si cuando llamas a la L_TO_CREATE_MULTIPLE NO necesitas que se haya creado previamente el movimiento podrias hacer lo siguiente
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
...
TESTMODE = 'X'.
CALL FUNCTION L_TO_CREATE_MULTIPLE
COMMIT WORK = space
IF SY-SUBRC IS INITIAL.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
...
TESTMODE = SPACE.
COMMIT WORK AND WAIT.
ELSE.
ROLLBACK WORK.
ENDIF.
Si cuando llamas a la L_TO_CREATE_MULTIPLE SI necesitas que el movimiento se haya creado previamente entonces forzosamente tendras que crear el movimiento, despues llamar a la L_TO_CREATE_MULTIPLE y si esta falla tendras que CANCELAR el movimiento o bien con la BAPI_GOODSMVT_CANCEL o bien haciendo un batch input contra la MBST
|