WHAT ARE EVENTS IN AN ALV REPORT ?
WHAT ARE EVENTS IN AN ALV REPORT ? PLEASE EXPLAIN HOW TO MAKE AN ALV REPORT AND WHAT THE EVENTS DO ?
BEST REGARDS,
RYAN
Events are driven by user interaction...Like...
DATA_CHANGED
DOUBLE_CLICK
ONF4
Here's a sample code of OO ALV using events...
*& Report ZDUMMY_ATG_2
REPORT zdummy_atg_2.
TYPES: BEGIN OF ty_scarr,
carrid TYPE scarr-carrid,
carrname TYPE scarr-carrname,
currcode TYPE scarr-currcode,
END OF ty_scarr.
DATA: t_spfli TYPE STANDARD TABLE OF spfli,
w_spfli LIKE LINE OF t_spfli,
lt_f4 TYPE lvc_t_f4 WITH HEADER LINE,
return_tab TYPE STANDARD TABLE OF ddshretval WITH HEADER LINE,
t_custom_scarr TYPE STANDARD TABLE OF ty_scarr WITH HEADER LINE,
t_stable TYPE STANDARD TABLE OF lvc_s_stbl WITH HEADER LINE.
FIELD-SYMBOLS: <fs_spfli> LIKE LINE OF t_spfli,
<fs_scarr> LIKE LINE OF t_custom_scarr.
CLASS cl_gui_object DEFINITION LOAD.
CLASS lcl_event_receiver DEFINITION DEFERRED.
INCLUDE <cl_alv_control>.
DATA: ok_code LIKE sy-ucomm,
gt_fieldcat TYPE lvc_t_fcat,
gt_sort TYPE lvc_t_sort,
event_receiver TYPE REF TO lcl_event_receiver,
gs_layout TYPE lvc_s_layo,
mycontainer TYPE scrfname VALUE 'CUSTOM_ALV',
custom_container TYPE REF TO cl_gui_custom_container,
grid1 TYPE REF TO cl_gui_alv_grid,
gs_variant TYPE disvariant,
x_save,
w_error TYPE c,
l_valid(1) TYPE c.
* CLASS LCL_EVENT_RECEIVER DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed,
handle_f4_help
FOR EVENT onf4 OF cl_gui_alv_grid
IMPORTING e_fieldname es_row_no er_event_data.
ENDCLASS. "LCL_EVENT_RECEIVER DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_data_changed.
PERFORM data_changed USING er_data_changed.
ENDMETHOD. "HANDLE_DATA_CHANGED
METHOD handle_f4_help.
PERFORM handle_onf4 USING e_fieldname es_row_no.
er_event_data->m_event_handled = 'X'.
ENDMETHOD. "HANDLE_F4_HELP
ENDCLASS. "LCL_EVENT_RECEIVER IMPLEMENTATION
*& START-OF-SELECTION *
START-OF-SELECTION.
PERFORM cargar_customs.
PERFORM cargar_datos.
PERFORM fill_layout.
PERFORM fill_catalog.
PERFORM llamar_alv.
CALL SCREEN 0100.
*& Form CARGAR_DATOS *
FORM cargar_datos.
SELECT mandt carrid connid countryfr cityfrom
airpfrom countryto cityto airpto
fltime deptime arrtime distance
distid fltype period
INTO TABLE t_spfli
FROM spfli.
ENDFORM. " CARGAR_DATOS
*& Form CARGAR_CUSTOMS *
FORM cargar_customs.
SELECT carrid carrname currcode
INTO TABLE t_custom_scarr
FROM scarr.
ENDFORM. " CARGAR_DATOS
*& Form FILL_LAYOUT *
FORM fill_layout.
gs_layout-sel_mode = 'A'.
ENDFORM. " FILL_LAYOUT
*& Form FILL_CATALOG *
FORM fill_catalog.
DATA: gs_fieldcat TYPE lvc_s_fcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 1.
gs_fieldcat-fieldname = 'CARRID'.
gs_fieldcat-reptext = 'Compañia'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = 'X'.
gs_fieldcat-f4availabl = 'X'.
gs_fieldcat-outputlen = '8'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 2.
gs_fieldcat-fieldname = 'CONNID'.
gs_fieldcat-reptext = 'Conexión'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = 'X'.
gs_fieldcat-outputlen = '8'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 3.
gs_fieldcat-fieldname = 'COUNTRYFR'.
gs_fieldcat-reptext = 'País'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = 'X'.
gs_fieldcat-outputlen = '4'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 4.
gs_fieldcat-fieldname = 'CITYFROM'.
gs_fieldcat-reptext = 'Ciudad Salida'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = space.
gs_fieldcat-outputlen = '20'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 5.
gs_fieldcat-fieldname = 'AIRPFROM'.
gs_fieldcat-reptext = 'Arp. Salida'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = 'X'.
gs_fieldcat-outputlen = '10'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 6.
gs_fieldcat-fieldname = 'COUNTRYTO'.
gs_fieldcat-reptext = 'País'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = 'X'.
gs_fieldcat-outputlen = '4'.
APPEND gs_fieldcat TO gt_fieldcat.
CLEAR gs_fieldcat.
gs_fieldcat-col_pos = 7.
gs_fieldcat-fieldname = 'CITYTO'.
gs_fieldcat-reptext = 'Ciudad Llegada'.
gs_fieldcat-tabname = 'T_SPFLI'.
gs_fieldcat-edit = space.
gs_fieldcat-outputlen = '20'.
APPEND gs_fieldcat TO gt_fieldcat.
ENDFORM. " FILL_CATALOG
*& Form LLAMAR_ALV *
FORM llamar_alv.
IF custom_container IS INITIAL.
CREATE OBJECT custom_container
EXPORTING
container_name = mycontainer
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
ENDIF.
CREATE OBJECT grid1
EXPORTING
i_parent = custom_container.
CREATE OBJECT event_receiver.
lt_f4-fieldname = 'CARRID'.
lt_f4-register = 'X' .
lt_f4-getbefore = 'X' .
lt_f4-chngeafter = 'X' .
APPEND lt_f4.
SET HANDLER event_receiver->handle_data_changed FOR grid1.
SET HANDLER event_receiver->handle_f4_help FOR grid1.
CALL METHOD grid1->register_f4_for_fields
EXPORTING
it_f4 = lt_f4[].
IF sy-batch IS INITIAL.
CALL METHOD grid1->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
ENDIF.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
is_variant = gs_variant
i_save = x_save
i_default = 'X'
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_sort = gt_sort[]
it_outtab = t_spfli[].
CALL METHOD grid1->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ENDFORM. " LLAMAR_ALV
*& Form HANDLE_ONF4 *
FORM handle_onf4 USING p_e_fieldname
p_es_row_no STRUCTURE lvc_s_roid.
CASE p_e_fieldname.
WHEN 'CARRID'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = t_custom_scarr
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF NOT return_tab[] IS INITIAL.
READ TABLE return_tab INDEX 1.
READ TABLE t_spfli INDEX p_es_row_no-row_id
ASSIGNING <fs_spfli>.
<fs_spfli>-carrid = return_tab-fieldval.
CALL METHOD grid1->refresh_table_display
EXPORTING
is_stable = t_stable.
ENDIF.
ENDCASE.
ENDFORM. " HANDLE_ONF4
*& Module STATUS_0100 OUTPUT *
MODULE status_0100 OUTPUT.
SET PF-STATUS 'MAIN_STATUS'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT *
MODULE user_command_0100 INPUT.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK' OR 'STOP' OR 'CANCEL'.
SET SCREEN 0.
LEAVE SCREEN.
WHEN 'SAVE'.
CALL METHOD grid1->check_changed_data
IMPORTING
e_valid = l_valid.
IF l_valid EQ 'X'.
PERFORM grabar_datos.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form DATA_CHANGED *
FORM data_changed USING rr_data_changed TYPE REF TO
cl_alv_changed_data_protocol.
DATA: w_new,
ls_mod_cells TYPE lvc_s_modi,
ls_cells TYPE lvc_s_modi.
DATA: l_carrid TYPE spfli-carrid.
CLEAR l_carrid.
LOOP AT rr_data_changed->mt_good_cells INTO ls_mod_cells.
CASE ls_mod_cells-fieldname.
WHEN 'CARRID'.
CALL METHOD rr_data_changed->get_cell_value
EXPORTING
i_row_id = ls_mod_cells-row_id
i_fieldname = ls_mod_cells-fieldname
IMPORTING
e_value = l_carrid.
IF l_carrid IS INITIAL.
CALL METHOD rr_data_changed->add_protocol_entry
EXPORTING
i_msgid = '0K'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = 'Seleccione algún código'
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id.
w_error = 'X'.
ELSE.
READ TABLE t_custom_scarr WITH KEY carrid = l_carrid
ASSIGNING <fs_scarr>.
IF sy-subrc NE 0.
CALL METHOD rr_data_changed->add_protocol_entry
EXPORTING
i_msgid = '0K'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = 'Código ingresado no existe'
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id.
w_error = 'X'.
ENDIF.
ENDIF.
ENDCASE.
ENDLOOP.
ENDFORM. " DATA_CHANGED
*& Form GRABAR_DATOS *
FORM grabar_datos.
LOOP AT t_spfli ASSIGNING <fs_spfli>.
w_spfli = <fs_spfli>.
MODIFY spfli FROM w_spfli.
IF sy-subrc EQ 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
ENDIF.
ENDLOOP.
ENDFORM. " GRABAR_DATOS
Greetings,
Blag.
Similar Messages
-
WHAT ARE EVENTS IN A CLASSICAL REPORT ?
WHAT ARE EVENTS IN A CLASSICAL REPORT ? PLEASE EXPLAIN THEM ?
BEST REGARDS
RYANWhen u start the Report:
LOAD-OF-PROGRAM
INITIALIZATION
Before displayins Selection Screen:
AT SELECTION-SCREEN OUTPUT.
Before leaving Selection Screen:
AT SELECTION-SCREEN.
After processing Selection Screen when the List starts:
START-OF-SELECTION.
Before displaying the List .. After completing START-OF-SELECTION.
END-OF-SELECTION.
For Every page:
TOP-OF-PAGE .
END-OF-PAGE.
For more details check this link -
Events in Report -
WHAT ARE EVENTS IN INTERACTIVE LIST ?
WHAT ARE EVENTS IN INTERACTIVE LIST ? IS THERE A DIFFERENCE BETWEEN INTERACTIVE LIST AND INTERACTIVE REPORT ?
BEST REGARDS,
RYANHi
Events in Interactive Report
TOP-OF-PAGE DURING LINE-SELECTION
AT USER-COMMAND.
AT LINE-SELECTION
AT PF-FUNCTION KEY
Report Output is called LIST
Interactive report Output is nothing but Interactive List
<b><REMOVED BY MODERATOR></b>
Regards
Anji
Message was edited by:
Alvaro Tejada Galindo -
What are the best practice in report design ?
Hi,
According to you, what are the best practices in report desing about layout, fonts and colors ?
ThksHi,
It all depends that what type of report you are designing and what tool you are using - WebI or Crystal.
And in WebI, if it is cross tab or Tabular report etc.
One most important thing is that what is client requirement. May be client does not like which is best practice.
On the base of my personal experience I will create few demo reports using different options - layout, colors and fonts and show them to client so that they may decide.
Regards,
Bashir Awan -
What are events in LBWE for a particular application area
hi ,
I would like to know what are events in LBWE for a particular application area extract structures.
What impact and how does it relate to BW/BIHi
There are lot of discusions on EVENT in SDN you can search and kindly look below links:
Events in LO cockpit
LBWE events
events
and so many other discussions
http://forumsa.sdn.sap.com/search.jspa?threadID=&q=LBWE+EVENTS&objID=c4&dateRange=all&numResults=15
Ravi -
What are events In a screen
could u plz explain clearlyHello
the events of the screen are
Variants:
1.PROCESS BEFORE OUTPUT. Process before output
2.PROCESS AFTER INPUT. Process after user input
3.PROCESS ON HELP-REQUEST. User-programmed F1 help
4.PROCESS ON VALUE-REQUEST. User-programmer F4 help
Variant 1
PROCESS BEFORE OUTPUT.
Effect
Processing before the screen is displayed (PBO).
Examples
Initializing screen fields, inserting default values, positioning the cursor, showing and hiding fields and changing field attributes dynamically.
Variant 2
PROCESS AFTER INPUT.
Effect
Processing after user input.
Examples
Checking values where there is no automatic check, processing the cursor position, processing correct entries or triggering an error dialog.
Variant 3
PROCESS ON HELP-REQUEST.
Effect
POH event for user-programmed help. Modules in this event are processed when the user presses F1 with the cursor positioned on a screen field. In the subsequent FIELD statements, you can specify a data element supplement (or determine one in an application module). The texts are then displayed by the help system.
Examples
FIELD XY WITH '0001'.
Displays data element addition 0001 for field XY.
FIELD XY WITH variable.
Displays the data element supplement with the number contained in variable for the field XY.
FIELD XY MODULE XYZ WITH variable .
The relevant data element supplement is determined in module XYZ, where it is placed in variable. Use this procedure whenever you cannot determine the correct data element supplement until the F1 event.
Variant 4
PROCESS ON VALUE-REQUEST.
Effect
Event in user-programmed help that occurs when the user presses F4 with the cursor positioned on a screen field. The modules specified in the subsequent FIELD statements are called instead of the SAP help system.
Example
FIELD XY MODULE XYZ
Module XYZ determines the value of field XY and places it in the input field on the screen.
Reward the points and close the thread.
Vasanth -
What are the common errors in reporting and extraction.
hi friends,
what are the common errors in reporting and extraction for implementation and support projects.
thanking u
suneel.Hi Suneel,
Errors in reporting are like incorrect query creation, errors in creating RKF, CKF and variables, misunderstanding the data, or errors with other tools like broadcasting. Errors in extraction relate to source system connectivity, field-infoobject mapping, incorrect code etc. Also, please search the forums and you will find many real time examples.
Hope this helps... -
What are events in ALV report and explain how sorting is done alv report
events in alv report and sorting in alv report
Moderator Message: Search before posting.
Edited by: kishan P on Dec 21, 2011 11:13 AMHi Raja,
<<content and links removed by moderator>>
PavanKumar.G
Edited by: kishan P on Dec 21, 2011 11:12 AM -
Column Heading are not displayed in ALV Report using CL_SALV_DISPLAY?
Hi,
I am using CL_SALV_DISPLAY class to display data. I Created an Internal Table Dynamically based fieldcatalog which was prepared based data at run time. When i displayed data using CL_SALC_DISPALY data is display in output but column headings are not displayed.
can anyone suggest me how to display heading in ALV using CL_SALV_DISPLAY class, My code is
CLASS lcl_report DEFINITION
CLASS lcl_report DEFINITION.
PUBLIC SECTION.
METHODS:
display IMPORTING l_table TYPE string
l_fcat TYPE string.
ENDCLASS. "lcl_report DEFINITION
CLASS lcl_report IMPLEMENTATION
CLASS lcl_report IMPLEMENTATION.
METHOD display.
DATA: gr_table TYPE REF TO cl_salv_table.
DATA: gr_columns TYPE REF TO cl_salv_columns_table,
gr_column TYPE REF TO cl_salv_column_table,
ls_fcat TYPE slis_fieldcat_alv.
DATA: gr_display TYPE REF TO cl_salv_display_settings.
DATA: l_o_functions TYPE REF TO cl_salv_functions_list,
l_field TYPE string.
FIELD-SYMBOLS : <fs_table> TYPE STANDARD TABLE,
<ft_fcat> TYPE STANDARD TABLE.
Get the ALV object refering to the output table
ASSIGN (l_table) TO <fs_table>.
ASSIGN (l_fcat) TO <ft_fcat>.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = <fs_table> ).
CATCH cx_salv_msg. "#EC NO_HANDLER
ENDTRY.
Add basic default functionality in the ALV report
Functions
l_o_functions = gr_table->get_functions( ).
l_o_functions->set_all( abap_true ).
gr_columns = gr_table->get_columns( ).
gr_columns->set_headers_visible( abap_true ).
Display the list
gr_table->display( ).
ENDMETHOD. "extract
ENDCLASS. "lcl_report IMPLEMENTATION
*& start-of-selection declaration
START-OF-SELECTION.
PERFORM :
get store codes
get_storecodes USING p_stfile
CHANGING it_t001w,
fetching mard data
read_mard_data,
preparing fieldcatalog for Final Data
create_filedcat USING it_t001w
it_site
CHANGING it_fieldcat,
preparing structure & internal table for Final Data
create_final_table_structure USING it_fieldcat,
prepare output data
prepare_final_data.
*& end-of-selection declaration
END-OF-SELECTION.
PERFORM :
display data
display_data USING l_table
l_fcat.
*& Form get_storecodes
FORM get_storecodes USING p_p_stfile
CHANGING p_it_t001w LIKE it_t001w[].
DATA :
internal table for RAW
lt_raw TYPE truxs_t_text_data,
rs_site LIKE LINE OF rt_site,
l_index LIKE sy-tabix.
FIELD-SYMBOLS :
field symbol for it_t001w
<fs_t001w> LIKE LINE OF p_it_t001w.
calling function module to get Stores Data from File
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = lt_raw
i_filename = p_p_stfile
TABLES
i_tab_converted_data = p_it_t001w[]
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ENDIF.
SORT p_it_t001w BY werks.
CLEAR rs_site.
rs_site-sign = 'I'.
rs_site-option = 'EQ'.
rs_site-low = p_dccode.
APPEND rs_site TO rt_site.
IF it_t001w[] IS NOT INITIAL.
LOOP AT p_it_t001w ASSIGNING <fs_t001w>.
l_index = sy-tabix.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = <fs_t001w>-werks
IMPORTING
output = <fs_t001w>-werks.
MODIFY p_it_t001w FROM <fs_t001w> INDEX l_index.
IF <fs_t001w>-werks GE s_site-low AND <fs_t001w>-werks LE s_site-high.
append site to ranges
CLEAR rs_site.
rs_site-sign = 'I'.
rs_site-option = 'EQ'.
rs_site-low = <fs_t001w>-werks.
APPEND rs_site TO rt_site.
CONTINUE.
ENDIF.
ENDLOOP.
SORT p_it_t001w BY werks.
SORT rt_site.
ENDIF.
ENDFORM. " get_storecodes
*& Form create_final_table_structure
FORM create_filedcat USING p_it_t001w LIKE it_t001w[]
p_it_site LIKE it_site[]
CHANGING p_it_fieldcat LIKE it_fieldcat[].
FIELD-SYMBOLS :
field symbol for p_it_t001w
<fs_t001w> LIKE LINE OF p_it_t001w,
field symbol for p_it_site
<fs_site> LIKE LINE OF p_it_site.
DATA :
fieldname
l_fieldname TYPE slis_fieldname,
workarea for site ranges
rs_site LIKE LINE OF rt_site.
CLEAR : l_fieldname, rs_site.
l_fieldname = p_dccode.
PERFORM
prepare fieldcatalog
build_fieldcatalog USING : 'MTART' 'CHAR' '5' ,
'MTBEZ' 'CHAR' '25' ,
'MATKL' 'CHAR' '6' ,
'WGBEZ' 'CHAR' '20' ,
'MATNR' 'CHAR' '18' ,
'MAKTX' 'CHAR' '30' ,
l_fieldname 'CHAR' '17' .
create header for excel
PERFORM create_excel_header USING : 'Division',
'Divsion Description',
'MC Code',
'MC Description',
'Article',
'Article Description',
l_fieldname.
loop for creating fieldcatalog
LOOP AT it_site ASSIGNING <fs_site>.
READ TABLE it_t001w ASSIGNING <fs_t001w> WITH KEY werks = <fs_site>-werks
BINARY SEARCH.
IF sy-subrc = 0 AND <fs_t001w> IS ASSIGNED AND
<fs_site> IS ASSIGNED AND <fs_site>-stock GT 0.
CLEAR : l_fieldname, rs_site.
l_fieldname = <fs_site>-werks.
prepare fieldcatalog
PERFORM build_fieldcatalog USING : l_fieldname 'CHAR' '17'.
create header for excel
PERFORM create_excel_header USING l_fieldname .
CONTINUE.
ENDIF.
ENDLOOP.
l_fcat = 'it_fieldcat[]'.
ENDFORM. " create_final_table_structure
*& Form build_fieldcatalog
FORM build_fieldcatalog USING p_fieldname TYPE slis_fieldname
p_datatype TYPE datatype_d
p_length TYPE intlen.
DATA : ls_fieldcat LIKE LINE OF it_fieldcat.
CLEAR : ls_fieldcat.
ls_fieldcat-fieldname = p_fieldname.
ls_fieldcat-datatype = p_datatype.
ls_fieldcat-intlen = p_length.
APPEND ls_fieldcat TO it_fieldcat.
ENDFORM. " build_fieldcatalog
*& Form create_final_table_structure
FORM create_final_table_structure USING p_it_fieldcat.
Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = t_table.
ASSIGN t_table->* TO <ft_final>.
ENDFORM. " create_final_table_structure
*& Form create_excel_header
FORM create_excel_header USING p_p_fieldname.
DATA : ls_header LIKE LINE OF it_header.
CLEAR ls_header.
ls_header-col_name = p_p_fieldname.
APPEND ls_header TO it_header.
ENDFORM. " create_excel_header
*& Form prepare_final_data
FORM prepare_final_data .
DATA : l_matnr LIKE g_matnr,
l_werks LIKE g_werks,
l_index LIKE sy-tabix.
FIELD-SYMBOLS : <fs_mard> LIKE LINE OF it_mard.
Getting No. of Lines in IT_MARD internal table
DESCRIBE TABLE it_mard LINES g_lines.
LOOP AT it_mard ASSIGNING <fs_mard>.
l_index = sy-tabix.
IF l_matnr IS INITIAL.
l_matnr = <fs_mard>-matnr.
CLEAR : l_werks.
l_werks = <fs_mard>-werks.
UNASSIGN : <fs_value>, <fs_final>.
Create dynamic work area and assign to FS
CREATE DATA t_line LIKE LINE OF <ft_final>.
ASSIGN t_line->* TO <fs_final>.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mard>-matnr.
ASSIGN COMPONENT l_werks OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_value> + <fs_mard>-labst.
getting Article Type,MC & its Descriptions
PERFORM get_other_data USING l_matnr
l_werks.
ELSEIF l_matnr <> <fs_mard>-matnr.
APPEND <fs_final> TO <ft_final>.
CLEAR l_matnr.
l_matnr = <fs_mard>-matnr.
CLEAR : l_werks.
l_werks = <fs_mard>-werks.
UNASSIGN : <fs_value>, <fs_final>.
Create dynamic work area and assign to FS
CREATE DATA t_line LIKE LINE OF <ft_final>.
ASSIGN t_line->* TO <fs_final>.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mard>-matnr.
ASSIGN COMPONENT l_werks OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_value> + <fs_mard>-labst.
getting Article Type,MC & its Descriptions
PERFORM get_other_data USING l_matnr
l_werks.
ELSE.
CLEAR : l_werks.
l_werks = <fs_mard>-werks.
ASSIGN COMPONENT l_werks OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_value> + <fs_mard>-labst.
ENDIF.
IF l_index = g_lines.
APPEND <fs_final> TO <ft_final>.
ENDIF.
ENDLOOP.
l_table = '<ft_final>[]'.
ENDFORM. " prepare_final_data
*& Form get_other_data
FORM get_other_data USING p_l_matnr
p_l_werks.
FIELD-SYMBOLS : <fs_mara> LIKE LINE OF it_mara,
<fs_t023t> LIKE LINE OF it_t023t,
<fs_t134t> LIKE LINE OF it_t134t,
<fs_makt> LIKE LINE OF it_makt.
READ TABLE it_mara ASSIGNING <fs_mara> WITH KEY matnr = p_l_matnr. " BINARY SEARCH.
IF sy-subrc = 0 AND <fs_mara> IS ASSIGNED.
ASSIGN COMPONENT 'MTART' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mara>-mtart.
ASSIGN COMPONENT 'MATKL' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_mara>-matkl.
READ TABLE it_makt ASSIGNING <fs_makt> WITH KEY matnr = <fs_mara>-matnr BINARY SEARCH.
IF sy-subrc = 0 AND <fs_makt> IS ASSIGNED.
ASSIGN COMPONENT 'MAKTX' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_makt>-maktx.
ENDIF.
READ TABLE it_t023t ASSIGNING <fs_t023t> WITH KEY matkl = <fs_mara>-matkl BINARY SEARCH.
IF sy-subrc = 0 AND <fs_t023t> IS ASSIGNED.
ASSIGN COMPONENT 'WGBEZ' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_t023t>-wgbez.
ENDIF.
READ TABLE it_t134t ASSIGNING <fs_t134t> WITH KEY mtart = <fs_mara>-mtart BINARY SEARCH.
IF sy-subrc = 0 AND <fs_t134t> IS ASSIGNED.
ASSIGN COMPONENT 'MTBEZ' OF STRUCTURE <fs_final> TO <fs_value>.
<fs_value> = <fs_t134t>-mtbez.
ENDIF.
ENDIF.
ENDFORM. " get_other_data
*& Form display_data
text
FORM display_data USING p_l_table
p_l_fcat.
DATA:
Variable for Object Creation
o_report TYPE REF TO lcl_report.
CREATE OBJECT o_report.
o_report->display( EXPORTING l_table = p_l_table
l_fcat = p_l_fcat ).
ENDFORM. " display_dataI don't know how to read the code you pasted or I would have checked this myself.
Do your fields in the internal table reference dictionary objects or elementary types? If not using dictionary types, the column names will be blank by default. If you can't change your fields to be dictionary types, you can try this to change the column names:
I made a method inside my local class to add the names:
call method set_colname
EXPORTING iv_tab = alv_tab
iv_colid = 'xxxx' "fieldname from the table
iv_stxt = text-t54
iv_mtxt = text-t55
iv_ltxt = text-t55.
METHOD set_colname .
data:
alv_cols type REF TO cl_salv_columns_table,
alv_col type REF TO cl_salv_column.
TRY .
*... Change fieldnames
call METHOD iv_tab->get_columns RECEIVING value = alv_cols.
call method alv_cols->get_column EXPORTING columnname = iv_colid RECEIVING value = alv_col.
IF iv_stxt <> ''.
CALL METHOD alv_col->set_short_text EXPORTING value = iv_stxt.
ENDIF.
IF iv_mtxt <> ''.
CALL METHOD alv_col->set_medium_text EXPORTING value = iv_mtxt.
ENDIF.
IF iv_ltxt <> ''.
CALL METHOD alv_col->set_long_text EXPORTING value = iv_ltxt.
ENDIF.
CATCH cx_salv_not_found.
ENDTRY.
ENDMETHOD. "set_colname -
How to handle Events in Blocked ALV report
Hi All,
I have a Blocked ALV report, I have a requirement where if I double click a row in blocked ALV report, it should branch off to MM01 transaction code and the material number and change number should get populated with the material number and change number in my program.
Is there any idea how to do this.
Thanks,
Vishal.hi anil,
I have used user_command1 as the function module however the field details are not getting captured.
How can we use set get parameters in this aspect.
Please elaborate your answer.
Thanks,
Vishal. -
What are the standard bex analyzer reports available?
hi all
what are all the std reports available for fico? sd and mm?
thanxs in advance
regds
hariHi,
This is the best way...and the simplest way....since it is a big question....just go Business content tab in RSA1 and there go to "query elements" option and cick on the option "select objects" this will give you all the standata BW queris based on all the BC cubes and it will not show self developed queries in you system.
So fo MM reports go to...Infoarea "Supply Chain Management"-> "Inventory Management"....here you will see all the cubes related to MM and the reports nased on that.
for FICO go to Infoarea FMCO Financial management and controlling.........
Similarly you can find for SD.
If you want to find the detailed information about all the queries .....you will have to search the help.sap.com witth the same name of the cubes and you will get various links explaining that.
Thanks -
What are new features of interactive reporting in hyperion 9.3 release
hi
what are new features of hyperion system 9.3 interactive reporting over hyperion system 9.Here is a link to Reporting and Analysis New Features pdf for 9.3
http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/hs_new_features.pdf
Brian Chow -
This might be a very basic question but I'm having trouble grasping the concept of events in iPhoto '08. I already have my iPhoto library (the previous version) organized into what I'd call "events" -- for example, a recent trip to colorado is called 2007-07-Colorado. This keeps everything sorted by date and then by special, uh, events. Will the new version destroy this architecture I've worked hard to build and maintain?
Events are similar to albums -- but there are some big differences.
Albums aren't automatically created. You have to make the album and drag pictures into it. You could also create 'smart albums', but even then you'd have to make the smart album and then define the rules used to determine which photos belong to it. Either way, the creation of the album hinges on you manually doing something.
Events don't rely on you doing anything special to organize them -- and this is really the biggest difference between events and albums. The assumption is that when you use your digital camera for some real-life activity, you'll probably import the pictures when you're done. This means that all the pictures you imported probably belong together. iPhoto calls this an "event". It makes a new iPhoto event (you get to pick a name for it) each time you import pictures from your camera. As a result, your library automatically has at least some organization to it -- even if you're not the sort of person who is good at organizing information and would never have manually created albums and/or sorted your photos. This makes things easier to find later because the photos aren't all just piled in one really big photo library that gets harder to search as it grows.
Events don't conflict with albums. You can still drag things into albums. Photos can belong to multiple albums at the same time and still also belong to the original event. Events assume that all the pictures in the iPhoto event are somehow related to each other because they were taken at the same real-life activity. Albums don't assume anything about their contents -- other than you decided to put the picture in the album.
If iPhoto is ever wrong about categorizing photo events, you can always correct it. You can split events. Say you took some photos at some real-life activity, then never bothered to use your camera for several weeks, then took more photos at a different real-life activity, THEN decided it was time to import all your photos. iPhoto would believe all the photos were from a single event because they would have been imported at the same time. You can just pick the first picture from the 2nd real-life event and click the 'split' icon -- iPhoto will then break the event into two events at the point you specified. You can also merge separate events back together again.
Another big difference is the way in which pictures in an event can be displayed vs. pictures in an album. iPhoto allows you to go to the 'events' view (at the top left side of the iPhoto window) and it will show all the all the events you have the libary at the same time (you can scroll the list). It only shows the 'Key' photo in each event. By default this is the first photo from the event, but you can set it to any photo in the event. If you slowly pan your mouse across the event, it'll flip through a thumbnail of every photo in that event. It's a great way to scan the event without having to click the event to open it's contents. Instead of viewing your libary as thousands of thumbnails, you just see a few dozen thumbnails -- it just displays the 'key' photo for each event and hides the rest until you mouse-over the event or click it to open it and view all the photos. Albums, in contrast, can only be viewed by clicking the album name at the left side of the iPhoto window to view the individual photos in the album. This makes it a LOT easier to scan photos using the 'Library Events' view than either the 'Libary Photos' view or even the individual Album views.
Events is a way of saving you from frustration as your photo library grows into the thousands of pictures.
Regards,
Tim -
What are option for cloud based Reporting?
Could you verify that Reporting Services and Performance Point Service cannot be used with O365?
Is it so that have basically two option to implement Microsoft based reporting portal on Cloud? 1) SQL Server on Azure VM 2) Power BI on O365.
Kenny_IHi Kenny_I,
All Office 365 plans include the SharePoint Online service, but not all plans support all SharePoint features. And based on my research, Reporting Services and PerformancePoint Service are not supported in Office 365. For more details, we can refer to the
following article:
http://technet.microsoft.com/en-us/library/sharepoint-online-service-description.aspx
If we want to create reports, we can use Power View feature in Power BI. But the PerformancePoint Services is a SharePoint Server service application, and it only supported in SharePoint Server 2010 Enterprise or SharePoint Server 2013 Enterprise. So we
cannot use it on cloud.
Hope this helps.
Thanks,
Katherine Xiong
If you have any feedback on our support, please click here.
Katherine Xiong
TechNet Community Support -
What are Events in NWDS Enterprise Service Repository Perspective?
Hello Experts,
does anyone have further information about the artefact "Events" in the context of the attached picture?
As far as I know is it not the same as the events in process modelling. Furthermore you can't create an object of the type "Events".
When I'm accessing the ESR with the swing client there is no object like an Event (I've checked all subcategories).
Thanks in advance and best Regards
PatrickHi Holger,
It is running with PI.
A detailed description of the error as follows:
503 Service not available
Error: -6
Version: 7011
Component: ICM Java
Date/Time: Tue Apr 26 06:19:18 2011
Module: http_j2ee2.c
Line: 769
Server: gblonxi01_XI1_00
Error Tag: {-}
Detail: ICM running but no server with HTTP connected
Thank you.
Regards,
Haridev
Maybe you are looking for
-
At a loss with my Galaxy battery Problems. If you can help you are awesome
So about 2 months ago my Galaxy 1's battery got really low but when I plugged it into charge it it said "Use genuine battery only. Shutting down in 10, 9, 8, ...ect..." After calmly trying to explain to the phone that the battery it had was the one
-
Photos not showing up in my photo stream on my computer.
My photos are in the "cloud" on my iphone and ipad, but the last photos showing up on my computer (not a mac) was October 11. I haven't changed any settings, I've done manual back ups, but nothing seems to work. Anything I could try?
-
this is my problem Adobe ShareOnBehance 1.0.3 There was an error installing this update. Please quit and try again later. Error Code: U44M1I200 Photoshop Camera Raw 8.4.1(CC) There was an error downloading this update. Please quit and try again later
-
Fully qualified database object names
Is there a method to determine the fully qualified name of a database object such as a table or procedure? At the moment I compute this from the catalog and schema identifiers but I am hoping there is a more direct way. Thanks, KP
-
Hi, I read somewhere "Business Catalyst does have plans to develop functionality that will allow templates to be transferred across data centres, but that is not currently available" Is this true and does anyone have an idea of whether this is on the