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: 

alv hotspot

Former Member
0 Kudos

Hi forum,

Hello friends,

I have made one alv report and displayed data using REUSE_ALV_GRID_DISPLAY.now i want that if user clicks on Coloum- Vbeln. then VA02 should open for that order no.please tell me how i can do.. i made a hyperlink on that coloum but i dont know how i handle it..

thanks

Lovleen

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

do like this

FORM dis_data.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid

i_callback_user_command = 'USER_COMMAND'

i_grid_title = 'Interactive ALV'

it_fieldcat = fcat

it_events = eve

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.

ENDFORM. "dis_data

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

READ TABLE itab INDEX sel_field-tabindex.

IF sy-subrc = 0.

t_doc = itab-vbeln.

SET PARAMETER ID 'AUN' FIELD t_doc.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM. "user_command

reward if useful

8 REPLIES 8

Former Member
0 Kudos

hi,

do like this

FORM dis_data.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid

i_callback_user_command = 'USER_COMMAND'

i_grid_title = 'Interactive ALV'

it_fieldcat = fcat

it_events = eve

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.

ENDFORM. "dis_data

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

READ TABLE itab INDEX sel_field-tabindex.

IF sy-subrc = 0.

t_doc = itab-vbeln.

SET PARAMETER ID 'AUN' FIELD t_doc.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM. "user_command

reward if useful

0 Kudos

HI DHWANI,

WHERE I HAVE TO CALL THIS FORM user_command

AFTER ALV GRID PERFORM???

U HAVE WRITTEN FORM FORM user_command USING...

BUT WHERE TO WRITE THIS PERFORM?

0 Kudos

hi,

see in reuse_alv_grid_display

i_callback_user_command..

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid

i_callback_user_command = 'USER_COMMAND'

i_grid_title = 'Interactive ALV'

it_fieldcat = fcat

it_events = eve

TABLES

t_outtab = itab

.

IF sy-subrc <> 0.

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

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

ENDIF.

0 Kudos

Hi all.

My problem is solved. thanku all for ur replies.

regards

Lovleen

former_member223537
Active Contributor
0 Kudos

Hi,

In the fieldcatalog, pass HOTSPOT = 'X'.



  wa_fieldcat-col_pos   = 1.
  wa_fieldcat-fieldname = 'VBELN.
  wa_fieldcat-outputlen = '10'.
  wa_fieldcat-seltext_l = 'Order No.'.
  wa_fieldcat-hotspot   = 'X'.   " Add this field
  APPEND wa_fieldcat TO gt_fieldcat.

former_member402443
Contributor
0 Kudos

Hi lovleen,

Check this code.

This will give you an idea how to use hot-spot in the alv grid.

**

  • Data Types

**

type-pools: slis.

types: begin of tp_data,

bukrs like bsik-bukrs,

belnr like bsik-belnr,

budat like bsik-budat,

gjahr like bsik-gjahr,

lifnr like bsik-lifnr,

wrbtr like bsik-wrbtr,

waers like bsik-waers,

shkzg like bsik-shkzg,

chk1,

end of tp_data,

tp_tbl_data type standard table of tp_data.

**

  • Constants

**

**

  • Data objects (variable declarations and definitions)

**

  • Report data to be shown.

data: it_data type standard table of tp_data.

  • Heading of the report.

data: t_heading type slis_t_listheader.

======================= Selection Screen ==========================

selection-screen: begin of block b1 with frame title text-t01.

DATA: w_aux_bukrs like bsik-bukrs.

SELECT-OPTIONS s_bukrs for w_aux_bukrs .

DATA: w_aux_lifnr like bsik-lifnr.

SELECT-OPTIONS s_lifnr for w_aux_lifnr .

DATA: w_aux_gjahr like bsik-gjahr.

SELECT-OPTIONS s_gjahr for w_aux_gjahr .

selection-screen: end of block b1.

======================== Event Blocks =============================

at selection-screen.

start-of-selection.

perform get_data using it_data.

end-of-selection.

perform build_alv using it_data t_heading.

======================== Subroutines ==============================

&----


*& Form get_data

&----


  • Gets the information to be shown in the report.

----


form get_data using t_data type tp_tbl_data.

SELECT b~bukrs

b~belnr

b~budat

b~gjahr

b~lifnr

b~wrbtr

b~waers

b~shkzg

INTO CORRESPONDING FIELDS OF TABLE t_data

FROM bsik as b

WHERE b~bukrs in s_bukrs

AND b~lifnr in s_lifnr

AND b~gjahr in s_gjahr

.

endform. " get_data

&----


*& Form build_alv

&----


  • Builds and display the ALV Grid.

----


form build_alv using t_data type tp_tbl_data

t_heading type slis_t_listheader.

  • ALV required data objects.

data: w_title type lvc_title,

w_repid type syrepid,

w_comm type slis_formname,

w_status type slis_formname,

x_layout type slis_layout_alv,

t_event type slis_t_event,

t_fieldcat type slis_t_fieldcat_alv,

t_sort type slis_t_sortinfo_alv.

refresh t_fieldcat.

refresh t_event.

refresh t_sort.

clear x_layout.

clear w_title.

  • Field Catalog

perform set_fieldcat2 using:

1 'CHK1' 'XFELD' space space space 'Select' 'Select this row' 'Sel'

'Select this row' space space space 'X' 'X' space t_fieldcat,

2 'BUKRS' 'BUKRS' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

3 'BELNR' 'BELNR' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

4 'BUDAT' 'BUDAT' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

5 'GJAHR' 'GJAHR' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

6 'LIFNR' 'LIFNR' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

7 'WRBTR' 'WRBTR' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

8 'WAERS' 'WAERS' 'BSIK' space space space space space space space

space space space space space t_fieldcat ,

9 'SHKZG' 'SHKZG' 'BSIK' space space space space space space space

space space space space space t_fieldcat .

  • Layout

x_layout-zebra = 'X'.

  • Top of page heading

perform set_top_page_heading using t_heading t_event.

  • Events

perform set_events using t_event.

  • GUI Status

w_status = ''.

w_repid = sy-repid.

  • Title

  • w_title = <<If you want to set a title for

  • the ALV, please, uncomment and edit this line>>.

  • User commands

w_comm = 'USER_COMMAND'.

  • Order

  • Example

  • PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.

  • Displays the ALV grid

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = w_repid

it_fieldcat = t_fieldcat

is_layout = x_layout

it_sort = t_sort

i_callback_pf_status_set = w_status

i_callback_user_command = w_comm

i_save = 'X'

it_events = t_event

i_grid_title = w_title

tables

t_outtab = t_data

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.

endform. " build_alv.

&----


*& Form set_top_page_heading

&----


  • Creates the report headings.

----


form set_top_page_heading using t_heading type slis_t_listheader

t_events type slis_t_event.

data: x_heading type slis_listheader,

x_event type line of slis_t_event.

  • Report title

clear t_heading[].

clear x_heading.

x_heading-typ = 'H'.

x_heading-info = ''(001).

append x_heading to t_heading.

  • Program name

clear x_heading.

x_heading-typ = 'S'.

x_heading-key = 'Program: '.

x_heading-info = sy-repid.

append x_heading to t_heading.

  • User who is running the report

clear x_heading.

x_heading-typ = 'S'.

x_heading-key = 'User: '.

x_heading-info = sy-uname.

append x_heading to t_heading.

  • Date of execution

clear x_heading.

x_heading-typ = 'S'.

x_heading-key = 'Date: '.

write sy-datum to x_heading-info.

append x_heading to t_heading.

  • Time of execution

clear x_heading.

x_heading-typ = 'S'.

x_heading-key = 'Time: '.

write sy-uzeit to x_heading-info.

append x_heading to t_heading.

  • Top of page event

x_event-name = slis_ev_top_of_page.

x_event-form = 'TOP_OF_PAGE'.

append x_event to t_events.

endform.

&----


*& Form set_events

&----


  • Sets the events for ALV.

  • The TOP_OF_PAGE event is alredy being registered in

  • the set_top_page_heading subroutine.

----


form set_events using t_events type slis_t_event.

data: x_event type line of slis_t_event.

**

  • Example

  • -------

  • clear x_event.

  • x_event-name = .

  • x_event-form = .

  • append x_event to t_event.

**

endform.

&----


*& Form set_order

&----


  • Adds an entry to the order table.

----


FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot

t_sort TYPE slis_t_sortinfo_alv.

DATA: x_sort TYPE slis_sortinfo_alv.

CLEAR x_sort.

x_sort-fieldname = p_fieldname.

x_sort-tabname = p_tabname.

x_sort-up = p_up.

x_sort-down = p_down.

x_sort-subtot = p_subtot.

APPEND x_sort TO t_sort.

ENDFORM. "set_order

&----


*& Form set_fieldcat2

&----


  • Adds an entry to the field catalog.

  • p_colpos: Column position.

  • p_fieldname: Field of internal table which is being described by

* this record of the field catalog.

  • p_ref_fieldname: (Optional) Table field / data element which

* describes the properties of the field.

* If this field is not given, it is copied from

* the fieldname.

  • p_ref_tabname: (Optional) Table which holds the field referenced

* by <<p_ref_fieldname>>.

  • If this is not given, the parameter

  • <<p_ref_fieldname>> references a data element.

  • p_outputlen: (Optional) Column width.

  • p_noout: (Optional) If set to 'X', states that the field is not

* showed initially. If so, the field has to be

  • included in the report at runtime using the display

  • options.

  • p_seltext_m: (Optional) Medium label to be used as column header.

  • p_seltext_l: (Optional) Long label to be used as column header.

  • p_seltext_s: (Optional) Small label to be used as column header.

  • p_reptext_ddic: (Optional) Extra small (heading) label to be

* used as column header.

  • p_ddictxt: (Optional) Set to 'L', 'M', 'S' or 'R' to select

  • whether to use SELTEXT_L, SELTEXT_M, SELTEXT_S,

  • or REPTEXT_DDIC as text for column header.

  • p_hotspot: (Optional) If set to 'X', this field will be used

* as a hotspot area for cursor, alolowing the user

* to click on the field.

  • p_showasicon: (Optional) If set to 'X', this field will be shown

  • as an icon and the contents of the field will set

* which icon to show.

  • p_checkbox: (Optional) If set to 'X', this field will be shown

  • as a checkbox.

  • p_edit: (Optional) If set to 'X', this field will be editable.

  • p_dosum: (Optional) If set to 'X', this field will be summed

  • (aggregation function) according to the grouping set

  • by the order functions.

  • t_fieldcat: Table which contains the whole fieldcat.

----


FORM set_fieldcat2 USING

p_colpos p_fieldname p_ref_fieldname p_ref_tabname

p_outputlen p_noout

p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt

p_hotspot p_showasicon p_checkbox p_edit

p_dosum

t_fieldcat TYPE slis_t_fieldcat_alv.

DATA: wa_fieldcat TYPE slis_fieldcat_alv.

CLEAR wa_fieldcat.

    • General settings*

wa_fieldcat-fieldname = p_fieldname.

wa_fieldcat-col_pos = p_colpos.

wa_fieldcat-no_out = p_noout.

wa_fieldcat-hotspot = p_hotspot.

wa_fieldcat-checkbox = p_checkbox.

wa_fieldcat-icon = p_showasicon.

wa_fieldcat-do_sum = p_dosum.

  • Set reference fieldname, tablenam and rollname.

  • If p_ref_tabname is not given, the ref_fieldname given

  • is a data element.

  • If p_ref_tabname is given, the ref_fieldname given is a

  • field of a table.

  • In case ref_fieldname is not given,

  • it is copied from the fieldname.

IF p_ref_tabname IS INITIAL.

wa_fieldcat-rollname = p_ref_fieldname.

ELSE.

wa_fieldcat-ref_tabname = p_ref_tabname.

IF p_ref_fieldname EQ space.

wa_fieldcat-ref_fieldname = wa_fieldcat-fieldname.

ELSE.

wa_fieldcat-ref_fieldname = p_ref_fieldname.

ENDIF.

ENDIF.

  • Set output length.

IF NOT p_outputlen IS INITIAL.

wa_fieldcat-outputlen = p_outputlen.

ENDIF.

  • Set text headers.

IF NOT p_seltext_m IS INITIAL.

wa_fieldcat-seltext_m = p_seltext_m.

ENDIF.

IF NOT p_seltext_l IS INITIAL.

wa_fieldcat-seltext_l = p_seltext_l.

ENDIF.

IF NOT p_seltext_s IS INITIAL.

wa_fieldcat-seltext_s = p_seltext_s.

ENDIF.

IF NOT p_reptext_ddic IS INITIAL.

wa_fieldcat-reptext_ddic = p_reptext_ddic.

ENDIF.

IF NOT p_ddictxt IS INITIAL.

wa_fieldcat-ddictxt = p_ddictxt.

ENDIF.

  • Set as editable or not.

IF NOT p_edit IS INITIAL.

wa_fieldcat-input = 'X'.

wa_fieldcat-edit = 'X'.

ENDIF.

APPEND wa_fieldcat TO t_fieldcat.

ENDFORM. "set_fieldcat2

======================== Subroutines called by ALV ================

&----


*& Form top_of_page

&----


  • Called on top_of_page ALV event.

  • Prints the heading.

----


form top_of_page.

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

  • i_logo = <<If you want to set a logo, please,

  • uncomment and edit this line>>

it_list_commentary = t_heading.

endform. " alv_top_of_page

&----


*& Form user_command

&----


  • Called on user_command ALV event.

  • Executes custom commands.

----


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 '&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'.

ENDCASE.

*

  • End of example code.

**

endform. "user_command

Reward Points, if useful.

Regards,

Manoj Kumar

Edited by: Manoj Kumar on Dec 21, 2007 4:54 PM

Former Member
0 Kudos

hi

good

check this code

REPORT zalv5 NO STANDARD PAGE HEADING.

Description----


  • TOPICS INTRODUCED:

  • 1. Learn about the ‘Standard’ PF-Status that comes as default.

  • 2. Exclude function codes from ‘Standard’ PF-Status and customize it.

----


TYPE-POOLS: slis.

DATA: BEGIN OF i_data OCCURS 0,

qmnum LIKE qmel-qmnum,

qmart LIKE qmel-qmart,

qmtxt LIKE qmel-qmtxt,

ws_row TYPE i,

ws_char(5) TYPE c,

chk,

END OF i_data.

DATA: report_id LIKE sy-repid.

DATA: ws_title TYPE lvc_title VALUE 'An ALV Report'.

DATA: i_layout TYPE slis_layout_alv.

DATA: i_fieldcat TYPE slis_t_fieldcat_alv.

DATA: i_events TYPE slis_t_event.

DATA: i_header TYPE slis_t_listheader.

DATA: i_extab TYPE slis_t_extab.

SELECT qmnum

qmart

qmtxt

INTO TABLE i_data

FROM qmel

WHERE qmnum <= '00030000010'.

LOOP AT i_data.

i_data-ws_row = sy-tabix.

i_data-ws_char = 'AAAAA'.

MODIFY i_data.

ENDLOOP.

report_id = sy-repid.

PERFORM f1000_layout_init CHANGING i_layout.

PERFORM f2000_fieldcat_init CHANGING i_fieldcat.

PERFORM f3000_build_header CHANGING i_header.

PERFORM f4000_events_init CHANGING i_events.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

i_callback_program = report_id

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • i_structure_name = ' '

  • I_BACKGROUND_ID = ' '

i_grid_title = ws_title

  • I_GRID_SETTINGS =

is_layout = i_layout

it_fieldcat = i_fieldcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

i_save = 'A'

  • 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

  • IT_ALV_GRAPHICS =

  • IT_ADD_FIELDCAT =

  • IT_HYPERLINK =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = i_data

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 F1000_Layout_Init

&----


FORM f1000_layout_init USING i_layout TYPE slis_layout_alv.

CLEAR i_layout.

i_layout-colwidth_optimize = 'X'.

i_layout-edit = 'X'.

ENDFORM. " F1000_Layout_Init

&----


*& Form f2000_fieldcat_init

&----


FORM f2000_fieldcat_init CHANGING i_fieldcat TYPE slis_t_fieldcat_alv.

DATA: line_fieldcat TYPE slis_fieldcat_alv.

CLEAR line_fieldcat.

line_fieldcat-fieldname = 'QMNUM'. " The field name and the table

line_fieldcat-tabname = 'I_DATA'. " name are the two minimum req.

line_fieldcat-key = 'X'. " Specifies the column as a key (Blue)

line_fieldcat-seltext_m = 'Notification No.'. " Column Header

APPEND line_fieldcat TO i_fieldcat.

CLEAR line_fieldcat.

line_fieldcat-fieldname = 'QMART'.

line_fieldcat-ref_tabname = 'I_DATA'.

line_fieldcat-hotspot = 'X'. " Shows the field as a hotspot.

line_fieldcat-seltext_m = 'Notif Type'.

APPEND line_fieldcat TO i_fieldcat.

CLEAR line_fieldcat.

line_fieldcat-fieldname = 'QMTXT'.

line_fieldcat-tabname = 'I_DATA'.

line_fieldcat-seltext_m = 'Description'.

APPEND line_fieldcat TO i_fieldcat.

CLEAR line_fieldcat.

line_fieldcat-fieldname = 'WS_ROW'.

line_fieldcat-tabname = 'I_DATA'.

line_fieldcat-seltext_m = 'Row Number'.

APPEND line_fieldcat TO i_fieldcat.

CLEAR line_fieldcat.

line_fieldcat-fieldname = 'WS_CHAR'.

line_fieldcat-tabname = 'I_DATA'.

line_fieldcat-seltext_l = 'Test Character Field'.

line_fieldcat-datatype = 'CHAR'.

line_fieldcat-outputlen = '15'. " You can specify the width of a

APPEND line_fieldcat TO i_fieldcat. " column.

CLEAR line_fieldcat.

line_fieldcat-fieldname = 'CHK'.

line_fieldcat-tabname = 'I_DATA'.

line_fieldcat-seltext_l = 'Checkbox'.

line_fieldcat-checkbox = 'X'. " Display this field as a checkbox

line_fieldcat-edit = 'X'. " This option ensures that you can

" edit the checkbox. Else it will

" be protected.

APPEND line_fieldcat TO i_fieldcat.

ENDFORM. " f2000_fieldcat_init

&----


*& Form f3000_build_header

&----


FORM f3000_build_header USING i_header TYPE slis_t_listheader.

DATA: gs_line TYPE slis_listheader.

CLEAR gs_line.

gs_line-typ = 'H'.

gs_line-info = 'This is line of type HEADER'.

APPEND gs_line TO i_header.

CLEAR gs_line.

gs_line-typ = 'S'.

gs_line-key = 'STATUS 1'.

gs_line-info = 'This is line of type STATUS'.

APPEND gs_line TO i_header.

gs_line-key = 'STATUS 2'.

gs_line-info = 'This is also line of type STATUS'.

APPEND gs_line TO i_header.

CLEAR gs_line.

gs_line-typ = 'A'.

gs_line-info = 'This is line of type ACTION'.

APPEND gs_line TO i_header.

ENDFORM. " f3000_build_header

&----


*& Form f4000_events_init

&----


FORM f4000_events_init CHANGING i_events TYPE slis_t_event.

DATA: line_event TYPE slis_alv_event.

CLEAR line_event.

line_event-name = 'TOP_OF_PAGE'.

line_event-form = 'F4100_TOP_OF_PAGE'.

APPEND line_event TO i_events.

CLEAR line_event.

line_event-name = 'PF_STATUS_SET'.

line_event-form = 'F4200_PF_STATUS_SET'.

APPEND line_event TO i_events.

ENDFORM. " f3000_events_init

----


  • FORM F4100_TOP_OF_PAGE *

----


FORM f4100_top_of_page.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = i_header.

ENDFORM.

----


  • FORM F4200_PF_STATUS_SET *

----


FORM f4200_pf_status_set USING i_extab TYPE slis_t_extab.

REFRESH i_extab.

PERFORM f4210_exclude_fcodes CHANGING i_extab.

SET PF-STATUS 'STANDARD' OF PROGRAM 'SAPLSALV' EXCLUDING i_extab.

ENDFORM.

&----


*& Form f4210_exclude_fcodes

&----


FORM f4210_exclude_fcodes USING i_extab TYPE slis_t_extab.

DATA: ws_fcode TYPE slis_extab.

CLEAR ws_fcode.

ws_fcode = '&EB9'. " Call up Report.

APPEND ws_fcode TO i_extab.

ws_fcode = '&ABC'. " ABC Analysis.

APPEND ws_fcode TO i_extab.

ws_fcode = '&NFO'. " Info Select.

APPEND ws_fcode TO i_extab.

ws_fcode = '&LFO'. " Information.

APPEND ws_fcode TO i_extab.

ENDFORM. " f4210_exclude_fcodes

thanks

mrutyun^

Former Member
0 Kudos

Hi Fnd,

In filedcatalog we have use hotspot option.

ex:

wa_fieldcat-fieldname = 'VBELN'.

wa_fieldcat-hotspot = 'X'.

APPEND WA_FIELDCAT TO GT_FIELDCAT.

In the user command ..u use the call transaction statement

ex:

FORM usercommand USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.

CASE selfield-sel_tab_field.

WHEN 'GT_HEADERDAT-VBELN'.

GET CURSOR FIELD GT_HEADERDAT VALUE

GT_VBAK-VBELN.

SET PARAMETER ID 'AUN' FIELD GT_VBAK-VBELN.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.

ENDCASE

Award points if useful.

kiran kumar.G.