MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Como llamar la tx fb03 desde un ALV (foro/showthread.php?t=61834)

Leonel Espitia Torres 14/03/12 20:09:40

Como llamar la tx fb03 desde un ALV
 
Buenas dias compañeros abapers.
Nuevamente muchas gracias por todos sus aportes.
Necesito que al hacer doble clic, pueda llamar a la tx fb03.
Alquien por favor me puede enviar un ejemplo de como realizarlo?.
Cordialmente, Leonel

caralbgro 15/03/12 12:11:18

tenes que hacer lo siguiente
 
*primero agregar el parámetro a la función de display

i_callback_user_command = 'USER_COMMAND'

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_interface_check = 'X'
i_callback_program = g_repit
it_fieldcat = LISTADO[]
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = s_layout
i_save = 'A'
it_events = events[]
i_callback_user_command = 'USER_COMMAND'
TABLES
t_outtab = t_ZLOG_CHEQUE_MACR
EXCEPTIONS
program_error = 1
OTHERS = 2.


*luego creas el form

FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM
L_SELFIELD TYPE SLIS_SELFIELD.

COMMIT WORK.

CASE L_UCOMM.
WHEN '&IC1'. " Doble click
CHECK NOT L_SELFIELD-value IS INITIAL.
READ TABLE t_ZLOG_CHEQUE_MACR INDEX L_SELFIELD-tabindex.
CASE L_SELFIELD-FIELDNAME.
WHEN 'VBLNR'. * nombre de la columna que da doble click
SET PARAMETER ID 'BLN' FIELD t_ZLOG_CHEQUE_MACR-VBLNR.
SET PARAMETER ID 'BUK' FIELD t_ZLOG_CHEQUE_MACR-zbukr.
SET PARAMETER ID 'GJR' FIELD t_ZLOG_CHEQUE_MACR-gjahr.
* t_ZLOG_CHEQUE_MACR es mi tabla interna pon la tuya

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.

l_SELFIELD-REFRESH = 'X'.
endform.


Husos Horarios son GMT. La hora en este momento es 14:12:34.

www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web