WHAT ARE EVENTS IN A CLASSICAL REPORT ?
WHAT ARE EVENTS IN A CLASSICAL REPORT ? PLEASE EXPLAIN THEM ?
BEST REGARDS
RYAN
When 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
Similar Messages
-
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,
RYANEvents 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. -
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 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 -
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 -
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 a few iPod Classic Specs?
I have gotten little or no help from Apple Store employees. They are not all Geniuses. Does the iPod Classic contain a hard drive or flash drive? Is it able to play gapless tracks as they are intended or will there still be gaps betwen the tracks? That's all I want to know. Thanks to anyone who can answer these simple questions.
It's difficult to believe that an Apple Store employee was unable to confirm that the Classic has a hard drive. But, as Niel has already said....
As for your question about gapless music, I'm less surprised that they were unable to answer that one.
I have an observation about the Classic's ability with gapless music. My Classic, (admittedly, an older one from 2007, running 1.1.2 PC of the software) tends to break the music bretween tracks the first time it's played, but from then on, will play tracks without that gap.
The current Classic runs a different version of the software, so one would hope that Apple has removed that glitch from it.
I suggest that if you know anyone with a recent Classic, that you ask them for their experience. If necessary, load a gapless album onto their iPod and test it for yourself. -
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 -
*what are the step by step events trigger in interactive report*
Hi gurus,
pls explain event by event triggers in interactive report.
points will be rewarded.
Thanks,
Balakrishna.Hi,
Interactive reporting allows the user to participate in retrieving and presenting data at each level during the session. Instead of presenting one extensive and detailed list with cluttered information, with interactive reporting you can create a condensed basic list from which the user can call detailed information by positioning the cursor and entering commands.
Detailed information is presented in secondary lists. A secondary list may either overlay the basic list completely or appear in an additional dialog window on the same screen. The secondary list can itself be interactive again. The basic list is not deleted when secondary list is created.
User can interact with the system by:
u2022 Double clicking or pressing F2
u2022 Selecting menu option
Like classical report, the interactive report is also event driven. Both the action mentioned above trigger events and code is written to handle these events. The events triggered by this action are as follows:
u2022 At line-selection
u2022 At user-command
u2022 Top-of-Page During Line-Selection for Secondary Page Header info
Interactive report consists of one BASIC list and 20 secondary list. Basic list is produced by START-OF-SELECTION event. When the user double clicks on the basic list or chooses the menu option, the secondary list is produced. All the events associated with classical report except end-of-page are applicable only to basic list.
AT LINE-SELECTION event
Double clicking is the way most users navigate through programs. Double clicking on basic list or any secondary list triggers the event AT LINE-SELECTION. SY-LSIND denotes the index of the list currently created. For BASIC list it is always 0. Following piece of code shows how to handle the event.
Start-of-selection.
Write: / u2018this is basic listu2019.
At line-selection.
Write : u2018this is first secondary listu2019.
In this case the output will be displayed on basic list i.e.
This is basic list.
When user double clicks on this line, the event at line-selection gets triggered and secondary list is produced, i.e. This is first secondary list.
You can go back to basic list by clicking on F3 or back icon on the standard tool bar. For this list, the value of sy-lsind will be 1.
HIDE technique
In this case thins are much simpler. Consider the case, wherein you display fields from table sflight in basic list. When user double clicks on any sflight-carrid, you are displaying the detailed information related to that particular carrid on secondary list. Hence there is a need to store the clicked carrid in some variable. So that you can access this carrid for next list. ABAP/4 has facility; a statement called HIDE, which provides the above functionality.
HIDE command temporarily stores the content of clicked field in system area.
Syntax:
HIDE <FIELDS>.
This statement stores the contents of variable <f> in relation to the current output line (system field SY-LINNO) internally in the so-called HIDE area. The variable <f> must not necessarily appear on the current line.
You have to place the HIDE statement always directly after the output statement i.e., WRITE for the variable <f>. As when you hide the variable, control is passed to next record. While writing, WRITE statement takes that record from header and writes it on to the list, but when writing onto your interactive list you will miss out 1st record.
To hide several variables, use chain HIDE statement.
As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored. A line can be selected.
u2022 By an interactive event.
For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.
The HIDE area is a table, in which the system stores the names and values of all HIDE fields for each list and line number. As soon as they are needed, the system reads the values from the table. (Please try to find the name of this table.)
Sy-lsind indicates the index of the list and can be used to handle all the secondary lists. When the user double clicks on the line or presses F2, sy-lsind is increased by one and this new sy-lsind can be handled. For example:
Write: / u2018this is basic listu2019.
u2022 Will create a basic list.
If sy-lsind = 1.
Write: / u2018this is first secondary listu2019.
Elseif sy-lsind = 2.
Write: / u2018This is second secondary listu2019.
Endif.
When this code is executed,
u2022 Basic list is produced.
u2022 When the user clicks on the basic list, sy-lsind becomes one.
u2022 AT LINE-SELECTION event is triggered.
u2022 Whatever is written under IF Sy-lsind = 1, gets executed.
u2022 Secondary list is produced.
u2022 Again if user clicks on this list, sy-lsind becomes two.
u2022 AT LINE-SELECTION gets triggered.
u2022 Code written under IF Sy-lsind = 2, gets executed.
A sample program for AT LINE-SELECTION.
AT USER-COMMAND
When the user selects the menu item or presses any function key, the event that is triggered is AT USER-COMMAND, and can be handled in the program by writing code for the same. The system variable SY-UCOMM stores the function code for the clicked menu item or for the function key and the same can be checked in the program. Sample code would look like
AT USER-COMMAND.
Case sy-ucomm.
When u2018DISPu2019.
Select * from sflight.
Write sflight-carrid, sflight-connid.
Endselect.
When u2018EXITu2019.
LEAVE.
If GUI status, suppose you have set menu bar for two items and the function code is u2018DISPu2019 and u2018EXITu2019 respectively. If the user clicks the menu item u2018DISPLAYu2019, then function code u2018DISPu2019 is stored in the sy-ucomm and whatever is written under the when u2018DISPu2019, gets executed. This is applicable for EXIT as well.
Sy-lsind for the screen increases when the user clicks the menu item.
Usually you have combination of all the three navigations in your user interface, i.e., you have to create menu bar, assign function code for the function keys and write code to handle all this in addition to handling double clicking.
Things to remember while using all the combinations:
u2022 Sy-lsind increases even if you select menu-item.
u2022 When the user double clicks on particular line, value of sy-ucomm is u2018PICK.
u2022 If you set sy-lsind = 2 for your 4th secondary list, when control is transferred to the 2nd secondary list, all the other lists after 2nd are lost or memory allocated to them is lost.
u2022 Sy-lisel also gives you the value of clicked line but in this case you cannot differentiate between field. To retrieve the exact field, you have to know the field length of each field.
u2022 If you use statement SY-LSIND = 1.
The system reacts to a manipulation of SY-LSIND only at the end of an event, directly before displaying the secondary list. So, if within the processing block, you use statements whose INDEX options access the list with the index SY-LSIND, make sure that you manipulate the SY-LSIND field only after processing these statements. The best way is to have it always at the `as the last statementu2019 of the processing block.
Regards,
Bhaskar
Maybe you are looking for
-
Inserting Record in a Z-Table during CS01 / CS02
Dear Sir, We have a requirement that in Tcode CS01 / CS02 , for all new Records which are being created , we want that information like STLNR ,Itemcode and Quantity also must be posted in Z-Table . We are maintaining the Z-Table for history purpose
-
How do I save emails in folders on my iPad
How do I create folders to save emails and attachments in my iPad 2. What I use briefcases and folders for on my pc.
-
I recieved a gotality heart monitor accessory and my iPhone doesn't read the accessory when attached to phone. The accessory works on my friends iPhone 4, so the accessory works. I restored my phone and cleaned out the 30 pin jack and still no luck.
-
Bug in Page Turn transition?
I copied and burned a photo slideshow with music from iPhoto. There were 237 pics. I used random transitions. Ken Burns Effects were off. Everything looks great except that just prior to the page turn transition, the picture fades for a half second o
-
Interactive Report actions don't work for users (i.e. for non-developers)
I've Interactive Reports that work fine in development. But when I or other users run it in non-development mode, no feature or actions (sorting, filtering, select columns, aggregate, etc.) work. At run time (going directly to the URL ...apex/f?p=APP