Skip to Content
0
Former Member
Jul 02, 2007 at 04:35 AM

Interactive to alv

11 Views

Hi friends doing a interactive report with hide statement .when doublec click

on it alv report is to be displalyed .

i had from and to in my selection crietria ..user can input groups

suppose A1,TO A3.

BUT WHEN I DOUBLE CLICK ON A1 I WILL GET A1 DETAILS IN LAV OUTPUT..AND WHEN I PRESS

BACK AND SCROLL AND DOUBLE CLICK ON A2 GROUP THEN TOO I GET A1 DETAILS SIMILARLY FOR

A3 ALSO .

I AM USING CALL SCREEN IN MY ITAB IAM GETTING THE CORRECT DATA BUT THE TABLE DISPLAYS THE

PREVIOUS VALUE

HERE IS MY CODE PLEASE CORRECT ME WHERE IAM WRONG ..

MODULE status_0100 OUTPUT.

SET PF-STATUS 'ALV'.

SET TITLEBAR '001'.

  • clear g_custom_container.

  • refresh g_custom_container.

IF g_custom_container IS INITIAL.

CREATE OBJECT g_custom_container

EXPORTING container_name = g_container.

CREATE OBJECT grid1

EXPORTING i_parent = g_custom_container.

CALL METHOD grid1->set_table_for_first_display

EXPORTING

is_layout = gs_layout

CHANGING

it_outtab = i_output[] "i_best_10%_detail[]

it_fieldcatalog = gt_fieldcatalog

it_sort = gt_sort.

ENDIF.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE user_command_0100 INPUT.

CALL METHOD cl_gui_cfw=>dispatch.

  • CALL METHOD g_editable_alv->refresh_table_display

  • exporting

  • is_layout = gs_fcatlayo

  • changing

  • it_outtab = gt_fieldcat[]

  • it_fieldcatalog = gt_fcatfcat[].

*

  • clear i_output.

  • free: i_output[].

*refresh i_output.

CASE sy-ucomm.

WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

****

FORM fieldcatalog_init USING lt_fieldcatalog TYPE lvc_t_fcat

value(field_name) value(field_type) value(field_text) value(field_key)

value(field_len).

DATA: ls_fieldcatalog TYPE lvc_s_fcat.

CLEAR ls_fieldcatalog.

  • ls_fieldcatalog-tabname = table_name.

ls_fieldcatalog-fieldname = field_name.

ls_fieldcatalog-datatype = field_type.

ls_fieldcatalog-reptext = field_text.

ls_fieldcatalog-coltext = field_text.

ls_fieldcatalog-seltext = field_text.

ls_fieldcatalog-tooltip = field_text.

ls_fieldcatalog-key = field_key.

ls_fieldcatalog-intlen = field_len.

ls_fieldcatalog-dd_outlen = field_len.

IF ls_fieldcatalog-fieldname = 'NOBESTBATCH'.

ls_fieldcatalog-emphasize = 'C411'.

ENDIF.

IF ls_fieldcatalog-fieldname = 'NOBATCH'.

ls_fieldcatalog-emphasize = 'C411'.

ENDIF.

APPEND ls_fieldcatalog TO lt_fieldcatalog.

ENDFORM. "fieldcatalog_init

regards

answers will be rewarded points