How to disable line selection functionality in ALV.
Hallo guys,
I need to disable the ALV functionality to select one(or more) lines.
How to hide this push button on the right side?
Thanks.
hi
good
check this
*& Report ZDEMO_ALVGRID_SELROW *
*& Example of a simple ALV Grid Report *
*& The basic ALV grid, Enhanced to display capture each row a user has *
*& selected *
REPORT zdemo_alvgrid_selrow .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
SEl, "stores which row user has selected
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-box_fieldname = 'SEL'.
"set field name to store row selection
gd_layout-edit = 'X'. "makes whole ALV table editable
gd_layout-zebra = 'X'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
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_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into corresponding fields of table it_ekko.
endform. " DATA_RETRIEVAL
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&DATA_SAVE'. "user presses SAVE
loop at it_ekko into wa_ekko.
if wa_ekko-sel EQ 'X'.
Process records that have been selected
endif.
endloop.
ENDCASE.
ENDFORM.
thanks
mrutyun^
Similar Messages
-
How to disable the purchase function?
Anyone know how to disable the purchase function from the ipad2? How to disable and empty the payment credit card inform? If not, is it secure?
None for payment
After establishing the Credit Card account (i.e. after you have made purchases), you can remove the credit card information by editing your payment info, choosing "None". -
How to disable the selection of "Title and logo URL of a SharePoint 2013 site" from browser
how to disable the selection of "Title and logo URL of a SharePoint 2013 site" from browser or How can we able to set our custom default log to the sp2013 site using code.So that users are not allowed to change from browser again.
Thanks & Regards, KrishnaHi Krishna,
For your issue, you need to deploy a farm solution using HideCustomAction to hide site settings link. For example to hide “Title, description, and logo” link you can use below code:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<HideCustomAction
GroupId="Customization"
HideActionId = "ProjectSettings"
Location = "Microsoft.SharePoint.SiteSettings">
</HideCustomAction>
</Elements>
Reference:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/92f002b7-0e9c-424e-836a-de40c4e5d81f/hide-option-from-site-settings-page-in-sharepoint-2010?forum=sharepointdevelopmentprevious
http://blog.milanchauhan.com/2013/06/add-custom-section-in-site-settings.html
Best Regards,
Eric
Eric Tao
TechNet Community Support -
How to find the selected item in alv grid or table control
can any one tell me please
how to find the selected item in alv grid or table controlIn table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
IN PAI
LOOP AT it_tkhdr.
FIELD it_tkhdr-sel_row
MODULE tab_tkhdr_mark ON REQUEST.
ENDLOOP.
MODULE tab_tkhdr_mark INPUT.
MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
ENDMODULE. " tab_tkhdr_mark INPUT
here it_TKHDR is internal table sel_row is field for selection
After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
regards,
Gagan -
How to disable the Selection screens of LDB's ?
Hi,
How to disable the Selection screens of LDB's when we r using the predefined LDB for our executable pgm ? and how to include the predefined LDB can u write the Code for including LDb or if possible give an example of a Pgm using a Predefined LDB?
Thanks & Regards,
Gopi.Hi Gopi,
Go through the link,
http://www.sapdevelopment.co.uk/hr/hrhome.htm
Regards,
Azaz Ali. -
How to disable the select options button, while audio is playing in the question template in captivate 8?
Apologies for late reply.
I mean "On Question screens audio keeps on playing even after we have selected an option or options depending on the question type and clicked Submit. How do we stop the audio on selecting an option?" -
How to disable dragging selected text to web search?
How to disable dragging selected text to web search?
Hmm, I haven't heard of that before. It's a new tab page with no relation to what you were dragging?
I wonder whether this might be a feature of one of your extensions. You can review them, and disable/remove any that are nonessential or unrecognized, here:
orange Firefox button (or Tools menu) > Add-ons > Extensions category
If you disable extensions, usually a link will appear above at least one of them to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
If that makes no difference, you could test in Firefox's Safe Mode -- that's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: [[Troubleshoot Firefox issues using Safe Mode]].
You can restart Firefox in Safe Mode using
Help > Restart with Add-ons Disabled
In the dialog, click "Start in Safe Mode" (''not'' Reset)
Any difference? -
How to disable line/phono/mic in under playback
/How to disable line/phono/mic in under playbackWHow to disable line/phono/mic in under playback? for the creative soundblaster SB240. Under windows xp under playback in sound settings I only see the usb speaker, and my laptops integrated sound card. Am I missing icons for the playback devices cause under the creative software I only see SPDIF in which I'm using and the line/phono/mic in which I muted. If I can't disable the line/phono/mic in, where in my settings could I prioritize the spdif in to being the default player because the only default player seems the be the SB240? Which is fine but when I go into its properties I see SPDIF in and Mic in/phono/line and I mute the line in. The reason I'm asking for how to disable the mic/line/phono in is because I WANT for my soundcard to only accept, listen, and playback through the SPDIF in channel. I currently disabled all the recording devices, and now creative only picks up SPDIF in and line in under playback which is fine but I would perfer only SPDIF in or if that isn't possible to make it the default input device that the sound card only listens to. Thanks for any assistance!!!!
/How to disable line/phono/mic in under playbackWHow to disable line/phono/mic in under playback? for the creative soundblaster SB240. Under windows xp under playback in sound settings I only see the usb speaker, and my laptops integrated sound card. Am I missing icons for the playback devices cause under the creative software I only see SPDIF in which I'm using and the line/phono/mic in which I muted. If I can't disable the line/phono/mic in, where in my settings could I prioritize the spdif in to being the default player because the only default player seems the be the SB240? Which is fine but when I go into its properties I see SPDIF in and Mic in/phono/line and I mute the line in. The reason I'm asking for how to disable the mic/line/phono in is because I WANT for my soundcard to only accept, listen, and playback through the SPDIF in channel. I currently disabled all the recording devices, and now creative only picks up SPDIF in and line in under playback which is fine but I would perfer only SPDIF in or if that isn't possible to make it the default input device that the sound card only listens to. Thanks for any assistance!!!!
-
How to process Line Selection on ALV Table in ABAP WebDynpro
Hi there,
I have a view with an ALV table whose context node retrieves its data from a Service Call for a method.
The method provides certain data of a database table which the ALV displays.
Now I would like to be able to select one row of that ALV table and after pressing a button or doubleclicking on the row or whatever a different view (as for me it is also ok on the same view) should appear to display the details of that selection.
I only need to know how to retrieve the selected data.
Or its index within the internal table.
I am already looking for hours for a useful thread and actually there is one which obviously is about a similar issue apart from the multiple selection part:
How to process multiple row selection in ALV table in Wendynpro ABAP? Help!
but i am afraid that i don't understand it. Or at least I misunderstand it since it does not work with me.
The system example mentioned in the thread does not help me either because it somehow does not correspond to my needs, does it?
It would be GREAT if somebody could help me with that. Please keep it simple for I am not an expert in webdynpro yet (obviously ^^) and also please explain in detail what I have to do with the context nodes since I am not sure whether the selection is stored in my already existing node or whether I need a special one for that.
Thanks!!
christinaHi Christina,
If you just want to get one column data of the line that user clicked, use the Web Dynpro Code Wizard to Read Context of attibute you needed, then you will get code as follow:
* Define data for read attribute
node_alv TYPE REF TO if_wd_context_node,
elem_alv TYPE REF TO if_wd_context_element,
stru_alv TYPE if_view_display=>element_alv ,
item_column_name LIKE stru_alv-column_name.
* navigate from <CONTEXT> to <ALV> via lead selection
node_alv = wd_context->get_child_node( name = if_view_display=>wdctx_alv ).
* get element via lead selection
elem_alv = node_alv->get_element( ).
* get single attribute
elem_alv->get_attribute(
EXPORTING
name = `COLUMN_NAME'
IMPORTING
value = item_column_name ).
The value of column_name is stored in item_column_name.
If you need the index that the user clicked, try this:
* Definition of field symbol for index
FIELD-SYMBOLS : <fs_index> TYPE data.
* Get the selected index
ASSIGN r_param->index->* TO <fs_index>.
The index of clicked line is stored in field symbol <fs_index>.
Hope it will help.
Best Regards,
Stephanie -
How to Use At line-Selection Functionality in dialog programming or mpp .
hi
i had created customized Transaction ,
in that notification field is there , their when they place notification number ,after that when they double click on that, it have to go to iw23 .(so that they will get confirm that notification number is write )
i have tried to use AT LINE-SELECTION event it showing error ,
where i have to write and which event i have to use ?
may i know how can i resolve this ?
Thanks a lot
Edited by: raghu111 on Dec 3, 2011 6:14 AMhi sharin.
Thanks for ur reply
i followed ur steps
WHEN 'PICK'.
DATA : dc_scrfield TYPE zmotor-qmnum.
GET CURSOR FIELD dc_scrfield.
CHECK NOT dc_scrfield IS INITIAL.
IF dc_scrfield = zmotor-qmnum.
IF NOT zmotor-qmnum IS INITIAL .
set PARAMETER ID 'IQM' FIELD zmotor-qmnum.
call TRANSACTION 'IW23'.
ENDIF. .
ENDIF.
its not working
but i already tried like this .
WHEN 'PICK'.
if field name =tablename-fieldname
set PARAMETER ID 'IQM' FIELD zmotor-qmnum
call transaction 'IW23'
endif
i written in pai event ." i have dought here also whether i have to write here r not
HERE ITS WORKING BUT PROBLEM IS FOR ANOTHER FIELDS ALSO ITS RESPONDING . how to stop the responding .
as per my knowledge in condition only prob but i tried i didnt solve
please send me one example or tell me how to solve
for better understanding only i pasted coding
thanks a lot
Edited by: raghu111 on Dec 5, 2011 12:21 PM -
How to implement line selectability for a table control using table Wizard?
Hello SDN Community,
I have created a table control using the Table Wizard. I found my exact question in this forum, but unfortunately it had not been andsered. While I cannot paste a screen-print into this plane-text area, here are the steps I followed...
1) SE51
2) Create new screen 0100
3) Click Layout button
4) Clidk Table Control (with Wizard) and draw box on canvas.
5) Step is "Start" - click Continue
6) Step is "Name of Table Control" - provided name
7) Step is "Table Name" - provided name of dictionary table (AUFK)
8) Step is "Definition of Columns" - selected order numver and order text
9) Step is "Table Control Attributes" - Line Selectability is in display mode - cannot set it.
I would like to have a selectability column for my table. Would appreciate any insight into how to do this.
Thank you,
Dean Atteberry.This is a puzzling...
For the table control wizard, in the Table Control Attributes step, I was able to get line selectability to open up by declaring a char01 data element at the beginning of my type.
The puzzling is in regards to the "Selection col. fld" entry field.
If I leave it blank and try to go to the next step, I get message "Enter the name of the selection column if you are using a program table"
So it looked like it wanted to know the name of my selection column. So I type in "CHAR1". and got the message "The field "CHAR1" for the selection column is already contained in the table."
Hmmmmm.... don't understand............
Dean Atteberry. -
How to call the 'DETAIL' function in ALV for a program?
Dear Friends,
I have a prf_tree (TYPE REF TO cl_gui_alv_tree), and I added below codes to add an new button for displaying the detail record, it works fine:
CALL METHOD prf_toolbar->add_button
EXPORTING
fcode = prf_tree->mc_fc_detail
icon = icon_detail
butn_type = cntb_btype_button
text = ''
quickinfo = 'Show Details'.
Everytime I click this new button, a window will popup and display the record details.
My question is: how to call this standard function ('DETAIL' function) in a program? for example:
CASE ldf_ok_code.
WHEN gcf_okcode_save.
PERFORM okcode_save.
WHEN 'SHOW_DETAIL'.
CHECK gdf_nodkey_9003 IS NOT INITIAL.
PERFORM SHOW_DETAIL.(How to write this code to display the detail data of the selected record?)
Thanks a lot!Hi,
Go for Interactive Reporting
like When u click on the output then it will show the Detail report u want .
for that purpose Pls
Use Hide command .
And call another report
by using SUBMITT Program -
How to Disable battery charging Function?
Hi;
I have a question about charging funtion of my "HP Compaq Business Notebook, 6720s":
How can I disable "battery charging" function in windows 7? Is there any "advanced setting change" or "software" that while battery is in its slot, stop my notebook from charging its battery?
ThanksAfter some days trying many methods, yet I haven't find a solution to my problem. Then I ask is there any one
knows which software should I download for HP Compaq Power Management (similar to the software that Huffer
mentioned, but that was for Lenovo) or which registery or BIOS change should I do , so that I can manually disable
charging function of laptop, or at least put a starting level that up to that level, laptop won't start
autolatically to charge battery, because in this manner once that my Battery reaches to below 100%, instantly begin
to be charged & it would decrease its life time. Please consider that because of my power cable is to some damaged, sometimes it suddenly disrubt & cause my laptop abruptly shut down, then necessarily the battery would always be connected tob prevent this suddent effect.
If any one could help me, I would appreciate him a lot.
Regards -
How to detect a selected row in ALV GRID
Hi,
Can anyone tell me how to detect and catch an event when a row is selected in an ALV GRID?
I would like to catch such event when the end user presses Ctrl + Shif + Space bar.
Thank you and best regards.
Hassane.Hi,
Use this wiki link, to have a checkbox with all the records in ALV Grid and to process those selected records at a user command, as per the requirement.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir -
How to disable Save & Print functionality in PDF form?
Hi,
This is the requrement, client need to disable Save & Print functionality in PDF form. (They not allow employee save & print the hrforms payslip)
May I know how to do it. Thank you.
What is the parameter value in structure SFPOUTPUTPARAMS that I need to set in order to disable Save & Print functionality ?
call function 'FP_JOB_OPEN'
changing
ie_outputparams = SFPOUTPUTPARAMS
exceptions
others = 1.Hi Nayan,
I'm the person who did the WD as well, using IFrame to contain the PDF binary. WD site didn't contro the binary source.
I pre-define the 'FP_JOB_OPEN' before calling the PDF generation.
Optional: Set output parameters
gs_outputparams-nodialog = ''.
gs_outputparams-preview = ''.
gs_outputparams-getpdf = 'X'.
gs_outputparams-nopreview = 'X'.
gs_outputparams-noprint = 'X'.
gs_outputparams-noarchive = 'X'.
gs_outputparams-nopributt = 'X'.
gs_outputparams-arcmode = '1'.
gs_outputparams-noarchive = 'X'.
Open print job
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_outputparams
EXCEPTIONS
OTHERS = 1.
Regards,
Eric
Maybe you are looking for
-
please help me
-
Itunes music stored on external hard drive
Hello, I have my itunes music, movies and tv shows stored on a lacie external hard drive that is getting close to full. I was wondering if there was a way to sync it so that I could use a second hard drive to start storing music on? I have gone to th
-
Call transaction for pop2.need to create packing instructions for materials
while assigning packing instruction to the materials from table mara. its unable to create a new line item in the screen. ex: only 8 records are saved but needs to proceed for other materials increasing the line item no. options of create new materi
-
Change request - specify config directory in listenerConfigure
Please... oh please... could the dev team allow the config directory to be specified on the listenerConfigure screen. Defaulting config.dir to ${java.io.tmpdir}, The effort needed to persuade the listener away from /tmp/apex, see How to change apex-c
-
Saving as HTML can't see anything when saved illustrator CS3 for windows
I'm working on a newsletter that will be used in a blast email. I am rather new at illustrator. I was told that I need to save it as html and did that but after it is saved and reopened there is nothing to see except boxes with a "x" in it. I tried l