Task to add new row and values to Table?
Hi, I am new to SSIS, I have a table that I would like to capture daily currency conversion rates. In my Control Flow
pane, I've been able to use a web service task to get a string value of the conversion rate pass it to an XML task, and connect it to at Data Flow Task. So now I'm not sure what to do from here. I would like to input the daily values into my table:
[CurrencyID] [int] IDENTITY(1,1) NOT NULL,
[CurrXDate] [datetime] NOT NULL,
[Country] [nvarchar](50) NOT NULL,
[CurrXRate] [float] NOT NULL,
insert into tbl_CurrXrates
(CurrXDate, Country, CurrXRate)
values
(getdate(), 'USD', @[User::ConversionRate])
What data tasks and order would I use to add a new row to my table which I think would be a simple insert statement. Hope my
question makes sense.
You can put into a package variable and use as part of the insert statement via a SSIS expression to drive a Execute SQL Command to insert it or
Have the value off the webservice dumped to a XML file and then consume it with XML Source which will allow the values to be inserted into the table (e.g. OLEDB Destination)
Arthur
MyBlog
Twitter
Similar Messages
-
How to add new row and update existing rows at a time form the upload file
hi
How to add new row and update existing rows at a time form the upload file
example:ztable(existing table)
bcent smh nsmh valid date
0001112465 7.4 26.06.2007
0001112466 7.5 26.06.2007
000111801 7.6 26.06.2007
1982 7.8 26.06.2007
Flat file structure
bcent nsmh valid date
0001112465 7.8 26.06.2007 ( update into above table in nsmh)
0001112466 7.9 26.06.2007 ( update into above table in nsmh)
000111801 7.6 26.06.2007 ( update into above table in nsmh
1985 11 26.06.2007 new row it should insert in table
thanks,
Sivagopal RHi,
First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
Then :
Loop at it.
*insert or modify as per your requirement.
Endloop.
Regards,
Srilatha. -
Add new row and update on grid
Hi all !
Can you help me ?
I want to add new row on grid ,but I canu2019t add .I donu2019t know ,have I written code correct?
This is code that I used belown.
I connect to database as code :SetApplication()
Public Sub SetApplication()
Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
SboGuiApi = New SAPbouiCOM.SboGuiApi
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
SboGuiApi.Connect(sConnectionString)
SBO_Application = SboGuiApi.GetApplication()
End Sub
Sub ItemEvent_Add(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, _
ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If "frmGrid" = pVal.FormType And pVal.BeforeAction = True And pVal.ItemUID = "AddNew" Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
SetApplication()
oGrid.DataTable.Rows.Add()
End If
End If
End Sub
<a href="http://imageshack.us">[IMG]http://img402.imageshack.us/img402/2763/updateandaddnewnf2.png[/IMG]</a>
<a href="http://g.imageshack.us/img402/updateandaddnewnf2.png/1/">[IMG]http://img402.imageshack.us/img402/updateandaddnewnf2.png/1/w699.png[/IMG]</a>Hi all !
To day, I want to ask you about 2 problem .
1:I want to update data as I changes data of column Name.I used code for this function update:
If (pVal.ItemUID = "1") Then
Dim frm As SAPbouiCOM.Form = SBO_Application.Forms.Item(FormUID)
If frm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Then
Dim n1 As String
Dim col As SAPbouiCOM.GridColumns
Dim i As Integer
col = oGrid.Columns.Item(1)
n1 = col.String()
Dim b1 As String
b1 = oGrid.Columns.Item(2)
Dim n2 As String
n2 = oGrid.Columns.Item(3)
frm.DataSources.DataTables.Item(0).ExecuteQuery("UPDATE OHEM SET U_NameChild = '" & n1 & "',U_Birthdate = '" & b1 & "' ,U_*** = '" & n2 & "'")
frm.Update()
End If
End If
However,This code donu2019t work ,because it not get value of column Name :col = oGrid.Columns.Item(1)
n1 = col.String()
Can you help me test this function and can rewritten it?
2:I want to add new child to database pass grid.
If FormUID = "frmGrid" And pVal.BeforeAction = False And (pVal.ItemUID = "AddNew") Or pVal.ItemUID = "1" And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
'Try
If (pVal.ItemUID = "AddNew") Then
Try
OForm = SBO_Application.Forms.ActiveForm
oGrid = OForm.Items.Item("MyGrid").Specific
oGrid.DataTable.Rows.Add()
oGrid.AutoResizeColumns()
'OForm.Freeze(True)
Catch ex As Exception
MessageBox.Show("Can't add new row on Grid", "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Error)
End Try
End If
But, it only add new row on grid ,so it donu2019t add on database.
Could you help me ?
<a href="http://imageshack.us">[IMG]http://img404.imageshack.us/img404/1980/addandupdatepr8.png[/IMG]</a>
<a href="http://g.imageshack.us/img404/addandupdatepr8.png/1/">[IMG]http://img404.imageshack.us/img404/addandupdatepr8.png/1/w700.png[/IMG]</a> -
I searched, but my query may not have been structured to yeild results. In my table I would like to insert new rows at the top of the table. The only way I can think of right now would be getting the last row that isn't null and move the data from that row to the next increment. After that, count down by 2 and do the same over again until I get to row 0. There really isn't any particular data in my table that I could sort by so that isn't really an option.
Is there something simple I am over-looking?Alrighty. And I guess it was insertRow() I was looking for the entire time, not addRow(). Ugh... need sleep.
-
ALV List Layout add new button and modify Append Row Button Text and Logi
Hi All,
I am working on Employee custom development Application in Webdynpro ABAP>
In my ALV list Layout I have to add new two Buttons Top or Bottom of the ALV List.
If I am adding I have to add logic for those Buttons. How to add and add logic for those buttons.
as well as I have to Change the Text for Existing Button ''Append Row'' to "ADD NEW ROWS"
and I have to add logic in this button while Append New Row I have to generate ID no for New Rows .
Kindly help/advice me to proceed further.
Thanks in advance.
DavHi Dav,
To Add buttons please refer this thred,
ALV with user-defined buttons on toolbar in wd abap
To change or rename text in ALV standard buttons, please refer this ...
How can i change the text of an standard button in ALV?
and also see this article on self defined functions...
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110?quicklink=index&overridelayout=true
Thanks,
Kris.
Edited by: kissnas on Feb 22, 2011 5:59 AM -
Editable ALV (CL_GUI_ALV_GRID) Pasting add new rows
Hi all,
I have a problem with OO ALV.
I'm using class CL_GUI_ALV_GRID as I need to have a couple of editable columns.
Let's say that we have columns Material and Quantity. And Quantity is editable.
Toolbar buttons for adding new rows, paste, copy, are all disabled.
Suppose I have 2 rows in the ALV.
If I copy to clipboard from, for example, Excel, more than 2 rows, and paste them in Quantity column of the ALV, the result is that new rows are inserted till all the information in the clipboard is pasted. The new rows have all blank values except for the column I'm pasting.
I do not want this rows inserted. I supposed that this wounldn't happened, as there are no buttons for inserting rows.
Anybody knows how to change this behaviour?
Thanks a lot.
Alejandro Galliano.Hi Alejandro,
You can implement your own functionality to create new row.You can add your own button in ALV for New row creation. In another simple way is you place the button in the screen which display the ALV and implement the logic in PAI of the screen.
the logic is simple add new row in the internal table which you are using to display ALV and refresh the ALV.Then your new row will appear in the Grid.
Regards,
Mike -
How can I add new row/column into existing jTable?
Hi add!
Can you help me how can I add new row/column into existing jTable?
Tnx in adv!e.g
Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
their handlers are:
add new row:
//i supose u already have
DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
//and
JTabel jtable = new JTable(tablemodel);
// Handler (row)
jbtAddRow.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
if(jtable.getSelectedRow() >= 0 )
tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());
else
tablemodel.addRow(new java.util.Vector());
});to add new columns its the same but inside actionPerformed method:
ask for e.g "Whats the name for the new column"
then,
tablemodel.addColumn(nameOfColumn, new java.util.Vector()); Joao
Message was edited by:
Java__Estudante -
Create a new row in a table without using add new row button
I want to add a new row to the table without using the add new row button of the table. I'm not able to display default row in the table. Though if click on apply the record appears after saving in the database. Any thoughts how to implement this functionality.
Here is what you have to do.
1) You have to handle this in processRequest()
2) In the AM code , u need to check if there is already a row exisit or vo is blank
if (vo.getFetchedRowCount() == 0)
// first time
vo.setMaxFetchSize(0); // THIS IS REQUIRED.
Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
else
//If already rows are there then you suppose to insert in the end
// i assume you would have execute your vo
YourVORowImpl row= (YourVORowImpl)vo.getRowAtRangeIndex(0);
vo2.insertRowAtRangeIndex();
It should work. -
How to add new rows in Advanced Table along with attribute value?
Hi,
I have one advanced table that contain one messageChoice and messageTextInput field.
I want to add new rows in advanced table. I can able to add rows using the AddMoreRows button in the footer of the advanced table,
but I want to add attribute value(contactId) each time when new row created.
contactId I am getting from pageContext.getParameter("contactId")
How to achive this? Please suggest.
Thanks & Regards,
SunitaHi,
There are two ways to do it.
1. Use create method of entity object, create method fires whenever you creates new row.
2. Handle the event raised by addanotherrow button and write logic there to initialize contactid as you are getting contactid from pageContext so I will suggest you to use this method.
if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
&& ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
//write your logic here to default the contact id
Hope this will help.
Regards,
Reetesh Sharma -
Hello!
I'm using JDev 11.2 and I'm trying to add a new row to a table object (using create insert)
the catch is this-
and the new empty row that will appear- I want a value set instead of one of the values- so the user can choose which value to insert
do you know how can this be done?
(just to be clear- i know how to add a value set, I know how to add new row- dont know how to make the new row contain value set field)
tnx for your time
TalyaIf you use a model driven list of value on the attribute in question this should work automatically.
Have you setup a LOV on the attribute? Have you (on the attribute) checked that the ui-hint is set to selectOneChoice?
Timo -
Add new rows when query not input-ready
In the Web Application Designer, is it possible to detect whether a query is in display or change mode, and depending on the outcome to set an Analysis Item parameter ? This would provide a solution to the following:
Background: I have a Web template used for sales quantity planning which contains two Analysis Items, each with their own input-ready query: ANALYSIS_ITEM_EXISTING allows users to enter plan values based on existing characteristic combinations, ANALYSIS_ITEM_NEW_ROWS allows users to enter new characteristic combinations and their plan values (using the 'Number of New Lines' parameter). These two separate Analysis Items are needed so that I can restrict the characteristic values differently for each. ANALYSIS_ITEM_NEW_ROWS shows only new rows, since I have set both parameters 'Number of New Lines' and 'Data Row to' to 5.
Problem: If the query underlying ANALYSIS_ITEM_NEW_ROWS is not able to go into change mode (such as when there is an active data slice, or a locking conflict), then instead of seeing 5 empty rows the user sees existing data from the underlying query. This looks bad and is confusing for the user.
Can anyone think of a solution?Hi Jacky,
The Bex analyzer works in the same way as in the web. You've restrict all charateristics which are not in your rows or columns to a single value. Then you can see that in excel the last blank row has a black border. If this is the case you can add a new row.
By pressing F4 in an empty cell you can select values or if you've know the key you can type it directly. Also you can add multiple rows at once. IP collects all rows below the query.
If this not works, just put all chars from your aggr. level in the rows and check if this works. And then for each change to the restriction/layout run the query and look if you can still add new rows.
Hope it helps.
Regards,
J. -
Hello.
I would like to add a new row to an ALV GRID CONTROL in which one of the fields is a counter. Which methods, codes have I to change/write?
For example:
ALV
COUNTER FLIGHT DESTINATION
1 1234 CDG
2 3443 SVQ
On adding a new row :
COUNTER FLIGHT DESTINATION
1 1234 CDG
2 3443 SVQ
3
Thanks in advance!!!There are two options.
1. Use the data_changed event to put in the values.
- Enable edit mode for the grid, so the row create/insert/copy icons appear on the toolbar.
- Create an event handler for the DATA_CHANGED event
- In this method, use attribute table er_data_changed->MT_INSERTED_ROWS to check for new rows, and then er_data_changed->modify_cell to put in the line number.
The problem is that if your counter field is set as non-editable, then you cannot put a value in...
2. implement your own add function.
- Add a button to the toolbar (implement methiod for event handle_toolbar)
- Create an event handler for event handle_user_command.
- In the handler method, add a row to the outtab table used by the grid (with the correct line number).
- CALL METHOD gr_grid->refresh_table_display to update the display with the additional line.
Regards
Michael -
Add new row to DCIteratorBinding
Dear All
i have a DCIteratorBinding instance :
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
DCBindingContainer dcbc = (DCBindingContainer) bindings;
DCIteratorBinding empViewIterator = dcbc.findIteratorBinding("NewAppointmentListIterator");
My QUESTION is how i can add new row onto empViewIterator .
this iteration is generated from the datacontrol which is generated from BPEL human task.(not from webservice or Business Component)
Regards
Mohd.WeshahNo, it'd be more sensible to post a detailed question here with the information needed to help others to assist you. The power of the forum is a lot of people read your post. Sending it to me relies on my finding a solution, and I have no experience with BPEL nor time to look through your solution.
There is BPEL forum of course. Have you tried posting there?:
BPEL
CM. -
Add new row in Matrix in SBO 2004
Hi All,
I created a form by using screen painter and loaded data into matrix by using datasource.That is working fine. But when i add new row in that matrix, it copies all data from the last row in that matrix. How will i clear the row to add new values in the row?
Please help me.
Thanks in advance
DenisHello Denis,
OK, I see the problem.
This is because your datasource are on the last row, so whenever you add a new row to the matrix, the last record in your datasource will be added. My suggestion is to modify datasource instead of matix itself, and then use oMatrix.LoadfromDatasource to load all the data back to matrix.
Hope this helps,
Nick -
Dynamically adding new rows and columns
i want to have a button on my jsp page which shud add new rows dynamically. and same one for columns.
how do i calculate the values across the rows on the forms
I'm new to JSP. Please point me in the right direction...any tutorials or code will be helpful.
thanksWell its a good question actually and the most needed one.
Say 4 example u need a screen which should accepts the employee details in one screen
and the user should be able to enter all the employee details in one screen and he should
have a flexibility to change the previous details too.
So 4 that u need to know 2 things:
1) Using of JspBeans
2) Using Vector
I will give u a brief idea:
So the bean is just a container been which has the methods say
setEmployeeName(.....)
getEmployeeName()
So the basic logic is, the naming of html form elements and displaying multiple rows of elements.
Say 4 eg, empname -> <input type=text name=empname<%= count%> value=<%= ....%>>
So u should run the loop the size of ur vector times and every time u add a vector u should save all
the data using same logic in ur vector and thatz it once u commit get all the values from the vector.
Try this u will definitely get it,
all da best,
kiran
kiran
Maybe you are looking for
-
Save film in editing mode on external drive?
I've been making informational videos using iMovie. I save all the raw footage so I can remake it later if needed. But, is there a way to save the project in it's editing mode and still remove it from iMovie (to an external drive)? That way I could
-
Hi All, I am going to develop idoc2file scenario in XI. Any body have the full documentation with step-by-step process(including R/3 settings & XI settings), Please send me ASAP. I am very thankful to you in advance. Thanks & Regards, Nagarjuna.
-
If I do group and sum in interactive report why download (pdf,xls...) don't have this group and sum which I make in interactive report?
-
Adobe utilizes my CPU over RAM, this normal?
So i ill start by saying i have a quad core i7 3.4ghz system with a 2gb Nvidia EVGA Geforce GTX 750ti FTW GPU and 16gb of ram. when ever i render a project i have begun to notice that my system is utilizing my cpu over my RAM my CPU will be ranging f
-
Flash-based uploaders crashing on all Mac browsers
I'm going to try to be as level-headed as possible with this, but to be frank, I am becoming furiously pissed after dealing with this issue for at least a month now... Every single Flash-based uploader I use troughout the web causes my Flash Player t