How to update Records from Internal table to u2018Zu2019 table?
Hi Friends,
How to update Records from Internal table to u2018Zu2019 table.
I have records in Internal table , that records want to update on u2018Zmarau2019 Table.
( my internal table & u2018 Zu2019 table structures are same.)
Thanking you.
Regards,
Subash
Hi,
loop at internal table.
modify <Z- table > from values < internal table Workarea>.
if sy-subrc = 0.
COMMIT work.
else.
ROLLBACK waork.
endif.
endloop.
or
UPDATE <Z- table > from table < internal table Workarea>.
if sy-subrc = 0.
COMMIT work.
else.
ROLLBACK waork.
endif.
Prabhudas
Similar Messages
-
Qosmio X500 - How to enable recording from internal speaker?
How do you enable recording from internal speaker on Qosmio X500?
Is this possible because from Control Panel / Sound / Recording only microphone can be seen.
Any help appreciated.
Thank you.Hi
Do you want to record the sound that will be played through the internal speakers?
Therefore you can use the Windows Sound Recorder or other tools like Audacity. Latter is a very nice freeware tool. :) -
How to update record from datagridview
hi every one
am new in .net am developing an inventory system for learning.
i successfully develop a purchase form where user can put record for parching invoice.
as
and for save record am using flowing code.
Private Sub btn_Save_Click(sender As Object, e As EventArgs) Handles btn_Save.Click
Dim connectionStringdgv As String = "Data Source= ABDULLAH-PC;Initial Catalog=Erpdb;Persist Security Info=True;User ID=jabbar;Password=abc123"
Dim connection As New SqlClient.SqlConnection(connectionStringdgv)
Dim adaptor As New SqlClient.SqlDataAdapter
Dim adaptor1 As New SqlClient.SqlDataAdapter
Dim dataset As New DataSet()
Dim datasetmax As New DataSet()
Dim adaptor3 As New SqlClient.SqlDataAdapter
Dim adaptormax As New SqlClient.SqlDataAdapter
Dim dataset3 As New DataSet()
Dim dataset1 As New DataSet()
Dim cmdinsert As New SqlClient.SqlCommand
Dim cmdinsert1 As New SqlClient.SqlCommand
Dim cmduppurtable As New SqlClient.SqlCommand
Dim cmdupdrcrtable As New SqlClient.SqlCommand
Dim cmdinsert2 As New SqlClient.SqlCommand
Dim Cmd As New SqlClient.SqlCommand
Dim Commandmax As New SqlClient.SqlCommand
connection.Open()
cmdinsert1.Connection = connection
cmdinsert1.CommandText = "INSERT INTO purtrans(date,amount,paid,discount,[bill no],taxvalue,ac,tax)" _
& "VALUES ('" & DateTimePicker2.Text & "','" & GAmt.Text & "','" & amtpaid.Text & "','" & Tdis.Text & "','" & invo.Text &
"','" & ttax.Text & "','" & txtCode.Text & "','" & tv.Text & "')"
cmdinsert1.ExecuteNonQuery()
'find last id'
Commandmax.Connection = connection
Commandmax.CommandText = "SELECT date,MAX(sr) FROM purtrans GROUP BY date"
Commandmax.ExecuteNonQuery()
adaptormax.SelectCommand = Commandmax
Dim maxtable As New DataTable
adaptormax.SelectCommand = Commandmax
adaptormax.Fill(maxtable)
If maxtable.Rows.Count > 0 Then
SrTextBox.Text = maxtable.Select.Last.Item(1)
End If
If connection.State = ConnectionState.Open Then
connection.Close()
End If
connection.Close()
Dim n, m As Integer
n = Me.dgv.Rows.Count - 1
For m = 0 To n - 1
Dim cd As String = "insert Into amountdrcr(todate,ac,party1,amount,purtransid,qty,rate,billno,disc,tax,weight,sp,drcr) VALUES (@todate,@ac,@Party1,@amount,@purtransid,@qty,@rate,@billno,@disc,@tax,@Weight,'Purchase','Dr')"
Cmd = New SqlClient.SqlCommand(cd)
Cmd.Connection = connection
Cmd.Parameters.AddWithValue("todate", DateTimePicker2.Text)
Cmd.Parameters.AddWithValue("ac", dgv.Rows(m).Cells("itemcode").Value)
Cmd.Parameters.AddWithValue("party1", cmbname.Text)
Cmd.Parameters.AddWithValue("amount", dgv.Rows(m).Cells("Amount").Value)
Cmd.Parameters.AddWithValue("purtransid", SrTextBox.Text)
Cmd.Parameters.AddWithValue("Qty", dgv.Rows(m).Cells("Qty").Value)
Cmd.Parameters.AddWithValue("Rate", dgv.Rows(m).Cells("Rate").Value)
Cmd.Parameters.AddWithValue("BILLNO", invo.Text)
Cmd.Parameters.AddWithValue("Disc", dgv.Rows(m).Cells("Disc").Value)
Cmd.Parameters.AddWithValue("tax", txtPerVat.Text)
Cmd.Parameters.AddWithValue("Weight", dgv.Rows(m).Cells("Weight").Value)
connection.Open()
Cmd.ExecuteNonQuery()
connection.Close()
Next
MsgBox("Your Record save Sucssfully", vbOKOnly, "AANO TECH")
'posting a credit voucher for supplier'
If Balance.Text > 0 Then
Dim cd2 As String = "insert Into amountdrcr(todate,ac,party1,amount,purtransid,billno,sp,drcr) VALUES (@todate,@ac,@Party1,@amount,@purtransid,@Billno,'Purchase','Cr')"
cmdinsert2 = New SqlClient.SqlCommand(cd2)
cmdinsert2.Connection = connection
cmdinsert2.Parameters.AddWithValue("todate", DateTimePicker2.Text)
cmdinsert2.Parameters.AddWithValue("ac", txtCode.Text)
cmdinsert2.Parameters.AddWithValue("party1", cmbname.Text)
cmdinsert2.Parameters.AddWithValue("amount", Balance.Text)
cmdinsert2.Parameters.AddWithValue("purtransid", SrTextBox.Text)
cmdinsert2.Parameters.AddWithValue("billno", invo.Text)
connection.Open()
cmdinsert2.ExecuteNonQuery()
connection.Close()
dgv.Rows.Clear()
btn_Save.Enabled = False
invo.Text = ""
txtCode.Text = ""
TAmt.Text = ""
GAmt.Text = ""
Tdis.Text = ""
Balance.Text = ""
ttax.Text = ""
amtpaid.Text = ""
txtAddress.Text = ""
txtPhone.Text = ""
cmbname.Text = ""
btnAdd.Enabled = False
txtQty.Text = ""
Wk.Text = ""
txtRate.Text = ""
txtRate.Text = ""
txtPerDisc.Text = ""
txtPerVat.Text = ""
cmbItemCode.Text = ""
cmbitemname.Text = ""
invo.Focus()
Else
dgv.Rows.Clear()
btn_Save.Enabled = False
invo.Text = ""
txtCode.Text = ""
TAmt.Text = ""
GAmt.Text = ""
Tdis.Text = ""
Balance.Text = ""
ttax.Text = ""
amtpaid.Text = ""
txtAddress.Text = ""
txtPhone.Text = ""
cmbname.Text = ""
txtQty.Text = ""
Wk.Text = ""
txtRate.Text = ""
txtRate.Text = ""
txtPerDisc.Text = ""
txtPerVat.Text = ""
cmbItemCode.Text = ""
cmbitemname.Text = ""
btnAdd.Enabled = False
invo.Focus()
End If
what is the easiest way for editing record
please guide me thanks
Hi ABDULLAH,
>> what is the easiest way for editing record
What do you mean by “editing record” ? Do you mean that you want to update the record according the textboxes in the form? If so, I am afraid that there is no better way, you need to use the ado.net and the update command to achieve that like you insert
new records. If you want to modify the record in the datagridview directly, I think you could bind the dataset to the datagridview, and then modify the record in the datagridview, and then save the changes to the database. The link below might be useful to
you:
# DataGridview Update
https://social.msdn.microsoft.com/Forums/en-US/5980181e-f666-4f0a-ab50-c4ebecf96f02/datagridview-update-?forum=Vsexpressvb
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
How to send data from internal table to the shared folder in ABAP
Hi experts,
My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is "
xxx\y\z....".
I do not have any idea on how to send data from internal table to the shared folder path.
can anybody please help me out how to do this?
Thanks & Regards
Sireesha.Where that folder is located, its on presentation server i.e. desktop or application server.
If its on presentation server, use FM GUI_UPLOAD.
If its on application server, then use DATASET functions. Have a look at below link.
[File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
I hope it helps.
Thanks,
Vibha
Please mark all the useful answers -
Inserting records from internal table to database table
Hi all,
i want to insert records from internal table to zDatabase table, can u plz guide me which statement is better in performance to insert the records.
1) insert one by one record from internal table
loop at itab.
insert ztable from wa.
endloop.
2) insert total records at a time
INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
or let me know if any other statement is there with high performance.
i internal table contains nearly 40000 records.
thanks.Hi,
Insert the entire table at atime rather than a record so as to increase the performance.
you can use INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
or
MODIFY ZPRODUCT FROM TABLE GI_AFPO.
Regards,
Raj. -
How can distribute 5 lakhs records from sap R/3 setup tables ?
How can distribute 5 lakhs records from sap R/3 setup tables in to multiple requests in sap BI?
Hello,
what is "lakhs" ?
Please use plain English words on a world wide forum...
Regards,
Olivier -
Deleting/Updating records from an object table in PL/SQL
Hello All,
VER:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
I have created an object and inserted records in it. Is there any way we can delete/update records from it. I do not want to delete based on iteration like delete.collection but I would like to know if we can delete directly from obj like delete from table...
CREATE OR REPLACE TYPE test_type AS OBJECT
col1 number,
col2 varchar2(100)
CREATE OR REPLACE TYPE tab_type is table of test_type;
DECLARE
test_tab tab_type;
l_cnt NUMBER;
BEGIN
select test_type(col1,col2) bulk collect
into test_tab from (select 1 as col1,'test1' as col2 from dual
union all
select 2,'test2' from dual);
IF test_tab.count>0
THEN
DELETE FROM TABLE(CAST(test_tab as tab_type)) a
where a.col1=1;
END IF;
l_cnt := test_tab.count;
END;Thx
Shank.SB,
I have a scenario wherein I insert few records into a collection table. I'm gonna filter few records from collection table based on the filter.
I want to delete the records that didn't match the filter. Right now, I'm inserting the records into a physical table and deleting from there. I do no want to use a physical table. Trying to avoid it.
Would like to delete from collection itself.
DELETE FROM TABLE(CAST(lv_attr_filter_tab as EDMS_CSPP_DISC_REQ_TAB_TYPE))
WHERE NOT EXISTS (SELECT 1
FROM edms_disc_lines_stg edls
WHERE edls.req_id = edrg.request_id
AND edls.disc_line_id = edrg.discount_id
AND UPPER(edls.disc_status) IN ('ACTIVE'); -
To delete duplicate records from internal table
hi friends,
i have to delete records from internal table based on following criterion.
total fields are 7.
out of which if 4 fields are same and 5th field is different,then both records must be deleted.
in case all five fields are same,the program should do nothing.
for example.
if there are 3 records as follows
a1 b1 c1 d1 e1 f g
a1 b1 c1 d1 e2 w r
a1 b1 c1 d1 e1 j l
then first two records should be deleted as four fields are same but fifth(e) field differs.
but third record should remain as it is evenif first five fields are same for first and third record.
values of last two fields need not to be consider for deleting the records.LOOP AT ITAB.
V_FILED5 = ITAB-F5. "to compare later
V_TABIX = SY-TABIX. "used to delete if condition not matches
READ TABLE ITAB WITH KEY F1 = ITAB-F1
F2 = ITAB-F2
F3 = ITAB-F3
F4 = ITAB-F4.
IF SY-SUBRC = 0.
IF ITAB-F5 <> V_FIELD5.
*--both the records to be deleted,as Field5 is different.
DELETE ITAB INDEX SY-TABIX. "deletes that record
DELETE ITAB INDEX V_TABIX. "deletes the current record
ENDIF.
ENDIF.
ENDLOOP.
Message was edited by: Srikanth Kidambi
added comments
Message was edited by: Srikanth Kidambi -
Insert records from report program into R3 table
Hi
I wanted to insert records from report program into R3 table.
here is my code
data : itab type standard table of zemp initial size 10 with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
but i am getting the following error
the type of the data base table and work area/internal table "ITAB" are no unicode-converible.
how can I insert records from report program into R3 table
should I have to write move corresponding
pls guide
thanks
manianHi,
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
Do one thing
Data : itab type table of ztable with header line.
itab-EMPNO = '012'.
itab-ENAME = 'XXXX'.
itab-JOB = 'XXXX'.
APPEND itab.
insert ztable from table itab.
error will resolve, then try to make structure similar to ZTABLE -
Getting the un updated records from receiver JDBC
Hi Friends,
I am doing the Proxy - jdbc integration. Consider my proxy sends 10 records to JDBC to update. Consider bcoz of some reason the jdbc updates only 8 records i need to get the 2 records back to Proxy which is not updated in the DB.
Should i need to use the Proxy and JDBC channel as syn or seperate integration should be built. I have seen some documents, that we can get the count of the updated records from jdbc receiver, but i dont need the count i need the record which is not been updated.
How can i do it. please give ur inputs.
thanks
PremUnless you are using SP on JDBC side and explicitly build a record set to send back the data it might not be possible. I am not sure if a custom record set could be returned in JDBC sync receive adapter. You can realize this by updating some other table on JDBC side and then polling that table to update ecc back.
VJ -
I have an external camera, IceCam2, connected to my MacBook Air, but I cant switch to the camera when I try to use videocam on a websayt. How do I switch from internal to externl camera? In use is Adobe Flash Player, but I cant open that program, is the s
I think the McAfee suite will do the trick when I pay them a one-time fee of $69 or $179 for a year for unlimited support.
Your call of course but IMO a waste of money. Please read this first:
There are many forms of ‘Malware’ that can affect a computer system, of which ‘a virus’ is but one type, ‘trojans’ another. Using the strict definition of a computer virus, no viruses that can attack OS X have so far been detected 'in the wild', i.e. in anything other than laboratory conditions. The same is not true of other forms of malware, such as Trojans. Whilst it is a fairly safe bet that your Mac has NOT been infected by a virus, it may have another security-related problem, but more likely a technical problem unrelated to any malware threat.
You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful:
https://discussions.apple.com/docs/DOC-2435
The User Tip (which you are welcome to print out and retain for future reference) seeks to offer guidance on the main security threats and how to avoid them.
More useful information can also be found here:
http://www.reedcorner.net/mmg/ -
*Urgent*How to insert data from MS SQL to the table that create at the adobe form?
Hi,
I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
ThanksTou need to do a couple of things
1. On the Essbase server, set up an odbc system connection to your MySQL database
2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it -
HT1338 how to update software from 10.5 to 10.7?
how to update software from 10.5 to 10.7?
You need to buy a Mac OS X 10.6 DVD from the online Apple Store, and phone them and order a download code for Mac OS X 10.7. Mac OS X 10.7 requires a Mac with a Core 2 Duo(not Core Duo) or better CPU and at least 2GB of RAM.
(77981) -
How can i record from radio to mp3 format?
How can i record from radio to mp3 format?
because i want to record a radio program, and save it, how can i do it?If you can, the instructions will be in the user manual - iPod Manuals
-
How to update Records of SAP table from .CSV file
Hi,
I have written a code which takes a data from (,) delimited CSV file and adds it into the Internal table.
Now I want to update the all fields in SAP table with the Internal table.
I want to use Update statement.
Update <table Name> SET <field needs to update> WHERE connditon.
I don't want to iterate through thousand on record in sap table to check the where condition.
Could you please tell me how to do it.Hi. I thing you will not workaround the iterating of the internal table.
You can pre-load all the records into another internal table
check lt_csv[] is not initial. " important, otherwise next select would read all records of the table
select .... into lt_dbitab for all entries in lt_csv where key-fieds = lt_csv-key_fields...
check sy-subrc eq 0 and lt_dbitab[] is not initial.
then do in-memory update of the it_dbitab
loop at it_dbitab assign <fs>.
read table lt_csv assign <fs_csv> with key ... " lt_csv should be sorted table with key, or you should try to use binary search
if sy-subrc eq 0.
...change required lt_dbitab fields: <fs>-comp = <fs_csv>-comp...
endif.
endloop.
ant then you can do mass-update
update dbtab from table lt_dbitab.
From performance view, this solution should be much faster than iterating lt_csv directly and updating every single database record
Br
Bohuslav
Maybe you are looking for
-
Photoshop CS6 crash after crash
Hi, can anyone help please? I recently updated after being prompted by Adobe to update a newer version of CS6. Since then Photoshop has not stopped crashing. All I am doing is dropping some photos into it, re scaling, and then crash. I have lost coun
-
Adding pictures to albums in Ovi Share
I have over one hundred pictures that I would like to add to an album in Ovi Share. Is there a way to select more than one picture at a time to add to an album? Going one by one is impractical as you need to select then confirm etc. It would be absol
-
BADI to populate Asset Master Class valu in Account Assignment Item Detail?
Hi All, In Shopping Cart - COST ASSIGNMENT - Account Assignment Item Details Tab we have Create New Asset Master Record section and the field Choose an Asset Master Class I need to populate this field (Choose an Asset Master Class) with my o
-
How to link tables EKKO, EKPO, EIKP and EIPO
What I'm trying to do is create a view based on these four tables. EKPO contains multiple rows with the same values for EBELN. EKKO contains all distinct values for EBELN. I am trying to pick up all rows from both tables where EBELN in EKPO is the sa
-
MSI 975x PowerUp Edition and Intel Core 2 Duo E4300 overclocking
As subject says, BIOS ver. 7.40, board rev.2.1, CPU works on other boards up to high 3GHz+ and on this one not even a megahertz over standard 200... Memory is not a subject, A-DATA Extreme, known to work up to 1GHz, cooling by TT Big Typhoon an PSU b