#1
|
|||
|
|||
Error en bapi BAPI_USER_CHANGE
Hola a todos,
Espero pueda alguien ayudarme: Resulta que estoy creando un programa Z que bloquea a los usuarios por cierto número de dias por inactividad. Y al momento de bloquearlos les cambia el campo FUNCION que aparece en la SU01 y que esta mapeado en la tabla ADCP. Esto lo estoy tratando de hacer con la bapi BAPI_USER_CHANGE. Esta la he testeado directo en la SE37 pasando el campo USERNAME = valor del campo ADDRESS-FUNCTION = 'nueva cadena de caracteres que tendra el campo funcion' ADDRESSX-FUNCTION = 'X' (para indicar que el campo que cambia es la funcion). Me lo hace correctamente desde la SE37, pero al momento de implementar esto en mi programa Z, me arroja un dumpo con lo siguiente: An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_DYN_CALL_ILL not caught in procedure "BLOQUEAR_USUARIOS" "(FORM)", nor was it propagated clause. Since the caller of the procedure could not have anticipated exception would occur, the current program is terminated. The reason for the exception is: The call to the function module "BAPI_USER_CHANGE" is incorre In the function module interface, you can specify only fields of a specific type and length under "ADDRESS". Although the currently specified field "IT_BAPIADDR3" is the correct type, its length is incorrect. Anexo el codigo de mis programa. Espero alguien pueda ayudarme !!!!!!
__________________
Amparo Gómez Salazar Seguridad SAP/Programmer ABAP |
#2
|
|||
|
|||
Anexo el código. Para mayor referencia por favor.
__________________
Amparo Gómez Salazar Seguridad SAP/Programmer ABAP |
#3
|
|||
|
|||
Tipos de Variables
Hola Amparo,
Al parecer estas pasando en los parámetros de la BAPI un tipo de datos diferente. Trata que las variables que estas enviando a la BAPI sean del mismo tipo de las variables que la reciben. Espero haber sido Claro, Saludos,
__________________
-- SapConexion.com Servidor SAP ECC 6.0 Acceso Remoto |
#4
|
|||
|
|||
Pues bueno ya lo resolvi,
Por si a alguien le interesa use este codigo: data: it_usr02 type standard table of ty_usr02 , it_usr21 type standard table of ty_usr21 , it_adcp type standard table of ty_adcp , it_adrp type standard table of ty_adrp , it_lista type standard table of ty_lista , * Datos funcion w_address type bapiaddr3, it_bapiret2 type standard table of bapiret2, w_addressx type bapiaddr3x, t_return type standard table of bapiret2, it_return like bapiret2 . w_address-function = c_inact . w_addressx-function = 'X'. call function 'BAPI_USER_CHANGE' exporting username = wa_lista-bname address = w_address addressx = w_addressx tables return = t_return. call function 'BAPI_TRANSACTION_COMMIT' exporting wait = '2' importing return = it_return.
__________________
Amparo Gómez Salazar Seguridad SAP/Programmer ABAP |
#5
|
|||
|
|||
Hola asi era! ya lo logre solucionar, muchas gracias por tus comentarios.
__________________
Amparo Gómez Salazar Seguridad SAP/Programmer ABAP |
Herramientas | Buscar en Tema |
Desplegado | |
|
|