Back button in ALV oops with two screens
hi,
i have created the ALV report using oops concept. have kept the selection screen say 1000 and two more screens say 9001 and 9002.
when i click on back from 9002 screen it should go to 9001.
Hello Sankumar
I assume your 2nd screen (9002) displays detailed data based on a selection of the first screen (9001).
Example: first ALV displays customers -> select single customer via double-clicking -> display sales orders on 2nd ALV
Furthermore, I assume you trigger the second screen within your event handler method. If this is the case then I regard this as bad design which is bound to cause problems.
Within the event handler method just store the required selection (e.g. customer number) and trigger PAI using:
CALL METHOD cl_gui_cfw=>set_new_ok_code( ok_code = 'DISPLAY_DETAILS' ).
This trigger PAI of your first screen with a defined ok-code (= 'DISPLAY_DETAILS' ).
Now you may call a FORM routine DISPLAY_DETAILS where you make the call to your second screen.
This allows you to use the normal PAI logic to switch back and forth between multiple screens.
Regards
Uwe
Similar Messages
-
I have recently installed Mavericks on my desk top and since then I have been unable to switch off my computer without crashing it. I work with two screen and now I seem to have the menu bar on the second screen as well which I did not have before. Can you please help me?
Dr Bettina, I had similar problems with Mavericks. I installed it on a Mini and a 13" MacBook Pro. I can't speak to your disdplay issues, but I can confirm the inability to logout, shut down, or restarft without a forced, power button shut down. I can also report frequent System Prefs freezes and finder issues, like folder contents taking half a minuite or more to render, or not appearing at all. And while a few Adobe CC apps actually ran faster, InDesign ran like molasses uphill in Decemner.
I tried uninstalling or disabling numerous 3rd party apps and pref panes. I unplugged everything but the keyboard, ran DiskWarrier, repaired permissions, did fsck -f, trashed various preference files, reinstalled the OS... You name it, and I tried it — short of a potion using eye of newt.
After two days of totally hosed productivity, I restored OS 10.8.5 on the Mini so I could actually get some work done. However, I've decided to leave Mavericks on the MBP as a sort of crash dummy, and will install and thoroughly test all updates until stability has been achieved. Then — and only then — will I upgrade the Mini to Mavericks, even if it means waiting 'til a .2 or even .3 update.
Good luck to you... -
Dear All,
i have redefined the functionality of back button in ALV list display calling the FM popup_to_confirm....... but the problem is that the pop up is being generated twice in the program. can this be made to one.
regards
abhihi praveen,
You can check the value of sy-lsind on the click of back button and set its value to the previous list.
so what i mean to say is forcefully change the value of sy-lsind on click of back button to (sy-lsind - 1)
,this will take you to its parent list.
Hope this is helpful to you.
Abhishek. -
Cant open firefox on second screen on computer with two screens with two graphics cards.
I have a computer with two screens and two diffrent graphics card. One of them is onboard GC and another one is USB GC. I am running two instances of FF and it works fine with 3.6.20 version. But when I update to the latest version of FF either 5 or 6 this does not work. Even if i try to open one instance of FF on second screen on USB GC , I cant see anything> i have to move it to the main screen to see the FF window and will not work on the extended screen. I am using windows 7 pro 32 bit and the screen resolution is set to 1280x1024 on both the screens.
Can you please help.
Thanks.
Regards
PJTry to disable hardware acceleration.
*Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
If disabling hardware acceleration works then check if there is an update available for your graphics display driver.
*https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers -
Event handling in alv oops With buttons
Hi Experts
I have some doubt in ALV OOPS using Events. Could any one please tell me the procedure to how to handle events in oops ( Like interactive reports using events ).
Thank you
Satyendra.Hello Satyendra
The following sample report shows you how to handle the event HOTSPOT_CLICK and BUTTON_CLICK.
DATA: gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA: gt_knb1 TYPE STANDARD TABLE OF knb1.
PARAMETERS: p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender, " grid instance that raised the event
handle_button_click FOR EVENT button_click OF cl_gui_alv_grid
IMPORTING
es_col_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_col_id TYPE lvc_s_col.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CASE e_column_id-fieldname.
WHEN 'KUNNR'.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'ERNAM'.*
SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
WHEN OTHERS.
ENDCASE.
* Set active cell to field BUKRS otherwise the focus is still on
* field KUNNR which will always raise event HOTSPOT_CLICK
ls_col_id-fieldname = 'BUKRS'.
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
is_row_id = e_row_id
is_column_id = ls_col_id.
ENDMETHOD. "handle_hotspot_click
METHOD handle_button_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
READ TABLE gt_knb1 INTO ls_knb1 INDEX es_row_no-row_id.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDMETHOD. "handle_button_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid1,
lcl_eventhandler=>handle_button_click FOR go_grid1.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
CHANGING
it_outtab = gt_knb1
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
FORM build_fieldcatalog_knb1 .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat
WHERE ( fieldname = 'KUNNR' OR
fieldname = 'ERNAM' OR
fieldname = 'BUKRS' ).
IF ( ls_fcat-fieldname = 'BUKRS' ).
ls_fcat-style = cl_gui_alv_grid=>mc_style_button. " column appears as button
ELSE.
ls_fcat-hotspot = abap_true.
ENDIF.
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
Regards
Uwe -
Customised Back button in ALV loses selection screen parameters
Hi,
In my ALV output, the user interacts with the output. I had to program my own back button in the pf-status so that when the user hit back they didnt return to the original alv output. (if that makes sense)
I use LEAVE TO TRANSACTION 'ZZZZ' (user_command form) but the problem is that i lose all the selection parameters that the user has entered.
I have tried everything.........set screen 0, leave screen etc..........and searched the forum but cant find the answer.
Anyone know what i need i do..........
Cheers..........try submit ...
submit the report of ZZZZ tcode... with the selection parameters of your existing report....
e.g.
SUBMIT zbbp_sc_arch_initial_upload
VIA SELECTION-SCREEN
WITH p_r01 EQ p_r01
WITH p_r02 EQ p_r02
WITH p_mode EQ p_mode. -
Problem with back button in alv o/p
Hi guys,
I am using Grid display to display a data. but when i am clicking on back button on o/p the o/p is displaying duplicate records for the first o/p. i,e it is displaying multiple records, again clicking on back it displaying extended o/p with more duplicate data...Hi
Check did u refreshed the internal that u displayed.
And also check grid control is initial or not
Data: g_cust_container TYPE REF TO cl_gui_custom_container,
g_cust_grid TYPE REF TO cl_gui_alv_grid.
**Create Container ALV Grid
IF g_cust_grid IS INITIAL.
Create Control Container for Grid
CREATE OBJECT g_cust_container
EXPORTING
container_name = g_container.
IF sy-subrc <> 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = sy-repid
txt2 = sy-subrc
txt1 = text-m02. "The control could not be created.
ENDIF.
CREATE OBJECT g_cust_grid
EXPORTING
i_parent = g_cust_container.
ENDIF.
CALL METHOD g_cust_grid->refresh_table_display.
Regards,
Raghu. -
Regarding BACK button in ALV OO ABAP
Hi ,
I have created two screens with containers, first screen displays records in ALV grid and when user selects one or more records and clicks on release button (which i have created ), it should update the database field and displays the status report on the next screen.
I have also done another functionality i.e., when user double clicks on a particular record, it should call the change order transaction(IW32).
Now, the problem is when i select few records and click on release and after the status report i.e.,the secon screen is getting displayed.after coming back to the first screen if i double click on the record, it is going to the respective transaction(IW32).but when i click 'BACK' button in IW32,it is not going back at one click.i need to press so many times.then it is coming back to the first screen.
Can anybody help me how to go back at one click.Hi,
i thing the problem is in you internal table where you are selecting the record its still keeping the old selected record. you should refresh your internal table after first selection and than select for calling transaction.
Atul -
ALV GRID with two Containers Background Execution
Hi Friends,
I have to display two ALV GRIDS on two Container one below another in one screen.
I tried with 'DOCKING CONTAINER' - it works fine in foreground and not in BACKGROUND exection.
In background execution (F9) only one grid is getting displayed.
Please suggent whether I can go for CUSTOM CONTAINER or SPLITTER or some other way.
But I should use GRID DISPLAY and it should work in BACKGROUND EXECUTION also.
Regards,
VijiHi Vijaya,
It should work. I am giving you a sample code. Try this and let me know.
REPORT TEST.
data gt_lfa1 type standard table of lfa1.
data gt_kna1 type standard table of kna1.
start-of-selection.
select * from lfa1 into table gt_lfa1 up to 10 rows.
select * from kna1 into table gt_kna1 up to 20 rows.
end-of-selection.
if sy-batch eq 'X'.
perform display_lfa1.
perform display_kna1.
endif.
form display_lfa1 .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = sy-repid
i_structure_name = 'LFA1'
tables
t_outtab = gt_lfa1
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_LFA1
form display_kna1 .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = sy-repid
i_structure_name = 'KNA1'
tables
t_outtab = gt_kna1
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_KNA1
copy and paste the code and create a program. Activate it and come back to SE38 screen.
Now, in program name give the name of the report created and then
select PROGRAM->EXECUTE->BACKGROUND from the MENU bar.
This will generate two separate spools . One for KNA1 data & one for LFA1 data.
Let me know how it goes.
Thanks,
Abhishek -
Problem in Back Button in ALV report
Hi Team,
I have created a report which has a selection screen. Based on the input I am showing an ALV OO grid in my custom screen 0100. Now In the system toolbar on my 0100 screen I have enabled back, up and exit button. On click of which I am wrting 'LEAVE TO SCREEN 0. '
But it doesn't take me to the selection screen. Rather it throws me out of the transaction. Can anybody
suggest me a command so that when I click on back button it will take to the selection screen.
Thanks,
MainakHi,
Go through given program it is very usefull for you,
***Correct your program as follows...
PROGRAM rsolett1 MESSAGE-ID sy.
TYPE-POOLS: slis.
data: repid like sy-repid.
DATA: w_fieldcat TYPE slis_fieldcat_alv,
t_fieldcat TYPE slis_t_fieldcat_alv.
DATA: w_listheader TYPE slis_listheader,
t_listheader TYPE slis_t_listheader.
DATA: BEGIN OF t_output OCCURS 0,
slno TYPE char10,
name TYPE char10,
lino TYPE char10,
prof TYPE char10,
addr TYPE char10,
fanm TYPE char10,
plbu TYPE char10,
END OF t_output.
w_fieldcat-col_pos = 1.
w_fieldcat-fieldname = 'SLNO'.
w_fieldcat-seltext_m = 'SERIAL NUMBER'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-col_pos = 2.
w_fieldcat-fieldname = 'NAME'.
w_fieldcat-seltext_m = 'NAME'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-col_pos = 3.
w_fieldcat-fieldname = 'LINO'.
w_fieldcat-seltext_m = 'LICENCE NUMBER'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-col_pos = 4.
w_fieldcat-fieldname = 'PROF'.
w_fieldcat-seltext_m = 'PROFESSION'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-col_pos = 5.
w_fieldcat-fieldname = 'ADDR'.
w_fieldcat-seltext_m = 'ADDRESS'.
w_fieldcat-do_sum = 'X'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-col_pos = 6.
w_fieldcat-fieldname = 'FANM'.
w_fieldcat-seltext_m = 'FATHER NAME'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
w_fieldcat-col_pos = 7.
w_fieldcat-fieldname = 'PLBU'.
w_fieldcat-seltext_m = 'PLACE OF BUSSINESS'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
*PUPULATING TOP-OF-PAGE.
w_listheader-typ = 'H'.
w_listheader-info = 'FORMA'.
APPEND w_listheader TO t_listheader.
CLEAR w_listheader.
repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = ' '
i_callback_top_of_page = 'SUB_TOP_OF_PAGE'
it_fieldcat = t_fieldcat
i_default = 'X'
TABLES
t_outtab = t_output.
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZPFSTATUS'.
ENDFORM.
Edited by: Ganesh Modhave on Aug 12, 2008 1:06 PM
Thanks&Regards,
Naresh kumar -
Hi All,
I have developed ALV report using grid layout.The user wanted that when he execute the report and click on refresh button the report data gets refreshed as report output is based on Z table and same Z table is updating through RFC interface continously.So this functionality is working for me but problem is that after click refresh 2 to 3 times then to come back to selection screen he has to click back button same number of times as refresh button click.
Could anybody help how I can come back to selection screen on single click after click refresh button.
Thanks&Regards,
SachinHi Sachin,
This is what Madhukar meant
On refresh button I am again fetching data and calling fieldcatlog and displaying report.
Do not call the fieldcatalog and function module again.
Get the new data into your internal table in user command event &
Just add refresh = 'X' in your user command event.
For example
FORM f_user_command USING UCOMM LIKE SY-UCOMM v_selfld TYPE slis_selfield.
if sy-ucomm = 'REF'.
PERFORM get_data.
selfld-refresh = u2018Xu2019.
endif.
ENDFORM.
Kesav -
Hi,
I created a custom refresh button in alv. However when user clicks on this, it opens the refreshed data in a new window. When i click on back, it takes me to the previous window having my original data. I want that it should take me to the main selection screen and not the previous screen.
Please help.
I am using ALV GRID DISPLAY.form USER_Command
case ok_code.
when 'BACK'.
call selection-screen '1000'. " or whatever ur selection-screen no. is , for standard it will b 1000
endcase.
endform. -
Backing up iPad apps purchased with two accounts?
For a recent sync, I "transferred purchases" from my iPad to iTunes and subsequently synced it to my iMac with my personal AppleID. Before syncing, my iPad had apps purchased with two separate AppleIDs on it.
Upon doing a restore for the iOS5 upgrade, the apps purchase on the other AppleID account don't show up on my iPad.
Where are the apps now and how can I get them, and their data, back?!? I know I can log into the other AppleID on my iPad and redownload the lost apps from the App Store. However, I need the DATA from the apps (note taking apps and such). How do I get that data back?
If this isn't an option, this is a major fault of Apple's account design.
Thanks in advance for your help and suggestions~Hello J_DougBC,
Thank you for posting in the Apple Support Communities. I found an article that addresses Apple IDs that are different than the Primary Email Address on the account. You will need to go to https://appleid.apple.com/ to "Make your Apple ID and email address one and the same."
If your Apple ID and primary email address do not match, or they match but the email address is unverified, you can edit them.
1. Sign in to My Apple ID to manage your account information.
2. If you want to add and verify an email address that matches your Apple ID, follow the dialog box that says "Make your Apple ID and email address one and the same." This will automatically unverify that email address from any other Apple ID for which it was previously verified.
3. If you want to change your email address to one that does not match your Apple ID, click Edit next to your Primary Email Address. If this email address is already associated with another Apple ID, you will need to sign in with that Apple ID and delete it before you can add it to your preferred Apple ID.
Note: If you have an @me.com or @mac.com Apple ID and primary email address, you cannot edit your primary email address once it has been verified. To change your @me.com or @mac.com primary email address to another email address, contact Apple Support for assistance.
You can find the full article here:
Associating and verifying email addresses with your Apple ID
http://support.apple.com/kb/HE68
I hope this helps get you back on track!
Best,
Sheila M. -
This is totally insane!! They took someone's money in a sec by 'MISTAKE' but haven't returned after 10days.
I already have chatted with two staffs about this but different from what they promised, this still has not solved yet!
My devoted time for this was totally wasted and I am still in suffering.
I think this is theft!!! What shall I do more?!I am really sorry to bring this issue to the forum but had no choice. Like I mentioned above, I already have contacted them but never returned me back. Sick of chatting with those staffs who act like answering machine and wasting my time because of their mistake. After I finally decided to post this last night, then they called me this morning that I have to wait 5days more.
Sorry again, and thanks for your reply.
J -
Macbook Air with two screens?
I would like to connect two external screens (Apple Cinema Display + Apple Thunderbolt Display) to one Macbook Air - what the best solution?
best regardsIf you have the MacBook Air (Mid 2012) and later, it will support two extrernal displays.
<http://support.apple.com/kb/HT5219?viewlocale=en_US&locale=en_US#18>
A Mini DisplayPort display won't work plugged directly into a Thunderbolt display
<http://support.apple.com/kb/HT5219?viewlocale=en_US&locale=en_US#20>
but will work if you connect a Thunderbolt dock or disk drive (with two Thunderbolt ports) between the displays.
Maybe you are looking for
-
Why can't i open and save pdf's in i books any more?
Over the last couple of upgrades i have lost the ability to open pdf docs in i books - is there a proper solution for this Cant use zip files there either
-
Consultation on purchase from the Apple Store Online
Good afternoon, do not know if I can do this type of query over here but in any case, I will appreciate if someone can guide me in this regard. My question is specific and refers to the fact that I am interested in purchasing a macbook pro retina fro
-
Methods in JSP (repetitive things)
I had posted this question before but didnt solve me problem.Here I ask it again. I alway thought that JSP should be used for display purpose.In that what to do if some lines of code are repeated many number of times,and since I cant have a method in
-
Why no accelometer/landscape support?
Why has Apple neglected these applications for landscape support? It seems like having landscape for all of the applications would be very helpful, including mail, sms, calendar, and contacts. A lot of phones use landscape for writing texts (and e-ma
-
C5100 all in one install option missing
I am running Windows 8, 32 bit. So the printer has been buggy and I decided to uninstall and re-install it. As I was uninstalling it I was also downloading some files. After I reinstalled the c5100 all in one package from the website I ran the instal