Skip to Content
0
Jun 05, 2009 at 03:28 AM

Regarding CALL TRANSACTION

385 Views

Dear forumers,

Is there a way to call different transactions by using the same data field in an ALV report?

In my spec, it is written to call transactions "IW33 or CN23" in the ALV drill-down functionality on the data field AUFNR. Does anyone know how to get this done? I'm not sure what conditions to check for calling the two different transactions here.

The following is how my codes look like (I'm only calling the transaction IW33 alone for this):-

CLASS lcl_handle_events IMPLEMENTATION.
  METHOD on_double_click.
    CASE column.

      WHEN 'VBELN'.
        READ TABLE i_assets INTO w_assets INDEX row.
        SET PARAMETER ID 'AUN' FIELD w_assets-vbeln.
        CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

      WHEN 'AUFNR'.
        READ TABLE i_assets INTO w_assets INDEX row.
        SET PARAMETER ID 'ANR' FIELD w_assets-aufnr.
        CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.

    ENDCASE.
  ENDMETHOD.                    "on_double_click
ENDCLASS.                    "lcl_handle_events IMPLEMENTATION

Please do let me know if any of you need any further information regarding my spec too.

Thanks.