Graphical display of hierarichal structure (ALV)
Hi Friends,
I have the requirement of displaying the hierarchical data in graphical mode. For this I am using the FM CNET_GRAPHIC_HIERARCHY, now the problem is that I want to navigate on to some screen when user clicks any node of the graphical structure , how I can capture the event of click on the node.
Kindly reply ASAP.
Thanks and regards,
Rachit Khanna
Hi Janagar,
My requirement is not to make the ALV hierarchical interactive. Basically i want the graphical mode of the hierarchical structure interactive.
To make more clear kindly execute the program RIEQUI10 , Enter the equipment number and then F8.
Now you will see the hierarchical report. Now follow the path GOTO --> Graphic a new window will now open with the Graphical view of the hierarchical list.
Now my requirement is to make a program that will output the current graph (this I have done) and when the user click on any node of the hierarchical tree it should call another screen. I am not able to understand how can I capture the click event when user clicks on any of the node.
Similar Messages
-
Graphical Display of Organisation Structure
Hi All,
I know we can view the Tree structure of Org Units reporting relationship in R/3 just dont know how to...Please guide me which transaction I should use to display the reporting structure in graphical format in R/3.
Useful answers will be awarded points.Please share with us the tcode.
Thanks & Regards,
Manoj -
Graphical Display of Organization Structure in HR
While creating the organization structure some dummy org. units are created basically for reporting purpose. However while displaying the same in graphical structure the dummy units are also displayed.
I would like to know if it is possible to hide these dummy org units while having the structural display.Hi Kerf,
Answer would be like this.. Let say : Your Root org unit is 100000 (i.e., ABC Industries) and your sub org units as follows
100001 - Finance
100002 - HR
100003 - Your DUMMY org unit
Now all these got created with a standard relationship as A-002 with 100000. Now You have 2 ways to hide your DUMMY org unit in the Organisation Graphical display..
1. Deleting the Org object 100003 from Data Base
2. Deleting only the relationship between Org Units 100000 and 100003.
If you want to delete the Org Unit... first goto SM30, give the table as T777I and Select the Org Infotype as 1000 and Click on the "Time Constraint" and change the Time Constraint as 3 instead of "1" and now go to Report "RE_RHRHDL00" and Select the Plan Version, Object Type as "O" and Object ID as "100003" and Uncheck the TEST mode and execute. So that Org Unit 100003 will get deleted from data base...
If you want to delete the relationships : You can do this in PP01 and select the Object Type "O" and Object ID as 100000. Select the Org Units and Position which you want to delete. Click on Delete Now I hope you should not be in a position see those in Org Unit graphical display..
Regards
<u><i><b>Anil.C</b></i></u>
<i><b>Reward the Points if my answer helps you out</b></i> -
Display only cell in ALV Grid in OO
Hi Folks,
Hope someone can help me with this little issue. I have a series of columns in my ALV grid that are editable, but I need to a) make some of the cells on specific lines uneditable and b) display time based fields on this line as blank (presently they shoe 00:00:00).
For problem a) I have set the layout style frame as 'cellstyles'
es_layout-stylefname = 'CELLSTYLES'.
I have also set the edit flag in the field catalog for the individual columns to 'X' eg
WHEN 'CUSTTS_DATE_N'.
ls_fieldcat-edit = 'X'.
And coded:
gwa_stylerow-fieldname = 'CUSTTS_DATE_N'.
gwa_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gwa_stylerow TO gt_stylerow.
wa_delivery_list-cellstyle[] = gt_stylerow[].
APPEND wa_delivery_list TO it_delivery_list.
Yet, the ALV cells are still being displayed as editable. Can't for the life of me figure out what's missing. The only other thought I had around this is that the wa_delivery_list-cellstyle table is being set in the data extraction code, before the ALV grid is built, and that the cell formats are being overwritten/on not being called by the field catalog entries. Any thoughts on how to make these fields/cells display only when the ALV is first displayed would be greatly appreciated.
As for option b) I'm clueless, as the cell style commands are not being picked up (see problem a.). Again any thoughts would be appreciated, and points will be rewarded for solutions/suggestions that lead to solutions.
Cheers,
Stephen KeamHello Stephen
I have created a simple report ZUS_SDN_ALV_EDITABLE_1B which shows how to use editability on cell level.
The crucial parts of the coding for your requirements are shown below, followed by the entire report.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'UPTIM'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ls_fcat-no_zero = abap_true. " suppresses 00:00:00
INSERT ls_fcat INTO gt_fcat INDEX 7.
ENDIF.
*& Form SET_CELL_EDITABLE
* text
* --> p1 text
* <-- p2 text
FORM set_cell_editable .
* define local data
DATA: ld_idx TYPE i,
ls_outtab TYPE ty_s_outtab,
ls_style TYPE lvc_s_styl.
LOOP AT gt_outtab INTO ls_outtab.
ld_idx = syst-tabix.
REFRESH: ls_outtab-celltab.
" NOTE: if you change the year of column ERDAT to 2008 then two columns will become non-editable
IF ( ls_outtab-erdat+0(4) = '2008' ).
CLEAR: ls_style.
ls_style-fieldname = 'UPDAT'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
CLEAR: ls_style.
ls_style-fieldname = 'UPTIM'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
ELSE.
ENDIF.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING celltab.
ENDLOOP.
ENDFORM. " SET_CELL_EDITABLE
*& Report ZUS_SDN_ALV_EDITABLE
*& Thread: Display only cell in ALV Grid in OO
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="765083"></a>
* Flow logic of screen '100' (no elements, ok-code => gd_okcode ):
**PROCESS BEFORE OUTPUT.
** MODULE STATUS_0100.
**PROCESS AFTER INPUT.
** MODULE USER_COMMAND_0100.
*& GUI-Status: ok-codes BACK, EXIT, CANC
REPORT zus_sdn_alv_editable_1b.
TYPE-POOLS: abap.
CONSTANTS:
gc_tabname TYPE tabname VALUE 'KNB1'.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knb1 AS knb1.
TYPES: celltab TYPE lvc_t_styl.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
gt_fcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo,
gs_variant TYPE disvariant,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
DATA:
gs_outtab TYPE ty_s_outtab,
gt_outtab TYPE ty_t_outtab,
gt_outtab_pbo TYPE ty_t_outtab.
DATA:
gd_answer TYPE c.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_data_changed.
" Just trigger PAI followed by PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'REFRESH'
* IMPORTING
* rc =
ENDMETHOD. "handle_data_changed
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM (gc_tabname) INTO CORRESPONDING FIELDS
OF TABLE gt_outtab UP TO 99 ROWS.
gt_outtab_pbo = gt_outtab. " set PBO data
PERFORM init_controls.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
" NOTE: not required
* set handler:
* lcl_eventhandler=>handle_data_changed for go_grid.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog.
PERFORM set_layout_and_variant.
PERFORM set_cell_editable.
*§3.Optionally register ENTER to raise event DATA_CHANGED.
* (Per default the user may check data by using the check icon).
CALL METHOD go_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
SET HANDLER: lcl_eventhandler=>handle_data_changed FOR go_grid.
* Display data
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE:
* Documenation of I_SAVE ("An Easy Reference for ALV Grid Control")
*I_SAVE
*Determines the options available to the user for saving a layout:
*? 'X': global saving only
*? 'U': user-specific saving only
*? 'A': corresponds to 'X' and 'U'
*? SPACE: no saving
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
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. " INIT_CONTROLS
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
" NOTE: retrieve changed data from frontend (grid control) into
" the backend (itab in ABAP)
go_grid->check_changed_data( ).
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'REFRESH'.
PERFORM set_cell_editable.
" NOTE: Refresh required
CALL METHOD go_grid->refresh_table_display
* EXPORTING
* is_stable =
* i_soft_refresh =
* EXCEPTIONS
* finished = 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.
WHEN 'SAVE'.
IF ( gt_outtab = gt_outtab_pbo ).
MESSAGE 'No data changed' TYPE 'S'.
ELSE.
CLEAR: gd_answer.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
* TITLEBAR = ' '
* DIAGNOSE_OBJECT = ' '
text_question = 'Save data?'
* TEXT_BUTTON_1 = 'Ja'(001)
* ICON_BUTTON_1 = ' '
* TEXT_BUTTON_2 = 'Nein'(002)
* ICON_BUTTON_2 = ' '
* DEFAULT_BUTTON = '1'
* DISPLAY_CANCEL_BUTTON = 'X'
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
* IV_QUICKINFO_BUTTON_1 = ' '
* IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
answer = gd_answer
* TABLES
* PARAMETER =
EXCEPTIONS
text_not_found = 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.
IF ( gd_answer = '1' ). " yes
MESSAGE 'Data successfully saved' TYPE 'S'.
gt_outtab_pbo = gt_outtab. " update PBO data !!!
ELSE.
MESSAGE 'Action cancelled by user' TYPE 'S'.
ENDIF.
ENDIF.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = gc_tabname
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_fcat-edit = abap_true.
MODIFY gt_fcat FROM ls_fcat
TRANSPORTING edit
WHERE ( key NE abap_true ).
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'UPTIM'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ls_fcat-no_zero = abap_true. " suppresses 00:00:00
INSERT ls_fcat INTO gt_fcat INDEX 7.
ENDIF.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'UPDAT'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
INSERT ls_fcat INTO gt_fcat INDEX 7.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
IF ( syst-tabix > 10 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SET_LAYOUT_AND_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM set_layout_and_variant .
CLEAR: gs_layout,
gs_variant.
gs_layout-cwidth_opt = abap_true.
gs_layout-zebra = abap_true.
*§3.Provide the fieldname of the celltab field by using field
* STYLEFNAME of the layout structure.
gs_layout-stylefname = 'CELLTAB'.
gs_variant-report = syst-repid.
gs_variant-handle = 'GRID'.
ENDFORM. " SET_LAYOUT_AND_VARIANT
*& Form SET_CELL_EDITABLE
* text
* --> p1 text
* <-- p2 text
FORM set_cell_editable .
* define local data
DATA: ld_idx TYPE i,
ls_outtab TYPE ty_s_outtab,
ls_style TYPE lvc_s_styl.
LOOP AT gt_outtab INTO ls_outtab.
ld_idx = syst-tabix.
REFRESH: ls_outtab-celltab.
IF ( ls_outtab-erdat+0(4) = '2008' ).
CLEAR: ls_style.
ls_style-fieldname = 'UPDAT'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
CLEAR: ls_style.
ls_style-fieldname = 'UPTIM'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
ELSE.
ENDIF.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING celltab.
ENDLOOP.
ENDFORM. " SET_CELL_EDITABLE
Regards
Uwe -
Solution Directory Graphic Displays as XML
We are runing Solution Manager 4.0.
If I perform the following actions...
- Run transaction SOLUTION_MANAGER.
- Select "Goto Solution Directory" (pencil icon) for a solution.
- Expand the solution structure by clicking on the solution name.
- Select the Systems sub-item or the Servers sub-item.
Instead of seeing any graphics in the Graphic tab, I see XML tags. The XML is formatted using Internet Explorer's default appearance.
Any idea what could be causing this? I downloaded and installed the latest version of Microsoft XML (MSXML 6.0), but this didn't change anything.Hi Steve,
Can you help us how to change this default name mapping.... we too are in a similar problem...where the graphics display is in XML code.
The error shows : URL http://blrkecsolman.XXXXXX.com:8001/sap/bc/solman/defaultUser/graphic/solmangraphic.htm call was terminated because the corresponding service is not available.
Thanks for your help.
Br,
Sri -
Graphical Display of Standard Reports
Hi Gurus,
In standard report like FBL1N, FBL3N etc. Can we get a graphical display of these reports?
If yes, tell me the steps.
ThanksHi,
What do you mean by 'graphical display'? You can either have standard view or ALV. You can switch between the two being in the report and going to Menu - Settings - Switch list.
Regards,
Eli -
Hi,
i need to display a report using ALV in the following manner. im using reuse_alv_listdisplay and the display is fine . however, i need to add a header to the list and i need to display total for the currency fields. how can i do that. your help would be appreciated.
Thanks,
kranthi.
________some company header----
alv report----
display total for currency fields------
i appreciate all of you for your quick response.
i need to call a function module which uses couple of 'write' statements to create the header. is it possible to use that in this context.
Thanks,
Kranthi.
Message was edited by: kranthi kumar*& Report ZVENU_ALV *
Program: ZZ_ALV_REPORT_STUB
Author :
Date :
Purpose: Report using ALV function
Notes:
1) Logos & wallpapers can be found in table BDS_CONN05
with class = PICTURES
2) Transaction OAER can be used to create PICTURES.
Run transaction OAER with class name = PICTURES, Class type = OT,
and Object key with whatever name you want to create. In the
next screen, right clicking on screen and import
Revisions
Name :
Date :
Comments:
report zz_alv_report_stub
no standard page heading
line-size 200
line-count 65
message-id zz.
Tables
tables:
ekpo,
trdir.
Global Types
type-pools: slis.
Global Internal Tables
data:
i_fieldcat_alv type slis_t_fieldcat_alv,
i_events type slis_t_event,
i_event_exit type slis_t_event_exit,
i_list_comments type slis_t_listheader,
i_excluding type slis_t_extab.
Display data
data: begin of i_data occurs 0,
name like trdir-name,
clas like trdir-clas,
subc like trdir-subc,
cnam like trdir-cnam,
cdat like trdir-cdat,
myfield(1) type c,
end of i_data.
Global Variables
data:
w_variant like disvariant,
wx_variant like disvariant,
w_variant_save(1) type c,
w_exit(1) type c,
w_repid like sy-repid,
w_user_specific(1) type c,
w_callback_ucomm type slis_formname,
w_print type slis_print_alv,
w_layout type slis_layout_alv,
w_html_top_of_page type slis_formname,
w_fieldcat_alv like line of i_fieldcat_alv,
w_excluding like line of i_excluding,
w_events like line of i_events,
w_event_exit like line of i_event_exit,
w_list_comments like line of i_list_comments.
Global Constants
*constants:
Selection Screen
selection-screen begin of block blk_criteria with frame title text-f01.
select-options:
s_name for trdir-name.
selection-screen end of block blk_criteria.
selection-screen begin of block blk_params with frame title text-f02.
parameters:
p_vari like disvariant-variant.
selection-screen skip 1.
parameters:
p_grid radiobutton group rb01 default 'X',
p_html as checkbox.
selection-screen skip 1.
parameters:
p_list radiobutton group rb01.
selection-screen end of block blk_params.
Initialization
initialization.
perform init_variant.
perform variant_default using p_vari.
clear: s_name[].
s_name-sign = 'I'.
s_name-option = 'CP'.
s_name-low = 'Z*'.
append s_name.
At Selection Screen PBO
at selection-screen output.
At Selection Screen Value Request
at selection-screen on value-request for p_vari.
perform variant_f4 using p_vari.
At Selection Screen
at selection-screen.
perform variant_fill.
Start of Selection
start-of-selection.
perform get_data.
end-of-selection.
perform fieldcat_build.
perform event_build.
perform event_exit_build.
perform exclude_build.
perform print_build.
perform layout_build.
perform display_data.
Top of Page
top-of-page.
Top of Page During Line Sel
top-of-page during line-selection.
At User Command
at user-command.
At Line Selection
at line-selection.
Macros
define skip_1.
write: /001 sy-vline,
at sy-linsz sy-vline.
end-of-definition.
Forms
*& Form variant_f4
form variant_f4 using p_variant.
call function 'LVC_VARIANT_F4'
exporting
is_variant = w_variant
i_save = w_variant_save
importing
e_exit = w_exit
es_variant = wx_variant
exceptions
not_found = 1
program_error = 2
others = 3.
if sy-subrc <> 0.
message i000(zz) with text-g01.
endif.
if w_exit is initial.
w_variant-variant = wx_variant-variant.
p_variant = wx_variant-variant.
endif.
endform.
*& Form init_variant
form init_variant.
clear: w_variant.
w_repid = sy-repid.
w_variant-report = w_repid.
w_variant-username = sy-uname.
w_variant_save = 'A'. "All types
endform.
*& Form variant_default
form variant_default using p_variant.
wx_variant = w_variant.
if not p_variant is initial.
wx_variant-variant = p_variant.
endif.
call function 'LVC_VARIANT_DEFAULT_GET'
exporting
i_save = w_variant_save
changing
cs_variant = wx_variant
exceptions
wrong_input = 1
not_found = 2
program_error = 3
others = 4.
case sy-subrc.
when 0.
p_variant = wx_variant-variant.
when 2.
clear: p_variant.
endcase.
endform.
*& Form variant_fill
form variant_fill.
clear: w_variant.
if p_vari is initial.
w_variant-variant = 'STANDARD'.
w_variant-report = w_repid.
else.
w_variant-variant = p_vari.
w_variant-report = w_repid.
call function 'LVC_VARIANT_EXISTENCE_CHECK'
exporting
i_save = w_variant_save
changing
cs_variant = w_variant
exceptions
others = 01.
if sy-subrc ne 0.
message i000(zz) with text-g02.
endif.
endif.
endform.
*& Form fieldcat_build
form fieldcat_build.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = w_repid
i_structure_name = 'TRDIR'
i_internal_tabname = 'I_DATA'
i_inclname = w_repid
changing
ct_fieldcat = i_fieldcat_alv.
Modify displayed fields
loop at i_fieldcat_alv into w_fieldcat_alv.
case w_fieldcat_alv-fieldname.
when 'NAME'.
w_fieldcat_alv-hotspot = 'X'.
when 'MYFIELD'.
w_fieldcat_alv-checkbox = 'X'.
w_fieldcat_alv-seltext_s = 'MyChkBox'.
when others.
endcase.
modify i_fieldcat_alv from w_fieldcat_alv.
endloop.
endform.
*& Form display_data
form display_data.
w_callback_ucomm = 'CALLBACK_UCOMM'.
case 'X'.
when p_grid.
if p_html = 'X'.
w_html_top_of_page = 'HTML_TOP_OF_PAGE'.
endif.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_background_id = 'SIWB_WALLPAPER'
i_background_id = 'SIWB_WALLPAPER'
i_callback_program = w_repid
i_callback_html_top_of_page = w_html_top_of_page
i_structure_name = 'TRDIR'
i_default = 'X'
i_save = 'A'
is_variant = w_variant
is_layout = w_layout
i_callback_user_command = w_callback_ucomm
it_fieldcat = i_fieldcat_alv
it_events = i_events
it_event_exit = i_event_exit
it_excluding = i_excluding
is_print = w_print
i_screen_start_column = 1
i_screen_start_line = 1
i_screen_end_column = 70
i_screen_end_line = 30
tables
t_outtab = i_data.
when p_list.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_background_id = 'ALV_BACKGROUND'
i_callback_program = w_repid
i_default = 'X'
i_save = 'A'
is_variant = w_variant
is_layout = w_layout
i_callback_user_command = w_callback_ucomm
it_fieldcat = i_fieldcat_alv
it_events = i_events
it_event_exit = i_event_exit
is_print = w_print
tables
t_outtab = i_data.
endcase.
endform.
FORM user_command *
form callback_ucomm using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
message i000(zz) with r_ucomm.
case r_ucomm.
when '&IC1'.
set parameter id 'RID' field rs_selfield-value.
call transaction 'SE38'.
when others.
endcase.
endform.
*& Form get_data
form get_data.
select * up to 15 rows from trdir
into corresponding fields of table i_data
where name in s_name.
endform.
FORM ALV_TOP_OF_PAGE *
form alv_top_of_page.
clear: i_list_comments[].
w_list_comments-typ = 'H'. "H=Header, S=Selection, A=Action
w_list_comments-key = ''.
w_list_comments-info = 'Info 1'.
append w_list_comments to i_list_comments.
w_list_comments-typ = 'A'. " H = Header, S = Selection, A = Action
w_list_comments-key = ''.
w_list_comments-info = 'Begin of list'.
append w_list_comments to i_list_comments.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = i_list_comments.
endform.
*& Form event_build
form event_build.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = i_events.
read table i_events
with key name = slis_ev_top_of_page
into w_events.
if sy-subrc = 0.
move 'ALV_TOP_OF_PAGE' to w_events-form.
modify i_events from w_events index sy-tabix.
endif.
read table i_events
with key name = slis_ev_end_of_list
into w_events.
if sy-subrc = 0.
move 'ALV_END_OF_LIST' to w_events-form.
modify i_events from w_events index sy-tabix.
endif.
read table i_events
with key name = slis_ev_end_of_page
into w_events.
if sy-subrc = 0.
move 'ALV_END_OF_PAGE' to w_events-form.
modify i_events from w_events index sy-tabix.
endif.
endform.
FORM alv_end_of_list *
form alv_end_of_list.
clear: i_list_comments[].
w_list_comments-typ = 'A'. "H = Header, S = Selection, A = Action
w_list_comments-key = ''.
w_list_comments-info = 'End of list'.
append w_list_comments to i_list_comments.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = i_list_comments
i_logo = 'ZMYOBJECTKEY'
i_end_of_list_grid = 'X'.
endform.
FORM alv_end_of_page *
form alv_end_of_page.
endform.
*& Form print_build
form print_build.
w_print-no_print_listinfos = 'X'.
endform.
*& Form layout_build
form layout_build.
w_layout-zebra = 'X'.
w_layout-no_vline = 'X'.
w_layout-colwidth_optimize = 'X'.
w_layout-detail_popup = 'X'.
w_layout-detail_initial_lines = 'X'.
w_layout-detail_titlebar = 'Detail Title Bar'.
endform.
*& Form event_exit_build
form event_exit_build.
clear: i_event_exit[].
Pick
w_event_exit-ucomm = '&ETA'.
w_event_exit-before = ' '.
w_event_exit-after = 'X'.
append w_event_exit to i_event_exit.
endform.
FORM HTML_TOP_OF_PAGE *
form html_top_of_page using r_top type ref to cl_dd_document.
data:
text type sdydo_text_element,
s_table type ref to cl_dd_table_element,
col_key type ref to cl_dd_area,
col_info type ref to cl_dd_area,
a_logo type ref to cl_dd_area.
Split TOP-Document
call method r_top->vertical_split
exporting split_area = r_top
split_width = '30%'
importing right_area = a_logo.
Fill TOP-Document
call method r_top->add_text
exporting text = 'Example of a Heading'
sap_style = 'HEADING'.
call method r_top->new_line.
call method r_top->new_line.
call method r_top->add_table
exporting no_of_columns = 2
with_heading = ' '
border = '1'
importing table = s_table.
call method s_table->add_column importing column = col_key.
call method s_table->add_column importing column = col_info.
text = 'A key value marked'.
call method col_key->add_text
exporting text = text
sap_emphasis = 'Strong'.
call method col_info->add_gap exporting width = 6.
text = '600' .
call method col_info->add_text
exporting text = text
sap_style = 'Key'.
call method col_info->add_gap exporting width = 3.
text = 'Block brick units'.
call method col_info->add_text exporting text = text.
call method s_table->new_row.
text = 'Storage Bin'.
call method col_key->add_text
exporting text = text
sap_emphasis = 'Strong'.
call method col_info->add_gap exporting width = 7.
text = 'C-A-004'.
call method col_info->add_text exporting text = text.
call method s_table->new_row.
text = 'Warehouse number' .
call method col_key->add_text
exporting text = text
sap_emphasis = 'Strong'.
call method col_info->add_gap exporting width = 6.
text = '200' .
call method col_info->add_text
exporting text = text
sap_style = 'Success'.
call method col_info->add_gap exporting width = 3.
text = 'marked success'.
call method col_info->add_text exporting text = text.
call method s_table->new_row.
call method r_top->new_line.
text = 'This last line is a comment in italics.'.
call method r_top->add_text
exporting text = text
sap_emphasis = 'EMPHASIS'.
call method r_top->new_line.
call method a_logo->add_picture
exporting picture_id = 'ZZTESTBMP'.
exporting picture_id = 'ENJOYSAP_LOGO'.
endform.
*& Form exclude_build
form exclude_build.
w_excluding = '&GRAPH'. "Graphic
append w_excluding to i_excluding.
endform. " exclude_build -
To Display Report in a ALV GRID Format
Hi All,
I want to display dome information in ALV Grid format.
Can anybody give example for displaying data in ALV Grid Format.
Thanks in advance.
Thanks & Regards,
Rayeez.Hi ,
1.FOR ALV Lists..
REPORT Y_DEMO_ALV NO STANDARD PAGE HEADING.
Data to be displayed
DATA: I_SFLIGHT TYPE TABLE OF SFLIGHT.
Selection
SELECT * FROM SFLIGHT INTO TABLE I_SFLIGHT.
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
TABLES
T_OUTTAB = I_SFLIGHT.
2.Using Grids..
REPORT Y_DEMO_ALV_1.
Data to be displayed
DATA: I_SFLIGHT TYPE TABLE OF SFLIGHT.
Selection
SELECT * FROM SFLIGHT INTO TABLE I_SFLIGHT.
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
TABLES
T_OUTTAB = I_SFLIGHT.
3.Demo Using most of the ALv Functionalities..
REPORT ZSATTRIAL4.
TYPE-POOLS: slis.
DB-Table
TABLES sflight.
Includes
INCLUDE <icon>.
INCLUDE <symbol>.
CONSTANTS:
c_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
i_layout TYPE slis_layout_alv,
i_sp_group TYPE slis_t_sp_group_alv,
i_events TYPE slis_t_event,
i_print TYPE slis_print_alv,
i_sort TYPE slis_t_sortinfo_alv.
*internal table for data to be displayed
DATA: BEGIN OF i_sflight OCCURS 0.
INCLUDE STRUCTURE sflight.
DATA: box,
lights.
DATA: END OF i_sflight.
DATA: w_repid LIKE sy-repid.
DATA: i_list_top_of_page TYPE slis_t_listheader.
Report Selections
SELECT-OPTIONS s_carrid FOR sflight-carrid.
SELECT-OPTIONS s_connid FOR sflight-connid.
SELECT-OPTIONS s_fldate FOR sflight-fldate.
*SELECTION-SCREEN SKIP 1.
Parameters
PARAMETERS: p_maxrow TYPE i DEFAULT 30."to limit the selection
SELECTION-SCREEN SKIP 1.
Variant for ALV display
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE text-000.
PARAMETERS: p_varnt LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK 0.
Layout of the report display
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
PARAMETERS: p_zebra AS CHECKBOX DEFAULT ' ', "Striped pattern
p_nocolh AS CHECKBOX DEFAULT ' ', "No column heading
p_novlin AS CHECKBOX DEFAULT ' ', "No vertical lines
p_colopt AS CHECKBOX DEFAULT ' ', "Optimizes col. wd
p_keyhot AS CHECKBOX DEFAULT ' ', "Key fields hot
p_noinpt AS CHECKBOX DEFAULT ' '. "No field for input
SELECTION-SCREEN END OF BLOCK a.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
PARAMETERS: p_lights AS CHECKBOX DEFAULT 'X',
p_lightc AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b.
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-003.
PARAMETERS: p_totonl AS CHECKBOX DEFAULT ' ',
p_totext(60),
p_sttext(60).
SELECTION-SCREEN END OF BLOCK c.
SELECTION-SCREEN BEGIN OF BLOCK d WITH FRAME TITLE text-004.
PARAMETERS: p_chkbox AS CHECKBOX DEFAULT 'X',
p_detpop AS CHECKBOX DEFAULT 'X',
p_groupb AS CHECKBOX DEFAULT ' ',
p_groups AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK d.
SELECTION-SCREEN BEGIN OF BLOCK e WITH FRAME TITLE text-005.
PARAMETERS: p_print AS CHECKBOX DEFAULT ' ',
p_nosinf AS CHECKBOX DEFAULT ' ',
p_nocove AS CHECKBOX DEFAULT ' ',
p_nonewp AS CHECKBOX DEFAULT ' ',
p_nolinf AS CHECKBOX DEFAULT ' ',
p_reserv TYPE i.
SELECTION-SCREEN END OF BLOCK e.
DATA: w_boxnam TYPE slis_fieldname VALUE 'BOX',
w_f2code LIKE sy-ucomm VALUE '&ETA',
w_lignam TYPE slis_fieldname VALUE 'LIGHTS',
w_save(1) TYPE c,
w_default(1) TYPE c,
w_exit(1) TYPE c,
i_variant LIKE disvariant,
i_variant1 LIKE disvariant.
INITIALIZATION.
w_repid = sy-repid.
PERFORM fieldcat_init USING i_fieldcat.
PERFORM eventtab_build USING i_events.
PERFORM comment_build USING i_list_top_of_page.
PERFORM sp_group_build USING i_sp_group.
PERFORM t_sort_build USING i_sort.
Set Options: save variant userspecific or general
'A or 'U' are for user-specific variants list
'X' or 'space' for general
w_save = 'A'.
PERFORM variant_init.
Get default variant
i_variant1 = i_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = w_save
CHANGING
cs_variant = i_variant1
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_varnt = i_variant1-variant.
ENDIF.
Process on value request (list of possible variants)
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varnt.
PERFORM f4_for_variant.
PAI
AT SELECTION-SCREEN.
PERFORM pai_of_selection_screen.
START-OF-SELECTION.
PERFORM selection.
END-OF-SELECTION.
PERFORM layout_build USING i_layout. "wg. Parameters
PERFORM print_build USING i_print. "wg. Parameters
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = w_repid
i_internal_tabname = 'I_SFLIGHT'
i_structure_name = 'SFLIGHT'
i_client_never_display = 'X'
i_inclname = w_repid
CHANGING
ct_fieldcat = i_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
i_callback_program = w_repid
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 = 'SFLIGHT'
i_background_id = 'ALV_BACKGROUND'
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = i_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
it_special_groups = i_sp_group[]
it_sort = i_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
i_save = w_save
is_variant = i_variant
it_events = i_events[]
IT_EVENT_EXIT =
is_print = i_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 = i_sflight
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.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_structure_name = 'SFLIGHT'
is_layout = i_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
it_special_groups = i_sp_group[]
it_sort = i_sort[]
IT_FILTER =
IS_SEL_HIDE =
i_default = W_DEFAULT
i_save = w_save
is_variant = i_variant
it_events = i_events[]
IT_EVENT_EXIT =
is_print = i_print
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 =
TABLES
t_outtab = i_sflight.
FORM FIELDCAT_INIT *
--> L_FIELDCAT *
FORM fieldcat_init USING l_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'SEATSOCC'.
*The field is not displayed in the initial output, can be interactively
chosen for display
ls_fieldcat-no_out = 'X'.
*This field is assigned to a special group with tech. key 'A' and can be
*displayed using the special group buttons
ls_fieldcat-sp_group = 'A'.
*The field cannot be summed irrespective of its data type
ls_fieldcat-no_sum = 'X'.
APPEND ls_fieldcat TO l_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'SEATSMAX'.
ls_fieldcat-no_out = 'X'.
ls_fieldcat-sp_group = 'A'.
APPEND ls_fieldcat TO l_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PRICE'.
ls_fieldcat-no_out = 'X'.
ls_fieldcat-sp_group = 'B'.
APPEND ls_fieldcat TO l_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'CARRID'.
ls_fieldcat-outputlen = 7.
APPEND ls_fieldcat TO l_fieldcat.
ENDFORM.
FORM DATA_ADD *
--> L_SFLIGHT
FORM data_add TABLES l_sflight STRUCTURE i_sflight.
LOOP AT l_sflight.
IF sy-tabix > 10.
l_sflight-box = 'X'.
l_sflight-lights = '3'.
ELSE.
IF sy-tabix = 1.
l_sflight-lights = '2'.
ELSE.
l_sflight-lights = '1'.
ENDIF.
ENDIF.
MODIFY l_sflight.
ENDLOOP.
ENDFORM.
FORM EVENTTAB_BUILD *
--> l_EVENTS *
FORM eventtab_build USING l_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = l_events.
READ TABLE l_events WITH KEY name = slis_ev_top_of_page INTO ls_event.
IF sy-subrc = 0.
MOVE c_formname_top_of_page TO ls_event-form.
APPEND ls_event TO l_events.
ENDIF.
ENDFORM.
FORM COMMENT_BUILD *
--> L_TOP_OF_PAGE *
FORM comment_build USING l_top_of_page TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader.
***Header
CLEAR ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: not used for this type
ls_line-info = 'Heading list'.
APPEND ls_line TO l_top_of_page.
***Selection
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Key 1'.
ls_line-info = 'Information'.
APPEND ls_line TO l_top_of_page.
ls_line-key = 'Key 2'.
APPEND ls_line TO l_top_of_page.
***Action
CLEAR ls_line.
ls_line-typ = 'A'.
LS_LINE-KEY: not used for this type
Ls_line-info = 'Status list'.
APPEND ls_line TO l_top_of_page.
ENDFORM.
FORM LAYOUT_BUILD *
<-> LS_LAYOUT *
FORM layout_build USING ls_layout TYPE slis_layout_alv.
ls_layout-f2code = w_f2code.
ls_layout-zebra = p_zebra.
ls_layout-colwidth_optimize = p_colopt.
IF p_chkbox = 'X'.
*Fieldname for check box on the report output
ls_layout-box_fieldname = w_boxnam.
ELSE.
ls_layout-box_fieldname = space.
ENDIF.
ls_layout-no_input = p_noinpt.
ls_layout-no_vline = p_novlin.
ls_layout-no_colhead = p_nocolh.
IF p_lights = 'X' OR p_lightc = 'X'.
**Fieldname for lights on the report output
ls_layout-lights_fieldname = w_lignam.
ELSE.
CLEAR ls_layout-lights_fieldname.
ENDIF.
ls_layout-lights_condense = p_lightc.
ls_layout-totals_text = p_totext.
ls_layout-subtotals_text = p_sttext.
ls_layout-totals_only = p_totonl.
ls_layout-key_hotspot = p_keyhot.
ls_layout-detail_popup = p_detpop.
ls_layout-group_change_edit = p_groups.
E05_LS_LAYOUT-GROUP_BUTTONS = P_GROUPB.
ls_layout-group_buttons = 'X'.
ENDFORM.
FORM SP_GROUP_BUILD *
--> L_SP_GROUP *
FORM sp_group_build USING l_sp_group TYPE slis_t_sp_group_alv.
DATA: ls_sp_group TYPE slis_sp_group_alv.
*Fields are assigned to the special group
CLEAR ls_sp_group.
ls_sp_group-sp_group = 'A'.
ls_sp_group-text = 'Reservation status'.
APPEND ls_sp_group TO l_sp_group.
CLEAR ls_sp_group.
ls_sp_group-sp_group = 'B'.
ls_sp_group-text = 'Flight charges'.
APPEND ls_sp_group TO l_sp_group.
ENDFORM.
FORM SELECTION *
FORM selection.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE i_sflight
UP TO p_maxrow ROWS WHERE carrid IN s_carrid
AND connid IN s_connid AND fldate IN s_fldate.
PERFORM data_add TABLES i_sflight.
ENDFORM.
FORM TOP_OF_PAGE *
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = i_list_top_of_page.
ENDFORM.
FORM F4_FOR_VARIANT *
FORM f4_for_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = i_variant
i_save = w_save
it_default_fieldcat =
IMPORTING
e_exit = w_exit
es_variant = i_variant1
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF w_exit = space.
p_varnt = i_variant1-variant.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
to check whether right variant is entered on the selection scr
FORM pai_of_selection_screen.
IF NOT p_varnt IS INITIAL.
MOVE i_variant TO i_variant1.
MOVE p_varnt TO i_variant1-variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = w_save
CHANGING
cs_variant = i_variant1.
i_variant = i_variant1.
ELSE.
PERFORM variant_init.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
*& Form VARIANT_INIT
FORM variant_init.
CLEAR i_variant.
i_variant-report = w_repid.
ENDFORM. " VARIANT_INIT
FORM PRINT_BUILD *
FORM print_build USING l_print TYPE slis_print_alv.
l_print-print = p_print.
l_print-no_print_selinfos = p_nosinf.
l_print-no_coverpage = p_nocove.
l_print-no_new_page = p_nonewp.
l_print-no_print_listinfos = p_nolinf.
l_print-reserve_lines = p_reserv.
l_print-print = p_print.
ENDFORM.
FORM T_SORT_BUILD *
FORM t_sort_build USING l_sort TYPE slis_t_sortinfo_alv.
DATA: ls_sort TYPE slis_sortinfo_alv.
ls_sort-fieldname = 'CARRID'.
ls_sort-spos = 1.
ls_sort-up = 'X'.
ls_sort-subtot = 'X'.
APPEND ls_sort TO l_sort.
ps : reward points for helpful answers and mark the post as closed.. -
Graphical Display of Marketing Calender
hi CRM GURUS,
We are trying to use the Marketing Calender.
we defined the Queries and we are able to see the Respective Campaigns according to the QUery.
But we are just able to see the list of the campaigns and we are not able to see the camapigns Graphically.
The help file states that we will be able to see the campaigns Graphically in the Calender But I am not able to see them.
Also we are not able to go to the respective campaigns by clicking them and here also the help file states that we should be able to enter in to the respective campaigns and be able to do the changes
Any help for meHi,
What do you mean by 'graphical display'? You can either have standard view or ALV. You can switch between the two being in the report and going to Menu - Settings - Switch list.
Regards,
Eli -
Programm for graphical display of a GNEA
hey peeps,
I'm a newbie in java and have to write a pretty tough programm for my practical course.
a programm that provides the graphical display of a gnea ((in)finite automaton...dont know if thats the correct expression. the user has to be able to delete any of the states he wants by clicking on the partiular buttons...we already have the structure of the programm thought i have no idea if it's gonna work. but i dont know how the actual coding looks like. can anyone help me ?You will have to provide more information that this. It sounds to me like you are asking for someone to give you the code to solve your problem which is not likely going to happen.
What are you specifically looking for? -
Is it possible to display LOGO in simple ALV list?
Hi Guys,
Is it possible to display LOGO in simple ALV list. If yes plz explain in details.
Thanks
SharatYes it is possible to display logo at the top of the page.
TYPE-POOLS: slis.
* Data Decalaration
DATA: it_vbak TYPE TABLE OF vbak.
DATA: g_repid TYPE sy-repid.
DATA: it_listheader TYPE slis_t_listheader,
wa_listheader TYPE slis_listheader.
* START-OF-SELECTION
START-OF-SELECTION.
g_repid = sy-repid.
SELECT * FROM vbak INTO TABLE it_vbak.
PERFORM build_alv_header.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'vbak'
TABLES
t_outtab = it_vbak.
*& Form BUILD_ALV_HEADER
FORM build_alv_header .
* Type H is used to display headers i.e. big font
wa_listheader-typ = 'H'.
wa_listheader-info ='Flight Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
* Type S is used to display key and value pairs
wa_listheader-typ = 'S'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
* Type A is used to display italic font
wa_listheader-typ = 'A'.
wa_listheader-key = 'Date :' .
wa_listheader-info ='SAP ALV Report'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
ENDFORM. " BUILD_ALV_HEADER
*& Form top_of_page
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo = 'PARI'.
ENDFORM. "top_of_page -
Displaying special characters in ALV report.
Hi Experts,
Can we display special characters in ALV reports? Special characters such as tick mark.(Like in character map(Font Bookshelf Symbol 7) of windows ).
I tried with icons in ALV report, I was able to display tick icon in the ALV report, but when we export the report in to a excel, the icons comes in as Hexadecimal code.
Can any we display special characters like tick in ALV report or display the icons in excel aswell?
I will be gratefull for the <urgency reduced by moderator> response.
Regards,
Sharath.
Edited by: Thomas Zloch on May 10, 2011 10:26 AMSharath,
I think it is possible to do so.
Please check this link.
http://www.sapfans.com/forums/viewtopic.php?f=13&t=322569
Thanks,
Guru. -
Hi,
I would need to display the architectural view of RE-FX (buildings, properties etc.) in a graphical display tool.
What are the settings required in RE-FX? Should the geocoordinates (longitude, latitude) be maintained in the RE object master data, and if so is there some enhancement or similar for adding those?
Thanks a lot!Hi,
sorry, do you mean this is available in RE or not?
Would anyone have some examples how the link from RE-FX to GIS systems has been made?
Should the mapping of the RE objects to the map be done in some external tool like some geodatabase? Is this typically something that is provided by the external map tool e.g ESRI?
In SAP help is mentioned the architectural view is recommended for this link ,but I can't find any practical information about how this should be done:
"Use of the architectural view is optional. It is recommended in the following cases:
.... You want to link to graphical systems."
If you have any ideas about this it would be really great! -
How to display the fields in ALV Output without using Field catalog?
How to display the fields in ALV Output without using Field catalog?
Could you pls tell me the coding?
Akshitha.Hi,
u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
data: itab type table of mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = itab
CHANGING
ct_fieldcat = lt_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*Pass that field catalog into the fillowing FM
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_grid_title = 'REPORTING'
is_layout = gt_layout
it_fieldcat = lt_fieldcat[]
tables
t_outtab = itab. -
Problem in display of text in ALV report
Dear experts,
I am working on a MM Report in which I need to display Material Basic data text maintained in MM01,02 Tcodes through ALV report.
I have declared a string type variable for the Basic data text in the Final Internal Table.
For reading the Standard text I am using Read_Text FM, from which I am looping the Text internal table and concatenating it into
String variable.
What I notice is all the content beyond 255 chars is not getting displayed, Even when the ALV report is downloaded to Excel file.
Can you suggest some approach to over come this issue.
Regards,
MurthyHi,
Use the below code
Data : lt_content TYPE TABLE OF tline,
lw_content TYPE tline.
Data : lt_text Type Table of solisti1,
lw_text TYPE solisti1.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = lv_id
language = tdspras
name = lv_name
object = lv_object
archive_handle = 0
local_cat = ' '
TABLES
lines = lt_content
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
loop at lt_content into lw_content.
lw_text-line = lw_content-tdline.
APPEND lw_text TO lt_text.
CLEAR: lw_content, lw_text.
endloop.
Now your whole text is in "lt_text".
Regards,
Avish Mittal
Maybe you are looking for
-
Need help with System.setClipboard error
SDK version: 3.3.0.4589 Requires flash 10.0.12 or higher Code: private function sendTextToClipboard():void System.setClipboard("User Name: " + uname + "\n" + "Password: " + pword); I am using the System.setClipboard function in my application an
-
External Sound On External Monitor?
Hi guys, need some help here So, what I'm trying to do is connect my macbook pro 13 inch to a samsung monitor( can be used as tv and monitor). So , it was easy to connect but what i really wanted is to play a game on my macbook and put a video to see
-
Help! I can't distribute forms, or email them at all in Adobe Acrobat Pro
I have wasted an entire weekend attempting to email, distribute etc. forms out of the Adobe Acrobat Pro 9.2 I just bought. I have uninstalled and redownloaded and I just get the error "unable to connect with mail." I am working off of my Macbook Pr
-
Hello, I am trying to print PDF with portfolio and getting the following behavior; 1. When I open the pdf using Adobe , I am able to print the portfolio. 2. When I explore to that file location and then right click to print the document, I get a prin
-
Cannot use DDNS service in china!
I am use WRT300N V1(Firmware Version: v1.03.6) wireless router in china, and use China Telecom ADSL Broadband service, I want to use DDNS service but never connet to DynDNS.org, please help me to solve the problem,many thanks. Joe