How to display a group by function in reports
Dear all,
i am new to reports, just a little question, I have to display one tabluar form report with 5 feilds.For example col1,col2,col3,col4,col5.The report shold be group by col1 and col2 how can i display a group by in reports so values does not appear in redundancy
thanks
Edited by: user562674 on 02/03/2011 08:00 م
Hi,
After you create the data query in Data Model, drag col2 outside the group and place it, a new group will be created.
Similarly drag col3 in the newly created group for col2.
Now again drag col3 from col2 group and place it outside both the above groups a new group will be created.
Now drag all the other columns col4, col5 etc in the group for col3.
You can place all the columns in the query in any group as required after creating the groups.
Hope this helps.
Best Regards
Arif Khadas
Similar Messages
-
How to display standard ALV toolbar function in Webdynpro ABAP
Hi All,
Could any one please let me know that how to display the standard ALV functions. What I tried is as follows:
data :lr_config_table type ref to cl_salv_wd_config_table.
data lr_function type ref to cl_salv_wd_function_std
Got the reference by calling the get_model().
Now tried to display a standard button say :
CALL METHOD lr_config_table ->if_salv_wd_function_settings~get_function_std
EXPORTING
id = 'SALV_WD_INPUT_INSERT_ROW'
RECEIVING
value = lr_function.
CALL METHOD lr_function->set_visible
EXPORTING
value = cl_wd_uielement=>e_visible-visible.
But I can't see the button added to my ALV toolbar! Could any one please help me out on this if I am missing something.
Many Thanks!
SomnathHi..
ALV report which when displayed normally allows users to insert and delete rows using the methods below from class Cl_Salv_Wd_Config_Table:
I think add these lines to your code and check..
IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY (false)
IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_INSERT_ROW_ALLOWED (true).
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv_basic( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv_basic( ).
DATA l_table TYPE REF TO cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
l_table->if_salv_wd_table_settings~set_read_only( abap_false ).
l_table->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
l_table->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
l_table->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
Cheers,
Kris. -
How to display a message in an audit report?
hello all,
i would like to ask how do display a message in an audit report. here is my code...
CALL TRANSACTION tcode USING i_bdcdata
MODE c_n
MESSAGES INTO i_error2.
IF sy-subrc EQ 0.
ENDIF.
CLEAR i_error2.
LOOP AT i_error2.
IF i_error2-msgtyp EQ c_e.
MOVE v_pernr TO i_bdcerror2-pernr.
MOVE c_infotype TO i_bdcerror2-infty.
MOVE 'Error' TO i_bdcerror2-msgtype.
<b> SELECT SINGLE text
INTO v_msgtxt
FROM t100
WHERE sprsl = i_error2-msgspra
AND arbgb = i_error2-msgid
AND msgnr = i_error2-msgnr.
MOVE v_msgtxt TO i_bdcerror2-msgtxt.</b>
APPEND i_bdcerror2.
ENDIF.
ENDLOOP.
DESCRIBE TABLE i_bdcerror LINES v_bdcerrors.
IF v_bdcerrors <> 0.
SKIP 1.
WRITE: 'BDC Error Report'.
SKIP 1.
WRITE: 'PERNR',
'INFOTYPE',
'MESSAGE TYPE',
'MESSAGE TEXT'.
ULINE.
LOOP AT i_bdcerror.
WRITE: / i_bdcerror-pernr,
13 i_bdcerror-infty,
22 i_bdcerror-msgtype,
35 <b>i_bdcerror-msgtxt</b>.
ENDLOOP.
ENDIF.
the message text that i was getting contains &1, &2 and so on. how would i be able to replace it with the original value?
thanks!
-annAfter calling the transaction, this is what I do.
a) Call the function module, <b>MESSAGE_TEXT_BUILD</b> and pass the following values from <b>BDCMSGCOLL</b> or the internal table where you collect the messages.
i) MSGID
ii) MSGNR
iii) MSGV1
iv) MSGV2
v) MSGV3
vi) MSGV4
There is no need to fetch data using select from table t100.
It builds the message and returns in MESSAGE_TEXT_OUTPUT which can be then displayed to user.
Regards,
Subramanian V. -
How to display username in RTF BI publisher report?
Please advice how to display username in RTF BI publisher report?
May be this can be done via hidden parameter of BIP report which default value will be set up with macro like {$username$} (or smth like)?
Thanks in advance!Thanks. That worked. I was trying to get it as part of a multi-table query, aliasing dual. But that doesn't work in SQL Plus either so I guess I can't do that.
I was trying
select o.*, d.:xdo_user_name
from oblix_audit_events o, dual d
Before that I was trying
select
:xdo_user_name as USER_ID,
:xdo_user_roles as USER_ROLES,
:xdo_user_report_oracle_lang as REPORT_LANGUAGE,
:xdo_user_report_locale as REPORT_LOCALE,
:xdo_user_ui_oracle_lang as UI_LANGUAGE,
:xdo_user_ui_locale as UI_LOCALE
from dual
but I must have fat fingered something because that works now too. Thanks.
So if I need to do this in it's own query and I'm using an RTF template, how do I make that work?
If I have to do it with it's own -
How to display success message in function module
Hi Experts,
I am developing new function module regarding URL finder. As per my requirement ,
If USER ID is not provided -display SUCCESS MESSAGE and Provide sy-uname.
how to display success message.if possible can You write the code.
Thanks
rajuHello,
We can use an exporting parameter like single character field like 'S' for success and 'E' for error instead of a message.
Another option is you can use the Tables parameter and populate Return table with error or success message. Return table of type 'BAPIRET2'.
Hope this might help you!
Regards,
MM Jaffer. -
How to Use a Group by Function
Hi Gurus,
I have Requirment where i need to use the group by function to one column
below is my query , can anyone help how to use the group by for the column OCCASIONALS_QT_STATUS.
below is giving me the error not a group by expression
select distinct source_id,OCCASIONALS_QT_STATUS,
(SELECT sum(head_count)
FROM gen_dcsf_occasionals_count
where OCCASIONALS_QT_STATUS = 'QTS'
and source_id = gdoc.source_id
) OccasionalsQTS,
(SELECT sum(head_count)
FROM gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'NOTQTS'
and source_id = gdoc.source_id
) OccasionalsNOTQTS,
(SELECT sum(head_count)
FROM gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'NTKNWN'
and source_id = gdoc.source_id
) OccasionalsNOTKNWN
from gen_dcsf_occasionals_count gdoc group by OCCASIONALS_QT_STATUS;
any inputs on this is highly appreciable
Thanks in advance909577 wrote:
Hi Gurus,
I have Requirment where i need to use the group by function to one column
below is my query , can anyone help how to use the group by for the column OCCASIONALS_QT_STATUS.
below is giving me the error not a group by expression
select distinct source_id,OCCASIONALS_QT_STATUS,
(SELECT sum(head_count)
FROM gen_dcsf_occasionals_count
where OCCASIONALS_QT_STATUS = 'QTS'
and source_id = gdoc.source_id
) OccasionalsQTS,
(SELECT sum(head_count)
FROM gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'NOTQTS'
and source_id = gdoc.source_id
) OccasionalsNOTQTS,
(SELECT sum(head_count)
FROM gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'NTKNWN'
and source_id = gdoc.source_id
) OccasionalsNOTKNWN
from gen_dcsf_occasionals_count gdoc group by OCCASIONALS_QT_STATUS;
any inputs on this is highly appreciable
Thanks in advanceFor your own sanity, you should format your code to make it more readable
For the sanity of those from whom you seek help, you should preserve that formatting with the code tags:
select
distinct source_id,
OCCASIONALS_QT_STATUS,
(SELECT
sum(head_count)
FROM
gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'QTS' and
source_id = gdoc.source_id
) OccasionalsQTS,
(SELECT
sum(head_count)
FROM
gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'NOTQTS' and
source_id = gdoc.source_id
) OccasionalsNOTQTS,
(SELECT
sum(head_count)
FROM
gen_dcsf_occasionals_count
where
OCCASIONALS_QT_STATUS = 'NTKNWN' and
source_id = gdoc.source_id
) OccasionalsNOTKNWN
from
gen_dcsf_occasionals_count gdoc
group by
OCCASIONALS_QT_STATUS; -
How to Display Contact Groups on iPhone 4s
When I started using my iPhone 4s, my Contacts displayed in Groups (as shown below). They still do on my Mac. On my iPhone, however, after the latest software update all I get is a list of all my Contacts. When I push the "Group" button (top left) it displays a list of which groups I want displayed on my long list. What Id' like is for it to look like the picture below (as it did before the last update). I cannot find anything about this online. Any fixes? Thanks very much!
there are some apps, where you can add/delete groups directly on your iPhone (or iPad or iPod) and easily assign contacts to groups. For example "Contacts In : Import CSV & Manage Groups". See here: http://csvcontacts.wordpress.com/iphone-groups-broadcast/. As bonus you get all contact management things (deletion, creation) and ability to send broadcast SMS and e-mails and quickly clean up your contacts.
Swipe group to delete - only group itselt will be deleted, not the contacts! Then you can create new groups, assign contacts to group directly on iPhone, no need for PC connection. The groups which are created are "native" iPhone groups and you will see them in any other applications (e.g. in native iPhone address book). -
How to display Campaigns--- custom Object1-- Accounts in reports?
Hi,
We had requirement that needs to associate Accounts to campaigns, not contacts. I was able to do this using custom object 1 (since many accounts can be associated to many campaigns), having accounts as part of its related information.
So the related information section of Campaigns is a list of custom obj 1s which, in turn, have multiple accounts associated to them.
The question is how to display a list of campaigns and list of accounts associated to each campaign(i.e. the list of accounts associated to the custom objects associated to the campaign) in reports ?
Regards,
Ani.Ani,
You'll need to use Combined reporting for this functionlity, if you search for this in the KB you should find some information on this or buy Mike Lairsons book from Amazon.com.
Alternatively I used a report filtered by Account ID to show Campaigns targeted to that Account as a related item, this was standard Campaign/Contact/Account reporting. And all we did was add contacts to Campaigns.
cheers
alex -
How to display special characters in APEX Classic Report column
Ref: Thread: How to display newline characters as new lines
Version: APEX 3.2
Hi,
I have created an classic SQL Report with one of the columns being a decode that gives a value 'Post'(the value should be highlighted in Red) on one condition and 'Pre' on another. I have followed the advice given in the page (URL provided above) , i.e. I have changed Strip HTML to 'No', changed Display as to 'Display as text (escape special characters, does not save state)'. I have also passed this value back to the same page to be stored in a page item each time a link (another column in report) in report is clicked. I have tried passing it as #DEADLINE# and \#DEADLINE#\. The issue I face is, instead of the value being highlighted in Red, it gets passed back as a string holding the value 'Post'. Is there any way I can get this to display as it should without the Strip HTML being changed to 'Yes'.
Thanks very much.
Rohi
Edited by: Rohi on 18-Jul-2012 04:21876651 wrote:
Hi,
Thanks for your response.
I am trying to display a page item that is derived from a report column based on a click on the URL link (*view >*>)
This page item (here, it is Manager_ID) should ideally be highlighted when a particular condition is satisfied (achieved using a DECODE in the report).
But it is not displayed like it should be.
I do not want the value to be displayed along with the html tags as a string.
I want the html tags to take effect and highlight the value within it.
Initially, I had set Strip HTML to Yes and the value was returned without any highlighting .
So I changed it to 'No' and and it contained the html tags.
I am not sure what setting in APEX Report Attributes can help me achieve that effect I want.None of the report settings are relevant. They affect the rendering of the report and none of the columns you were changing the properties of were actually rendered.
You can't pass HTML and CSS around in URL parameters.
I suggest you pass *2* values in the column link: the MGR ID and a simple class or colour value computed by the DECODE in the report. I've suppressed the first version of the report and created a new one that does this:
decode(dept.deptno, '30', 'c00', '000') highlight The link column now passes the MGR ID and the HIGHLIGHT colour (red when the condition is satisfied and black when it is not).
I created another hidden and protected page item <tt>P0_HIGHLIGHT</tt> as the target for the highlight value, and used the Pre/Post Element Text properties of the <tt>P0_G_MGR</tt> to wrap it in a <tt>span</tt> whose colour is changed using the <tt>P0_HIGHLIGHT</tt> value as a subtitution string:
<span style="color: #&P0_HIGHLIGHT.;">Having done that, I still don't really get the requirement here. I'm sure that given the full picture I'd be using a completely different approach... -
How to display a table control in a report
hi
how to display a table control in a reportcreate a screen in your report.
Call that screen in your report.
While designing your screen, use Table control creation wizard to create table control on that screen.
http://www.planetsap.com/online_pgm_main_page.htm -
How to display dynamic header title in the report?
I have a req to display dynamic header title in the report.
When a id is entered in the prompt text, it will display the user data based on that user_id.
so similarly....the header title should vary each time when you select different user_id.
How can we implement this?>
Zack H wrote:
> Lazaro,
>
> It depends on what you want displayed in the heading for each id.
> Please elaborate.
>
> Thanks,
> Zack H.
Zack..I have several projects listed under several project id's...
so when a user selects project id 00164 then it should display something like "Project document for Jon Doe"
again when the user selects project id as 00192 then it should display something like "project document for Zimmerman"
Did you get it?? -
How to display an USERID on "Portal Activity Report - Pages and iViews"
HI,All.
I have a question.
It is as follows.
A purpose:
iView of EP is used and called for contents of the WEB-AP server of various (Tomcat(Java)).
The acquisition of "EP login user ID" is difficult from the log of each WEB-AP server.
It wants to acquire information on "Which iView which EP login user how many times executed?" by using EP, and analysis/to use it.
A present specification:
"Only information on "Number of users using iView" can be acquired in this function
though "Page and iView of portal activity report" of EP was verified to achieve the above-mentioned purpose.
It is impossible to analyze it, that is, "Which user ID used iView?".
A question:
In "Page and iView of portal activity report"
How should I do to display "Which iView how many times did each EP login user execute?"?
Or, I want to know if there is a table with the informations.
Environment:
EP6.0 SP18
OS:WindowsServer2003 EE sp1 rc2
CPU:Xeon3.2GHz x2
MEMORY:4GB
HDD:36GB*2
Other:Clustering
Thanking you in advance.
matsu.Hi,
You can try Setting the 'Monitor Users' property of the pages to 'Yes'. We did this for one of our portal but there seem to be a slight performance trade-off.
Please award point if helpful. -
How can I show groupped columns inisde Diadem report ?
Hi,
I am trying to show some values inside a Diadem report. I must show then in a similar way as "groupped columns" inside Excel, comparing different values in columns, just one columns next to the other one, but I do not know how I can manage it inside Diadem. With "bar" and outlined bars, all the columns are located at the same X point, so it is not the same as in Excel. How could I compare values of differet columns?
Thanks for your collaborationHi koniker,
Do you mean Y offset? If so, you can do it, but it's not a built-in feature, so again, you would have to shift the Y values up or down by Delta with the FormulaCalculator prior to graphing.
Normally multiple values occurring at the same X axis point are displayed either as lines and/or symbols. Bar graphs come up occasionally in DIAdem, but they're much more important for business graphing needs, thus the strong support of them in Excel.
What's your use-case? Are bar graphs the only acceptable choice? I can create and send you VBScript code to shift the bars either in the X direction or the Y direction, as you wish, if that's the optimal diplay. It just won't be a built-in feature.
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
How to display selected table fields in ALV report.
Hi,
I am displaying data from table EKPO using ALV through this query.
select * from ekpo into table itab_ekpo up to 25 rows.
bt if i need to display selected fields like
select ebeln matnr netpr from ekpo into table itab_ekpo up to 25 rows.
IT gives error GETWA_NOT_ASSIGNED.
FIELD SYMBOL HAS NOT YET BEEN ASSIGNED
CAN ANYONE PLZ HELP ME.Hi ,
I am pasting the code in which i am getting the error.Plz help.
REPORT ZHALV.
tables:ekpo.
data itab_ekpo type ekpo occurs 100 with header line.
types: begin of itab_new,
f_ebeln type ekpo-ebeln,
f_matnr type ekpo-matnr,
f_netpr type ekpo-netpr,
end of itab_new.
data itab1 TYPE STANDARD TABLE OF itab_new initial size 0.
type-pools: slis.
DATA: lt_fieldcat TYPE slis_t_fieldcat_alv,
lf_fieldcat TYPE slis_fieldcat_alv.
DATA: ws_repid TYPE sy-repid VALUE 'ZHALV'.
DATA: l_layout TYPE slis_layout_alv.
selection-screen Begin of block block1 with frame title text-111.
select-options : S_EBELN for EKPO-EBELN.
selection-screen end of block block1.
INITIALIZATION.
start-of-selection.
select ebeln matnr netpr from ekpo into table itab1 up to 10 rows WHERE EBELN IN S_EBELN.
*select * from ekpo into table itab_ekpo up to 25 rows.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM GET_DETAILS.
end-of-selection.
*& Form build_fieldcatalog
text
FORM build_fieldcatalog .
PURCHASING DOCUMENT NUMBER
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'EBELN'.
lf_fieldcat-ref_tabname = 'EKKO'.
lf_fieldcat-ref_fieldname = 'EBELN'.
MATERIAL NUMBER
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'MATNR'.
lf_fieldcat-ref_tabname = 'EKPO'.
lf_fieldcat-ref_fieldname = 'MATNR'.
APPEND lf_fieldcat TO lt_fieldcat.
NET PRICE IN PURCHASING DOCUMENT
CLEAR lf_fieldcat.
lf_fieldcat-fieldname = 'NETPR'.
lf_fieldcat-ref_tabname = 'EKPO'.
lf_fieldcat-ref_fieldname = 'NETPR'.
lf_fieldcat-cfieldname = 'WAERS'.
lf_fieldcat-do_sum = 'X'.
APPEND lf_fieldcat TO lt_fieldcat.
ENDFORM. " build_fieldcatalog
*& Form GET_DETAILS
text
FORM GET_DETAILS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ws_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'EKPO'
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = lt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = itab1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE: 'SY-SUBRC: ', SY-SUBRC .
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*append itab_ekpo to i_tab.
ENDFORM. "GET_DETAILS -
How to display the count distinct in a report
hi,
i have a report with multiple columns in it and with column, say A; i need to display in a calculated column B how many distinct values there are in A across the entire report; how to do that?Hi.
For example:
CALENDAR_YEAR
CALENDAR_MONTH_DESC
count(distinct TIMES.CALENDAR_MONTH_DESC by TIMES.CALENDAR_YEAR)
Count will give you how many distinct months are in year.
Regards
Goran
http://108obiee.blogspot.com
Maybe you are looking for
-
Posting on vendor reconciliation account in FS-CML
Hi experts, I am currently trying to prepare a Proof of concept for my customer on FS-CML on an IDES system. They want to manage the loans they contracted with banks. In fact, when posting the repayment or interests, they want to write directly on th
-
Hi All, I'm facing the typical issue.which is not repeating for all the Sales Orders.I Im creating the Sales order with BOM ,While creating the sales Order the Error message is "No Item category avaialble (Table T184 ZISE NORM ZTAN)" after pressing
-
Waveform Chart Update With Relative Time
Hey, I have a question about how a waveform chart updates. I am running a test in the pictures attached it is only for 4 minutes and I read in a data value every 90 seconds. I was wondering why the waveform chart doesn't look like chart 2 (photosho
-
Hi, Is password sync'd to OID when LDAP Sync is configured? If no, I am using OID 11.1.1.6 how can migrate the password with out having to install Connector Server? Thanks.
-
Processing multiple conditions
I hope you RH wizards out there can help me with one last problem. I've just spent the last week merging 3 RH5 projects into one RH6. I have conditional tags for AppA, AppB, and AppC. Some topics and some text in a couple topics are tagged for AppA a