Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Detail of a field in ALV

Former Member
0 Kudos

Guys I build a ALV ( in a classic way ) for list plant maintenance orders , however I would like to see the detail of the ordem double cliking the ord. number , someone talk me about call transaction , is the best way ? how can I do that ? , any example ?

3 REPLIES 3

Former Member
0 Kudos

Add these to form's

FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.

----


CONSTANTS:

GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',

GC_FORMNAME_LINE_SELECTION TYPE SLIS_FORMNAME

VALUE 'AT_LINE_SELECTION'.

DATA: LS_EVENT TYPE SLIS_ALV_EVENT.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = T_EVENTS.

READ TABLE T_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE

INTO LS_EVENT.

IF SY-SUBRC = 0.

MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.

APPEND LS_EVENT TO T_EVENTS.

ENDIF.

READ TABLE T_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND

INTO LS_EVENT.

IF SY-SUBRC = 0.

MOVE GC_FORMNAME_LINE_SELECTION TO LS_EVENT-FORM.

APPEND LS_EVENT TO T_EVENTS.

ENDIF.

ENDFORM.

&----


*& FORM AT_LINE_SELECTION

&----


  • text

----


FORM AT_LINE_SELECTION using ucomm type sy-ucomm

l_selfield type slis_selfield.

IF l_selfield-SEL_TAB_FIELD = 'IT_FINAL-(Your Column Name)'. < -


Fill Column name

IF NOT l_selfield-value IS INITIAL.

SET PARAMETER ID 'BES' FIELD l_selfield-value.

CALL TRANSACTION '(transaction)'

AND SKIP FIRST SCREEN.

ENDIF.

ENDIF.

ENDFORM.

0 Kudos

I Build this report using SQVI tnx , and I add the method handle_ouble_click event , After display the results of my selection I Debugg the double clicking event and I see that it goes to Program SAPLAQRUNT :

class lcl_event_receiver implementation.                
    method handle_double_click.                           
      ucomm = '&EB9'.                                     
      call method grid_handle->set_function_code          
           changing c_ucomm = ucomm.                                                                                
endmethod.                                            
  endclass.

Why is that ? , Can not I use my own event ?

Former Member
0 Kudos

hi jose,

If you want to calling the screen then use call transaction.

Hold your primary key value and using using AT LINE-SELECTION also you can achieve.

lot of examples are there in the forum search ou will get the help

Cheers!!

VEnk@