Skip to Content
author's profile photo
Former Member

Popup in ALV

Hi experts,

How can I do that, if I doubleclick on an ALV line it takes us to respective Sales Order document?

I tried to manage also the doubleclicking, but it doesn't work.

FORM USER_COMMAND USING ucomm selfield TYPE slis_selfield.

CASE ucomm.

WHEN '&IC1'.

break-point.

...

ENDCASE.

ENDFORM.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 11:21 AM

    Hi White,

    Try to use hotspot in the fieldcatlog for the particular column in the fieldcatalog.

    example.

    fcat-hotspot = 'X'.

    and then use

    FORM USER_COMMAND USING ucomm selfield TYPE slis_selfield.

    CASE ucomm.

    WHEN '&IC1'.

    READ TABLE itab INTO wa_itab INDEX selected_field-tabindex.

    set parameter id fielname 'memory id'

    call tranaction 'va02'.

    ENDCASE.

    ENDFORM.

    regards,

    Santosh Thorat

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 11:18 AM

    WHEN '&IC1'.

    'write code here like : "call transaction skipping initial screen of sales order "

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Shakir, how can i skip the initial screen?

      And what could be the problem because, when I double click on a line it didn't go to the break-point?

  • Posted on Sep 28, 2007 at 11:19 AM

    Hi,

    In the fieldcatalog, pass

    <b>wa_fieldcat-HOTSPOT = 'X'.</b>

    Handle the hotspot event.

    refer program "BCALV_TEST_GRID_EVENTS" for all the event handling.

    Best regards,

    Prashant

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 28, 2007 at 11:21 AM

    hi

    stripes

    have a look below report

    &----


    *& Report ZPRG8 *

    *& *

    &----


    *& *

    *& *

    &----


    REPORT ZPRG8 .

    TABLES: LFA1, EKKO, EKPO.

    SELECT-OPTIONS: S_LIFNR FOR LFA1-LIFNR.

    DATA: BEGIN OF ITAB OCCURS 0,

    LIFNR LIKE LFA1-LIFNR,

    NAME1 LIKE LFA1-NAME1,

    END OF ITAB.

    DATA: BEGIN OF JTAB OCCURS 0,

    EBELN LIKE EKKO-EBELN,

    AEDAT LIKE EKKO-AEDAT,

    END OF JTAB.

    DATA: BEGIN OF KTAB OCCURS 0,

    EBELP LIKE EKPO-EBELP,

    MATNR LIKE EKPO-MATNR,

    END OF KTAB.

    TYPE-POOLS:SLIS.

    DATA: REPID LIKE SY-REPID,

    F_LFA11 TYPE SLIS_T_FIELDCAT_ALV,

    F_LFA1 TYPE SLIS_FIELDCAT_ALV,

    F_EKKO1 TYPE SLIS_T_FIELDCAT_ALV,

    F_EKKO TYPE SLIS_FIELDCAT_ALV,

    F_EKPO1 TYPE SLIS_T_FIELDCAT_ALV,

    F_EKPO TYPE SLIS_FIELDCAT_ALV,

    I_EVENTS TYPE SLIS_T_EVENT,

    S_EVENTS TYPE SLIS_ALV_EVENT.

    REPID = SY-REPID.

    PERFORM COL_HEAD.

    START-OF-SELECTION.

    SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN S_LIFNR.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER =

    • I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = sy-repid

    • I_CALLBACK_PF_STATUS_SET = ' '

    • I_CALLBACK_USER_COMMAND = ' '

    • I_STRUCTURE_NAME =

    • IS_LAYOUT =

    IT_FIELDCAT = F_LFA11

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    • I_SAVE = ' '

    • IS_VARIANT =

    IT_EVENTS = I_EVENTS

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • IS_REPREP_ID =

    • I_SCREEN_START_COLUMN = 0

    • I_SCREEN_START_LINE = 0

    • I_SCREEN_END_COLUMN = 0

    • I_SCREEN_END_LINE = 0

    • IMPORTING

    • E_EXIT_CAUSED_BY_CALLER =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = ITAB

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    FORM COL_HEAD.

    F_LFA1-FIELDNAME = 'LIFNR'.

    *F_LFA1-TABNAME = 'ITAB'.

    F_LFA1-REF_TABNAME = 'LFA1'.

    F_LFA1-REF_FIELDNAME = 'LIFNR'.

    APPEND F_LFA1 TO F_LFA11.

    F_LFA1-FIELDNAME = 'NAME1'.

    *F_LFA1-TABNAME = 'ITAB'.

    F_LFA1-REF_TABNAME = 'LFA1'.

    F_LFA1-REF_FIELDNAME = 'NAME1'.

    APPEND F_LFA1 TO F_LFA11.

    F_EKKO-FIELDNAME = 'EBELN'.

    *F_EKKO-TABNAME = 'JTAB'.

    F_EKKO-REF_TABNAME = 'EKKO'.

    F_EKKO-REF_FIELDNAME = 'EBELN'.

    APPEND F_EKKO TO F_EKKO1.

    F_EKKO-FIELDNAME = 'AEDAT'.

    *F_EKKO-TABNAME = 'JTAB'.

    F_EKKO-REF_TABNAME = 'EKKO'.

    F_EKKO-REF_FIELDNAME = 'AEDAT'.

    APPEND F_EKKO TO F_EKKO1.

    F_EKPO-FIELDNAME = 'EBELP'.

    *F_EKPO-TABNAME = 'KTAB'.

    F_EKPO-REF_TABNAME = 'EKPO'.

    F_EKPO-REF_FIELDNAME = 'EBELP'.

    APPEND F_EKPO TO F_EKPO1.

    F_EKPO-FIELDNAME = 'MATNR'.

    *F_EKPO-TABNAME = 'KTAB'.

    F_EKPO-REF_TABNAME = 'EKPO'.

    F_EKPO-REF_FIELDNAME = 'MATNR'.

    APPEND F_EKPO TO F_EKPO1.

    S_EVENTS-NAME = 'USER_COMMAND'.

    S_EVENTS-FORM = 'VAL'.

    APPEND S_EVENTS TO I_EVENTS.

    ENDFORM.

    FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.

    DATA: V_LIFNR(10) TYPE N,

    V_EBELN(10) TYPE N,

    V_MATNR(10) TYPE C.

    IF SEL-FIELDNAME = 'LIFNR'.

    V_LIFNR = SEL-VALUE.

    SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = V_LIFNR.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = REPID

    IT_FIELDCAT = F_EKKO1

    IT_EVENTS = I_EVENTS

    TABLES

    T_OUTTAB = JTAB.

    ENDIF.

    IF SEL-FIELDNAME = 'EBELN'.

    V_EBELN = SEL-VALUE.

    SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = V_EBELN.

    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

    EXPORTING

    I_TITLE = 'ITEM DETAILS'

    I_SCREEN_START_COLUMN = 10

    I_SCREEN_START_LINE = 10

    I_SCREEN_END_COLUMN = 36

    I_SCREEN_END_LINE = 16

    I_TABNAME = 'EKPO'

    IT_FIELDCAT = F_EKPO1

    I_CALLBACK_PROGRAM = REPID

    • I_CALLBACK_USER_COMMAND =

    • IS_PRIVATE =

    IMPORTING

    ES_SELFIELD = SEL

    • E_EXIT =

    TABLES

    T_OUTTAB = KTAB.

    ENDIF.

    IF SEL-FIELDNAME = 'MATNR'.

    V_MATNR = SEL-VALUE.

    SET PARAMETER ID 'MAT' FIELD V_MATNR.

    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.

    ENDIF.

    ENDFORM.

    reward if u find useful

    regards

    Nagesh.Paruchuri

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 11:22 AM

    Give a look at following code , it may help u.

    FORM user_command_alv USING r_ucomm LIKE sy-ucomm

    rs_selfield TYPE slis_selfield.

    CASE r_ucomm.

    WHEN '&IC1'.

    READ TABLE t_itab INTO st_itab INDEX

    rs_selfield-tabindex.

    SET PARAMETER ID c_param_id FIELD

    st_itab-vbeln.

    CALL TRANSACTION c_transaction AND SKIP FIRST SCREEN.

    ENDCASE. " case r_ucomm

    ENDFORM. "USER_COMMAND_ALV

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 02:59 PM

    Thanks for the help! I gave my 10 points! 😊

    Add comment
    10|10000 characters needed characters exceeded