MUNDOSAP

MUNDOSAP (foro/index.php)
-   Programación ABAP IV (foro/forumdisplay.php?f=4)
-   -   Navegar a una transaccion dentro del reporte (foro/showthread.php?t=35681)

cookiemonsta 16/03/10 14:46:55

Navegar a una transaccion dentro del reporte
 
Hola !!!

Quisiera me ayudaran ya que tengo un reporte que despliega la instalacion y el contrato, pero cuando lo despliegue necesito que el reporte pueda navegar a la ZRAP. Alguien me pude ayudar?

Muchas gracias!!

yapbig 16/03/10 16:02:09

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

cookiemonsta 16/03/10 16:56:34

Te agradezco mucho, fijate que cuando va a la pantalla de la transaccion retorna a la pantalla anterior y no al reporte sabes como puedo agregar un RETURN o algo para saltearme esa pagina?

gracias por tu ayuda


Husos Horarios son GMT. La hora en este momento es 09:32:30.

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