‎2008 Oct 20 4:47 AM
hi,
Is there any built in functionmodule to save data from internal table to database table ,in my requirement i am asked to save data using function module.
‎2008 Oct 20 4:52 AM
may be you understood wrongly..>
what is the table you want to update..? if it is a standard table, look for standard BAPI function.
‎2008 Oct 20 5:00 AM
‎2009 Nov 19 4:39 PM
HI there,
did you foudn such a function module to fill VEIAV?
I also need that one...
Thanks
Danny
‎2009 Nov 19 4:50 PM
‎2009 Nov 19 5:27 PM
1st thing...
check what is the need.. according to the need you can try some BAPI ( tcode: BAPI)..
2nd thing..
check if there is not much dependability of that table with other tables.. you may go for UPDATE, INSERT, MODIFY..
‎2008 Oct 20 5:35 AM
hi Anjali,
Check one of the followings
1,> Try to use Work Area in MOVE-CORRESPONDING statement.
2>Try to use the Insert statement..this might solve your program.
3>create an internal table with the same structure like the database table.get data into that internal table.
Now use Modify Query to modify the database table.
like below
Modify (database-table) from (internal-table)
4.>modify <DBtable> from <int.tab>
if you use update
you need to provide the primary key also
5.>Below is the sample code.
DATA scarr_wa TYPE scarr.
scarr_wa-carrid = 'FF'.
scarr_wa-carrname = 'ABC Ltd'.
scarr_wa-currcode = 'EUR'.
scarr_wa-url = 'http://www.abcltd.com'..
INSERT INTO scarr VALUES scarr_wa.
Thanks and regards,
sachin sharma
‎2008 Oct 20 5:41 AM
Hi Anjali,
Check out these links.
[https://www.sdn.sap.com/irj/sdn/advancedsearch?query=fmtoupdatedatabaseTablefromInternal+table&cat=sdn_all]
These would surely be a help.
Another way to do it is like this.
Data : WA1 TYPE Z101754SBOOKHDR.
Inside PAI.
WA1-BOOKID = Z101754SBOOKHDR-BOOKID.
WA1-CARRID = Z101754SBOOKHDR-CARRID.
WA1-CONNID = Z101754SBOOKHDR-CONNID.
WA1-FLDATE = Z101754SBOOKHDR-FLDATE.
WA1-CUSTNAME = Z101754SBOOKHDR-CUSTNAME.
WA1-TELEPHONE = Z101754SBOOKHDR-TELEPHONE.
MODIFY Z101754SBOOKHDR FROM WA1.
IF SY-SUBRC = 0.
MESSAGE 'TABLE IS MODIFIED FROM WORK AREA ' TYPE 'S'.
ENDIF.
Regards,
Amit.