‎2005 Dec 08 7:38 AM
Hi,
I wnat to create a custom Bapi to update the custom table.
Should i use write the inser and update queries inside the Function Module.
is there any other way.
Please let me know.
Regards
kumar
‎2005 Dec 08 7:42 AM
‎2005 Dec 08 7:44 AM
Yes you can use Insert, Update, Modify statements to update the custome table.
In case of Standard tables, you can use standard BAPIs.
‎2005 Dec 08 7:54 AM
U can deveop a custom bapi. It can be used to update custom table. The proper code needs to be written.
May be u can have the final data in an internal table or other way also.
say the custom table has 2 key fields.
before puttingthe data into custom table,
loop at <int'table>.
custom-table-field = inttable-field.
.........
<populate all fields>.
use UPDATE <custom table>
where <field1> = <inttable-field1>
and <field2> = <inttable-field2>.
endloop.
or else declare a work area which is of type custom table.
loop at <int'table> into workarea.
update <custom table> from work area
where <field1> = <inttable-field1>
and <field2> = <inttable-field2>.
endloop.
Hope this will solve ur problem.
Pl. award appropriate points.
endloop.