Dump al hacer un CALL FUNCTION en background URGENTE

Colapsar
X
 
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes
  • raulgar
    Junior Member
    • dic
    • 28

    #1

    Dump al hacer un CALL FUNCTION en background URGENTE

    Hola a todos.

    Necesito ayuda. El problema que tengo es que me da un dump cuando hago una llamada a una función en background. Necesito que sea en back porque tiene que esperar a que se desbloqueen unos objetos para que haga un BI.

    Esta es la llamada.
    CALL FUNCTION 'ZREVALORIZACION_MATERIALES' IN BACKGROUND TASK
    * CALL FUNCTION 'ZREVALORIZACION_MATERIALES' IN UPDATE TASK
    EXPORTING
    w_mseg = w_mseg.

    Tengo comentado todo lo que hace dentro de la función y me da un dump por lo que el error es en la llamada. Os copio el dump en cuestión.

    Errores tiempo ejec. PERFORM_PARAMETER_MISSING
    Excepción CX_SY_DYN_CALL_PARAM_MISSING
    Fecha y hora 04.09.2008 14:12:44

    ¿Qué ha sucedido?
    A routine call specifies fewer parameters than the number
    given when defining the routine.

    Anál.errores
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was
    not caught in
    procedure "XAB_RUN_DRIVER" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    A PERFORM was used to call the routine "XAB_RUN_DRIVER" of the program
    "SAPMSSY1".
    The current call contains 0 actual parameter(s),
    but the routine "XAB_RUN_DRIVER" expects more than 0 parameters.
    parameters.

    Codigo


    data : subrc type i.

    call 'AB_GET_C_PARMS' id 'P1' field <prog> "Programmname
    id 'P2' field <cntl>. "Handle

    perform rfcdrv_rflush in program (<prog>) using <cntl>
    subrc
    if found.

    call 'AB_SET_C_PARMS' id 'P2' field <cntl>. "Handle
    syst-subrc = subrc.
    endform.

    form xab_run_driver using prog type c
    if_found type i
    new_function type c.
    data : program like syst-repid.

    program = prog.
    if new_function = space.
    call 'RfcImport' id 'Push' field rfctype_abap4_exit
    id 'Info' field program.
    else.
    call 'RfcImport' id 'Push' field rfctype_abap4_exit
    id 'Info' field program
    id 'Function' field new_function.
    endif.
    if if_found = 0.
    perform (sy-xform) in program (sy-xprog).
    else. FALLO AQUI
    perform (sy-xform) in program (sy-xprog) if found.
    endif.

    endform.

    Alguien sabe que puede ser???

    Muchas gracias!
  • raulgar
    Junior Member
    • dic
    • 28

    #2
    Se me olvidaba comentar que la llamada a la funcion es dentro de una BADI. En concreto la ZMB_MIGO_BADI en la interfase IF_EX_MB_MIGO_BADI~POST_DOCUMENT.

    Muchas gracias.

    Comentario

    • ballan
      Senior Member
      • oct
      • 671

      #3
      El error es un problema en el numero de parametros al llamar a una rutina, por ejemplo si tienes este form

      FORM prueba USING param1 param2

      cuando haces la llamada PERFORM prueba. Te daria error porque no le has pasado parametros, tendrias que hacer
      PERFORM prueba USING parametro1 parametro2.

      Comentario

      Trabajando...