JTabbedPane Pane selection event?
JTabbedPane pane = new JTabbedPane();
pane.setSelectedIndex(0);
//Can you tell me which event is fired ...when i selected a pane..
by using setSelectedIndex....
yes....
i did add this listener....but initially when i set the selectedTabIndex to 0
it wasn't firing the event ......
so i added
pane.setSelectedIndex(-1);
pane.setSelectedIndex(0);
and it started working fine.
Similar Messages
-
Not able to reach start of selection event in the called program
hi,
I have a report 1 in which i am calling report2 using below syntax,
SUBMIT Report2 VIA JOB gv_jobname NUMBER gv_jobcount
WITH s_g_yr IN s_g_yr
WITH s_c_rf IN s_c_rf
AND RETURN.
the problem is when report 2 is called it exists after event "at selection screen output" and does not go in the event "start of selection".
Please advise. how can i reach the "start of selection" event where all the processing logic is specified..
Thanks and Regards,
KritiHi,
In your report you have used the event AT SELECTION-SCREEN OUTPUT. So, first it will trigger this event and then it will go for START-OF-SELECTION event.
Events will trigger in this following way.
LOAD PROGRAM
INITIALIZATION
AT SELECTION-SCREEN
AT SELECTION-SCREEN OUTPUT
START-OF-SELECTION
END-OF-SELECTION
TOP-OF-PAGE
END-OF-PAGE
In above sequence events will trigger in report.
Regards,
Shankar. -
[JS/CS4/CS5] Catching a selection event in a ScriptUI interface.
I've got this ScriptUI interface (javascript based), and now I wonder if it would be possible to change one of its button captions depending on whether anything is selected or not, in the active document (would also have to be updated if the user selects or opens another document).
1. Is it possible to write event listeners for this?
2. Would it be possible to include this in the same script as the rest of the Script UI interface code (that is, I'd prefer avoiding a separate file in the startup folder).
3. What's the best source of information regarding events, which ones there are, and how to handle them in javascript?
Andreas1. Yes. The selection events work well in my experience.
2. Yes, you don't have to add them at startup. You can do something like:
app.addEventListener("afterSelectionChanged", selectionChangedFunction);
before you open your window. Remove the listener in the onClose event of the window. I think you'll have to have some error trapping in the selectionChangedFunction to deal with app.selection erroring after a document close or during a revert.
3. See this thread for an extension that lets you see events as they're happening.
Jeff -
Finding selected event in iCal
I want to run a script that processes the currently selected iCal event / todo. (sync it with a Filemaker DB).
I cant find a command that returns the selected/current/active iCal object. I can only find an object one with a given property value.
I'm a bit new to this so any pointers would be greatly appreciated.
OTBCHi OTBC,
I was waiting for someone to post something Apple maight have added in newer versions of iCal, but I guess they didn't add anything.
There is no selection property in iCal, but you can create macro like statements to script applications. So, as a wrokaround in iCal, you could use keystrokes to get the name of the currently selected event.
tell application "iCal" to activate
tell application "System Events"
tell process "iCal"
keystroke return
keystroke "c" using command down
end tell
end tell
This would copy the summary of to selected event. You could tab to tab through the information for the event. This might help you pinpoint the event in the case where there are several events with the same summary. Like a macro you would have to test it out in iCal to find the right combination of keystroke and ui scripting.
Note that it is very hard to get recurrence events.
gl, -
I recently updated to Yosemite 10.10.1. Since I updated I can no longer upload photos to eBay, Shutterfly, Craigslist by selecting "events". It is no longer an option.
All my photos come up as one entire library. When I view them in iPhoto they are divided into events, however once I go to upload them the entire library appears without any defining options, such as "events", recent imports, etc. I thought at first this might be an issue with eBay, but realized it wasn't when I tried to list on Craigslist. This is a nuisance and time consuming process. Does anyone know if there is a fix in the future or if I am just missing some quick fix?I would like to add that Comcast is my internet provider. Perhaps that is part of the issue although the Connection Doctor confirms the mail box is connecting to the internet. No other function processes when Connection Doctor program is used to find the source of the issue. I have read forum posts but am unable to find a way to get my Apple mail to be delivered to my computer. It worked fine up until I chose to transfer mail to the Cloud. My mail account is a .mac account.
Still hoping someone out there can help me.
thanks,
anne -
Error in at line-selection event...
Hello experts,
In my report, I am hiding the values of BUKRS, ANLN1 and ANLN2 during my loop.
I am using field symbols as my work area for my itab which is it_output. The problem
is, when I try to do this in my at line-selection event:
at line-selection.
data: cursorfield(20) type c.
get cursor field cursorfield.
case cursorfield.
when '<FS_OUTPUT>-ASSET_SUBNUM'.
SET PARAMETER ID 'BUK' FIELD <FS_OUTPUT>-bukrs.
SET PARAMETER ID 'AN1' FIELD <FS_OUTPUT>-asset.
SET PARAMETER ID 'AN2' FIELD <FS_OUTPUT>-anln2.
endcase.
It says that it can't recognize the fields. What am I doing wrong? By the way, I am using
ABAP Objects in my report. Help would be greatly appreciated. Thanks again guys and take care!Hi Viraylab,
Have you assigned the fieldsymbols ?
ASSIGN IT_OUTPUT to <FS_OUTPUT>.
Cheers
VJ
Message was edited by: Vijayendra Rao -
Using select event for interlayer navigation
Hi All,
I have two tables. The output of first table is input for the second one. When I select a row in the first table,the SELECT event is fired and the second table is populated based on the selection.
Now I have a scenario where the two tables are on separate layers. My requirement is that, the secondlayer should be brought in when the SELECT event is fired. I don't want to use a button to trigger a navigation event. I try naming the navigation event as SELECT but it didn't work.
please helpHi Jarrod,
Yes your view i sright. But i had mistakingly mentioned a table. Its Bar chart actually. When a bar is clicked, second layer should appear with the detail table ouput.
Though the table is filled with the click but the navigation is not happeneing. Do you have any idea abouit it ?
I have used *select also but to no avail -
Select event not triggered in table with only one row
Hi all,
I am building a BI VC application where query data is displayed in a table. When the user clicks on a table row another query is then triggered and output in a second table. The output from table 1 is linked to the input of query2/table2 with a select event.
The problem that I am facing is that if there is only one row in table 1, the select event is never triggered. If, however there are two or more rows in the table the select event is triggered and query 2 is executed. I have searched the forums but all I could find on select event problems was how to avoid the initial select event.
Has anyone else experienced this issue and what is the workaround or is this a bug in Visual Composer? We are on VC 7.0 SP19.
Cheers,
Astein MelandThanks Chittya,
Yes we have considered this option as well. But as we have more than one table linked together we would like to avoid having to manually click several buttons.
In the end I found Note 1364334 describing bugfixes released in VC 7.0 SP20:
"Normally, when a Visual Composer table is populated from a data service, the first row is selected by default. However, we have found that if only one data row is returned from the data service, this row is not selected by default and cannot be manually selected by clicking on it either."
So I think we will just have to upgrade our Portal to the latest support packs to solve this problem.
Thanks,
Astein -
What is the use of "end of selection" event in report
Hi all
As we can display the outputs in the "start-of-selection "using the write statement.
Then what is the use of "end-of-selection" in reports.
Please tell me with some real tiem examples.
God points will be rewarded.
ThanksHi,
The END-OF-SELECTION event is triggered in type executable programs once the logical database has finished reading all data and before the list processor is started.
It tells the server that all the database reading is completed and no further reading is going to take place..
For more details go through the following link:
http://help.sap.com/saphelp_me21sp2/helpdata/en/9f/db9aca35c111d1829f0000e829fbfe/content.htm
END-OF-SELECTION is used mostly when you are using Logical data base in your report. It is triggered when all selection get finished from the data base.
You can use write statments in start of selection and end of selection also.
But the one use of end of selection is... if you want to stop the processing of a certain code and directly display some message you can use this.
start-of-selection.
select data..
process data
if no data .
stop.
endif.
write data
end-of-selection.
write : 'No data to display.
Stop command will take the control to end of selection event.
thanks,
mahesh
Message was edited by:
I Can Solve It -
Proper use of END-OF-SELECTION event in report programme
Hi,
If we will write "WRITE" statements in side START-OF-SELECTION then it will help me to display the output.Then what is the need of END-OF-SELECTION .
Can any body please tell me the <b>proper use of END-OF-SELECTION event in report programme.</b>This is the last of the events called by the runtime environment to occur. It is triggered after all of the data has been read from the logical database, and before the list processor is started.
<b>In report programs using LDB for every value selected the program issues the output, to control this you would use END-OF-SELECTION.</b> Now if you call your output in this event, the output is made only after all the values are selected as per the selection criteria.
suppose while coding, u need a logic like below:
if a condition is satisfied continue with the report
and if not satisfied, then display a message and end the report.
then u can code like below.
start-of-slection.
if a = <condition>.
do the following.......
else.
stop.
end-of-selection.
write: 'THIS IS END'.
stop command triggers end-of-slection from anywhere.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers -
"AT LINE-SELECTION" event in a Query (SQ01 or SQ02)
Hi there
I want to know if it's possible to put "AT LINE-SELECTION" event in an ABAP Query? I'm trying that in SQ02 - the infoset - but nothing happens when I double-click on the output lines. I cannot find any place to type codes in SQ01.
The purpose is to call a transaction VA03 when people double-click on the output field "sales order number" and here is the code I put in "Free coding" section of SQ02.
AT LINE-SELECTION.
DATA: w_cucol TYPE sy-cucol.
w_cucol = sy-cucol + sy-staco.
w_cucol = w_cucol - 2.
IF w_cucol BETWEEN 103 AND 119.
SET PARAMETER ID 'AUN' FIELD vbkd-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
yuHi ,
You must create infoset based on join VBKD with VBAK and LIPS.
Also you must put VBAK-VBELN and LIPS-VBELN as a column output.
There is no problem to use 2 report assignment ( there is no loss ).
There is no necessity to use " some ABAP code at line-selection ".
This works.
By the way is more correct from the beginning to formulate the issue including all the data about your problem and not include them by adding a little at a time.
Regards. -
AT LINE SELECTION EVENT IN BLOCKED ALV
hi friends,
i have developed blocked alv report.
i wanted to use at line selection event..
pls halp me if u know..
thanks and regards,
shridevi.lhi
there is no particulat at line selection event in REUSE_ALV_EVENTS_GET.
at line selection we get fct 'PICK' code for double click.
so using that fct code we do the operations using at user_command. which is other way of implemnting at line-selection
If any quieries revert, reward if helpful
Try this code
*& Report ZP_ALV8
REPORT zp_alv8.
TABLES: kna1, mara, vbak, mard.
TYPE-POOLS: slis.
**TYPE DECLERATION
TYPES: BEGIN OF ty_kna1,
kunnr LIKE kna1-kunnr,
land1 LIKE kna1-land1,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
END OF ty_kna1.
TYPES: BEGIN OF ty_mara,
matnr LIKE mara-matnr,
ersda LIKE mara-ersda,
ernam LIKE mara-ernam,
END OF ty_mara.
TYPES: BEGIN OF ty_vbak,
vbeln LIKE vbak-vbeln,
erdat LIKE vbak-erdat,
ernam LIKE vbak-ernam,
END OF ty_vbak.
TYPES: BEGIN OF ty_mard,
matnr LIKE mard-matnr,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
END OF ty_mard.
**DATA DECLERATION
DATA: it_kna1 TYPE STANDARD TABLE OF ty_kna1,
wa_kna1 TYPE ty_kna1.
DATA: it_mara TYPE STANDARD TABLE OF ty_mara,
wa_mara TYPE ty_mara.
DATA: it_vbak TYPE STANDARD TABLE OF ty_vbak,
wa_vbak TYPE ty_vbak.
DATA: it_mard TYPE STANDARD TABLE OF ty_mard,
wa_mard TYPE ty_mard.
DATA: it_fieldcat_kna1 TYPE slis_t_fieldcat_alv,
wa_fieldcat_kna1 TYPE slis_fieldcat_alv,
it_fieldcat_mara TYPE slis_t_fieldcat_alv,
wa_fieldcat_mara TYPE slis_fieldcat_alv,
it_fieldcat_vbak TYPE slis_t_fieldcat_alv,
wa_fieldcat_vbak TYPE slis_fieldcat_alv,
it_fieldcat_mard TYPE slis_t_fieldcat_alv,
wa_fieldcat_mard TYPE slis_fieldcat_alv.
DATA: it_event_kna1 TYPE slis_t_event,
wa_event_kna1 TYPE slis_alv_event,
it_event_mara TYPE slis_t_event,
wa_event_mara TYPE slis_alv_event,
it_event_vbak TYPE slis_t_event,
wa_event_vbak TYPE slis_alv_event,
it_event_mard TYPE slis_t_event,
wa_event_mard TYPE slis_alv_event.
DATA: wa_layout TYPE slis_layout_alv,
it_listheader TYPE slis_t_listheader,
wa_listheader TYPE slis_listheader.
selection-screen begin of block b1 with frame title text-001.
select-options: s_kunnr for kna1-kunnr default '1000' to '1050'.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
select-options: s_matnr for mara-matnr default '1' to '100'.
selection-screen end of block b2.
**INITIALIZATION
INITIALIZATION.
PERFORM layout.
PERFORM fieldcat_kna1.
PERFORM fieldcat_mara.
PERFORM event_kna1.
PERFORM event_mara.
PERFORM eventpopulate_kna1.
PERFORM eventpopulate_mara.
**START OF SELECTION AND FIRST LIST DISPLAY
START-OF-SELECTION.
SELECT kunnr land1 name1 ort01
FROM kna1
INTO TABLE it_kna1
where kunnr in s_kunnr.
UP TO 10 ROWS.
SELECT matnr ersda ernam
FROM mara
INTO TABLE it_mara
where matnr in s_matnr.
UP TO 20 ROWS.
PERFORM display.
**FORM LAYOUT
*& Form layout
text
--> p1 text
<-- p2 text
FORM layout .
wa_layout-zebra ='X'.
wa_layout-get_selinfos = 'X'.
wa_layout-key_hotspot = 'X'.
ENDFORM. " layout
*FIELD CATALOUGE*******************************
*& Form fieldcat_kna1
text
--> p1 text
<-- p2 text
FORM fieldcat_kna1 .
REFRESH it_fieldcat_kna1.
CLEAR wa_fieldcat_kna1.
wa_fieldcat_kna1-fieldname = 'KUNNR'.
wa_fieldcat_kna1-seltext_l = 'CUSTOMER NUMBER'.
wa_fieldcat_kna1-datatype = 'CHAR'.
wa_fieldcat_kna1-outputlen = 30.
wa_fieldcat_kna1-tabname = 'IT_KNA1'.
wa_fieldcat_kna1-key = 'X'.
wa_fieldcat_kna1-hotspot = 'X'.
wa_fieldcat_kna1-col_pos = 1.
wa_fieldcat_kna1-emphasize = 'C21'.
APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1.
CLEAR wa_fieldcat_kna1.
wa_fieldcat_kna1-fieldname = 'LAND1'.
wa_fieldcat_kna1-seltext_l = 'COUNTRY CODE'.
wa_fieldcat_kna1-datatype = 'CHAR'.
wa_fieldcat_kna1-outputlen = 30.
wa_fieldcat_kna1-tabname = 'IT_KNA1'.
wa_fieldcat_kna1-hotspot = 'X'.
wa_fieldcat_kna1-col_pos = 2.
wa_fieldcat_kna1-emphasize = 'C31'.
APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1.
CLEAR wa_fieldcat_kna1.
wa_fieldcat_kna1-fieldname = 'NAME1'.
wa_fieldcat_kna1-seltext_l = 'CUSTOMER NAME'.
wa_fieldcat_kna1-datatype = 'CHAR'.
wa_fieldcat_kna1-outputlen = 30.
wa_fieldcat_kna1-tabname = 'IT_KNA1'.
wa_fieldcat_kna1-hotspot = 'X'.
wa_fieldcat_kna1-col_pos = 3.
wa_fieldcat_kna1-emphasize = 'C71'.
APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1.
CLEAR wa_fieldcat_kna1.
wa_fieldcat_kna1-fieldname = 'ORT01'.
wa_fieldcat_kna1-seltext_l = 'COUNTRY '.
wa_fieldcat_kna1-datatype = 'CHAR'.
wa_fieldcat_kna1-outputlen = 30.
wa_fieldcat_kna1-tabname = 'IT_KNA1'.
wa_fieldcat_kna1-hotspot = 'X'.
wa_fieldcat_kna1-col_pos = 4.
wa_fieldcat_kna1-emphasize = 'C51'.
APPEND wa_fieldcat_kna1 TO it_fieldcat_kna1.
CLEAR wa_fieldcat_kna1.
ENDFORM. " fieldcat_kna1
*& Form fieldcat_kna2
text
FORM fieldcat_mara .
wa_fieldcat_mara-fieldname = 'MATNR'.
wa_fieldcat_mara-seltext_l = 'MATERIAL NUMBER'.
wa_fieldcat_mara-datatype = 'CHAR'.
wa_fieldcat_mara-outputlen = 30.
wa_fieldcat_mara-tabname = 'IT_MARA'.
wa_fieldcat_mara-key = 'X'.
wa_fieldcat_mara-hotspot = 'X'.
wa_fieldcat_mara-col_pos = 1.
wa_fieldcat_mara-emphasize = 'C21'.
APPEND wa_fieldcat_mara TO it_fieldcat_mara.
CLEAR wa_fieldcat_mara.
wa_fieldcat_mara-fieldname = 'ERSDA'.
wa_fieldcat_mara-seltext_l = 'CREATED ON'.
wa_fieldcat_mara-datatype = 'CHAR'.
wa_fieldcat_mara-outputlen = 30.
wa_fieldcat_mara-tabname = 'IT_MARA'.
wa_fieldcat_mara-hotspot = 'X'.
wa_fieldcat_mara-col_pos = 2.
wa_fieldcat_mara-emphasize = 'C41'.
APPEND wa_fieldcat_mara TO it_fieldcat_mara.
CLEAR wa_fieldcat_mara.
wa_fieldcat_mara-fieldname = 'ERNAM'.
wa_fieldcat_mara-seltext_l = 'CREATED BY'.
wa_fieldcat_mara-datatype = 'CHAR'.
wa_fieldcat_mara-outputlen = 30.
wa_fieldcat_mara-tabname = 'IT_MARA'.
wa_fieldcat_mara-hotspot = 'X'.
wa_fieldcat_mara-col_pos = 3.
wa_fieldcat_mara-emphasize = 'C61'.
APPEND wa_fieldcat_mara TO it_fieldcat_mara.
CLEAR wa_fieldcat_mara.
ENDFORM. "fieldcat_kna2
*& Form FIELDCAT_VBAK
text
FORM fieldcat_vbak.
wa_fieldcat_vbak-fieldname = 'VBELN'.
wa_fieldcat_vbak-seltext_l = 'SALES ORDER'.
wa_fieldcat_vbak-datatype = 'CHAR'.
wa_fieldcat_vbak-outputlen = 30.
wa_fieldcat_vbak-tabname = 'IT_VBAK'.
wa_fieldcat_vbak-hotspot = 'X'.
wa_fieldcat_vbak-col_pos = 3.
wa_fieldcat_vbak-emphasize = 'C31'.
APPEND wa_fieldcat_vbak TO it_fieldcat_vbak.
CLEAR wa_fieldcat_vbak.
wa_fieldcat_vbak-fieldname = 'ERDAT'.
wa_fieldcat_vbak-seltext_l = 'CREATED ON'.
wa_fieldcat_vbak-datatype = 'DATS'.
wa_fieldcat_vbak-outputlen = 30.
wa_fieldcat_vbak-tabname = 'IT_VBAK'.
wa_fieldcat_vbak-hotspot = 'X'.
wa_fieldcat_vbak-col_pos = 3.
wa_fieldcat_vbak-emphasize = 'C41'.
APPEND wa_fieldcat_vbak TO it_fieldcat_vbak.
CLEAR wa_fieldcat_vbak.
wa_fieldcat_vbak-fieldname = 'ERNAM'.
wa_fieldcat_vbak-seltext_l = 'CREATED BY'.
wa_fieldcat_vbak-datatype = 'CHAR'.
wa_fieldcat_vbak-outputlen = 30.
wa_fieldcat_vbak-tabname = 'IT_VBAK'.
wa_fieldcat_vbak-hotspot = 'X'.
wa_fieldcat_vbak-col_pos = 3.
wa_fieldcat_vbak-emphasize = 'C51'.
APPEND wa_fieldcat_vbak TO it_fieldcat_vbak.
CLEAR wa_fieldcat_vbak.
ENDFORM. "FIELDCAT_VBAK
*& Form fieldcat_mard
text
FORM fieldcat_mard.
wa_fieldcat_mard-fieldname = 'MATNR'.
wa_fieldcat_mard-seltext_l = 'MATERIAL NUMBER'.
wa_fieldcat_mard-datatype = 'CHAR'.
wa_fieldcat_mard-outputlen = 30.
wa_fieldcat_mard-tabname = 'IT_MARD'.
wa_fieldcat_mard-hotspot = 'X'.
wa_fieldcat_mard-col_pos = 1.
wa_fieldcat_mard-emphasize = 'C31'.
APPEND wa_fieldcat_mard TO it_fieldcat_mard.
CLEAR wa_fieldcat_mard.
wa_fieldcat_mard-fieldname = 'WERKS'.
wa_fieldcat_mard-seltext_l = 'PLANT'.
wa_fieldcat_mard-datatype = 'CHAR'.
wa_fieldcat_mard-outputlen = 30.
wa_fieldcat_mard-tabname = 'IT_MARD'.
wa_fieldcat_mard-hotspot = 'X'.
wa_fieldcat_mard-col_pos = 2.
wa_fieldcat_mard-emphasize = 'C61'.
APPEND wa_fieldcat_mard TO it_fieldcat_mard.
CLEAR wa_fieldcat_mard.
wa_fieldcat_mard-fieldname = 'LGORT'.
wa_fieldcat_mard-seltext_l = 'STORAGE LOCATION'.
wa_fieldcat_mard-datatype = 'CHAR'.
wa_fieldcat_mard-outputlen = 30.
wa_fieldcat_mard-tabname = 'IT_MARD'.
wa_fieldcat_mard-hotspot = 'X'.
wa_fieldcat_mard-col_pos = 3.
wa_fieldcat_mard-emphasize = 'C81'.
APPEND wa_fieldcat_mard TO it_fieldcat_mard.
CLEAR wa_fieldcat_mard.
ENDFORM . "fieldcat_mard
**FORM DISPLAY
*& Form Display
text
--> p1 text
<-- p2 text
FORM display .
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'.
IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = it_fieldcat_kna1
i_tabname = 'IT_KNA1'
it_events = it_event_kna1
IT_SORT =
I_TEXT = ' '
TABLES
t_outtab = it_kna1
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = it_fieldcat_mara
i_tabname = 'IT_MARA'
it_events = it_event_mara
IT_SORT =
I_TEXT = ' '
TABLES
t_outtab = it_mara
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " Display
**EVENTS FOR KNA1 AND MARA
*& Form EVENT_KNA1
text
--> p1 text
<-- p2 text
FORM event_kna1 .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event_kna1
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " EVENT_KNA1
*& Form EVENT_MARA
text
--> p1 text
<-- p2 text
FORM event_mara .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event_mara
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " EVENT_MARA
**POPULATING EVENTS
*& Form eventpopulate_kna1
text
--> p1 text
<-- p2 text
FORM eventpopulate_kna1 .
READ TABLE it_event_kna1 INTO wa_event_kna1 WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc = 0.
wa_event_kna1-form = 'TOP_OF_PAGE_KNA1'.
MODIFY it_event_kna1 FROM wa_event_kna1 TRANSPORTING form WHERE name = wa_event_kna1-name.
ENDIF.
READ TABLE it_event_kna1 INTO wa_event_kna1 WITH KEY name = 'USER_COMMAND'.
IF sy-subrc = 0.
wa_event_kna1-form = 'USER_COMMAND_KNA1'.
MODIFY it_event_kna1 FROM wa_event_kna1 TRANSPORTING form WHERE name = wa_event_kna1-name.
ENDIF.
ENDFORM. " eventpopulate_kna1
*& Form eventpopulate_mara
text
--> p1 text
<-- p2 text
FORM eventpopulate_mara .
READ TABLE it_event_mara INTO wa_event_mara WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc = 0.
wa_event_mara-form = 'TOP_OF_PAGE_MARA'.
MODIFY it_event_mara FROM wa_event_mara TRANSPORTING form WHERE name = wa_event_mara-name.
ENDIF.
READ TABLE it_event_mara INTO wa_event_mara WITH KEY name = 'USER_COMMAND'.
IF sy-subrc = 0.
wa_event_mara-form = 'USER_COMMAND_MARA'.
MODIFY it_event_mara FROM wa_event_mara TRANSPORTING form WHERE name = wa_event_mara-name.
ENDIF.
ENDFORM. " eventpopulate_mara
**TOP OF PAGE
*& Form TOP_OF_PAGE_KNA1
text
FORM top_of_page_kna1.
wa_listheader-typ = 'H'.
wa_listheader-info = 'CUSTOMER DETAILS' .
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
WRITE:/ 'CUSTOMER DETAILS'.
ENDFORM. "TOP_OF_PAGE_KNA1
*& Form TOP_OF_PAGE_MARA
text
FORM top_of_page_mara.
wa_listheader-typ = 'H'.
wa_listheader-info = 'MATERIAL DETAILS' .
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
WRITE:/ 'MATERIAL DETAILS' .
ENDFORM. "TOP_OF_PAGE_KNA1
**CODE FOR SECOND LIST DISPLAY FOR VBAK
*& Form USER_COMMAND
text
-->UCOMM text
-->R_SELFIELD text
FORM user_command
USING ucomm LIKE sy-ucomm
r_selfield TYPE slis_selfield.
CASE UCOMM.
when '&IC1'.
CASE R_SELFIELD-TABNAME.
WHEN 'IT_KNA1'.
DATA: CUST(10) TYPE n.
CUST = r_selfield-value.
SELECT vbeln erdat ernam
FROM vbak
INTO TABLE it_vbak
WHERE kunnr = cust.
PERFORM fieldcat_vbak.
PERFORM display_vbak.
WHEN 'IT_MARA'.
DATA: MAT(18) TYPE N.
MAT = R_selfield-value.
SELECT matnr werks lgort
FROM mard
INTO TABLE it_mard
WHERE matnr = mat.
PERFORM fieldcat_mard.
PERFORM display_mard.
ENDCASE.
ENDCASE.
ENDFORM. "USER_COMMAND
**& Form USER_COMMAND_MARA
text
-->UCOMM text
-->S_SELFIELD text
*FORM user_command_mara
USING ucomm LIKE sy-ucomm
s_selfield TYPE slis_selfield.
SELECT matnr werks lgort
FROM mard
INTO TABLE it_mard
WHERE matnr = s_selfield-value.
PERFORM fieldcat_mard.
PERFORM display_mard.
*ENDFORM. "USER_COMMAND_MARA
*& Form DISPLAY_VBAK
text
--> p1 text
<-- p2 text
FORM display_vbak .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-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 =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = wa_layout
IT_FIELDCAT = it_fieldcat_vbak
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_vbak
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_VBAK
*& Form display_mard
text
FORM display_mard .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND_MARD'
I_STRUCTURE_NAME =
is_layout = wa_layout
it_fieldcat = it_fieldcat_mard
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = it_event_mard
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_mard
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "display_mard
REGARDS
PRASANTH -
At line-selection event in alv
Hi all......
I am creating an interractive alv.
Now waht I want is,
I want to display the details of only that particular field(ROW) as secondary out-put list, which i had dbl-clicked in the primary out-put list.
Like if I had dbl clicked on a pirticular Mat.No, than only the details of that Mat.No should be displayed in the secondary list.
I had used a statement like this...
DATA F(16).
GET CURSOR FIELD F.
but it seems like it is having error
Thanks...Hi Kiran,
I can solve your problem. I have made same type of report in whitch u can use only AT selection event instead of get cursor event to get desired output.
AT LINE-SELECTION.
CLEAR W_SYTABIX.
IF SY-LSIND = 1.
PERFORM SCREEN_1.
ELSEIF SY-LSIND = 2.
PERFORM SCREEN_2.
ELSEIF SY-LSIND = 3.
PERFORM SCREEN_3.
ENDIF.
*& Form SCREEN_1
text
FORM SCREEN_1 .
W_SYTABIX = SY-CUROW - 6.
IF W_SYTABIX >= 0.
READ TABLE I_SCARR INDEX W_SYTABIX INTO WA_SCARR.
IF WA_SCARR IS NOT INITIAL.
SELECT CARRID CONNID CITYFROM AIRPFROM CITYTO AIRPTO
FROM SPFLI
INTO CORRESPONDING FIELDS OF TABLE I_SPFLI
WHERE CARRID = WA_SCARR-CARRID.
IF SY-SUBRC NE 0.
MESSAGE 'NO RECORDS TO DISPLAY' TYPE 'E'.
ENDIF.
ELSE.
EXIT.
ENDIF.
WRITE : 'CARRID',(10)'CONNID',(20)'CITYFROM',(30)'AIRPORTFROM',(40)'CITYTO',(50)'AIRPORTTO'.
ULINE.
LOOP AT I_SPFLI INTO WA_SPFLI.
WRITE :/ WA_SPFLI-CARRID UNDER 'CARRID' ,
WA_SPFLI-CONNID UNDER 'CONNID',
WA_SPFLI-CITYFROM UNDER 'CITYFROM',
WA_SPFLI-AIRPFROM UNDER 'AIRPORTFROM',
WA_SPFLI-CITYTO UNDER 'CITYTO',
WA_SPFLI-AIRPTO UNDER 'AIRPORTTO'.
HIDE: WA_SPFLI-CARRID.
ENDLOOP.
CLEAR : WA_SCARR,
WA_SPFLI.
ELSE.
MESSAGE 'CURSOR IS NOT AT RIGHT PLACE' TYPE 'I'.
ENDIF.
ENDFORM. " SCREEN_1
*& Form SCREEN_2
text
FORM SCREEN_2 .
W_SYTABIX = SY-CUROW.
IF W_SYTABIX > 4.
READ TABLE I_SPFLI INDEX W_SYTABIX INTO WA_SCARR.
SELECT CARRID CONNID FLDATE PRICE CURRENCY
FROM SFLIGHT
INTO TABLE I_SFLIGHT
WHERE CARRID = WA_SPFLI-CARRID.
WRITE : 'CARRID',(10)'CONNID',(30)'FLDATE',(50)'PRICE',(70)'CURRENCY'.
ULINE.
LOOP AT I_SFLIGHT INTO WA_SFLIGHT.
WRITE :/ WA_SFLIGHT-CARRID UNDER 'CARRID',
WA_SFLIGHT-CONNID UNDER 'CONNID',
WA_SFLIGHT-FLDATE UNDER 'FLDATE',
WA_SFLIGHT-PRICE UNDER 'PRICE',
WA_SFLIGHT-CURRENCY UNDER 'CURRENCY'.
ENDLOOP.
ELSE.
MESSAGE 'CURSOR IS NOT AT RIGHT PLACE' TYPE 'I'.
ENDIF.
ENDFORM. " SCREEN_2
*& Form SCREEN_3
text
--> p1 text
<-- p2 text
FORM SCREEN_3.
W_SYTABIX = SY-CUROW.
IF W_SYTABIX > 4.
WRITE : 'THANKS FOR VISITING..HAPPY JOURNEY **LOKESH TAREY**'.
ENDIF.
ENDFORM. " SCREEN_3
You can easily use the same logic for your ALV report.
I hope i will help you.
Thanks & Regards,
Lokesh. -
Error launching select event in a region
Hi,
We are developing an application using JHeadStart and ADF Faces in JDeveloper 10.1.3.1.
Due to the size of the page code, we have splitted the page in different regions. The page has a master-detail-subdetail structure, where each subdetail has been put in a separated ADF region.
When changing the selected row in the master table, the values displayed in the detail table are refreshed. But when we do the same in the detail, no action takes place (the data in the subdetail doesn't change, and the code for the selection event listener is not executed either).
If I don't use ADF regions, the selection event listener code is executed. What could happen? On the other hand, an action event in the region is executed without problems.
Some pieces of the code:
- The include of the detail region in the main page:
<af:region id="ConcepteEco2" value="#{bindings}" regionType="cat.coec.outis.view.region.ConcepteEco2"/>- The declaration of the detail table in the region:
<af:table id="ConcepteEco2Table" styleClass="scrollable "
value="#{ConcepteEco2CollectionModel}"
inlineStyle="height: 120px; width: 1000px ; "
rangeChangeListener="#{ConcepteEco2CollectionModel.processRangeChange}"
selectionState="#{ConcepteEco2CollectionModel.selectedRow}"
selectionListener="#{ConcepteEco2CollectionModel.makeCurrent}"
disclosureListener="#{ConcepteEco2CollectionModel.hideAllDetails}"
varStatus="status"
var="row" rows="#{bindings.ConcepteEco2Table.rangeSize}"
first="#{bindings.ConcepteEco2Table.rangeStart}"
emptyText="#{bindings.ConcepteEco2Table.viewable ? 'No hi ha dades.' : 'Accés Denegat.'}"
binding="#{ConcepteEco2CollectionModel.table}"
partialTriggers="TipusCctEcoTable" >- The declaration of the table selection facet:
<!-- DEBUG:BEGIN:TABLE_SELECTION : outis/pageComponent/tableSelection.vm, nesting level: 11 -->
<f:facet name="selection">
<af:tableSelectOne disabled="#{ConcepteEco2CollectionModel.newRow}"
autoSubmit="true" id="ConcepteEco2SelectOne"
onclick="javascript:selectCurrentRow('ConcepteEco2:ConcepteEco2',this);">
<!-- DEBUG:BEGIN:DUPLICATE_ROW_BUTTON : outis/button/duplicateRowButton.vm, nesting level: 12 -->
<!-- DEBUG:END:DUPLICATE_ROW_BUTTON : outis/button/duplicateRowButton.vm, nesting level: 12-->
</af:tableSelectOne>
</f:facet><!-- DEBUG:END:TABLE_SELECTION : outis/pageComponent/tableSelection.vm, nesting level: 11--> Any help would be appreciated,
Carles Biosca
BBR Ingeniería de Servicios SL
www.bbr.cathi,
in your datagrid call use the property itemClick.
e.g <mx:DataGrid id="DG" dataProvider="{some provider"}
itemClick"myFunction())">
then in your script you can declare the function myFunction
to get column values of the selected row, use
DataGrid.selectedItem.ColumnDatafield
so for the above datagrid with a column name and
dataField=fullName i can use
DG.selectedItem.fullName
HTH
regards
abhi -
hi
i'm using a jtree in my gui but im facing a problem
jTree1.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e)
jTree1_valueChange(e);
as you can see that whenever i click on a particular node in the tree the tree selection event occurs which calls the valuechanged method and it does as required but if i click again on the same selection as before the tree selection event does not occur and it does not call the method so say that the node i'm selecting is supposed to be dynamic and has to be refreshed if i click on it again it will not update itself through the value changed method. can somebody please tell me a way to be able to get the valuechanged method even if i click on the same selection.
im a bot new to java swing programing so please if you could be a little more explanatory it could help
thanksYou problem is talked about (and a solution proposed) in the JavaDoc.
See the code sample in the doc header from http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTree.html
Maybe you are looking for
-
Unable to change group text name or add person to some group texts in iOS 8
I really like the ability to change group text names as it helps me separate work group texts from personal especially when I have coworkers that have separate business phones. I'm unable to change the name of some group texts as the option is not th
-
Problem in Installing Forms 6i on Pentium 4 Machine
Dear All, I tried to install forms 6i on my Pentium 4 machine but I was not successful. Later I come to know that for doing this I need a patch to be installed. i searched the whole oracle and intel site but I could not get it. If any one else have c
-
Quasi Newton Optimization Algorithm in Java
I need to implement Quasi Newton Optimization Algorithm in Java, I�ve found it in C. Can anyone help me to find this in Java?
-
Every time i click the icon iTunes never works
every time i click iTunes it never opens, what should i do?
-
Please can anyone HELP me,it's URGENT!!!!!!!
I need to implement the SortedMap interface the class will be named IntegerMap that contains only instances of the class integer, in the class test i have to enter the integer SortedMap ss = new IntegerMap (10); the element will be (from zero to the