How to make the column red in field catalog if its value is negetive
i am displaying 25 columns in a field catalog ,
if the value of the cell is negative it should appear in red colour .
for ex,
mat.no custno value
1 10 10
<b>2 20 -10</b>
3 30 20
note:
only cell which is the intersection of second row and third column
should appear red .
not the whole row or column
Hi Balaji,
Run this code for coloring specific coloum in a row when the value of that column is negative
REPORT zex34 .
TYPE-POOLS: slis.
INCLUDE <icon>.
DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
it_fieldcat1 TYPE slis_t_fieldcat_alv..
DATA: x_fieldcat TYPE slis_fieldcat_alv,
x_fieldcat1 TYPE slis_fieldcat_alv.
DATA: it_events TYPE slis_t_event,
x_events TYPE slis_alv_event,
i_program LIKE sy-repid.
x_events-name = 'END_OF_LIST'.
x_events-form = 'LIST_MODIFY_OUPUT'.
APPEND x_events TO it_events.
data : count type i,
calc1 type i value 1,
calc2 type i value 1,
TOTREC TYPE I.
DATA: BEGIN OF it_mara OCCURS 0,
matnr LIKE mara-matnr,
kunnr LIKE mara-kunnr,
value type i,
flag(1),
END OF it_mara.
SELECT matnr
kunnr
UP TO 10 ROWS
INTO corresponding fields of TABLE it_mara
FROM mara.
loop at it_mara.
count = sy-tabix mod 2.
if count eq 0.
it_mara-value = calc1.
calc1 = calc1 + 6.
it_mara-flag = ' '.
else.
calc2 = calc2 - 5.
it_mara-value = calc2.
it_mara-flag = 'X'.
endif.
modify it_mara index sy-tabix.
TOTREC = TOTREC + 1.
ENDLOOP.
i_program = sy-repid.
DATA:l_pos TYPE i VALUE 1.
CLEAR: l_pos.
l_pos = l_pos + 1.
x_fieldcat-seltext_m = 'MATNR'.
x_fieldcat-fieldname = 'MATNR'.
x_fieldcat-tabname = 'IT_MARA'.
x_fieldcat-col_pos = l_pos.
x_fieldcat-outputlen = '18'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
l_pos = l_pos + 1.
x_fieldcat-seltext_m = 'KUNNR'.
x_fieldcat-fieldname = 'KUNNR'.
x_fieldcat-tabname = 'IT_MARA'.
x_fieldcat-col_pos = l_pos.
x_fieldcat-outputlen = '10'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
l_pos = l_pos + 1.
x_fieldcat-seltext_m = 'VALUE'.
x_fieldcat-fieldname = 'VALUE'.
x_fieldcat-tabname = 'IT_MARA'.
x_fieldcat-col_pos = l_pos.
x_fieldcat-outputlen = '10'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
l_pos = l_pos + 1.
x_fieldcat-seltext_m = 'FLAG'.
x_fieldcat-fieldname = 'FLAG'.
x_fieldcat-tabname = 'IT_MARA'.
x_fieldcat-col_pos = l_pos.
x_fieldcat-outputlen = '1'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
l_pos = l_pos + 1.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = i_program
it_fieldcat = it_fieldcat
it_events = it_events
TABLES
t_outtab = it_mara
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.
*& Form LIST_MODIFY_OUPUT
text
FORM list_modify_ouput.
DATA: l_matnr LIKE mara-matnr,
l_kunnr LIKE mara-kunnr,
l_value type i,
l_index TYPE sy-index.
CLEAR it_mara.
DO 20 TIMES.
CLEAR: l_matnr, l_kunnr , l_value.
READ LINE sy-index INDEX sy-lsind
FIELD VALUE it_mara-matnr INTO l_matnr
it_mara-kunnr INTO l_kunnr
it_mara-value into l_value.
*3lines are reserved for alv headings , so i am reading it form 4th
*line so 4th line is equal to 1st line of itab
IF sy-subrc = 0 AND sy-index GE 4.
l_index = sy-index - 3.
READ TABLE it_mara INDEX l_index.
IF sy-subrc = 0 AND it_mara-flag = 'X'.
*-Modifying current list
MODIFY LINE sy-index INDEX sy-lsind
FIELD FORMAT it_mara-VALUE COLOR 6 INVERSE.
ENDIF.
ENDIF.
ENDDO.
ENDFORM.
Similar Messages
-
How to make the keyword red in the searched document
if the word document are loaded into the blob field,when the proper document are searched by the keyword,how to make the keyword red in the selected document!
thanks a lot!Take a look at the CTX_DOC.MARKUP procedure in the Oracle8i interMedia Text Reference.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by zhai ping ([email protected]):
if the word document are loaded into the blob field,when the proper document are searched by the keyword,how to make the keyword red in the selected document!
thanks a lot!<HR></BLOCKQUOTE>
null -
How to make a column as Password field?
Hi,
I need to change the column as "Password" field.
I.e. the data should be shown as "******" in DB Also.
How to make this happen in Table column?
Kindly guide / help me on this.
Thanks,
Orahar.Orahar wrote:
Dear Kumaran,
Thanks.
Can you explain me about the view which I need to create to displays the column value as stars ("*****")?
Thanks,
Orahar.
SQL> create table tbl_test (id number, name varchar2(10));
Table created.
SQL> insert into tbl_test values(111,'test');
1 row created.
SQL> select * from tbl_test;
ID NAME
111 test
SQL> create or replace view vw_test as
2 select '*****' id, name from tbl_test;
View created.
SQL> select * from vw_test;
ID NAME
***** test
SQL> insert into tbl_test values(2,'test2');
1 row created.
SQL> select * from vw_test;
ID NAME
***** test
***** test2
SQL> -
How to make the column in multi-record block resizable?
I am using Form6o, can I make the column in a multi-record block resizable?
Thanks!I don't know exactly how they did it, but I have seen it done in Forms 6i. It is not exactly Excel style, but it comes close. You can use when-mouse-down and when-mouse-up triggers to determine start and end position of the mouse (with system.mouse_x_pos) and then set the width property.
So, when you drag the mouse, you don't see the column size increase, you only see the result after you let go of the mouse button. -
How to extract the column width in ALv report if its executed in background
I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extract coulmns in back ground.
I have executed in background and checked the spool and for some of the columns width is not sufficient to display comeplete data so please suggest how to extract the columns sizes if executed inj background for an ALVHi Deepthi,
you can try with the above mentioned suggestions ,if its worked its fine ,
If not use Docking container instead of custom container, For ALV in back ground jobs, its suggest to use docking container instead of custom container , below you can find the declaration for docking container and code to use docking and custom container in your program for fore and back ground.
or you can use docking container alone for both operations.
Data : G_DOCK1 TYPE REF TO CL_GUI_DOCKING_CONTAINER,
IF CCON IS INITIAL. (ccon is container name )
*Check whether the program is run in batch or foreground
IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
*Run in foreground
CREATE OBJECT CCON
EXPORTING
CONTAINER_NAME = 'CON1'.
CREATE OBJECT GRID1
EXPORTING
I_PARENT = parent_1.
ELSE.
*Run in background
CREATE OBJECT GRID1
EXPORTING
I_PARENT = G_DOCK1.
ENDIF.
ENDIF.
B&R,
Saravana.S -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to make the column title needs to be on each page?
If a document has more than one page than a column title needs to be on each page,I can use Word fuction to do that. But If I Only use XML publisher, How to do it.
Message was edited by:
zhengrHi
If you mean how do you repeat the column titles on a table if the table extends over several pages then all you need do is:
Highlight the table header row
Right click and select table properties
On the Row tab, specify that the header row should be repeated on every page
Save your work
XMLP will now respect the word setting and will repeat the header row on evey page the table needs.
Regards, Tim -
WPF: How to make the Column and Row separator more wide and different color in datagrid?
Our application uses WPF.
One of request is make the DataGrid column separator and row separator more wide and use different color and remove original black separator of rows and columns.
Which template we need to modify to make it? Thx!
JaneCHi Magnus,
Thanks for replying our question and provide your suggestions!
Now we know modify both HorizontalGridLinesBrush and VerticalGridLinesBrush we can change the DataGrid cell separator color.
Following your suggested, we modify the DataGridCell as following:
<Style x:Key="Body_Content_DataGrid_Centering"
TargetType="{x:Type DataGridCell}">
<Setter Property="Padding" Value="2,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border BorderThickness="2" BorderBrush="{StaticResource PageBorderBackground}" Margin="-1">
<Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
<ContentPresenter VerticalAlignment="Center"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DataGridStyle1" TargetType="{x:Type DataGrid}">
<Setter Property="HorizontalGridLinesBrush" Value="{x:Null}"/>
<Setter Property="VerticalGridLinesBrush" Value="{x:Null}"/>
</Style
JaneC -
How to make the dblink and what is the use of this
plz any body tell me "how to make the dblink and what is the use of this"
sujitDo you understand how to make the Slider work using code to read its value? You will need to look into that in order to do this.
What you can do is have the yello rectangle be a movieclip that sits over the red rectangle and use the Slider to control the yellow rectangle's alpha property from 0 to 1. That way the yellow will gradually fade as you slide.
What you will then need to do is figure out how to make the number of dots that appear reduce from 15 to 8 over the same range of the slider. You need to use the fractional value from the slider to decide how many dots either appear or do not appear.
You should not start new postings for the same topics that you arlready have postings for. Doing so in the future might result in them being removed. -
How to repeat the column header on each page of the report?
Can any of you please suggest me on how to repeat the column titles on a table if the table extends over several pages:
I tried the below action present in Re: How to make the column title needs to be on each page? It worked fine for the pdf format whereas its not working for rtf format output.
Can anybody help on this?I guess this has been taken as bug,
may be some patch got released for it..iam not sure.. -
1) Make the column read only without coding
Please guid eme how to make the column read only in the list without using the coding.
VijBasically, the answer is that you can't. There are ways to change a specific list view to make a column readonly by replacing the form with a custom DataView form. But that only applies to that view and since users can create their own views,
those views would have read/write access to the column if the user has read/write access to the item. SharePoint only supports security down to the item level out of the box and not down to the individual column level.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
HOW TO MAKE THE FIELDS ON TABLE CONTROL SCREEN FIXED!!
Dear all,
Can you please tell me as to how to make the fields on the table control screen fixed (not respond to the scroll bar) i.e. simillar to MC88 screen , the first two fields are fixed and don't respond to the scroll.
Please Help!!!!
VjHi
In TC, goto attributes and set 'Fixed columns' as 2. This will fix the first 2 columns.
Regards
Navneet -
How to make the vendor column have figure in GRIR line item with RE document type?
Dear Experts,
Could you tell me how to make the vendor column have figure in GRIR line item whose document type is RE?
Thanks!
Xinling ZhangHi ,
You are using FAGLL03 .
FAGLL03 report vendor code is blank
vendor number in new FAGLL03 tcode (offsetting account information)
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30b96fed-eb5d-2e10-1792-f3ff9f65df8a?QuickLink=index&…
Also check OSS note
Note 112312 - Line item: Display of offsetting a/c information
Note 1034354 - FAGLL03: Display of offsetting account information
Many Thanks -
How to make the combobox column in grid can be selectable
Hi,
I have a grid in a form and use a SQL query as the data source. Now I want to make a column(a field in a SQL query) to be displayed as combobox and user can select it. I tried to use below code to make the column displayed like a combobox, it seems that the colunn becomes a dropdown box but i can't select it. Also I can't find a way to add valid value and description into this combobox like what I do on a combobox in a form.
oGrid.Columns.Item("Approved").Type = SAPbouiCOM.BoGridColumnType.gct_ComboBox;
SAPbouiCOM.GridColumn col = oGrid.Columns.Item("Approved");
then ???
Any suggestion?
Thanks!
LanHi Lan
Try This For Matrix......
'For Adding Values
oColumn = oColumns.Add("Drink", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oColumn.TitleObject.Caption = "Drink"
oColumn.Width = 100
'Add Valid Values
oColumn.ValidValues.Add("Cola", "")
oColumn.ValidValues.Add("7up", "")
oColumn.ValidValues.Add("Fanta", "")
oColumn.ValidValues.Add("Orange Juice", "")
oColumn.ValidValues.Add("Water", "")
oColumn.ValidValues.Add("Lemonade", "")
oColumn.ValidValues.Add("Ice Tea", "")
oColumn.ValidValues.Add("Coffee", "")
'For selected Value
Dim ocombo As SAPbouiCOM.ComboBox
Dim oform As SAPbouiCOM.Form
Dim omat As SAPbouiCOM.Matrix
oform = SBO_Application.Forms.Item("MOR1")
omat = oform.Items.Item("mat").Specific
ocombo = omat.Columns.Item("Drink").Cells.Item(1).Specific
ocombo.Select("Fanta", SAPbouiCOM.BoSearchKey.psk_ByValue)
Thanks
Shafi -
How to make the logs captured for Z fields in ME21N/ ME22N
Hi
I have devloped new tab(Screen) and added Z field in the PO header (ME21N) as per my requirement. But whenever I do changes to the perticular Z field, logs are not captured (ME21N->ENVIRONMENT-->HEADERLOG). How to make the logs captured for Z fields like standard fields. Is there any way?
Regards
Raj.HI Ranjitha
For the data element of Z fields go to further caracteristics of tab and make change document checkbox ticked.
Maybe you are looking for
-
Multitouch fails intermittently when resuming from Standby on Win 7 x64
I've got Windows 7 64-bit SP1 and Boot Camp 3.2 on a late-2010 Macbook Air 13". Intermittently (about one out of ten times, and more likely if the system has been in standby for an extended period), the multitouch driver will fail to run on resume. W
-
After overlaying Air SDK 3.6, iOS projects show a blank screen after startup.
Hi, I recently overlaid Air 3.6 in Flash Builder 4.7. My projects are using stage3D via Starling. Using the 3.4 SDK that comes installed with FB 4.7, my projects compiled and run fine with both debug and release builds. After overlaying the 3.6 SD
-
Overheating at the power adapter location shuts down computer
On occation Powerbook gets hot near the power adapter input. The unit shuts down with what sounds like the fan running, I must hold down the power button until it restarts. The unit is on a flat hard surface and the battery and charger function prope
-
Reinstall an app after a windows reset
reinstall an app after a windows reset
-
Please, I have just migrated a database from one server to another powerful server, but the issue is that one of the sql statement is very very slowing down. we downloaded the dump file to another server, and the same sql is very very fast. I shrank/