Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function module to save data into database table from internal table

Former Member
0 Likes
2,846

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.

7 REPLIES 7
Read only

Former Member
0 Likes
1,119

may be you understood wrongly..>

what is the table you want to update..? if it is a standard table, look for standard BAPI function.

Read only

0 Likes
1,119

i need to update VEIAV table

Read only

0 Likes
1,119

HI there,

did you foudn such a function module to fill VEIAV?

I also need that one...

Thanks

Danny

Read only

0 Likes
1,119

See if standard SAP programs RVEXST00 or RMIMST00 help.

Rob

Read only

0 Likes
1,119

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..

Read only

Former Member
0 Likes
1,119

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

Read only

Former Member
0 Likes
1,119

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.