‎2009 Jun 08 9:19 AM
Hi Experts,
I am trying to read the column name and row number of the cell selected in the ALV output and call standard transaction based on the selection.
I am getting syntax error for line READ TABLE T_SALV_CELL INTO ME->WA_SALV_CELL INDEX 1.
Error: Read dbtab is not supported in OOcontext. Use select single * from dbtab into wa.
Also, inspite of passing the correct parameter id it is not skipping the initial screen of transaction BP.
My code goes like this:
*&---------------------------------------------------------------------&
*& CLASS - DEFINITION
*&---------------------------------------------------------------------&
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS: ON_LINK_CLICK
FOR EVENT LINK_CLICK
OF CL_SALV_EVENTS_TABLE
IMPORTING ROW
COLUMN. "#EC NEEDED
PRIVATE SECTION.
DATA: L_ROWNUM TYPE I,
L_COLNAME TYPE LVC_FNAME,
WA_SALV_CELL TYPE SALV_S_CELL.
ENDCLASS. "LCL_EVENT_HANDLER
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*-- create hotspot on Partner Number column
METHOD ON_LINK_CLICK.
CLEAR: WA_FINAL, WA_SALV_CELL.
CALL METHOD GR_SALV_TABLE->GET_SELECTIONS
RECEIVING
VALUE = GR_SALV_SELECTIONS.
CALL METHOD GR_SALV_SELECTIONS->GET_CURRENT_CELL
RECEIVING
VALUE = T_SALV_CELL.
READ TABLE T_SALV_CELL INTO ME->WA_SALV_CELL INDEX 1.
IF SY-SUBRC = 0.
*-- Read Row information
READ TABLE T_FINAL INTO WA_FINAL INDEX WA_SALV_CELL-ROW.
IF SY-SUBRC = 0.
IF WA_SALV_CELL-COLUMNNAME = C_COLUMN_PARTNER AND WA_FINAL-PARTNER_NO IS NOT INITIAL.
SET PARAMETER ID 'BPA' FIELD WA_FINAL-PARTNER_NO.
CALL TRANSACTION C_BP AND SKIP FIRST SCREEN.
ELSEIF WA_SALV_CELL-COLUMNNAME = C_COLUMN_OBJ_ID AND WA_FINAL-OBJECT_ID IS NOT INITIAL.
SET PARAMETER ID 'CRM_OBJECT_ID' FIELD WA_FINAL-OBJECT_ID.
CALL TRANSACTION C_CRMD_BUS2000126 AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDIF.Please let me know how to correct it.
Regards,
Sangeeta.
Edited by: Matt on Jun 8, 2009 10:27 AM - added tags.
‎2009 Jun 08 9:27 AM
READ T_SALV_CELL INTO ME->WA_SALV_CELL INDEX 1.
(Don't use the TABLE keyword at this point!)
‎2009 Jun 08 9:40 AM
For your other question, it may be that you can't use "and skip first screen". Tx BP calls screen 100,, which is a dummy screen that loads screen 3000, which contains subscreen 1510 which uses BPA, and a docking container.
Screen 100 doesn't contain any fields other than OKCODE, so that's probably sufficient to disrupt "and skip first screen".
matt
‎2009 Jun 08 10:07 AM
Thanks for the prompt reply.
Matt....Can you please tell then how to call standard transaction BP by passing the value.
‎2009 Jun 08 10:10 AM
Hi Matt,
The statement READ TABLE T_SALV_CELL INTO ME->WA_SALV_CELL INDEX 1 is not working.
‎2009 Jun 08 11:02 AM
‎2009 Jun 08 12:51 PM