How to calculate RFC table columns in to another table column.
Hi,
I am doing a scenario, where in my Wendynpro UI table has been populated with a Function module output.
Now three of the output columns needs to processed on each row.
For ex:
1. I have to add two cloumn values on each row in to third column which is binded to a context attribute. This should happen before I show the table result. So, I cannot use calulated attribute here. Instead I am trying to find a custom solution that should process each row as soon it appears then bind to result column.
2. Also One of the RFC column has list of values i.e ABAP Function module returns a list of values. How do we populate these list of values in to UI table then add them alltogether before we show the result to the user.
I appreciate your help in this regard.
thanks
Praveen
Hi
You can add custom attributes in Modal node as well. After successful execution of RFC, loop through the modal node and do the necessary calculations for each row and put them in the custom attributes.
Map the required attributes in the Table UI including the custom attributes.
This should help !!!
Regards,
Sayan Ghosh
Similar Messages
-
How to calculate some value that referring to another table
Hi...
Need help asap
The questions are :
Q1 : In Microsoft Excell, we can take value from one cell and use it to another cell.
How about in BO, if we want to take value (ex. 93.75) from the other table and use or refer the value that we want to to another table (just use the value from another table)
Just for information, we want to use the number (93.75) in another function. (if <93.75, then........) and the value (93.75) is a result from another function or calculation.
Q2 : How to SUM from one table and show the result to another table.(We want to use the result of SUM for another calculation in different table.)
Thanks for your kind help.Eva,
In answer to your question about using a cell from report (block) as a value to be manipulated within another block, will be tricky unless you can employ the "Merge Dimensions" technique. Working in the blind and trying to visualize what you are trying to do is very difficult, so to speak in general terms, you will have to determine a best way to merge dimensions, then build specific local variables to "flag" and extract succinct values from one data provider, and then use that local variable in applying it to the other block. This will take some experimentation and testing before you can feel confident and get the hang of it.
On the other hand, if you know what the threshold value is that you want to apply (like for instance 91.75), then you can either "hardcode" that in your formula(s), or build a prompt in your report that captures this tidbit from the user when the report runs, and using the UserResponse function you should be able to calculate what it is you want to do.
Good luck and post more details (specific tables, columns, and manipulations) and perhaps some one can post a suggestion on how to best execute your report.
Thanks,
John -
How to calculate value from perticular column and row in pivot table
Hi all,
I am having following pivot table.
Country
A
B
C
D
F
G
H
J
K
L
M
Grand Total
Canada
1
1
3
3
12
14
13
97
China
8
4
3
19
India
2
47
448
176
395
3656
1964
1360
8077
USA
1545
352
380
26
10
4
8
32
2054
1023
758
4624
UK
12
19
13
23
33
298
Grand Total
1545
352
381
29
72
474
184
427
5743
3028
2167
13114
Now I want sum of Columns A, B, C, K, M where Country = India in one field.
and sum of D, F, g in another field. and sum of remainig columns in another field.
How can i get sum of values with some where condition in pivot table.
Thanks,Hi Michael,
Following is the representation which i want
CouRntry
ROW LABLES
A
B
C
Total of
ABC
F
G
Total
Of FG
J
K
L
TOTAL
of JL
Grand
Total
Canada
1
1
3
3
12
14
13
97
China
8
4
3
19
India
2
47
448
176
395
3656
1964
1360
8077
USA
1545
352
380
26
10
4
8
32
2054
1023
758
4624
UK
12
19
13
23
33
298
Grand Total
1545
352
381
29
72
474
184
427
5743
3028
2167
1
Also if i get sum how can i add a column in between of the fields.
Thanks -
How to calculate the individual sums of multiple columns in a single query
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
Thanksuser13667036 wrote:
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
ThanksLooks like you want a simple group by.
select
yr
, mnth
, region
, sum(handled_package)
, sum(expected_missing_package)
, sum(actual_missing_package)
from test
group by
yr, mnth, region
order by
yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
CREATE TABLE test
year_month date,
Region VARCHAR2(50),
CITY VARCHAR2(50),
Handled_Package NUMBER,
Expected_Missing_Package NUMBER,
Actual_Missing_Package NUMBER
alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
ERROR at line 1:
ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
Elapsed: 00:00:00.03
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
1 row created.
Elapsed: 00:00:00.01
ME_XE?select
2 to_char(year_month, 'fmYYYY') as year
3 , to_char(year_month, 'fmMonth') as month
4 , Region
5 , CITY
6 , Handled_Package
7 , Expected_Missing_Package
8 , Actual_Missing_Package
9 from test;
YEAR MONTH REGION CITY HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
2012 November Western San Fransisco 200 10 5
1 row selected.
Elapsed: 00:00:00.01
ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
Cheers, -
How to calculate a column bases on the result of another column?
Hello folks, i need some help with this senario.
I don't know to explain this in a simple way, but i'll give it a go.
I display a report in ApplicationExpress like this
Each row displays a product where the user are going to make a forecast for 18 months ahead.
[productname] [Stock] [sales] [PMonth] [NewstockMonth] [salesmonth1] [ProductionMonth1] [NewstockMonth1] ....
[product1]______[10]____[5]____[0]_________[5]__________[10]_________[10]______________[5]
[product2]______[2 ]____[0]____[0]_________[2]__________[5]__________[10]______________[ 7]
[product3]______[30]____[20]___[0]_________[10]_________[5]_________[10]______________[15]
Stock and sales are results of a function i have in my select.
productionmonth is a text field where the user can edit the production and is saved in the table.
So when the user has entered some inputs in the textboxes, and pressed the submit buttom, the newstockmonth columns
should be calculated from the result i get from the previous month.
newstockmonth = (stock-sales)+productionMonth
newstockmonth1 =(newstockmonth-salesmonth1)+productionmonth1
At this point my submit process has update in a for loop for each row. But i don't quite know how i can calculate every newstockmonth columns.Hi Klaus,
your condition only works if the Shop is in the query. If I understood it correctly you have one query with
Country Shop Total Sales
and one with
Country Number of Shops Total Sales
and you don't want to restrict the second Total Sales but the Total Sales from the first query.
Best regards
Dirk -
How to calculate table size given the structure.
Today i was asked how to estimate the size of the table given th transactions,.
table has 90 column all varchar(10)
How to calculate the size of table which has no data.
Message was edited by:
Maran.Ehi,
SQL> create table test as select * from all_objects ;
Table created.
SQL> create table test1 as select * from all_objects where 1 = 2 ;
Table created.
sql>select segment_name,bytes/1024/1024 "size", blocks
from dba_segments
where segment_name in ('TEST','TEST1')
SEGMENT_NAME
size BLOCKS
TEST1
.0625 8
TEST
6 768regards
Taj -
How to calculate New customers and Returning customers in a Pivot Table?
Hi,
I have a Pivot table with columns as Order Date, Customer Name, Qty, Cost, Freight, Invoice, Adv Payment. I have only 30 customers and 11000 transactions for 4 years sales period.
How to calculate New customers and Returning customers in Pivot Table for any given Month or Quarter or Year. I am open to use helper column, formula or a calculated field etc
Thanks
ArjunHi Arjun,
I have received the file and read it, based on your further explain, I know your requested more clarity. In my view, the requested could be done via VBA code or Select function in other dataset, like Access/SQL. (Because before we count the new
customer and return customer, we might to filter them via rule, the formula need to assign the customer one by one. So, it's inefficient)
Thus, I recommend we try the above workaround: Use macro or Select function in Access. If you have further question about the coding, please post to the MSDN forum for Excel
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
How we can replace the column in Core Table plz see this msg
Hi,
How we can replace the column in Core Table plz see this msg
Req:
when i push the Insert button the data inserted into the Table
like
Cols Values
FOCD CUFZ14
PRDCD FU6
Month 082008
AgencyCD AG02
PLAN 123
This is FO_Plan Table....
Requirement:
i need at table show to replace the Prd_CD to Prd_Desc while inserting the above Row....
There is no Prd_Desc in FO Plan Table....
Prd_desc comes from Product Table.
did u get my point...
how to solve.
Thanks
Ram
Edited by: Ram Vungarala on Sep 24, 2008 9:09 AM
Edited by: Ram Vungarala on Sep 24, 2008 9:15 AMHi,
I'm not sure if I understood what are you trying to do. But you can modify your table in a backing bean code. JSF page code for a table:
<af:table id="product_search_results_tbl" binding="#{backingBean.boundTable}" ... />
And a backing bean code:
import oracle.adf.view.faces.component.core.data.CoreTable;
public class YourBackingBean {
private CoreTable boundTable;
public void setBoundTable(CoreTable boundTable) {
this.boundTable = boundTable;
public CoreTable getBoundTable() {
return boundTable;
public String insertButtonAction() {
// Bind your button action to this method and modify here your bound table
return null;
{code}
Look for column modification methods in a CoreTable class documentation.
Marius -
How can i change the column label text in a alv table display
how can i change the column label text in a alv table display??
A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
<i>* declare column, settings, header object
DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
get column by specifying column name.
lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
set Header Text as null
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( ' ' ).</i>
My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
<i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
i have checked in debugging and the error occured at the statement :
<i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
Thanks,
SuriI found it myself how to do it. The error says that it is not able to find the reference object i.e it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
lr_if_controller TYPE REF TO iwci_salv_wd_table,
lr_cmdl TYPE REF TO cl_salv_wd_config_table,
lr_col TYPE REF TO cl_salv_wd_column.
DATA : node_year TYPE REF TO if_wd_context_node,
elem_year TYPE REF TO if_wd_context_element,
stru_year TYPE if_alv_layout=>element_importing,
item_year LIKE stru_year-i_current_year,
lf_string TYPE char(x),
DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
Get the entered value from the input field of the screen
node_year = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
elem_year = node_year->get_element( ).
elem_year->get_attribute(
EXPORTING
name = 'IMPORT_NODE-PARAMETER'
IMPORTING
value = L_IMPORT_PARAM ).
WRITE L_IMPORT_PARAM TO lf_string.
Get the reference of the table
lr_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
ENDIF.
lr_if_controller = wd_this->wd_cpifc_alv( ).
lr_column_settings = lr_if_controller->get_model( ).
get column by specifying column name.
IF lr_column_settings IS BOUND.
lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
set Header Text as null
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( lf_string ).
endif. -
How to add a new column (Project Number) in the action items table under NPD Module?
There are two projects with same name and created by same person in NPD.
So when it is displayed in "Action Items" table, It looks similar.
To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
Please do the needful.There is no out of the box configuration available to add columns to NPD action items. As always we welcome enhancement requests.
Thanks
Kelly -
How to get the primarykey columns of the table in SAP BI Java SDK
Hi, I'm new to sap BI Java SDK. I'm not getting how to get the primarykey columns, using BI JDBC Connector (for relational data sources). If anybody knows, please let me know. its very very urgent task to be done in my project. In the below following code.... I have written a code to connect to the database through resource bundle, reading table names, once user select table name, i need to show the primary key columns of that table to the user. here i'm not getting how to get the primary key columns . Please send me the code if there is any method to find out the primarykey columns or a logic to get them. I will be greatful to you.... if you can do this favour.
Please check out the following code ........
ManagedConnectionFactory mcf;
IConnectionFactory cf;
IConnectionSpec cs;
mcf = new JdbcManagedConnectionFactory();
cf = (IConnectionFactory) mcf.createConnectionFactory();
cs = cf.getConnectionSpec();
ResourceBundle rbLocal = ResourceBundle.getBundle( "xxxx");
Enumeration propnames = rbLocal.getKeys();
while (propnames.hasMoreElements())
String key = (String) propnames.nextElement(); //out.print(key); //out.println("="rbLocal.getString(key)"");
cs.setPropertyValue(key, rbLocal.getString(key));
// Establishing the connection. // The IBIRelational interface provides an entrypoint to access // metadata and execute queries.
IBIConnection connection = (IBIConnection) cf.getConnectionEx(cs); I
BIRelational rel = connection.getRelational();
IBIQuery query = rel.createQuery();
String sqlStatement = "SELECT * FROM " + "BICQPERSON where type='pk'"; ResultSet rs = IBIDataSet dataset = query.execute();
Thanks SreeKanthHi,
looks like you are on Infomation Builders, correct? If yes through which adapter and to what DB are you connecting?? in an R3/BW system you can do the folowing:
"(ABAP)
SELECT DISTINCT FIELDNAME
FROM DD03L
WHERE TABNAME = '/BIC/QPERSON'
AND AS4LOCAL = 'A'
AND KEYFLAG = 'X'
ORDER BY 1
Another option is goto directly to the RDBMS; in this case let me which one are you using
hope this helps...
Olivier.
Message was edited by:
Olivier Cora -
How to create a table with varied number of columns?
I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
Can I do it? How? Thanka a lot.Why did you create a new thread for this?
How to create a table with varied number of columns? -
How to create a table with editable column values.
Hi everyone,
I think this is very simple but i'm not able to find how to do this. This is my requirement. I need to create a table with n columns and 1 row initially. user should be able to enter data into this table and click of a button should insert data into the data base table. Also there should be a button at the bottom of the table to add 1 row to the table.
I know how to do the insert to database, but can anyone please let me know how to create a table that allows user to enter data and how to create a add 1 row button?
Thanks in Advance!Raghu,
Go through the ToolBox tutorial Create Page & Advanced table section of OAF Guide.
Step 1 - You require to create EO & a VO based on this EO. This EO will be of DataBase table where you want to insert the data.
Step 2 - Create a Advanced table region. (Refer this Adavanced table section for more on this)
Step 3 - Attach this VO in the BC4J component of Adavanced Table region.
Regards,
Gyan -
How to add an unique column to an existing table?
How to add an unique column to an existing table?
I have a large table which has no unique constraint. and I want to add an unique column for it. How to do it?
Does adding a sequence is a good choice? How to do it?
Thank youHi,
alter table tablename
add constraint contraint_name unique (columnname);but before that you need to check in the table.column there is no duplicate record exist.
Does adding a sequence is a good choice?
Your talking about unique constraint then yes.
Regards,
Taj -
How to populate the organization_code column in ST table for legacy system
Hi, dear all,
Now I use the stage table to load the setup&transaction collection data from a non-EBS legacy system to ASCP system.
My question is: how to populate the organization_code column in the stage table?If the source system is EBS system, maybe it's an inventory organization code. But for the non-EBS system, which value is need fo this field? keep it as blank? or assign some value for it?
Thanks
Edited by: 852938 on 2011-5-4 下午10:24I find some words in the implementation guide, it says:"To collect data from your non-Oracle ERP systems or your trading partners' systems,you model each non-Oracle ERP system or trading partner as an Oracle Applications organization and store their setup and transaction data there".
But I can't find where to model the application organization for the legacy system.
anyone can give some clues? Thanks in advance.
Maybe you are looking for
-
How do I revert back to my original LR
I ran a trial version of Adobe CC and now I can't get back to my original LR 5 version. It will open, but when I go to developer module it says I have to update/purchase the creative cloud version. How can I simply use my original boxed version?
-
Erase and install with SL with Time Machine Back up the right way
Ever since I upgraded to SL last year my MBP has had issues. After going round and round with Apple Care which is now expired it is clear that I need to do an erase and install. Most of the Apple Care guys don't know jack and you get a lot of answers
-
ITunes stops working when connecting to store. Solutions?
When attempting to conect to iTunes store a message appears "iTunes has stopped working" and it shuts down. I have updated and re-installed latest version and still I can't connect. All else within iTunes seems to work fine. I have Windows8. I see
-
WiFi Grayed, Bluetooth looping
I have my iPhone WiFi grayed almot all the time, and Bluetooth looping for a long times, sometimes it take a day to go back to off or on state. I thought that the problem began with updating to iOS 7.0.6, but I wasn't using WiFi & Bluetooth before t
-
Validation on ItemEditEnd of Datagrid
I have done validations on ItemEditEnd of datagrid but on focusout its showinf two alerts. Can anyone specify the reason?