"Custom" grouping and / or colored lines in ALV
Hi!
Two questions:
1. Is it possible to use colors in the ALV for a given set of rows? I'd like to mark rows with a color, which are logically belongs together.
2. Other approach would be to sort the ALV and via that the "similar" rows (i.e. some column values in the rows have the same value ) would be grouped.
The normal ALV grouping feature is too general. E.g if the ALV contains a lot of empty cells, then those cells will be grouped as well, nevertheless they are logically don't belong together -> looks quite weird.
If the custom grouping cannot be realized, then my approach would be the following:
1. Sorting the table. -> rows where the content partially equal are in succession.
2. Manually clear the cells in the second (in my business case only two lines can be partially equal, others are unique) row, which are the same as in the previous row.
3. Use coloring to indicate that these two lines are belonging together.
Best regards,
Peter
Hi Peter,
It is possible to assign colors to a specific row. But you need to have some work around.
You have to create an extra attribute for each column that you have in your table. The type of that attribute should be of WDUI_TABLE_CELL_DESIGN.
After Instatiating your ALV Component you have to use the following statement for the column that you have to apply the color.
ls_column-r_column->set_cell_design_fieldname( COLUMN1_DESIGN ). Assuming ls_column-r_column will have COLUMN1 as filed name.
There are 16 colors that are defined and each combination from '00' to '15' will define one color.
Look at the structure below. Its a table with 4 columns(2nd and 4th represents colors for first and third columns)
value11 00 value12 00
value21 00 value22 00
value31 02 value32 02.
If you consider the above struture as your output table 3 rows and 4 columns then your third row will be highlighted in green color because 02 represents green. You can hide your second column and fourth column in above example because they represents colors. Use the following statement to hide those columns.
ls_column-r_column->set_visible(
cl_wd_uielement=>e_visible-none ). "ls_column-r_column will have 'COLUMN1_DESIGN'
Let me know if you know more code.
Thank You,
Gajendra.
Similar Messages
-
Wbs in customer/vendor and gl document lines during initial balance upload
Hi gurus,
Can we enter wbs in customer/vendor and gl documents lines during upload of opening balance upload?
What is the impact of this?? Do we need to run project settlement on 1st day after go live to get data in cost center from ar, ap and gl????
ThanksHi Mohit,
Why do you want to udpate WBS element for vendor and customer line items. Basic concept of said cost object (WBS element) is transfer values to Fixed assets or GL accounts or any other cost objects like cost center ,Internal order,sales order like that.
You can update WBS element for all fixed expenses based on settlement rule and allocation types,which you created in customization and assigned cost elements or cost elment group over there. You can update WBS elements for said line items settle after opening balance update. Please note ,it may not possible to update WBS element for vendor and customer line items.
Basic cocnept of WBS element is cost collector ( You may use to collect revenue also as per nusiness processes) ,collects the cost from various resources and settle to said above objects. Vendor and customer balances are balance sheet accounts,which can settle through payments.
Regards
ManiKumar -
X300 partial screen flicker and solid colored lines
Hello all. Just opened my X300 tonight to find the lower-left quadrant of the screen flickering and some colored lines in the upper left-quadrant. The right half of the screen is viewable but pixelated. Anyone know if this is fixable? Loose cables, inverter?
thanks.
Solved!
Go to Solution.mmster55 wrote:
Good point. I fiddled with my friends laptop after I was convinced I could fix his Dell screen. Its still sitting in my room 2 years later. Thanks for the info.
i am in the same boat with my T30, T40, T42.... i decided to pull them apart and have yet to put them back again, i think i have lost some of the screws too.....
Regards,
Jin Li
May this year, be the year of 'DO'!
I am a volunteer, and not a paid staff of Lenovo or Microsoft -
Customer Groups and Customer Credit Groups
Hello
I was going through the documentation for Credit Management, but I was confused on what the difference was between customer groups and customer CREDIT Groups.. both of them sort of have the same definition, then what is the difference ?
Please help me out.
Regards,Hi Raj,
For your info :
The <b>credit group</b> groups together different business transactions which should be dealt with in the same manner with regard to the credit check.
You enter the credit groups when you configure the sales document types for credit management and define the automatic credit check.
Default settings
The following credit groups are contained in the standard SAP R/3 System:
01 = credit group for sales order
02 = credit group for delivery
03 = credit group for goods issue
Actions
1. Check whether you can use the credit groups in the standard system.
2. If you need to create new credit groups, enter an alphanumeric key with two characters and a descripion for the credit group.
A <b>customer group</b> tells to which a customer can belongs to.
You specify the customer group for sales data in the customer master record for each sales area.
The SAP System copies this specification automatically into the sales documents at header and item level. Here, you will find the customer group on the detail screen for general business data.
Actions
1. Specify an alphanumeric key which can have up to 2 characters and a description for the customer groups.
2. Make sure that the customer groups are entered in the customer master records.
Hope it helps. Pl reward if useful.
Thanks & Regards
Sadhu Kishore -
Customer group and price group mapping
Hi All ,
I want to know where do we set the mapping for the customer group versus price group in the system .
Is there any customizing t-code for this?
Please advice.
Thanks in advance,
SwatiDear Swathi,
There is no T-Code for Setting Customer Group and Pricing gorup in Customizing
But we assign generally this two in front end due to requirements,
like we consider in this two in Pricing condition creation in VK11, here suppose we maintain Key Combination in Customer Group and Pricing Group then we consider
Hope this may helps you
Prem. -
Please find details below ..
This code in if statement do what I want (coloured cell )how can I colour my line .
data definitions.
DATA: BEGIN OF ztab OCCURS 0.
INCLUDE STRUCTURE zskar_anz.
DATA : line_color TYPE shp_slis_t_specialcol_alv ,
cell_color TYPE shp_slis_t_specialcol_alv .
DATA: END OF ztab .
IF ztab-stskz < 0 .
ls_cell_color-fieldname = 'STSKZ'.
ls_cell_color-color-col = 6. "kırmızı
ls_cell_color-color-int = 0.
APPEND ls_cell_color TO ztab-cell_color[].
MODIFY ztab TRANSPORTING cell_color.
ENDIF.Hi,
See this code:
Here is a sample program which illistrates the coloring in ALV grid.
report zalv_0002 .
Use of colours in ALV grid (cell, line and column) *
Table
tables : mara.
Type
types : begin of ty_mara,
matnr like mara-matnr,
matkl like mara-matkl,
counter(4) type n,
free_text(15) type c,
color_line(4) type c, " Line color
color_cell type lvc_t_scol, " Cell color
end of ty_mara.
Structures
data : wa_mara type ty_mara,
wa_fieldcat type lvc_s_fcat,
is_layout type lvc_s_layo,
wa_color type lvc_s_scol.
Internal table
data : it_mara type standard table of ty_mara,
it_fieldcat type standard table of lvc_s_fcat,
it_color type table of lvc_s_scol.
Variables
data : okcode like sy-ucomm,
w_alv_grid type ref to cl_gui_alv_grid,
w_docking_container type ref to cl_gui_docking_container.
parameters : p_column as checkbox,
p_line as checkbox,
p_cell as checkbox.
at selection-screen output.
perform get_data.
perform fill_catalog.
if w_docking_container is initial.
perform create_objects.
endif.
*& Form create_objects
form create_objects.
create object w_docking_container
exporting
ratio = 60
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
create object w_alv_grid
exporting
i_parent = w_docking_container.
Field that identify color line in internal table
move 'COLOR_LINE' to is_layout-info_fname.
Field that identify cell color in inetrnal table
move 'COLOR_CELL' to is_layout-ctab_fname.
call method w_alv_grid->set_table_for_first_display
exporting
is_layout = is_layout
changing
it_outtab = it_mara
it_fieldcatalog = it_fieldcat
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
endform.
*& Form get_data
form get_data.
select * from mara up to 5 rows.
clear : wa_mara-color_line, wa_mara-color_cell.
move-corresponding mara to wa_mara.
add 1 to wa_mara-counter.
move 'Blabla' to wa_mara-free_text.
if wa_mara-counter = '0002'
and p_line = 'X'.
Color line
move 'C410' to wa_mara-color_line.
elseif wa_mara-counter = '0004'
and p_cell = 'X'.
Color cell
move 'FREE_TEXT' to wa_color-fname.
move '6' to wa_color-color-col.
move '1' to wa_color-color-int.
move '1' to wa_color-color-inv.
append wa_color to it_color.
wa_mara-color_cell[] = it_color[].
endif.
append wa_mara to it_mara.
endselect.
endform.
*& Form fill_catalog
form fill_catalog.
Colour code : *
Colour is a 4-char field where : *
- 1st char = C (color property) *
- 2nd char = color code (from 0 to 7) *
0 = background color *
1 = blue *
2 = gray *
3 = yellow *
4 = blue/gray *
5 = green *
6 = red *
7 = orange *
- 3rd char = intensified (0=off, 1=on) *
- 4th char = inverse display (0=off, 1=on) *
Colour overwriting priority : *
1. Line *
2. Cell *
3. Column *
data : w_position type i value '1'.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATNR' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATNR' to wa_fieldcat-ref_field.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'MATKL' to wa_fieldcat-fieldname.
move 'MARA' to wa_fieldcat-ref_table.
move 'MATKL' to wa_fieldcat-ref_field.
Color column
if p_column = 'X'.
move 'C610' to wa_fieldcat-emphasize.
endif.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'COUNTER' to wa_fieldcat-fieldname.
move 'N' to wa_fieldcat-inttype.
move '4' to wa_fieldcat-intlen.
move 'Counter' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
add 1 to w_position.
clear wa_fieldcat.
move w_position to wa_fieldcat-col_pos.
move 'FREE_TEXT' to wa_fieldcat-fieldname.
move 'C' to wa_fieldcat-inttype.
move '20' to wa_fieldcat-intlen.
move 'Text' to wa_fieldcat-coltext.
append wa_fieldcat to it_fieldcat.
endform.
I hope it helps u.
Regards,
Kumar -
Is it possible to have sorting by group and checkboxes in the same ALV
Hi there,
Does anyone know whether it is possible to have sorting and group on one field in ALV and checkboxes set on another field in ALV?
eg.
Fieldname
===========
Name----
Text
Allowance----
Numeric -> Sort & Group
Verified----
Checkbox
How do I code it if it is possible to have grouping and check box all in one ALV. Meaning I want some data that are the same to merge using sort, while still having the checkbox available for my other field (Verified).
Thanks in advance.
Lawrencehi,
GROUP BY clause is used on database tables with select statement.
sort is used on internal tables.
can u clearly explain y u need group by and sort on the same field.
if u are extracting from dbtable using grou by clause on a field, then no need to sort it again.
if u want sort u can do it by giveing "sort itab by field". thats not a problem.
now coming to check box.instead of using SLIS type field catalog, u use LVC type.
in LVC_S_LAYO, u can fine box_fname.
while defining layout, u declare a variable of type LVC_S_LAYO
AND GIVE BOX_FNAME = internal table field name -
Scanner and copy colored lines
i have the officejet 4500 all in one printer, it worked great for the longest time and now when i try to copy something it prints a page of colored lines, the same when i scan its just a pageof colored lines, has anyone had this issue? the printer still prints no problem its just the scan and copy function
Hey @jess1860,
Welcome to the HP Support Forums!
I understand that you're having an issue with your copier/scanner on your HP Officejet 4500 All-in-One Printer. I would like to work with you today at resolving the coloured vertical lines that you're experiencing on your copies.
Does the vertical colour lines issue happen from both the flatbed glass and the automatic document feeder on the top of the printer?
If the issue is only affecting the flatbed or the automatic document feeder and not both than it is usually an issue with dirt on the scanning assembly that can be easily cleaned.
However, if the vertical lines are affecting copies from the flatbed and the automatic document feeder than it is either a power issue or a programming failure on your product.
Please follow the steps below to resolve your copy quality issue:
First, make sure your printer is plugged directly into a wall outlet for power.
Vertical Bands, Lines, or Streaks in Copies, Faxes, or Scans
Please let me know if these steps resolve your issue. Good luck!
X-23
I work on behalf of HP
Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping! -
Why are my custom groups and buttons at QAT deleted each time I restart Outlook?
I created 3 template emails in my Outlook 2010 and added them to a group under Home Tab and also tried adding them to the QAT. In both cases, each time I reset Outlook, my customized templates are gone from the ribbon.
Hi,
How did you add the template emails to a group under Home tab?
Did you have any group policy set in your environment to restore your Outlook settings after each reboot?
Please come back and provide more information so that we can fix the problem more efficiently.
Meanwhile, please refer to the two links below to check if it helps:
How to Open Outlook Templates and Files using Toolbar Buttons
http://www.slipstick.com/outlook/hyperlink-templates/
How to add shortcuts to template in Ribbon in Outlook?
http://www.extendoffice.com/documents/outlook/1324-outlook-add-template-shortcut.html
Best Regards,
Steve Fan
TechNet Community Support -
Hi Experts,
I want to make color to parrticular line when it satisfies the condition in ALV report.
I am not using SLIS.
so is there any alternavite to clolor row on specific condition like...NETWR > 10000,
that row shold be in RED color.
Please give me Example of code.
Poins will be awarded soon.
Thanks,
RohanHi,
You have to expand your internal table with a field named eg. LINE_COLOR wich has 4 char's.
Then in building your internal table you can set that field with the appropriate value.
eg. wa_itab-line_color = C600. "( red )
Then when calling your first display of your ALV you do this
alv_grid_layout-info_fname = 'LINE_COLOR'.
Then
call method alv_grid->set_table_for_first_display
That should do the trick.
Best regards,
Dirk. -
Lack of Customer Service and Faulty Phone Line
Over the last 2 and a half weeks we have suffered variously from lack of broadband/ TV services and land line usage.
During that period the help line has been distinctly unhelpful with either the provision of no information or being told that I would be updated on progress and then not updated. Also, engineers have turned up at our property unannounced even though I was informed that I would be told when they were to arrive.
Also, having eventually had a fault in the pavement outside the house fixed we have now been advised that our internal "socket box" is faulty. We have BT Infinity and the box was installed by BT Open Reach and is the only way we can have BT broadband and we are now advised that the faulty socket is our responsibility.
This information came during a conversation last night when I was advised that I was about to be put through to a call centre manager and then left on hold for 25 minutes and subsequently advised that her call had overrun, but no apology that I had not been advised of why I was on hold.
During that conversation I was advised I could be given £10.00 compensation for having to make 6 or 7 lengthy calls to try and rectify the position at our property even thought there had been extensive time on hold and every time I spoke to someone they gave a different version of events or advice.
I would like the to be advised of the best course of action to have the matter fixed and to make a formal complaint about how the whole saga has been dealt with over the last two and a half weeks.You can register an official complaint with BT and if it is not resolved satisfactorily with them within 8 weeks then you can take it to the Communications Ombudsman who will progress things and I believe can compel BT to compensate/take certain courses of action.
I also have had a very frustrating time with BT. My phone has never been able to receive calls since switching in August - it goes through to someone elses phone who it appears somehow shares the same number with us.
I have done repeated tests on the phone with BT, initially being told that it wasn't a problem with BT. After a number of calls and online chats, the fault that I'd opened twice was closed as it had timed out.. So I raised a complaint which has still not been finalised and re-opened the fault (again!). Eventually we were available for an engineer to visit on Monday. They said the problem was with BT and would be fixed within 3 working days. Today was the 3rd working day and I received a text saying that the problem had been resolved (it hadn't been) so I re-opened the fault. I then received a further message saying that the problem had been fixed (it still hadn't) but this time there didn't appear to be an option to re-open the fault.
Please can someone advise on how I can re-open this as a fault and get it fixed. -
Total and non-total lines in ALV grid
Hi all,
Does anyone know if there is any standard SAP functionality for retrieving the non-total/raw item lines that lies beneath a total line in an ALV grid (after the user has selected the total line)?
All helpful answers will be rewarded!
Best regards,
MVTry the ALV event AFTER-LINE-OUTPUT may be it can help u to achieve ur requirement.
Append AFTER-LINE-OUTPUT event to the internal table T_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT.u201CAFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
FORM AFTER_LINE_OUTPUT
USING P_RS_LINEINFO TYPE SLIS_LINEINFO.
Here you have to write the logic to retrieve the 'total' line
ENDFROM.
Now call the alv FM
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = L_REPID "Program Name
IS_LAYOUT = W_LAYOUT "Layout of the Report
IT_FIELDCAT = T_FIELDCAT "Field Catalog for Report
IT_EVENTS = T_EVENT "For setting the events
TABLES
T_OUTTAB = T_OUTPUT "Report data Internal Table
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2. -
My screen was stepped on and I want to get it repaired. It is a Mac Book Pro serial no. CO*******H2G
<Personal Information Edited by Host>Make an appointment at the genius bar at your nearest Apple store, if available.
Type your USA Zip Code into the box at the bottom of this page for suggested locations near you, or use the page appropriate for your part of the world.
http://www.apple.com/retail/geniusbar/ -
Undesiarable Delivery split based on customer group
Hi Gurus,
This is very urgent,
One of my business requirement is to avoid splitting of Delivery when the reference sales order contains line items that belong to different customer group.
I have a sales order with three line items. Two of which belong to one customer group and one belong to another customer group. When delivery is created it gets split into two based on the customer group. But I dont want splitting based on customer group.
Is there any SRO settings or enhancement or SAP note etc available for this purpose.
Helpful answers will be rewarded.
Thanks in advance
Ramachandran BabuThis is indeed the routine I was referring to. This ZUKRL field is created for each order and only orders with exactly the same content in this field will be or can be combined into one delivery.
However, I don't see customer group here (only distribution channel and division), so this will not be the cause of your problem.
Regards,
John. -
Hi,
I need to create a customer group.Navigated to spro->crm->master data->Business partner->define attribute->define customer group,selected define customer group and see two customer group already exist.
How do we associate BPs to these customer group.
My objective is to have data(customer group) in sales tab when we select role for a BP as sold to party.
Regards,
RahulHi Rahul,
The customer group is defined in the master data for the sold-to party. Indicates a certain group of customers, defined for pricing and statistical purposes (for example, wholesale or retail trade).
You can define up to five different customer groups, depending on your company's particular requirements.
For example, if your company is in India, then
Customer Group 1 - This group can be maintained regional wise - Northern Region India, Southern Region India.
Customer Group 2 - This group can be maintained place wise - Mumbai, Delhi, Chennai
Customer Group 3 - This group can be maintained Turnover and Non Turnover discount sale wise - Non TOD, TOD
Similarly depending upon the other characteristics like billing, bank, etc. the customers can be grouped and that can be maintained as Customer Group 1, 2, etc.
Hope this helps.
Thanks.
Best Regards,
Arun Sankar.
Maybe you are looking for
-
Since I've upgraded to Leopard, I haven't been able to connect to my wireless network correctly. I have a MacBook and a D-Link router. It always worked fine before with Tiger-only it wouldn't connect automatically. Now, when I turn on the computer, i
-
Using MB mostly w/ power adapter, how do I maintain battery?
I use my MB at work plugged in with battery,and of course, once in a while take my MB for a trot, and like to make sure it is ready for normal use with a charged battery, however , I am concerned that running my MB w/battery with power adapter plugge
-
I have an additional LCD hooked to my iBook. How do I run two diff. apps?
Please help. Frustration level high.
-
ORA-20001: Error in MRU – Master-Detail
We don't allow to user modify the data and I remove a delete button in Master Detail. When I Add a row, I have the following message. Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in dat
-
Make a clip dissolve to black & white then back to color
Hi. How do I make a clip dissolve to b&w in the middle of it then back to color? Message was edited by: Hoops24