Avoid repeating values in details section
Hi,
I have a report with a lot of formulas - depending on certain values in a certain Oracle database table values are summed up.
The fields are therefore placed in the report footer.
As I now have to insert a grouping I need to move the fields into the details section. However, I don't want to display each value there but only the sum - I would like to avoid repeating values in the details section.
A formula looks like this:
stringvar A1;
if {OUR_TABLE_FIELD} = 1 then A1 := {OTHER_TABLE.OTHER_FIELD}
Else A1:=A1;
A1;
Thanks!
Add a suitable group and then display data in this group footer, suppress detail section. It will effectively show the last detail line and thus eliminate duplicates from view. However, data is still there so if you want to use summaries you will need to use Running totals to ensure duplicates are not counted/summed
Ian
Similar Messages
-
Displaying Array values in Details section
Hi All,
I am having trouble with Arrays in Crystal Reports.
I have made a Shared string array in my main report and am using the same in a sub report. In the sub report I need to print the values in the array one below another like a table.
Say the array MyArray has values (INDIA, USA, CHINA, JAPAN, UK)
Right now I have made a formula in which I iterate through each of them and use Join(MyArray[i], ChrW(10))
ChrW(10) as you might know is used to make a new line. So the formula output essentially looks like the way I want it, that is
INDIA
USA
CHINA
JAPAN
UK
But its still a formula and acts like a single cell. If I export it into Excel, all the values will come in single cell. Moreover, When I use it like this, I cannot do proper formatting on it either.
Is there any way to make Array behave like a table and use the same in Detail section. I do not want to hit the DB again for this purpose.
ThanksHi Antony,
The only way to display the values on the Detail section is to 'get those values from the database'.
Instead of using a shared array variable, use a comma separated string. Here's what you need to do:
1) In the Main Report, open your existing shared variable formula and add a new variable:
shared stringvar array <exisiting variable name>;
stringvar new_variable;
existing code line 1
existing code line 2
existing code line 3
new_variable = Join(array_variable_name, ",");
2) Right-click the Subreport > Select change Subreport Links > Move the above formula to the pane on the right > Uncheck the option at the bottom right that says 'Select data in Subreport based on field'.
3) Get into the Subreport and use this as the Record Selection Formula:
{database_field} IN Split({@Pm-formula_name}, ",") //Replace {@Pm-formula_name} with the parameter name that is automatically created in the Subreport.
-Abhilash -
ALV Avoid repeated values for a field
I have developed an ALV report. In that 1 field say Company Code along with its details are getting displayed. I dont want the same Company Code to get printed repeatedly. It is sorted by Company Code.
Company code should get printed only once when it gets changed ..
eg:
Comp1 sdf ghj
Comp1 bvc asd
Comp2 qqq ert
Comp2 www rrr
Comp2 tyu iop
I want a report like this:
Comp1 sdf ghj
bvc asd
Comp2 qqq ert
www rrr
tyu iop
Can anyone help me ? Its urgent ..
Thanking you in advance,
ShankarHi,
Check the sample code.
REPORT Z_TEST_HERSEQ_LIST_DISPLAY.
type-pools : slis.
*--Data declaration
data : itab_ekko like standard table of ekko with header line,
itab_ekpo like standard table of ekpo with header line.
data : it_fldcat_ekko type SLIS_T_FIELDCAT_ALV,
it_fldcat_ekpo type slis_t_fieldcat_alv.
data : v_repid type sy-repid.
DATA : IS_KEYINFO TYPE SLIS_KEYINFO_ALV.
data : header type slis_tabname,
item type slis_tabname,
layout type slis_layout_alv.
**--Table declaration
tables : ekko.
**--selection screen
select-options: s_ebeln for ekko-ebeln.
initialization.
v_repid = sy-repid.
**--Start of selection
start-of-selection.
select * from ekko
into table itab_ekko
where ebeln in s_ebeln.
if not itab_ekko[] is initial.
select * from ekpo
into table itab_ekpo
for all entries in itab_ekko
where ebeln = itab_ekko-ebeln.
endif.
perform fldcat.
*perform set_layout.
perform herseq_list.
*& Form fldcat
* text
* Form to populating fieldcat
form fldcat .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = v_repid
I_INTERNAL_TABNAME = 'ITAB_EKKO'
I_STRUCTURE_NAME = 'EKKO'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fldcat_ekko
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = v_repid
I_INTERNAL_TABNAME = 'ITAB_EKPO'
I_STRUCTURE_NAME = 'EKPO'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fldcat_ekKo
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " fldcat
*& Form herseq_list
* text
*her list
form herseq_list .
IS_KEYINFO-HEADER01 ='EBELN' .
IS_KEYINFO-ITEM01 = 'EBELN'.
header = 'ITAB_EKKO'.
item = 'ITAB_EKPO'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_CALLBACK_PROGRAM =
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IS_LAYOUT = layout
IT_FIELDCAT = IT_FLDCAT_EKKO
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
i_tabname_header = HEADER
i_tabname_item = ITEM
* I_STRUCTURE_NAME_HEADER =
* I_STRUCTURE_NAME_ITEM =
is_keyinfo = is_keyinfo
* IS_PRINT =
* IS_REPREP_ID =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
* IR_SALV_HIERSEQ_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = itab_ekko
t_outtab_item = itab_ekpo
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.
endform. " herseq_list
Regards
vijay -
SQL to sum a column while avoiding repeating values
Dear All
i have this table called Loans_installments that contains the client's loan installments.
a sample of data:
branch currency client_id loan_no inst_mat_date inst_seq original_inst_amt int_amt
110 2 222 100 1/1/2013 1 0 50
110 2 222 100 1/2/2013 2 0 52
110 2 222 100 1/3/2013 3 0 54
110 2 222 100 1/4/2013 4 500 90
110 2 222 100 1/5/2013 5 0 50
110 2 222 100 1/6/2013 6 0 51
110 2 222 100 1/7/2013 7 0 50
110 2 222 100 1/8/2013 8 600 105
110 2 222 100 1/9/2013 9 0 50
110 2 222 100 1/10/2013 10 0 54
110 2 222 100 1/11/2013 11 0 50
110 2 222 100 1/12/2013 12 700 120
now what i want to sum the field int_amt based on original_inst_amt value (0 or has a value) and put the result on the int_amt that has an orig_inst_amt value <>0.
the result should be like this:
branch currency client_id loan_no inst_mat_date inst_seq original_inst_amt int_amt
110 2 222 100 1/1/2013 1 0 0
110 2 222 100 1/2/2013 2 0 0
110 2 222 100 1/3/2013 3 0 0
110 2 222 100 1/4/2013 4 500 246
110 2 222 100 1/5/2013 5 0 0
110 2 222 100 1/6/2013 6 0 0
110 2 222 100 1/7/2013 7 0 0
110 2 222 100 1/8/2013 8 600 256
110 2 222 100 1/9/2013 9 0 0
110 2 222 100 1/10/2013 10 0 0
110 2 222 100 1/11/2013 11 0 0
110 2 222 100 1/12/2013 12 700 274
any help plz.Using model clause
SQL> with t
2 as
3 (
4 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/1/2013','mm/dd/yyyy') inst_mat_date, 1 inst_seq, 0 original_inst_amt, 50 int_amt from dual
5 union all
6 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/2/2013','mm/dd/yyyy') inst_mat_date, 2 inst_seq, 0 original_inst_amt, 52 int_amt from dual
7 union all
8 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/3/2013','mm/dd/yyyy') inst_mat_date, 3 inst_seq, 0 original_inst_amt, 54 int_amt from dual
9 union all
10 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/4/2013','mm/dd/yyyy') inst_mat_date, 4 inst_seq, 500 original_inst_amt, 90 int_amt from dual
11 union all
12 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/5/2013','mm/dd/yyyy') inst_mat_date, 5 inst_seq, 0 original_inst_amt, 50 int_amt from dual
13 union all
14 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/6/2013','mm/dd/yyyy') inst_mat_date, 6 inst_seq, 0 original_inst_amt, 51 int_amt from dual
15 union all
16 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/7/2013','mm/dd/yyyy') inst_mat_date, 7 inst_seq, 0 original_inst_amt, 50 int_amt from dual
17 union all
18 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/8/2013','mm/dd/yyyy') inst_mat_date, 8 inst_seq, 600 original_inst_amt, 105 int_amt from dual
19 union all
20 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/9/2013','mm/dd/yyyy') inst_mat_date, 9 inst_seq, 0 original_inst_amt, 50 int_amt from dual
21 union all
22 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/10/201','mm/dd/yyyy') inst_mat_date, 10 inst_seq, 0 original_inst_amt, 54 int_amt from dual
23 union all
24 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/11/201','mm/dd/yyyy') inst_mat_date, 11 inst_seq, 0 original_inst_amt, 50 int_amt from dual
25 union all
26 select 110 branch, 2 currency, 222 client_id, 100 loan_no, to_date('1/12/201','mm/dd/yyyy') inst_mat_date, 12 inst_seq, 700 original_inst_amt, 120 int_amt from dual
27 )
28 select branch
29 , currency
30 , client_id
31 , loan_no
32 , inst_mat_date
33 , inst_seq
34 , original_inst_amt
35 , decode(original_inst_amt, 0, 0, sum(int_amt) over(partition by cnt)) int_amt
36 from (
37 select branch
38 , currency
39 , client_id
40 , loan_no
41 , inst_mat_date
42 , inst_seq
43 , original_inst_amt
44 , int_amt
45 , cnt
46 from t
47 model
48 dimension by
49 (
50 inst_seq
51 )
52 measures
53 (
54 branch, currency, client_id, loan_no, inst_mat_date, original_inst_amt, int_amt, 1 cnt
55 )
56 rules
57 (
58 cnt[any] = case
59 when original_inst_amt[cv()-1] > 0 then
60 cnt[cv()-1] + 1
61 else
62 nvl(cnt[cv()-1], cnt[cv()])
63 end
64 )
65 )
66 /
BRANCH CURRENCY CLIENT_ID LOAN_NO INST_MAT_ INST_SEQ ORIGINAL_INST_AMT INT_AMT
110 2 222 100 01-JAN-13 1 0 0
110 2 222 100 02-JAN-13 2 0 0
110 2 222 100 03-JAN-13 3 0 0
110 2 222 100 04-JAN-13 4 500 246
110 2 222 100 05-JAN-13 5 0 0
110 2 222 100 06-JAN-13 6 0 0
110 2 222 100 08-JAN-13 8 600 256
110 2 222 100 07-JAN-13 7 0 0
110 2 222 100 09-JAN-13 9 0 0
110 2 222 100 11-JAN-01 11 0 0
110 2 222 100 10-JAN-01 10 0 0
110 2 222 100 12-JAN-01 12 700 274
12 rows selected.
SQL> -
How to avoid repeat values in two tables
hi there,
I have two tables. SUPPLIERS and MANUFACTURERS. SUPPLIERS has more than one MANUFACTURERS. In normalization rule, a field must have single piece of data. SUPPLIERS_ID is repeating for every MANUFACTURERS. pls help me out to normalize these two tables.
Thank u...Ideally you need to have 2 master tables SUPPLIER & MANUFACTURER.
Then you need an intermediate transaction table to hold the relationship bet SUPPLIED & MANUFACTURER. Here the records will be repeated. -
How do i avoid repeted values in a report.
how do i avoid repeated values in a report. for example..
DEPTID EMPLID NAME
10 101 aaaaaa
10 166 bbbbb
10 176 ggggg
10 145 iiiiiiiii
20 234 zzzzzz
20 285 ddddd
20 266 uuuuu
but I want see the report as below.
DEPTID EMPLID NAME
10 101 aaaaaa
166 bbbbb
176 ggggg
145 iiiiiiiii
20 234 zzzzzz
285 ddddd
266 uuuuu
Thanks in advanceI apologize for jumping in here, but I had this problem in the past and Marc Sewtz had indicated there is a fix slated for APEX 3.0 timeframe.
Here's a couple of links if you are interested:
Re: Break Formatting Region and effect on other regions
report error: ORA-01403: no data found when SUM columns
The second link contains the workaround I used.
Again, sorry for interjecting, but I thought it might be a bit helpful,
Mark -
Shared Variable in DETAILS section reports value of previous item.
I have a report with a subreport in the details section. I have set up a shared variable in the subreport to pass a value to the main report. For some reason, the value of the variable for the first detail line item, shows up in the field for the second, the value for the second shows up in the third and this pattern repeats. How can I get the shared variable to display in the correct record?
It's because the data in the details line is evaluated/diplayed before the subreport executes.
Split the details into two sections and place SR in top one and display formula for var in lower one.
If there is data in the subreoprt you want on same line as the var then in section expert set the upper detail section to underlay.
Ian -
Details section repeating same data
I have created a report using Crystal Reports 2008 that uses a group. The details section of the group is repeating the data 11 times when it should only print it out once, before moving on to the next group.
When I copy the SQL query out of Crystal into SQL server the query only returns the info once for each group so why is the report printing it out 11 times for each group?
How can I fix this.Check whether you have any joins between the tables. Also first try to place the fields from only one table and check when the values start repeating by placing the fields from each table.
Regards,
Raghavendra -
In detail section Static Text should not be repeat.
hi.
i need a small Requirement.
in detail section i put one field this is coming from data base.
beside i put one static text like something.
but something static text is repeating based on record set in detail section like
something value1
something value2
something value3
but i dont want to repeat something, only first line i need to put
like
something valu1
value2
value3
i dont want to put report section.
i need to put same line at detail section....there's a couple of ways to do this:
a) right click on the something field and choose Format Field > go to the Common tab and then select Suppress if duplicated
b) or you may wish to go to the Insert menu, choose Group, and then choose your field that contains the something. then you can right click on the Group Header name at the left of the report designer, choose Section Expert, and then choose Underlay Sections. -
Repeated Header Row within a Details Section Only of a Group Ignores Tablix Member Properties
Ok. I have a situation where I have a details section of a group, and I am trying to get it to repeat the row headers on each page. It's not working. I've gone into Advanced Mode, and addressed the static Tablix Member for the left-most
field of the header row in question, set the properties for the Tablix Member to "RepeatOnNewPage: True" and "KeepWithGroup: After", and still, it refuses to repeat the row header for these details. I've tried rebuilding and
not deleting the column where the grouping was originally assigned (without deleting the grouping, of course), and assigned the properties for "RepeatOnNewPage" to that left-most, grouping field, yet I get the exact same results. I've looked
up solutions, and even spoken to the expert of experts, but no joy here. I'm using VS'10.OK. So it is fixed... sort of...
Apparently, you must select to add group headers repeated as you create the group (inc. child group), BESIDES changing in Advanced Mode, Tablix Member /Properties / etc. Then you have to format that extra column within your Tablix to
make it appear to 'disappear'. BUT EVEN THEN, there is a new problem:
The headers will repeat on the additional pages, but only to a point. For some odd reason, SSRS doesn't consistently render the repeated headers of the group details for
every page, just where it is a hard (page) break, as opposed to a soft (page) break. My gut tells me that this has nothing to do with the .xml code, but is an SSRS idiosyncrasy. -
Hi All,
I have a field month in details section.Suppose if the month values are Jan ,Feb,Mar.Then in page header section (where I have all the headers)
I have to show the same values horizontally.
Is it possbile ? PFA
Please helpHi Kalyan,
Just place a crosstab on the report header and align it with the other column headings.
The column of the crosstab would be the Month field with nothing in the Rows and Summary.
-Abhilash -
How to avoid duplicates values from alvgird see below code
how to avoid duplicates values from alvgird see below code
in below query docno no is repeated again and again
how i can avoid duplication in this query.
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.Hi Laxman,
after that select statement
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.
<b>if sy-subrc = 0.
delete adjucent duplicates from itab comparing <field name of itab internal table>
endif.</b>
this will delete your duplicate entries.once you done with this call the alv FM.
<b> call function 'REUSE_ALV_GRID_DISPLAY'</b>
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'IT_USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
i_grid_title = 'Purchase Order Details'
I_GRID_SETTINGS = I_GRID_SETTINGS
is_layout = wa_layout
it_fieldcat = it_fieldcat
IT_EXCLUDING = IT_EXCLUDING
IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS
it_sort = it_sort
IT_FILTER = IT_FILTER
IS_SEL_HIDE = IS_SEL_HIDE
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT = IS_VARIANT
it_events = it_event
IT_EVENT_EXIT = IT_EVENT_EXIT
IS_PRINT = IS_PRINT
IS_REPREP_ID = 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_ALV_GRAPHICS
IT_HYPERLINK = IT_HYPERLINK
IT_ADD_FIELDCAT = IT_ADD_FIELDCAT
IT_EXCEPT_QINFO = IT_EXCEPT_QINFO
IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER
IMPORTING
E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
tables
<b> t_outtab = ITAB</b>
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.
Thanks
Vikranth Khimavath -
Mobile List Bind aggregation - repeated values?
Hi all, i'm new to SAPui5 so please forgive me if this is already discussed.
I'm calling a odata service (http://h03zdb.hcc.uni-magdeburg.de:8003/workshop/sessiona/12/Services/msgTab.xsodata/MSGTABLE?$filter=FROM%20eq%20%27STU…) and I get the values stored in a table in json. I want to show this in a list but there are repeated values created for the list. Is it because of bindAggregation?Here is the whole code.
I used split app and added two models for the detail and master page.
I'm very new to this so sorry for bad coding
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>SRH Chat</title>
<script src="/sap/ui5/1/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->
<script type="text/javascript">
var sessionKey = "STUDENT01";
// Login user to get session id
var oDetailPage2 = new sap.m.Page("detail2");
var url = "http://h03zdb.hcc.uni-magdeburg.de:8003/workshop/sessiona/12/Services/msgTab.xsodata/MSGTABLE?$filter=TO%20eq%20%27"+sessionKey+"%27%20&%20FROM%20eq%20%27"+sessionKey+"%27%20&$format=json";
$.get( url, function(data1) {
// create JSON model instance
var oModel = new sap.ui.model.json.JSONModel();
// set the data for the model
oModel.setData(data1);
// set the model to the core
oMasterPage1.setModel(oModel);
var contactList = new sap.m.List("newlist2",{
title : "{FROM}",
mode: sap.m.ListMode.SingleSelectMaster,
select: function(oEv) {
var item = oEv.getParameter("listItem");
var desc = item.getTitle();
retrieveMsgs(desc);
function retrieveMsgs(desc)
var aurl = "http://h03zdb.hcc.uni-magdeburg.de:8003/workshop/sessiona/12/Services/msgTab.xsodata/MSGTABLE?$filter=FROM%20eq%20%27"+desc+"%27%20&$format=json";
$.get( aurl, function( data ) {
// // create JSON model instance
var oModel1 = new sap.ui.model.json.JSONModel();
// // set the data for the model
oModel1.setData(data);
// set the model to the core
oDetailPage2.setModel(oModel1);
var contactList1 = new sap.m.List("newlist");
var inputField = new sap.m.TextArea();
var but1 = new sap.m.Button({text: "Send", tap: function(){
// Send button press functionality
var msg = inputField.getValue();
var murl = "http://h03zdb.hcc.uni-magdeburg.de:8003/workshop/sessiona/12/WebContent/InsertMsg.xsjs?from="+desc+"&to="+sessionKey+"&msg="+msg;
$.ajax({
url: murl,
type: 'POST',
async: false,
timeout: 30000,
success : function (data2){
var empty = "";
inputField.setValue(empty); // clear text area
//Populate the List with Data from the Model (Set in the Controller of this View)
contactList1.bindAggregation("items", {
path : "/d/results", //Reference to the JSON structure
template: new sap.m.StandardListItem({
title: "{FROM}", //Refer the name field in the JSON data
description: "{MSG}", //Address Field in the data
type: sap.m.ListType.Navigation //Specify what to do while clicking/tapping an item in the list, in this example navigate to another view
oDetailPage2.addContent(contactList1);
oDetailPage2.addContent(inputField);
oDetailPage2.addContent(but1);
oSplitApp.to("detail2");
//Populate the List with Data from the Model (Set in the Controller of this View)
//oModel.createBindingContext("/d/results", null, {select: "FROM"},function(a){});
contactList.bindAggregation("items", {
path : "/d/results", //Reference to the JSON structure
template: new sap.m.StandardListItem({
title: "{FROM}", //Refer the name field in the JSON data
//description: "{FROM}", //Address Field in the data
//select: "FROM,TO",
type: sap.m.ListType.Navigation //Specify what to do while clicking/tapping an item in the list, in this example navigate to another view
var oMasterPage1 = new sap.m.Page("master1",{
title : "Master"
// adding the list to master
oMasterPage1.addContent(contactList);
// //add the master pages to the splitapp control
oSplitApp.addMasterPage(oMasterPage1);
// .addMasterPage(oMasterPage1);
//add the detail pages to the splitapp control
oSplitApp.addDetailPage(oDetailPage2);
//oSplitApp.setInitialDetail("detail");
//oSplitApp.setInitialMaster("master");
oSplitApp.placeAt("body");
</script>
</head>
<body class="body">
<div id="body">
</div>
</body>
</html> -
Unrelated data in master detail sections of a custom BIP report deployed in R12 EBS
We have a custom Master Detail BIP report generated by calling XDO APIs from a custom Java concurrent program (common_report_attachment) . This Java concurrent program is called from another custom concurrent program (po_validation) that processes a batch of POs in a single concurrent request.
PO_Validation Program (processes a batch of POs per request) -> Java Concurrent Program -> BI Publisher Report APIs
BIP report generates data for master detail sections based on two sql queries (given below) that have 'where' clause based on a common external parameter "P_TRX_HDR_ID".
NOTE: No explicit data link is used NOR an output column of parent query is used in the where clause of detail query as bind parameter.
- <dataTemplate name="NAPPB2BPORPT" description="Data Template for B2B PO Report" version="1.0">
- <properties>
<property name="xml_tag_case" value="upper" />
<property name="db_fetch_size" value="200" />
<property name="scalable_mode" value="on" />
</properties>
- <parameters>
<parameter name="P_TRX_HDR_ID" dataType="number" />
</parameters>
- <dataQuery>
- <sqlStatement name="Q_PO_HDR">
- <![CDATA[
SELECT poh.po_number PO_NUMBER
, poh.quote_number QUOTE_NUMBER
---- other columns -----
FROM nappcust.napp_o2i_po_headers poh
,napp_aso_quote_headers_v naqv
WHERE 1=1
AND naqv.quote_number=poh.quote_number
AND poh.header_id = :P_TRX_HDR_ID
]]>
</sqlStatement>
- <sqlStatement name="Q_LINES">
- <![CDATA[
SELECT pol.item ITEM
, pol.partner_part_number PARTNER_PART_NUMBER
-- other columns --
FROM napp_o2i_po_lines pol
, napp_o2i_po_headers poh
, aso_quote_lines_all aqla
, mtl_system_items_b msib
WHERE 1=1
AND poh.header_id = pol.header_id
AND pol.header_id = :P_TRX_HDR_ID
AND aqla.quote_header_id = poh.QUOTE_HEADER_ID
AND msib.inventory_item_id = aqla.inventory_item_id
AND msib.organization_id = aqla.organization_id
AND (pol.quote_line_number = aqla.quote_line_id
OR pol.quote_line_number = aqla.quote_line_id||1)
]]>
-- Added for the defect 13954
</sqlStatement>
</dataQuery>
- <dataStructure>
- <group name="G_PO_HDR" source="Q_PO_HDR">
<element name="PO_NUMBER" value="PO_NUMBER" />
<element name="QUOTE_NUMBER" value="QUOTE_NUMBER" />
--- mappings for other columns of "Q_PO_HDR"
- <group name="G_LINES" source="Q_LINES">
<element name="ITEM" value="ITEM" />
<element name="PARTNER_PART_NUMBER" value="PARTNER_PART_NUMBER" />
--- mappings for other columns of "Q_LINES"
</group>
</group>
</dataStructure>
</dataTemplate>
Issue: Sometimes when the parent concurrent request runs for a batch with multiple POs the report generated for the last PO has inconsistent data in the master and detail sections. To elaborate, the detail section is having correct data pertaining to the PO identified by the parameter "P_TRX_HDR_ID". However, the master section is having data pertaining to the previous PO processed from the same batch.
This issue is not occurring consistently and is not reproducible at will. I
'm suspecting this could be because of not having data link between the queries but confirm from someone who has experienced this issue.
Regards,
Srinathis there any way from the page, can we pass the some values, which can identify the page level data?
if so pass the parameter to BIP report query. -
Master Detail Form - Update Statement for Column in the Detail Section
Hello,
I've posted a demo application to apex.oracle.com
Application# 49298
Application Name: Street_Inventory
Basically, on page 3 I have a Master Detail Form. In the Detail section, I want the value of On_hand to save to table ITEMS. Here's my code below.
SOURCE
select
"CONSUME_DETAIL"."CONSUME_DETAIL_ID",
"CONSUME_DETAIL"."CONSUME_HEADER_ID",
"CONSUME_DETAIL"."ITEM_ID",
"CONSUME_DETAIL"."CONSUMED_QUANTITY",
("ITEMS"."ON_HAND" - "CONSUME_DETAIL"."CONSUMED_QUANTITY") as "ON_HAND"
from "CONSUME_DETAIL",
"ITEMS"
where "CONSUME_HEADER_ID" = :P3_CONSUME_HEADER_ID
and "CONSUME_DETAIL"."ITEM_ID"="ITEMS"."ITEM_ID"
UPDATE INVENTORY PROCESS
UPDATE ITEMS
SET ON_HAND = :P3_ON_HAND - :P3_CONSUMED_QUANTITY
WHERE ITEM_ID = (select ITEM_ID
from CONSUME_DETAIL
where CONSUME_DETAIL_ID = :P3_CONSUME_DETAIL_ID);
My code isn't working. What am I doing wrong?WReed,
The first thing I see "off the bat" is that you don't have items named P3_ON_HAND and P3_CONSUMED_QUANTITY which are referenced in your code. Although it's possible to do what you want with just SQL, I updated your code with a little PL/SQL to make it easier to understand...
As you'll see the problem now is that the design/db model is not quite right as your getting a too many rows error.
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
Maybe you are looking for
-
Home Hub 3 and 4 Connections Limit ?
Hi All i am very much hoping there is someone expert on issues such as number of connections allowed and home hub interconnecting. First things first. I had a home hub 3 and it kept on dropping the signal. it went on for several months and many cal
-
New 60GB iPod very slow in updating with iTunes for Windows
I just purchased my first iPod, the new 60GB model. I imported all my music into iTunes from a music server connected to my home network. Although the import took a very long time, it all imported succesfully. When initially connecting my iPod, its l
-
I want to bring my back up hard drive on a trip, but now it's attahced to my Airport Extreame. If I unplug it and plug it directly on my MacBook Pro, it'll keep updating or I'll lose all my back ups and have to restart again?
-
Reading the reference GUID (Item Guid) within an ABAP Date Rule
I have created a new date rule in which a Z-function module is called. Within the function module I need to read data from the order (such as the Ibase Component). However I noticed that the within the Z-function module the import parameter provided
-
RocketRaid 3520 - anyone have it working?
Hi - I have a late 2005 PMG5 running os x server 10.5.8 Put a Highpoint RocketRaid 3520 in it, all ethernet ports stop working (to clarify, they say "cable disconnected" even with an cable plugged into them). Card works OK otherwise (not without some