How to return marked values from the FM F4IF_INT_TABLE_VALUE_REQUEST
Hello all.
I'm using the FM F4IF_INT_TABLE_VALUE_REQUEST with multiple choise activated.
My problem is: if I mark, for example - 2 choises from 5, and then press OK.
If i go in to the same F4 button, I what to see the same marks like before..
At the moment, if i go in again to the same F4, nothing is marked, as if i'm going in for the first time.
Can someone help me?
Hi Barak,
I don't think you can achieve this functionality using this FM. Even I think this is not there in standard SAP help, please check.
Regards,
Atish
Similar Messages
-
[UIX] How To: Return multiple values from a LOV
Hi gang
I've been receiving a number of queries via email on how to return multiple items from a LOV using UIX thanks to earlier posts of mine on OTN. I'm unfortunately aware my previous posts on this are not that clear thanks to the nature of the forums Q&A type approach. So I thought I'd write one clear post, and then direct any queries to it from now on to save me time.
Following is my solution to this problem. Please note it's just one method of many in skinning a cat. It's my understanding via chatting to Oracle employees that LOVs are to be changed in a future release of JDeveloper to be more like Oracle Forms LOVs, so my skinning skills may be rather bloody & crude very soon (already?).
I'll base my example on the hr schema supplied with the standard RDBMS install.
Say we have an UIX input-form screen to modify an employees record. The employees record has a department_id field and a fk to the departments table. Our requirement is to build a LOV for the department_id field such that we can link the employees record to any department_id in the database. In turn we want the department_name shown on the employees input form, so this must be returned via the LOV too.
To meet this requirement follow these steps:
1) In your ADF BC model project, create 2 EOs for employees and departments.
2) Also in your model, create 2 VOs for the same EOs.
3) Open your employees VO and create a new attribute DepartmentName. Check selected in query. In expressions type (SELECT dept.department_name FROM departments dept WHERE dept.department_id = employees.department_id). Check Updateable always.
4) Create a new empty UIX page in your ViewController project called editEmployees.uix.
5) From the data control palette, drag and drop EmployeesView1 as an input-form. Notice that the new field DepartmentName is also included in the input-form.
6) As the DepartmentName will be populated either from querying existing employees records, or via the LOV, disable the field as the user should not have the ability to edit it.
7) Select the DepartmentId field and delete it. In the UI Model window delete the DepartmentId binding.
8) From the data controls palette, drag and drop the DepartmentId field as a messageLovInput onto your page. Note in your application navigator a new UIX page lovWindow0.uix (or similar) has been created for you.
9) While the lovWindow0.uix is still in italics (before you save it), rename the file to departmentsLov.uix.
10) Back in your editEmployees.uix page, your messageLovInput source will look like the following:
<messageLovInput
model="${bindings.DepartmentId}"
id="${bindings.DepartmentId.path}"
destination="lovWindow0.uix"/>Change it to be:
<messageLovInput
model="${bindings.DepartmentId}"
id="DepartmentId"
destination="departmentsLov.uix"
partialRenderMode="multiple"
partialTargets="_uixState DepartmentName"/>11) Also change your DepartmentName source to look like the following:
<messageTextInput
id=DepartmentName
model="${bindings.DepartmentName}"
columns="10"
disabled="true"/>12) Open your departmentsLov.uix page.
13) In the data control palette, drag and drop the DepartmentId field of the DepartmentView1 as a LovTable into the Results area on your page.
14) Notice in the UI Model window that the 3 binding controls have been created for you, an iterator, a range and a binding for DepartmentId.
15) Right click on the DepartmentsLovUIModel node in the UI Model window, then create binding, display, and finally attribute. The attribute binding editor will pop up. In the select-an-iterator drop down select the DepartmentsView1Iterator. Now select DepartmentName in the attribute list and then the ok button.
16) Note in the UI Model you now have a new binding called DCDefaultControl. Select this, and in the property palette change the Id to DepartmentName.
17) View the LOV pages source, and change the lovUpdate event as follows:
<event name="lovSelect">
<compound>
<set value="${bindings.DepartmentId.inputValue}" target="${sessionScope}" property="MyAppDepartmentId" />
<set value="${bindings.DepartmentName.inputValue}" target="${sessionScope}" property="MyAppDepartmentName" />
</compound>
</event>18) Return to editEmployees.uix source, and modify the lovUpdate event to look as follows:
<event name="lovUpdate">
<compound>
<set value="${sessionScope.MyAppDepartmentId}" target="${bindings.DepartmentId}" property="inputValue"/>
<set value="${sessionScope.MyAppDepartmentName}" target="${bindings.DepartmentName}" property="inputValue"/>
</compound>
</event>Thats it. Now when you select a value in your LOV, it will return 2 (multiple!) values.
A couple things to note:
1) In the messageLovInput id field we dont use the .path notation. This is mechanism for returning 1 value from the LOV and is useless for us.
2) Again in the messageLovInput we supply _uixState as an entry in the partialTargets.
3) We are relying on partial-page-refresh functionality to update multiple items on the screen.
Im not going to take the time out to explain these 3 points, but its worthwhile you learning more about them, especially the last 2, as a separate exercise.
One other useful thing to do is, in your messageLovInput, include as a last entry in the partialTargets list MessageBox. In turn locate the messageBox control on your page (if any), and supply an id=MessageBox. This will allow the LOV to place any errors raised in the MessageBox and show them to the user.
I hope this works for you :)
Cheers,
CM.Thanks Chris,
It took me some time to find the information I needed, how to use return multiple values from a LOV popup window, then I found your post and all problems were solved. Its working perfectly, well, almost perfectly.
Im always fighting with ADF-UIX, it never does the thing that I expect it to do, I guess its because I have a hard time letting go of the total control you have as a developer and let the framework take care of a few things.
Anyway, I'm using your example to fill 5 fields at once, one of the fields being a messageChoice (a list with countries) with a LOV to a lookup table (id , country).
I return the countryId from the popup LOV window, that works great, but it doesn't set the correct value in my messageChoice . I think its because its using the CountryId for the listbox index.
So how can I select the correct value inside my messageChoice? Come to think of it, I dont realy think its LOV related...
Can someone help me out out here?
Kind regards
Ido -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to select multiple values from the parameters in BI Publisher report
How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...
Hi kishore,
I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
Iam able to get the results when I am selecting one value..
and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
1.Single selection.
2.Multiple selection.
3.'ALL' Values.
4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
Ex:
Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
Expected Output on the report:ACCOUNT,HR,SALES
reply to this would be much appreciated....
thanks,
manoj -
How to select multiple values from the Parameters in the concurrent program
How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?
I think there's no way to do that using standard feature.
Some workaround I use :
1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
Selection1 : <choose first selection>
Selection2: <choose 2nd selection>
..etc.
If you don't use it then leave it empty.
2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc. -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
How to return multiple values from dialog popup
hi all
I'm using ADF 10g. I have a requirement that I have to return multiple values from a dialog.
I have a page containing a table with a button which calls the dialog. The dialog contains a multi-select table where i want to select multiple records and add them to the table in the calling page.
In the backing bean of the calling page, I have the returnListener method.
I am thinking that I have to store the selected rows from dialog in an array and return that array to the returnListener...but I don't know how to go about it with the code.
Can someone help me out with it?
thanksHi Frank,
I'm trying to implement your suggestion but getting comfused.
AdfFacesContext.getCurrentInstance().returnFromDialog(null, hashMap) is called in ActionListener method, from what I understood.
ReturnListener method already calls it, so no need to call explicitly.
Okay here's what i'm doing.
command button launches the dialog on the calling page.
In the dialog page, there is a button "select", which when i click, closes the dialog and returns to calling page. I put a af:returnActionListener on this button, which logically should have a corresponding ReturnListener() in the calling page backing bean.
Now I have 3 questions:
1. do i have to use ActionListener or ReturnListener?
2. where do I create the hashMap? Is it in the backing bean of the dialog or in the one of calling page?
3. how do I retrieve the keys n values from hashmap?
please help! thanks
This is found in the backing bean of calling page:
package mu.gcc.dms.view.bean.backing;
import com.sun.java.util.collections.ArrayList;
import com.sun.java.util.collections.HashMap;
import com.sun.java.util.collections.List;
import java.io.IOException;
import java.util.Map;
import javax.faces.application.Application;
import javax.faces.application.ViewHandler;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import javax.faces.event.ActionEvent;
import mu.gcc.dms.model.services.DMSServiceImpl;
import mu.gcc.dms.model.views.SiteCompaniesImpl;
import mu.gcc.dms.model.views.SiteCompaniesRowImpl;
import mu.gcc.dms.model.views.lookup.LkpGlobalCompaniesImpl;
import mu.gcc.util.ADFUtils;
import mu.gcc.util.JSFUtils;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.adf.model.binding.DCIteratorBinding;
import oracle.adf.view.faces.context.AdfFacesContext;
import oracle.adf.view.faces.event.ReturnEvent;
import oracle.adf.view.faces.model.RowKeySet;
import oracle.binding.AttributeBinding;
import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;
import oracle.jbo.AttributeDef;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowIterator;
import oracle.jbo.RowSetIterator;
import oracle.jbo.domain.Number;
import oracle.jbo.server.java.util.Iterator;
public class CompanyList {
private BindingContainer bindings;
private Map hashMap;
DMSServiceImpl service =(DMSServiceImpl)ADFUtils.getDataControlApplicationModule("DMSServiceDataControl");
SiteCompaniesImpl siteCompanyList = service.getSiteCompanies();
LkpGlobalCompaniesImpl globalCompanyList = service.getLkpGlobalCompanies();
public CompanyList() {
public BindingContainer getBindings() {
return this.bindings;
public void setBindings(BindingContainer bindings) {
this.bindings = bindings;
*public void setHashMap(Map hashMap) {*
*// hashMap = (Map)new HashMap();*
this.hashMap = hashMap;
*public Map getHashMap() {*
return hashMap;
public String searchCompanyButton_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("Execute");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
*public void addCompanyActionListener(ActionEvent actionEvent){*
AdfFacesContext.getCurrentInstance().returnFromDialog(null, hashMap);
public void addCompanyReturnListener(ReturnEvent returnEvent){
//how to get hashmap from here??
public String addCompanyButton_action() {
return "dialog:globalLovCompanies";
} -
How to return a value from sql plus activity
Hi,
I want to return a value from sqlplus activity to a processflow variable.
SQL PLUS activity has a property :"RESULT_CODE", whenever i run the process flow this value is always reurned as 0.
in sqlplus activity i have written some pl/sql block....
for example
begin
end;
exit
i want to do something like
begin
if v=100 then
return 1
else
return 0;
end if;
end;
exit
can some please tell me how can i return value from this pl/sql block to proessflow.
Regards,
RD_RBStable ==> function
input param from table to function. ==> input mapping paramter to store the output from the mapping.
Will this now work. -
How to get a value from the previous element (XSLT/XPATH gurus ahoy!)
Hi All,
I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
Here's a simplified data example to illustrate the problem.
<ROW>
<START_DATE>01-01-1980</START_DATE>
<END_DATE>01-01-1988</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-1988</START_DATE>
<END_DATE>01-01-1990</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-2000</START_DATE>
<END_DATE>01-01-2005</END_DATE>
</ROW>
With the data above, I should print two lines:
01-01-1980 - 01-01-1990
01-01-2000 - 01-01-2005
I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
Thanks & Regards, Matildause this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to Get Parameter Values from the URL ?
Hi,
I have built a calendar called cal_test. I am calling this calendar with this URL:
http://.../pls/.../xyz.cal_test.show?p_arg_names=p_sc_id&p_arg_values=2&p_arg_names=_start_date&p_arg_values=FEB-2002
In the 'Additional PL/SQL Code' tab of cal_test, I need to call a procedure which requires me to pass in as parameters the values of p_sc_id and startdate embedded in the URL named above. How can I retrieve these 2 values from the URL ? Any advice will be appreicated !
DorothyHi Daniel
The following thread might help;
if not, you could try posting the question in Application Server » Web Dynpro Java
Thanks
Kenny -
How to get updated values from the loops while they are running
Hello,
I am having difficulty solving a very basic problem, how to access the updated values from the 'FOR loop' while its running? Basically, the VI I am currently working on calls two sub VIs. Each sub VI has a for loop, and both VIs may or may not run for same number of iterations. My goal is to read the values at each terminal inside the loop of both sub VIs, in the Main VI. I tried to achieve it using Global Variables, but in main VI it displays only the last iteration value from both sub VIs. Could anyone please tell me whrere am I going wrong? Is there any other/better way to achieve this.
I appreciate any input on this issue.
Kudos are (always) welcome for the good post. :-)
Solved!
Go to Solution.Dennis,
In attached VI, I can see the values changing in the sub VI from the main VI with the numeric indicator whose reference is passed on to the sub VI. Now if I wanted to store or use those values how do I do that? I tried to chnge the indicator to control and read from it (in the attached VI) , but the the indicator updates only once. Tried to create a property node and read the Value from it and it didn't work either.
Thanks in Advance!
-Nilesh
Kudos are (always) welcome for the good post. :-)
Attachments:
main-1.vi 8 KB
sub-1.vi 9 KB -
Hi,
I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values. The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB. ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
How can I see all the values in the line I select in the return table?
My code is as follows:
DATA: tbl_cawnt LIKE cawnt OCCURS 0,
wa_cawnt LIKE cawnt,
BEGIN OF tbl_list OCCURS 0,
atinn LIKE cawnt-atinn,
atzhl LIKE cawnt-atzhl,
atwtb LIKE cawnt-atwtb,
END OF tbl_list,
wa_list LIKE tbl_list,
tbl_return LIKE ddshretval OCCURS 0,
wa_return LIKE ddshretval,
tbl_fields LIKE dfies OCCURS 0,
tbl_dynp LIKE dselc OCCURS 0.
REFRESH: tbl_list, tbl_cawnt.
SELECT atinn atzhl atwtb
FROM cawnt
INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
WHERE spras EQ sy-langu.
LOOP AT tbl_cawnt INTO wa_cawnt.
CLEAR wa_list.
MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
wa_cawnt-atinn TO wa_list-atinn,
wa_cawnt-atzhl TO wa_list-atzhl.
APPEND wa_list TO tbl_list.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ATWTB'
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = tbl_list
return_tab = tbl_return
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
Thanks!Hi,
Use the structure DYNPFLD_MAPPING
With this internal table you can easily define that you want to return
other columns of the hit list in addition to field RETFIELD to the
screen.
In this IT you can MAP the screen fields to the serch help screen fields this has three fields
FLDNAME this is the field anme from the search help
FLDINH This has to be blank which would be field with the field value that you want to map
DYFLDNAME THis is the screen field name.
So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
Regards,
Himanshu -
How to get multiple values from the db using select
hi all,
i am using oracle 9i database
i created a procedure
create or replace procedure sample_proce
as
to_i varchar2(50)
begin
select to_id into to_i from sample where flag in('y');
dbms_output.put_line('hai'|| to_i);
end;
when i executed this procedure the following error occurred.
error at line 5 fetching too many rows.
but when i execute the select query alone i can able to view all the rows.
how to resolve iti used the following procedure
create or replace procedure sample_proc
as
begin
for s in(select to_id from sample where flag='y')
loop
dbms_output.put_line(s.to_id);
end loop.
end;
it is executed fine. i can able to fetch all the rows.
how to pass all these values into the another procedure.
we usually pass only one value into another procedure, i do no how to pass all the values . please help me.
Thank u. -
How to pass a value from the report to a form ( BIT OF URGENT ).
Hi,
I had created a "Form on a Table with Report" on the report I had remove the edit link and set one of the column feilds that functionality. Now I want to know how to pass that value that is clicked ( having hyper link ) on to the form where it runs a SQL query and then displays the reuslts on the form.
Illustrating with an example.
I am having these following columns on the report ( these are the results for the join statement )
JOBNUM JOBNAME DEPTNUMBER SAL EMPNO LNAME FNAME
In the above JOBNUM is having Hyper link as I removed the edit image.
Now this is area I am having problem. When the user clicked on the JOBNUM then on form it should display 20 other columns( pulled from 5 other tables ) which are related to that particualr JOBNUM.
Anybody give me a solution in which area I have to include my SQL statement and how to pass that selected value to that SQL statement.
Cheers,
KrishnaHi Ron,
I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
Thanks for your help in advance.
Cheers,
Krishna. -
How to delete a value from the nested structure?
Hi Friends!
I have a nested structure such as
multimap<int, map<int ,set<int>>> FinalMul
It contains sample values
1=>4--->1
6=>4--->1
6=>9--->4
11=>4--->1
11=>5--->1 4
11=>9--->4
12=>2--->1 4 5
I want to delete the value 4 from the second and third column,
So, it looks like
1=>
6=>
6=>9--->
11=>
11=>5--->1
11=>9--->
12=>2--->1 5
after deleting 4, if I have a key(first) (1, 6, 11) and secondkey (second)(6=>9--->, 11=>9--->) with no values, then delete them also.
Finally it looks like
11=>5--->1
12=>2--->1 5
Can anyone help me how to solve it?
I just tried something;
set<int> tempV;
map<int, set<int>> tempM;
multimap<int, map<int, set<int>>> FinalMul
tempV.insert(1);
tempM.insert(make_pair(4, tempV));
FinalMul.insert(make_pair(1, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1);
tempM.insert(make_pair(4, tempV));
FinalMul.insert(make_pair(6, tempM));
tempV.clear();
tempM.clear();
tempV.insert(4);
tempM.insert(make_pair(9, tempV));
FinalMul.insert(make_pair(6, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1);
tempM.insert(make_pair(4, tempV));
FinalMul.insert(make_pair(11, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1); tempV.insert(4);
tempM.insert(make_pair(5, tempV));
FinalMul.insert(make_pair(11, tempM));
tempV.clear();
tempM.clear();
tempV.insert(4);
tempM.insert(make_pair(9, tempV));
FinalMul.insert(make_pair(11, tempM));
tempV.clear();
tempM.clear();
tempV.insert(1); tempV.insert(4); tempV.insert(5);
tempM.insert(make_pair(2, tempV));
FinalMul.insert(make_pair(12, tempM));Check this attempt:
typedef
set<int>
SET;
typedef
map<int,
SET>
MAP;
typedef
multimap<int,
MAP>
MULTIMAP;
// remove '4' from second column
for_each( FinalMul.begin(), FinalMul.end(),
[]( MULTIMAP::value_type
& mmv )
MAP & m =
mmv.second;
m.erase( 4 );
// remove '4' from third column and remove empty entries
for_each( FinalMul.begin(), FinalMul.end(),
[]( MULTIMAP::value_type
& mmv )
MAP & m =
mmv.second;
for(
auto i = m.begin(); i != m.end(); )
SET & s = i->second;
s.erase( 4 );
if( s.empty() )
i = m.erase( i );
else
++i;
// remove empty entries
for(
auto i = FinalMul.begin(); i != FinalMul.end(); )
MAP & m = i->second;
if( m.empty() )
i = FinalMul.erase( i );
else
++i;
Maybe you are looking for
-
Can No Longer Read Uninstall Keys with vbscript package run by SCCM
Hi, I've been using vbscript packages in SCCM for over a decade, and one thing I do is use the registry to determine if I need to uninstall an old program with the Value: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ or HKLM\SOFTWARE\Wow
-
PDF Proofing Problems in Acrobat Reader
I have initiated a PDF Review for Comments and Markups in Adobe Acrobat Pro. My reviewers all have Adobe Reader and when they open the document, they are able to view it, but not able to comment and mark it up. They can't even access the Comment & Ma
-
Windows Vista Home, Visual Studio 2008 sp1, Oracle 11g Error Access
Hi: Im new in occi for visual studio, im try to do some with occi, i dowloaded and installed vc9 libs and inc and instant client basic and sdk, but i can connect, can you help me? this is my history First-chance exception at 0x52902721 (GEOM.arx) in
-
Photoshop 5.0.2 upgrades / updates
I currently own photoshop 5.0.2. What updates are available? Also, can I upgrade to a new version of Photoshop? If so, how and where?
-
Got a strange problem, Can sync but after sync shows there is a problem and uninstalling
Ok I have the latest generation Nano, Windows 7 (64bit) - All windows updates - Correct and update Asus motherboard drivers - Latest iTunes 10.6 install (64 bit) also have uninstalled and reinstalled - Already restored iPod through iTunes The Proble