MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
 
 
Herramientas Buscar en Tema Desplegado
Prev Mensaje Previo   Próximo Mensaje Próx
  #2  
Viejo 16/03/10, 16:02:09
yapbig yapbig is offline
Senior Member
 
Fecha de Ingreso: may 2007
Localización: San Nicolás, Argentina
Mensajes: 261
Thumbs up

para poder invocar una transacción desde un Reporte ALV tenes que indicarle dentro del catálogo que el campo es hotspot
fieldcat-hotspot = 'X'.

y luego en tu lógica del user_command invocar a la transacción en custión pasándole los parámetros de la misma que se los pudes asignar por ID de parámetro si el elemento de dato tiene ID de parámetro

form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.

**
* Example Code
*
* Executes a command considering the sy-ucomm.
CASE r_ucomm.
WHEN '&F03'.
CALL SELECTION-SCREEN 1000.
WHEN '&F15'.
CALL SELECTION-SCREEN 1000.
WHEN '&IC1'.
* Set your "double click action" response here.

* Example code: Create and display a status message.
* DATA: w_msg TYPE string,
* w_row(4) TYPE n.
* w_row = rs_selfield-tabindex.
* CONCATENATE 'You have clicked row' w_row
* 'field' rs_selfield-fieldname
* 'with value' rs_selfield-value
* INTO w_msg SEPARATED BY space.
* MESSAGE w_msg TYPE 'S'.


IF p_rbrc = 'X'.
READ TABLE it_datrc index rs_selfield-tabindex.
ELSE.
READ TABLE it_datfa index rs_selfield-tabindex.
ENDIF.

CASE rs_selfield-fieldname.
WHEN 'BELNR_RC'.
SET PARAMETER ID 'BLN' FIELD rs_selfield-value.
SET PARAMETER ID 'BUK' FIELD p_bukrs.
IF p_rbrc = 'X'.
SET PARAMETER ID 'GJR' FIELD it_datrc-gjahr_rc.
ELSE.
SET PARAMETER ID 'GJR' FIELD it_datfa-gjahr_rc.
ENDIF.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
WHEN 'BELNR_FA'.
SET PARAMETER ID 'BLN' FIELD rs_selfield-value.
SET PARAMETER ID 'BUK' FIELD p_bukrs.
IF p_rbrc = 'X'.
SET PARAMETER ID 'GJR' FIELD it_datrc-gjahr_fa.
ELSE.
SET PARAMETER ID 'GJR' FIELD it_datfa-gjahr_fa.
ENDIF.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
WHEN 'KIDNO_FA'.
IF rs_selfield-value <> ''.
SET PARAMETER ID 'VF' FIELD rs_selfield-value.
CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.

ENDCASE.
*
* End of example code.
**

endform. "user_command
__________________
Gustavo A. Biglia
Consultor SAP FI
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 22:46:03.


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