Inserting all the records in particular period
Hi.,
I am using jdev11.1.5
I had created a reccustdocEO and its corresponding VO with the following querry This VO doesnot displayd in the UI
SELECT RecCustDocHdEO.RCDOC_BU,
RecCustDocHdEO.RCDOC_PFX,
RecCustDocHdEO.RCDOC_DOC_TYPE,
RecCustDocHdEO.RCDOC_DOC_MODE,
RecCustDocHdEO.RCDOC_DOC_NO,
RecCustDocHdEO.RCDOC_PLNT,
RecCustDocHdEO.RCDOC_CUST_ID,
RecCustDocHdEO.RCDOC_DOC_DATE,
RecCustDocHdEO.RCDOC_DOC_YEAR,
RecCustDocHdEO.RCDOC_DOC_PERIOD,
RecCustDocHdEO.RCDOC_BANK_ID,
RecCustDocHdEO.RCDOC_CURRENCY,
RecCustDocHdEO.RCDOC_EXCHANGE_RATE,
RecCustDocHdEO.RCDOC_TOT_AMT,
RecCustDocHdEO.RCDOC_CUST_REFERENCE,
RecCustDocHdEO.RCDOC_CUST_REFERENCE1,
RecCustDocHdEO.RCDOC_START_YEAR,
RecCustDocHdEO.RCDOC_START_PERIOD,
RecCustDocHdEO.RCDOC_LAST_PROC_YEAR,
RecCustDocHdEO.RCDOC_LAST_PROC_PERIOD,
RecCustDocHdEO.RCDOC_FREQUENCY,
RecCustDocHdEO.RCDOC_PROC_NO,
RecCustDocHdEO.RCDOC_PROC,
RecCustDocHdEO.RCDOC_STATUS,
RecCustDocHdEO.RCDOC_CRE_BY,
RecCustDocHdEO.RCDOC_CRE_DATE,
RecCustDocHdEO.RCDOC_UPD_BY,
RecCustDocHdEO.RCDOC_UPD_DATE,
RecCustDocHdEO.RCDOC_REC_TYPE,
RecCustDocHdEO.RCDOC_LAST_PROC_DATE,
RecCustDocHdEO.RCDOC_PLANT,
RecCustDocHdEO.ROWID
FROM REC_CUST_DOC_HD RecCustDocHdEO
WHERE RecCustDocHdEO.RCDOC_STATUS = 'P'
ORDER BY RecCustDocHdEO.RCDOC_DOC_YEAR,RecCustDocHdEO.RCDOC_DOC_PERIODconsider the table contains datas such as
year Period Docno
201011 2 1125556
201011 2 5689898
201011 3 5689444
If the user clicks the button all the records in period2 should get inserted to another table gljrnlhd
Pls verify the link if i am not clear
http://www.4shared.com/photo/OK1hXBsW/E008.html
Hi,
To copy the values from one view object to another you can use a method in the application module that will be called when the button is clicked.
The code in the method could be something like:
//Create an iterator based on the source view object
RowSetIterator iter=getViewObject1().createRowSetIterator(null);
iter.reset();
//iterate through the first view object
while(iter.hasNext()){
Row current=iter.next();
if("2".equals((current.getAttribute("Period")){
//create a new empty row from the second view object
Row newRow=getViewObject2().createRow();
//copy all attributes from one view object to the other
newRow.setAttribute("attr1", current.getAttribute("attr1"));
newRow.setAttribute("attr2", current.getAttribute("attr2"));
newRow.setAttribute("attr3", current.getAttribute("attr3"));
//insert the new row to the second view object
getViewObject2().insertRow(newRow);
//RowSetIterators should always be closed
iter.closeRowSetIterator();
}I hope I understood your use-case correctly.
Gabriel.
Similar Messages
-
How to insert all the records using below loop
I am iterating value from hash map and store the values in database.
Below loop structure, the values from hashmap are inserted fine.
But inside while(rs.next()),first record from db only inserted for all the records
while(itr.next()){
Integer key=(Integer)iterator.next();
String Value=(String) orderNumberMap.get(key);
while(rs.next()){
String firstName=rs.getString("fname");
String lastName=rs.getString("lname");
insert into tbl values('"+key+"','"+Value+"','"+fname+"','"+lname+"');
RegardsThanks for ur reply. The below is a scenario
I am having 3 records in a resultset
firstname= shadik
lastname frank
firstname= felix
lastname sha
firstname= williams
lastname= scoot
To insert above records with key, values retrieved from hashmap as follows
Number 1
empid 101
Number 2
empid 102
Number 3
empid 103
I need to insert above values in a table and expect a output as follows..
Number empid firstname lastname
1 101 shadik frank
2 102 felix sha
3 103 williams scoot.
But output will be displayed as follows
Number empid firstname lastname
1 101 shadik frank
2 102 shadik frank
3 103 shadik frank.
Values from HashMap are inserted fine. But retriving from resultset shows only first records for all the rows. -
Periodic Alert-How to send all the records returned from the SQL in a mail?
Hello all,
I have defined a Periodic Alert, my SQL query returns more than one record whenever I run it. I also defined an action to send an email with the message consisting of the output variables from the SQL. Whenever i run this alert, a mail is being sent for every single record returned from the query. But i want to send a single mail containing all the records information that my SQL query returns.
For Example: My SQL query lists all the users created on current date.
Select User_Id, User_Name into &OUTPUT1, &OUTPUT2
from fnd_users where trunc(creation_date) = trunc(sysdate)
Now i want to send a mail with all the users information from the above query, to SYSADMIN. How can this be achieved?
Thanks & Regards
chakooHi Chakoo,
If the Periodic Alert is not working as requried. You can write a simple package with 3 procedures to implement the writing output to a out file and simultaneuosly send email to multiple receiptents.
Example:
Create Package xx_pac
Create public Procedure P1
begin
Select User_Id, User_Name into &OUTPUT1, &OUTPUT2
from fnd_users where trunc(creation_date) = trunc(sysdate)
fnd_file.put_line (fnd_file.output, &OUTPUT1, &OUTPUT2);
end;
(Create private Procedure P2
begin
---Write the email package using the UTL_SMTP approch. Using this approch you can send the procedure P1 output file as an attachment to the desiginated receiptents.
end;
(Create public Procedure P3
begin
---call the procedure P1 using the "g_request_id = fnd_request.submit_request"
---Wait for the above procedure to complete using "l_conc_status := fnd_concurrent.wait_for_request" procedure.
---call the procedure P2. (When called you must provide the correct to, from address)
end;
end;
Register the Package xx_pac as a concurrent program and schedule when submit it from the request.
Regards
Arun Rathod -
How to update all the record for a particular column in a table based on search criteria.
Hi All,
I am new to ADF. I have a requirement, where i have to perform mass update on a table.
Scenario:
Ex: I have a dept manual search region. where i search with deptId: 20. I get 20 records in my table. now i have another region where i have a inputchoice list which contains all the columns names that exists in dept table. Beside that i have a input text box and an update button
Now user, first searches with dept id:20 and clicks on search button, where it shows 20 record in the table. He then select a column from input choicelist(ex: ManagerId), then enters new value in the input box(ex: abc) then clicks on update button.
Now i want, all the records in the ManagerId column with dept id:20 to be updated with the new value "abc"
Can anyone help me with the code.
Thanks in advance..Hi,
If you go to your VO and generate the ViewObjectImpl, in there you can create a method which will contain two parameters, 1 the attribute name and 2 the value.
Then you can follow something like explained in this post:
ADF Tutorial: How to apply bulk actions to a view object rows
The only difference is that you will need to create a method like this:
public void updateAttribute(String attribute, Integer value){
RowSetIterator iter = createRowSetIterator(null);
while (iter.hasNext()){
Row row = iter.next();
row.setAttribute(attribute, value);
Then you expose that as a client interface and then after you filter your table by your criteria you just need to execute this method passing the right parameters.
Regards -
Trying to retrieve all the records from the file on desktop
HI All
I have one particular problem. I was given a text file which as 7000 records with length 512 each in a continues string. I Changed begining of each record with comma in that text and saved it in .csv , when I try to upload the file into my program's internal table.
It is still giving one record. I used
itab_EXTRACT1 declared as
DATA: begin of itab_extract OCCURS 0,
extract1(512) type c,
end of itab_extract.
call method cl_gui_frontend_services => gui_upload
exporting
filename = Xfile
filetype = 'ASC'
has_field_separator = 'X'
changing
data_tab = itab_EXTRACT1
exceptions
others = 17.
Is there a way how to retrieve all the records into the internal table.
Thanks
RaviHi Ravi,
I don't know if this is the correct solution, but I think it will work.
Declare your internal table (itab_extract) with the maximum length which your file will occupy.
Create another internal table (itab) with field (text) length 512.
Populate the internal table itab_extract using GUI_UPLOAD.
Then write this code
l_index = 1.
itab-text = itab_extract-extract1+0(512).
append itab.
do.
n = ( l_index * 512 ) + 1.
itab-text = itab_extract-extract1+n(512).
append itab.
if ( itab-text is initial ).
exit.
endif.
enddo.
Let me know if I miss anything. -
Hi sir,
I developed one review page using jsp techonology, and with the help of servlet i get connected to the database, where i wrote code for both inserting the record and selecting the record at a time, but problem is only one record is displayed in the review jsp page. Though i used "while(rs.next())".
1. I think first of all , all the records should be stored to an object, then it should be displayed to jsp page.
but how it can be done, plz help me out. its an urgent, i need to complete this application soon.
regardsproblem is only one record is displayed in the review jsp page. Though i used "while(rs.next())".How many records were retrieved in the 'while (rs.next())' loop?
plz help me out. its an urgent, i need to complete this application soon.Your time management problems are your own. If you need urgent help, hire it. This is a user to user forum, nobody gets priority. -
Vertical scrollbar not showing all the records when I scroll down.
Vertical scrollbar not showing all the records when I scroll down.
Using Oracle forms 10g , operating system windows
I have two fields with number of items dispayed = 15.
I have a vertical scroll bar with them. There are 34 records in the table but the scrollbar only shows 15 records.
Here are the properties for block / scrollbar.
WORK_CATEGORY
- Subclass Information
- Comments
* Navigation Style Same Record
- Previous Navigation Data Block
- Next Navigation Data Block
- Current Record Visual Attribute Group
- Query Array Size 0
- Number of Records Buffered 0
* Number of Records Displayed 60
* Query All Records No
- Record Orientation Vertical
* Single Record No
- Database Data Block Yes
- Enforce Primary Key No
- Query Allowed Yes
- Query Data Source Type Table
* Query Data Source Name WORK_CATEGORY
* Query Data Source Columns
* Column Name JOB_TYPE
* Column Type VARCHAR2
- Column Type Name
- Parent Column
* Length 30
* Precision 0
* Scale 0
* Mandatory Yes
* Column Name WORK_CATEGORY
* Column Type VARCHAR2
- Column Type Name
- Parent Column
* Length 30
* Precision 0
* Scale 0
* Mandatory Yes
- Query Data Source Arguments
- Alias
- Include REF Item No
* WHERE Clause
* ORDER BY Clause job_type
- Optimizer Hint
- Insert Allowed Yes
- Update Allowed Yes
- Locking Mode Automatic
- Delete Allowed Yes
- Key Mode Automatic
- Update Changed Columns Only No
- Enforce Column Security No
- Maximum Query Time 0
* Maximum Records Fetched 0
- DML Data Target Type Table
- DML Data Target Name
- Insert Procedure Name
- Insert Procedure Result Set Columns
- Insert Procedure Arguments
- Update Procedure Name
- Update Procedure Result Set Columns
- Update Procedure Arguments
Don't know where am I going wrong. I'll really appreciate if you can help me in this.
Thanks.
Edited by: 831050 on Sep 14, 2011 8:05 AMOne of the items is a list item.. here are it's properties:
* Name JOB_TYPE
* Item Type List Item
- Subclass Information
- Comments
- Help Book Topic
- Enabled Yes
* Elements in List
* Label
* List Item Value LIST20
* List Style Combo Box
- Mapping of Other Values
- Implementation Class
- Case Restriction Mixed
- Popup Menu
- Keyboard Navigable Yes
- Mouse Navigate Yes
- Previous Navigation Item
- Next Navigation Item
- Data Type Char
- Data Length Semantics Null
- Maximum Length 30
- Initial Value
* Required Yes
* Copy Value from Item
- Synchronize with Item
- Calculation Mode None
- Formula
- Summary Function None
- Summarized Block
- Summarized Item
- Current Record Visual Attribute Group
- Distance Between Records 0
* Number of Items Displayed 15
- Database Item Yes
* Column Name JOB_TYPE
- Primary Key No
- Query Only No
- Query Allowed Yes
- Insert Allowed Yes
- Update Allowed Yes
- Update Only if NULL No
- Visible Yes
* Canvas CANVAS2
- Tab Page
* X Position 47
* Y Position 137
* Width 187
* Height 18
- Visual Attribute Group DEFAULT
- Prompt Visual Attribute Group DEFAULT
- Foreground Color
* Background Color white
- Fill Pattern
- Font
* Font Name Tahoma
* Font Size 10
* Font Weight Demilight
* Font Style Plain
* Font Spacing Normal
* Prompt Job Type
- Prompt Display Style First Record
* Prompt Justification Start
* Prompt Attachment Edge Top
- Prompt Alignment Start
* Prompt Attachment Offset 10
* Prompt Alignment Offset 0
- Prompt Reading Order Default
- Prompt Foreground Color
- Prompt Font
* Prompt Font Name Tahoma
* Prompt Font Size 10
* Prompt Font Weight Bold
* Prompt Font Style Plain
* Prompt Font Spacing Normal
- Hint
- Display Hint Automatically No
- Tooltip
- Tooltip Visual Attribute Group
- Direction Default
- Initial Keyboard State Default
- Keyboard State Any
-
Checkbox taking all the records irrespective of selection
HI All,
This is my code
for i in 1..htmldb_application.g_f02.count
loop
insert into nam values(htmldb_application.g_f02(i));
end loop;
Here i'm trying to insert the selected things but its taking all the records whatever is displaying in the report
Kindly help me to get rid of the issue
And guide me how cai insert only checked in recordshi
I'm not a pro but maybe I can share some experience.
First I would create a textfield for debugging.
This helps to find out what data you are really working with.
My textfield's name is "PX_SELECTED_ITEMS"
I filled the textbox with a process in "On submit - After Computations and Validations"
BEGIN
:PX_SELECTED_ITEMS :=
HTMLDB_UTIL.TABLE_TO_STRING(HTMLDB_APPLICATION.G_F01);
END;I'm not sure how your values are seperated.
In my application I hat to replace the seperator from ':' to ','
Therefore I created another textfield "PX_SELECTED_ITEMS_replaced"
and added following code to the process:
:PX_SELECTED_ITEMS_replaced := replace(:PX_SELECTED_ITEMS,':',',');Now I have two textfields wich should contain your selection.
The second one ("PX_SELECTED_ITEMS_replaced") with the comma seperated data should be good for a "where-filter" in an SQL statement.
Here is the PL-SQL-syntax I used for a standard SQL report:
declare
v_sql varchar2(32767);
begin
v_sql := 'select * from my_table';
if :PX_SELECTED_ITEMS_replaced is not null then
v_sql := v_sql ||' where My_ID in ('||:PX_SELECTED_ITEMS_replaced||')';
else
v_sql := v_sql ||' where 1=0';
end if;
return v_sql;
end;This Report should contain your selected items.
Note: This does NOT work with Interacive Reports.
I hope this helps you finding the issue.
Edited by: pAT on Nov 26, 2010 4:45 AM -
How can i get all the records from three tables(not common records)
Hi
I have four base tables at R/3-Side. And i need to extract them from R/3-Side.
And i dont have any standard extractor for these tables .
If i create a 'View' on top of these tables. Then it will give only commom records among the three tables.
But i want all the records from three base tables (not only common).
So how can i get the all records from three tables. please let me know
kumarYou can create separate 3 datasources for three tables and extract data to BW. There you can implement business login to build relation between this data.
-
Sort all the Records in Data manager based on Update Date
How to sort the reocrds in Data Manager based on Date or something ?
And also I have three records for a same customer in ( for three different company codes ) and when I search for this customer with the Customer number then it is showing three records , but when I search with Update Date then no records are fetched ...what is the reason ?If you make a field as type "Time Stamp" in your data model using the MDM Console, make sure that the option Sort Index is set to Normal. If this is the case, whenever a record is updated in the repository, the date will be updated. If the sort index is normal, then MDM will allow you to sort the records based on the date and time by which they were updated. You can do this by finding your time stamp field in the MDM data manager and clicking on it. If there is an up and down arrow next to the name of your field, it means it can be sorted. Also, to answer your other question, you can definitely search based on date. Use the Free-Form Search on the left hand side of the data manager at the bottom of the screen. Simply select a date, and it will show you all the records updated on that date.
-
How to get all the Record Groups?
in the form i had created a record group. let us say they are:
RG_APPR_TYPE_CDE_LIST
RG_DRV_APPR_TYPE_CDE_LIST
RG_PROJ_MODE_CDE_LIST
RG_DRV_PROJ_MODE_CDE_LIST
RG_PROJ_STATUS_CDE_LIST
RG_DRV_PROJ_STATUS_CDE_LIST
RG_ORG_SUB_TYPE_CDE_LIST
RG_DRV_ORG_SUB_TYPE_CDE_LIST
RG_REGION_NUM_LIST
RG_DRV_REGION_NUM_LISTwhen the form hits on the clear button it invoke the CLEAR_FORM. i want to get all the record groups dynmically so i won't have to explicitly call the
Delete_Group('RG_APPR_TYPE_CDE_LIST');
Delete_Group('RG_DRV_APPR_TYPE_CDE_LIST');
Delete_Group('RG_PROJ_MODE_CDE_LIST');
...one by one. is there any other workaround? i appreciate any help on this. thanks.is there any other workaroundNo.
-
I just downlouded the latest version of the Muse CC and it doesn't work well, it freezes all the time, in particular with the tools. Example the selection tool doesn't wor at all. Is there any solution for this problem?
Hi!
I restarted the computer, but the same issue happens again. When I move my mouse over some object or tool, it doesn’t come active at all (only some of the tools works) When I try to change “site properties”, I can’t choose tablet or phone mode or even I can’t select the checkboxes, only thing what I can do is change the numbers (high and width) . After all the main problem is that I can’t select some of the items or functions by mouse, but only by the keyboard. -
Request is active after all the records loaded
Dear Experts,
I am extracting data from R/3 through custom Data source. While creating data source, I used custom Function Module.
I have checked in RSA3, 9565 Records are available.
When I start extract from BW side all the records (9565) fetched, but request still in yellow. Same way I have checked in R/3 side in SM37 job status is Active (After 5 Hours also).
Please provide the solution.
Thanks in Advance.
Regards,
Selvahi,
in the monitor screen select that requestselect refresh request for 1 more 2 minutes. otherwise come out the screenwait for some time-go to that request check it out.
select your requestselect details tabsee error.
if helpful provide reward points
regards
harikrishna N -
Validate whether all the records are present in the list before writing
Hi,
I have the below code:-
List<CustomerVO> custlist = new ArrayList<CustomerVO>();
for (CustomerVO customerVO : custlist) {
try {
saveRecord(customerVO);
} catch (Exception e) {
custlist.add(customerVO);
if(){ // Here i need to compare whether all the records in the list are processed and there is no more records
// if so i wrire the all the error details at once by calling the writeErrorDetails
writeErrorDetails(frbVOlist);
Here in the if block I need compare whether all the records in the list are processed and there is no more records to process ,
if so write all the error details at once by calling the writeErrorDetails in the .TXT file.
The problem here is, how i will know whether the all the records are processed from the custList, so that I can write all of then atonce.
If the If conditional block is not there, then for each record failure a separate .txt file will be created. Hence if there are 4 failed records
then 4 .txt error file will be generated. Which should be avoided and i want to write all the 4 failed records in a single .txt file.
Hence, what may be the If condition i need to check from the list whether all the records are processed. Please , let me know your opinion.
Thanks.797836 wrote:
List<CustomerVO> custlist = new ArrayList<CustomerVO>();
for (CustomerVO customerVO : custlist) {
try {
saveRecord(customerVO);
} catch (Exception e) {Look at the following statement in the catch block.
custlist.add(customerVO);Is this correct? Why are you adding the faild record to the custlist again? I think, it should be like,
frbVOlist.add(customerVO);
if(){ // Here i need to compare whether all the records in the list are processed and there is no more records
// if so i wrire the all the error details at once by calling the writeErrorDetails
writeErrorDetails(frbVOlist);
}Call the writeErrorDetails(frbVOlist) after the end of the for loop by checking the size of the frbVOlist > 0. -
Iterate through all the records in a table using Java API
Hi All,
What is the easiest way to iterate through all the records in a given table using Java API? I cannot find any methods that will return all records in a table and the only way I can use is to perform a free form search with a condition that is always true. The code works but is pretty ugly. Is there an alternative to this approach?
Thanks!
KennyHi Kenny,
You can construct a new Search object with your table's code name, a new ResultSetDefinition object for your table and just execute this search using the GetResultSet method of CatalogData.
Please look at the following code:
Search search = new Search(<code name of your table>);
ResultSetDefinition rsd = new ResultSetDefinition(<code name of your table>);
rsd.AddField<code name of a field>);
rsd.AddField(<code name of a field>);
String sortField = <code name of your sort field>;
boolean sortAscending = true;
int page = 0; //page number
A2iResultSet rs = <your CatalogData object>.GetResultSet(search, rsd, sortField, sortAscending, page);
for (int i = 0; i < rs.GetRecordCount(); i++)
Value fieldValue = rs.GetValueAt(i, <code name of a field>);
Hope this helps,
Nir
PS - I really recommend you to start using the new API, as it is much more efficient and straight-forward.
Maybe you are looking for
-
i am having alot of trouble i want to use imessage but everytime i turn it on it turns on but doesnt work and it says verifying but its verifying my old number and i need it to verify my new number but it wont let me
-
How do i save a page in pages with the ipad
Hi all I have just bought a new ipad2 and downloaded pages. I can open a new page but there is no way of saving that i can see. I also have it on my imac 27" and you just click on save as or just save but this is not on my ipad. Please help
-
Hi, I'm using ADO (Oracle Provider for OLEDB) to connect Oracle 9. If the type of any field in table is Number(9) and I open query with this field, all negative values are displayed as positive values. For example: If I write -1 value to this field a
-
Delete entries in "Installed Updates" log
Is there anyway to delete entries in the "Installed software updates" log? I want to reinstall a firmware patch but although the patch downloads and says it has installed successfully it doesn't actually update anything... However, it shows up in the
-
AIR for desktop and multiple swfs
I know when packaging AIR for mobile devices, you can load external swfs as long as they contain no code, but I was wondering if the same limitation exists for AIR on the desktop. Building a kiosk application and would like to organize and load the v