ALV grid can we remove the repetation values in field & display as one .
Dear Freinds,
i have developed a custom development relating to a salarly report based on the orgunit, the output is coming however i have one doubt in alv output.
right now my internal table data having data as follows : (iam giving only some fields)
orgunit orgdesc Empno Empname
70000905 Human Resources 7056 Richard
70000905 Human Resources 7057 Reymond Jain
70000905 Human Resources 7058 Maria Gulz
70000905 Human Resources 7061 Jacob
now in my output i dont want to have the orgunit value 70000905 and orgdesc (human resources) shouldnt not be repeated . is there any option in ALV where we I can use in
the field cat ( any parameter) where i can set that we can make the orgid as one and remove the repeation.(iam using alv grid function module).
Please help me in this regard
Regards
Syamla
Hi,
Before displaying sort ur internal table.
refer this code.
*& Form sub_display_data
text
FORM sub_display_data .
*--To sort the output through material number
DATA : lwa_sort TYPE slis_sortinfo_alv.
DATA : lit_sort TYPE slis_t_sortinfo_alv.
*--Pass the values to the table
lwa_sort-fieldname = 'PERNR'. "Field name in o/p inttable
lwa_sort-tabname = 'it_final2'. "Output Internal table
lwa_sort-spos = '1'. "Sort sequence
lwa_sort-up = 'X'. "Sort in ascending order
lwa_sort-down = ' '. "Sort in descending order
lwa_sort-subtot = 'X'. "Subtotal
APPEND lwa_sort TO lit_sort.
*--Pass the values to the table
lwa_sort-fieldname = 'WORKDATE'. "Field name in o/p inttable
lwa_sort-tabname = 'it_final2'. "Output Internal table
lwa_sort-spos = '2'. "Sort sequence
lwa_sort-up = 'X'. "Sort in ascending order
lwa_sort-down = ' '. "Sort in descending order
lwa_sort-subtot = ' '. "Subtotal
APPEND lwa_sort TO lit_sort.
*--Pass the values to the table
lwa_sort-fieldname = 'WEKLY'. "Field name in o/p inttable
lwa_sort-tabname = 'it_final2'. "Output Internal table
lwa_sort-spos = '3'. "Sort sequence
lwa_sort-up = 'X'. "Sort in ascending order
lwa_sort-down = ' '. "Sort in descending order
lwa_sort-subtot = ' '. "Subtotal
APPEND lwa_sort TO lit_sort.
wa_layout-colwidth_optimize = 'X'.
IF NOT it_final2[] IS INITIAL.
*--Call the function module to display the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = wa_layout
i_callback_program = v_repid
it_fieldcat = it_fieldcat1[]
i_default = c_chk
i_save = c_save
it_sort = lit_sort
TABLES
t_outtab = it_final2
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.
ELSE.
*--Message No data found
MESSAGE i888 WITH text-017.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " sub_display_data
Regards,
Prashant
Similar Messages
-
How can i remove the measurement info bubble from displaying while using patch tool?
When removing unwanted parts of an image or repairing older images, the tool most used by me is the patch tool. When I select a patch and move a bubble with measurements of how far I've moved this patch pops up and ALWAYS seems to be in the way. Some areas to repair are extremely magified and can make or break an image looking natural or not. The darn measurement bubble seems to place itself in the worst possible location for exact placement of small elements. How can I turn this info bubble from popping up as I'm not why it's even there?
You can turn it off under Photoshop (Edit)>Preferences>Interface by setting Show Transformation Values to Never
-
How can we remove the commas from the Formula value in SAP BW BEx query
Hi All,
How can we remove the commas from the Formula value in SAP BW BEx query
We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
Regards
Venkat.Do you want to remove the commas when you run the query on Bex Web or in RSRT?
Regards -
How can I remove the values of two MessageTextInputFields?
Hi all,
I have two MessageTextInput fields in which user have to enter two unique values.
With CO extension I have thrown a message "This code combination is already used" after some validation checks which is working fine.
My issue is -- if user enter the values which is previously entered than system throw a message which is workin fine but after thrown the messge system should clear the values which is entered by user in these two fields.
these two strings fields i got by
Agency_Location_Code = (String)pRow.getAttribute("AgencyLocationCode");
Bank_Account_Name = (String)pRow.getAttribute("BankAccountName");
How can I remove the values of Agency_Location_Code and Bank_Account_Name?
Thanks
AmitHi Gyan,
By setting null in Agency_Location_Code and Bank_Account_Name fields before throw exception, Still values of these two fields are showing. when we navigate to same supplier second time.
Is there any other solution to clear the fields.
Its urgent.
Thanks
Amit -
How can we remove the following zeros from quantity field ?
Hi All.
how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
eg:getting output zqty = 2.000
but i need zqty = 2.
help me to reslove this issue.
Regards.
jayHi,
While populating the field catlog do the following thing to avoid zeros.
wa_fieldcat-tabname = 'I_OUTPUT'. " Curr
wa_fieldcat-fieldname = 'FWAER'.
wa_fieldcat-seltext_l = text-023.
wa_fieldcat-no_zero = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Thanks,
Khushbu. -
How can we remove the key from the dataset which has json
uid
id
Json
4588
51
{ "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
4589
52
{ "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
4590
53
{ "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
I have the above dataset resulting from merge operation .
UID -Integer data type
ID- Integer data type
Json- String data type holding json document
How can I remove the " key" element from the json field and make my dataset look like
Expected output which will strip of key value pair from the json column
uid
id
Json
4588
51
{ "element1":{ "a":10 "b": "test1" } }
4589
52
{ "element1":{ "a":10 "b": "test1" } }
4590
53
{ "element1":{ "a":10 "b": "test1" } }
MudassarHello Mudassar,
In SQL Server / T-SQL we don't have a native JSON support, so you would have to implement a solution on your own = parsing the string and remove the "Key" + it's value.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
How can I remove the Star Button from the Address Bar?
How can I remove the Star Button from the Address Bar? There's no obvious way of doing it. Is there any about:config value related to it?
https://addons.mozilla.org/en-US/firefox/addon/no-star-button/
-
Want to remove the default value of a column in a table
HI
I have a table called User_ind. This table columns have default values as 'n' like
create table user_ind(
ind_num varchar2(1)
,group_allowed varchar2(1) default 'y'
,view_allowed varchar2(1) default 'y'
now i want to remove the default values How can i procede with this.
Urgent .
Thanks in advance.
Chaitanya.In Oracle 9i you cannot remove the DEFAULT, you can only change it to null:
alter table user_ind modify group_allowed varchar2(1) default null
You can check it using this one:
select table_name,column_name,data_default
from user_tab_columns
where table_name = 'USER_IND'
Best Regards
Krystian Zieja / mob -
How stop PS6 from removing the DPI value from an image when using "save for the web"?
How stop PS6 from removing the DPI-value from an image when using "save for the web"?
Example:
- Open a tif image, that contains a dpi value (resolution).
- Use the splice tool in PS6.
- Export the slices with "Save for web", as gif-files.
Then the dpi value is removed, the gif files has no dpi value (it's empty).
How can we stop PS6 from removing the dpi value when using "save for web"?
OR:
When using the slice tool, how can we save the sliced pieces without PS removing the dpi value?you can make your art go a little bit over the bounds. or you can make sure your artboart and art edges align to pixels
-
Read two CSV files and remove the duplicate values within them.
Hi,
I want to read two CSV files(which contains more than 100 rows and 100 columns) and remove the duplicate values within that two files and merge all the unique values and display it as a single file.
Can anyone help me out.
Thanks in advance.kirthi wrote:
Can you help me....Yeah, I've just finished... Here's a skeleton of my solution.
The first thing I think you should do is write a line-parser which splits your input data up into fields, and test it.
Then fill out the below parse method, and test it with that debugPrint method.
Then go to work on the print method.
I can help a bit along the way, but if you want to do this then you have to do it yourself. I'm not going to do it for you.
Cheers. Keith.
package forums.kirthi;
import java.util.*;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import krc.utilz.io.ParseException;
import krc.utilz.io.Filez.LineParser;
import krc.utilz.io.Filez.CsvLineParser;
public class DistinctColumnValuesFromCsvFiles
public static void main(String[] args) {
if (args.length==0) args = new String[] {"input1.csv", "input2.csv"};
try {
// data is a Map of ColumnNames to Sets-Of-Values
Map<String,Set<String>> data = new HashMap<String,Set<String>>();
// add the contents of each file to the data
for ( String filename : args ) {
data.putAll(parse(filename));
// print the data to output.csv
print(data);
} catch (Exception e) {
e.printStackTrace();
private static Map<String,Set<String>> parse(String filename) throws IOException, ParseException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(filename));
CsvLineParser.squeeze = true; // field.trim().replaceAll("\\s+"," ")
LineParser<String[]> parser = new CsvLineParser();
int lineNumber = 1;
// 1. read the column names (first line of file) into a List
// 2. read the column values (subsequent lines of file) into a List of Set's of String's
// 3. build a Map of columnName --> columnValues and return it
} finally {
if(reader!=null)reader.close();
private static void debugPrint(Map<String,Set<String>> data) {
for ( Map.Entry<String,Set<String>> entry : data.entrySet() ) {
System.out.println("DEBUG: "+entry.getKey()+" "+Arrays.toString(entry.getValue().toArray(new String[0])));
private static void print(Map<String,Set<String>> data) {
// 1. get the column names from the table.
// 2. create a List of List's of String's called matrix; logically [COL][ROW]
// 3. print the column names and add the List<String> for this col to the matrix
// 4. print the matrix by inerating columns and then rows
} -
Dear All,
Any Idea to remove the decimals value from the text ? my parameter declare as Character type.
eg : i want from 10000.000 become 10000
thanksDear All,
Any Idea to remove the decimals value from the text ? my parameter declare as Character type.
eg : i want from 10000.000 become 10000
thanks
hi,
for this we can use two method one is,
data : value type p decimals 0.
value = '10000.000'.
write : / value.
Output is = 10000
Second method,
data : value type i.
value = '10000.000'.
write : / value.
Output is = 10000
If u use packed decimals
data : value type p decimals 1.
value = '10000.000'.
write : / value.
Output is = 10000.0 -
ALV Grid with size of the whole screen
I need to create ALV Grid, that fits any screen. How can i do this?
I tried cl_gui_docing_container, but in the constructor it's possible to make it to occupy only 95% of the screen.If you are using a custom control on the screen and then a custom container you can easily do this.
Create a screen(Size 200 x 240), place a custom control on the screen and make it to the max size 200 x 240. Now in the attributes of the custom control, check the Resizing option for both horizontal and vertical, with some minimum numbers there.
Now, your ALV grid automatically occupies all the space available on the screen irrespective of the size if the screen and you will have only one scroll bar.
Regards,
Ravi
Note - Please mark all the helpful answers -
How can I avoid the null values in cross tab?
How can I avoid the null values in cross tab?
Hello Anindita,
Let me explain you the problem in detail.
I have selected User and Program as rows in the cross tab. In Summarized Field I am counting the Programs.
In DB I can have both User and Program null.
Letu2019s take these scenarios...
1) For a User, Program can be null
2) For a Program, User can be null
3) And both can be null.
A null Program does not give problem since Cross tab does not count the null values and in my case too, it remove the Program which are null from the Cross tab because of the counting its doing on Program. Hence scenario 1 and 3 is not a Problem.
Problem comes in scenario 2 (For a Program, User can be null).
In this case since Program is not null it will get counted and will be grouped under null user but I donu2019t want to show the null user Grouping in my cross tab.
"Suppress empty rows" and "suppress empty colums" does not help.
Thanks & Regards,
Amrita -
How can i get the all values from the Property file to Hashtable?
how can i get the all values from the Property file to Hashtable?
ok,consider my property file name is pro.PROPERTIES
and it contain
8326=sun developer
4306=sun java developer
3943=java developer
how can i get the all keys & values from the pro.PROPERTIES to hashtable
plz help guys..............The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
InputStream is = new FileInputStream("tivoli.properties");
props.load(is); -
How can I get the edited value from the editor in JTable
I have a JTextField added as an editor to a cell in JTable.
I value gets changed when I press enter.
but in actionPerformed of the JTextField when I say
String txtEditorValue = txtEditor.getText();
I am getting the old value. How can I get the edited value? Thanks.Hi,
I guess, your understanding of how JTable works together with its models is not good enough - for example the method getTableCellEditorComponent(...) of the TableCellEditor interface is used to get the component, that should be used as editing component - its second parameter is a value that should be used to setup the editing component - it is normally not the editing component itself.
JTable uses an underlying TableModel to store the cell values - if you have edited a cell, JTable gets the value of the editing component by itself and stores it in the TableModel using its setValueAt(...) method. To retrieve this data you only need to query the TableModel using row and column of this cell as parameters
say jt is your JTable, and row and column are the row and column of the cell - so to get the value, simply use
Object obj = jt.getModel().getValueAt(row,column);
if you know, that there is a String in this cell use
String str = (String) jt.getModel().getValueAt(row,column);
The editor component is used for the view of the JTable - you only want the data, which is stored in the model - you don't have to deal with the GUI components in this case.
greetings Marsian
Maybe you are looking for
-
I have had my iphone 3gs for 3 mths., I have not connected it to my computer to creat a apple id and upload, somebody told me u have to do this right when u get your phone or you will loose everything in your phone. I don't want to loose all my #'s,
-
I ordered the IX500 Scan Snap through Amazon and received the incorrect Adobe Acrobat XI Standard disc in Windows format instead of for my Mac. I contacted Amazon and they suggested I contact Scan Snap who suggests I contact Adobe for the correct di
-
When using TM with an external drive, can I connect and use it occasionally for backup and disconnect it between backups, say one backup per week? Or does it need to be connected all the time when the computer is on?
-
Why do website links to documents stored on another server work in IE but not firefox?
here is the line of code that works fine in IE: <td><div align="left"><b><a ref="file://sndpdps.ess.ad.addp.com/opssupport/FLOWCHARTS/Batch_Processing/PDF format/BKUP_FACKS_PROD_Daily.pdf" target="_Top">FACKS_PROD Backup</a></b></div></td>
-
Other technologies for Process Composer applications
Hi, as I found out, the most appropriate technologies applications built with Process Composer are WebDynpro for Java and enterprise service invocation. I have to queations regarding other technologies: 1. Is it possible to use other UI technologies