How to Hide rows in ALV without affecting total sum at the end of table?
Hi,
I need some help in hiding particular rows in an ALV Grid without affecting the total sum at the end of the table. I am trying to hide the rows that have negative quantities, but I still need those values so that the user can still compute for the total sums. Can anyone help? Thanks.
Joseph
Hi,
Hopw this way you can hide the rows in the GRID.
DATA:
ld_column TYPE lvc_fname,
ld_hide TYPE abap_bool.
FIELD-SYMBOLS:
<ls_entry> TYPE any,
<ld_fld> TYPE any.
ld_column = 'COL_1'. " column which you want to suppress if everything is zero
ld_hide = abap_true. " = 'X'; default hide column
LOOP at <gt_outtab> ASSIGNING <ls_entry>.
ASSIGN COMPONENT (ld_column) OF STRUCTURE <ls_entry> TO <ld_fld>.
IF ( <ld_fld> > 0 ).
ld_hide = abap_false. " display column because at least single value > 0
EXIT. " leave LOOP
ENDIF.
ENDLOOP.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = ld_column.
IF ( syst-subrc = 0 ).
ls_fcat-no_out = ld_hide.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDIF.
hop you will get the total with for those columns too.
Regards,
Madhavi
Similar Messages
-
if you have a large document and you add two returns at the end of every major section or group but one of the two returns goes to next page, how do you keep that return so it doesn't mess up spacing if something is added earlier in document but get rid
of it so the top of the page is the same as the other pages? I was wondering if there was something like a hidden return that would hide the paragraph at the top of the page but if more information was added before it, it would act like a regular return. Hope
this makes sense.
Also do you know what the paragraph maker with a dotted box around it is? I was trying to solve the above problem by trying different keys with the return key, e.g. control + return gives you a page break, shift + return gives you a soft return,
control + alt + return gives you this funky paragraph symbol that seems to erase lines in front of it at least it did when I printed out a page using them.Thank you! I've never used Styles but have used the formatting. I just didn't want to have to go to the bottom of every page and change the paragraph formatting but format painter helped a lot. Thanks again.
You could also use a heading style for the start of your next major block of text which is formatted to have a page break before. Styles are at the heart of Word formatting. Take the time to learn about them to save a lot of time and hair pulling.
Read the
link that Stefan gave you. If you want more, see
Understanding Styles in Microsoft Word.
Charles Kenyon Madison, WI -
Hello folks,
I just would like to know that how to hide rows except dbms_rls package? I mean, it has been said that I can hide rows to create views but lets said that I have got 200 students and each student can see only their rows in students table, in that scenerio I have to create 200 views, isn't it? I just would like to learn that how to hide rows with using views? Do you have any ideas?
Note: I know dbms_rls package, except this solution I am tryin to find onather solution.
Thanks a lot.Hi,
Polat wrote:
Hello folks,
I just would like to know that how to hide rows except dbms_rls package? I mean, it has been said that I can hide rows to create views but lets said that I have got 200 students and each student can see only their rows in students table, in that scenerio I have to create 200 views, isn't it? No! As you realized, that's not practical.
If every student is a separate Oracle user, the USER fucntion will return the name of the current user. A view definition can reference that function, like this:
CREATE OR REPLACE VIEW view_x
AS
SELECT *
FROM table_x
WHERE student_account = USER;If you logged in to Oracle as POLAT, then the view will contain only rows where student_account='POLAT'.
If you logged in to Oracle as SYSTEM, then the view will contain only rows where student_account='SYSTEM'.
If students do not have thier own Oracle accounts, then they are probably authenitcated by some procedure in your package. That procedure can set a SYS_CONTEXT variable, or write data to a global temporary table, which you can then use instead of the USER function in view definitions.
Note: I know dbms_rls package, except this solution I am tryin to find onather solution.Why can't you use dbms_rls, or why don't you want to use it? It's a very powerful tool, and not vey hard to use.
I'm not saying there's never a good reason not to use dbms_rls; I'm just asking if you have one.
I hope this answers your question.
If not, give a specific example of what you want. Post CREATE TABLE and INSERT statements for some sample data for all tables involved. Identify 2 or 3 different students, and show what the contents of the view should be for each student, given the same sample data. If students do not log in to Oracle with their own usernames, then explain how you know which student is currently logged in. -
How to hide rows with merged cells?
I would like to know how to hide rows on numbers with merged cells, could do it normally at excel but I am not being able to do it at Numbers.
thanks!Felipe,
To hide a row with Merged Cells, Un-Merge first, then Hide. Select the Merged Cells and Table > Unmerge.
Note that this is only a problem with vertically merged cells when you want to Hide a Row.
If you want to Hide a Column, you can't have a Horizontal Merge that involves that Column.
Jerry -
How to display row to columns without using pivot keyword
hi,
could someone help me how to dispaly rows into columns without using pivot keyword and actuall my scenario is,iam having two tables with names and sample data is shown below
ID PROJECT MID MINAME TASKID TASKNAME
1 PROJ1 1 AA 100 PR1_TASK1
1 PROJ1 3 CC 102 PR1_TASK3
1 PROJ1 4 DD 103 PR1_TASK4
1 PROJ1 5 EE 104 PR1_TASK5
1 PROJ1 6 FF 105 PR1_TASK6
2 PROJ2 5 EE 114 PR2_TASK1
2 PROJ2 6 FF 115 PR2_TASK2
2 PROJ2 7 GG 116 PR2_TASK3
2 PROJ2 8 HH 117 PR2_TASK4
2 PROJ2 9 JJ 118 PR2_TASK5
2 PROJ2 10 KK 119 PR2_TASK6
2 PROJ2 1 AA 120 PR2_TASK7
The output should display project and count of tasks in particular milestone as shown below
project AA BB CC DD EE FF GG HH JJ KK
1 2 0 1 5 3 2 0 2 1 0
2 1 2 0 2 1 0 2 4 3 1
Thanks in advance ,
vvrWITH t1 AS
(SELECT 1 ID,
'PROJ1' PROJECT,
1 MID,
'AA' MINAME,
100 TASKID,
'PR1_TASK1' TASKNAME
FROM DUAL
UNION
SELECT 1, 'PROJ1', 3, 'CC', 102, 'PR1_TASK3'
FROM DUAL
UNION
SELECT 1, 'PROJ1', 4, 'DD', 103, 'PR1_TASK4'
FROM DUAL
UNION
SELECT 1, 'PROJ1', 5, 'EE', 104, 'PR1_TASK5'
FROM DUAL
UNION
SELECT 1, 'PROJ1', 6, 'FF', 105, 'PR1_TASK6'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 5, 'EE', 114, 'PR2_TASK1'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 6, 'FF', 115, 'PR2_TASK2'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 7, 'GG', 116, 'PR2_TASK3'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 8, 'HH', 117, 'PR2_TASK4'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 9, 'JJ', 118, 'PR1_TASK5'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 10, 'KK', 119, 'PR1_TASK6'
FROM DUAL
UNION
SELECT 2, 'PROJ2', 1, 'AA', 120, 'PR1_TASK7' FROM DUAL)
SELECT id project,
NVL((SELECT mid
FROM t1
WHERE miname = 'AA'
AND id = t_out.id),
0) AA,
NVL((SELECT mid
FROM t1
WHERE miname = 'BB'
AND id = t_out.id),
0) BB,
NVL((SELECT mid
FROM t1
WHERE miname = 'CC'
AND id = t_out.id),
0) CC,
NVL((SELECT mid
FROM t1
WHERE miname = 'DD'
AND id = t_out.id),
0) DD,
NVL((SELECT mid
FROM t1
WHERE miname = 'EE'
AND id = t_out.id),
0) EE,
NVL((SELECT mid
FROM t1
WHERE miname = 'FF'
AND id = t_out.id),
0) FF,
NVL((SELECT mid
FROM t1
WHERE miname = 'GG'
AND id = t_out.id),
0) GG,
NVL((SELECT mid
FROM t1
WHERE miname = 'HH'
AND id = t_out.id),
0) HH,
NVL((SELECT mid
FROM t1
WHERE miname = 'JJ'
AND id = t_out.id),
0) JJ,
NVL((SELECT mid
FROM t1
WHERE miname = 'KK'
AND id = t_out.id),
0) KK
FROM (SELECT DISTINCT id FROM t1) t_out
PROJECT AA BB CC DD EE FF GG HH JJ KK
1 1 0 3 4 5 6 0 0 0 0
2 1 0 0 0 5 6 7 8 9 10As I understand, you want MID of MINAMEs displayed ? But output is not like yours.. What is exactly your requirements? -
sir,
explain me how to edit row in alv report in particular column.put in the fieldcatalog;;
wa_fieldcat-edit = 'X'.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-scrtext_m = 'Net Price'.
wa_fieldcat-edit = 'X'. "sets whole column to be editable
wa_fieldcat-col_pos = 7.
wa_fieldcat-outputlen = 15.
wa_fieldcat-datatype = 'CURR'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat. -
How can I print a booklet without a white outline around the border?
How can I print a booklet without a white outline around the border? I'd like the front page to be covered entirely.
You either need a borderless printer, or you have to print on oversize paper and trim off the bleed.
-
How can I resize an image without losing resolution or using the crop tool? I am using Photoshop Elements 13 on a PC.
Hi Peru Bob,
I've tried two images, the results were:
Image 1
Jpg, original file size 923KB, dimensions 848px x 279px.
After resizing to 848px x 180px with 72dpi, the file size decreased to 164KB.
Image 2
Jpg, original file size 809KB, dimensions 1200px x 1800px.
After resizing to 668px x 722px with 72dpi, the file size decreased to 307KB.
So, there seems to be a fair file size loss - is this to be expected? -
How can i open a DOC or TXT file and insert the data into table?
How can i open a DOC or TXT file and insert the data into table?
I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
I'd like open DOC file and I'd like insert them into the table with same columns.
Thanks.Use the SQL*Loader utility or the UTL_FILE package.
-
Does anyone know how to add a preface page at the beginning of the book in ibooks author once the book is written? No matter how I try to add a Preface page, it goes to the end of the book.
Thanks. I've tried this and apparently the template I'm using is one of those where it doesn't work. I've tried dragging it as well as cutting a pasting but it always travels back to the end of the book. Maybe I can try changing the template temporarily, move the preface page, and then convert back to the original template. I'll experiment a little.
-
How to draw horizontal line at the end of table for multiple line items
Dear Experts,
Pls can anyone help me how to draw horizontal line at the end of table for multiple line items . kindly help me regarding this
Thanks
Ramesh ManoharanHi
I tried as per your logic but it is not solving my problem . when i am gone to table painter it is showing line type 1 and line type 2
is below format.. if u see here line type 1 bottom line and line type 2 top line both are same.. so how to avoid this ?
line type 1
line type 2 -
How to hide row in JTable?
Hi all,
How to hide some specific rows in JTable for user view filtering purpose?
ThanksTry to use the Table Model.
The "getValueAt" Methode decide what to Display.
So a simple "if" command can hide the complete row - or a single Statement.
public Object getValueAt(int row, int col) {
ArrayList al = new ArrayList();
StueliTeil tabellenzeile = (StueliTeil) getDaten().get(row);
switch (col) {
case 0 :
return tabellenzeile.getUmfang();
case 1 :
return tabellenzeile.getTakt();
... -
How do I reformat hard drive without affecting recovery partition?
I would like to know how I can reformat my Toshiba hard drive without affecting the hidden recovery partition? I would like to get rid of the preinstalled Windows 7 OS and replace it with Windows XP, which is not as bloated. Also, does anyone know of a good 'free' disk scrubber program? I actually have the original 'disk scrubber' software, but the software disk just won't work any more. Finally, I tried to get the computer ready for the drive scrubbing, but I still can't change the disk order on my Toshiba laptop. I did get into the 'bios' screen by hitting the F8 key on startup, which did bring up the 'boot menu' screen. When I selected the cd/dvd drive and then hit the F10 key to save the change, nothing happened! I put in a data disk, but the laptop still booted into the Windows 7 OS. If I can't get the laptop to boot into the cd/dvd drive, I don't think that I can erase the hard drive and put Windows XP on since I wouldn't be able to boot up the laptop with the Windwos XP disk. Is that true? Anyway, without changing the boot order, I can't do anything. Please help! Thanks!
If you use the recovery that is on the hidden partition (hold down the zero key while starting up computer) then your OS reinstall will not affect that hidden partition, just overwrite the c: drive.
L305-S5955, T9300 Intel Core 2 Duo, 4GB RAM, 60GB SSD, Win 7 Ultimate 64-bit -
How to hide Rows Conditionaly??
Hi All BOBJ Experts,
Is it possible to hide measure value conditionaly in WEBI XI 4.0.....i have 3 dimension Objects and 2 measure Objects..(i.e)Product Code,Name,Capacity,Quantity,Unit(Ton,Kg,Litters,etc).....i want to hide rows if Quantity is null...
thanks in advance....
Regards,
Sella Perumal Pcheck this:
HOW TO HIDE A ROW ON WEBI REPORT WITH 0 AND NULL VALUES
rgs,
Parth. -
Select multple rows in ALV without pressing pressing CTRL key
Hi experts,
Is there any way that I can select multple rows in an ALV without pressing pressing CTRL key?
I am using set_table_for_first_display method for displaying the ALV.
I tried different options of sel_mode, but none of them works without the CTRL key.
Thanks,
Mohit.Hi,
You can add checkbox using ALV grid display.
Call your ALV grid as below. Pass 'wa_layout' with 'WA_LAYOUT-BOX_FIELDNAME' as your selection column name.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'F_GUI_STATUS'
I_CALLBACK_USER_COMMAND = 'F_USERCOMMAND'
I_GRID_TITLE = TEXT-026
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = I_FIELDCAT
TABLES
T_OUTTAB = I_OUTTAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
Check below link for more help.
[http://www.sapfans.com/forums/viewtopic.php?t=40968]
Thanks,
Archana
Maybe you are looking for
-
"A connection already exists..."
Hello, I just moved into the dorms at my college last Thursday and am having problems with my iChat. I very rarely use AIM or anything like that but I started using it at the dorms to stay connected with others. However, two days ago it started givin
-
What's *.ser file used for?
Hi,All, I got a servlet application need to test which use weblogic5.1 on NT4, Question 1: I run application use URL like, http://201.70.4.157:8001/booking/ServletStub?file=Chair_jsp_booking_Index_js
-
SQL Query to find the Delta between 2 rows
Can the below be possible? If so can you help me writing aSQL Query to do so- I have data in spreadsheet which is pulled off from the database (data from more than one table with joins); send it to the different teams. They will check the data n upda
-
i dont understand why apple is charging so much more for the new ipod touch 5 , 8 gig with just one camera lens on it....its highway robbery...not only that every store that is close by to me are sold out of the 8 gig they also tried to rope me into
-
Testing Dreamweaver site in Inspect CC
I am currently busy building site in dreamweaver using fluid grid layout. When I am testing the site I am going to > Preview in browser > google chrome and can see my site perfectly. In chrome, when I click on Inspect and select my iPhone the site on