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

How to create BAPI to Update ZTABLE ?

Former Member
0 Likes
1,794

How to create bapi to update Ztable.

Is there any standard example in system ? Please tell me how to do that ?

Thanks

1 ACCEPTED SOLUTION
5 REPLIES 5
Read only

Former Member
0 Likes
1,078

Hi,

I think You need to build your logic in Bapi FM.

Regards

Ajay

Read only

Former Member
0 Likes
1,078

Hi, You can check the below link..it is given step by step to create BAPI.

http://www.erpgenie.com/abap/bapi/example.htm

Reward if it is useful.

Thanks,

Srinivas

Read only

Former Member
0 Likes
1,078

Hi Anee,

Any Remote enabled function module can be used as BAPI. I assume you want to update the ZTABLE from an external system.

While creating the function module, in the attributes, under processing type you need to select the radio button remote-enable module. Hope this helps.

Regards,

Kasthuri Rangan Srinivasan

Read only

Former Member
0 Likes
1,078

Hi Anee,

Firstly when u want to create a BAPI you will be going to se11 and creating a structure there. Basically when creating custom BAPI's we will be including some fields in that structure. So, include your ZTABLE fields in your structure. Then you should go to se37 and create a function group which again you have to create function module by giving parameters. After that you will be writing the code in editor of the another client or the system. Then you have to specify RFCDEST also.

Example:

parameters: mat like zbapi_swamy-matnr.

data : bapiretn like bapiret2.

data: begin of item occurs 0.

include structure zbapi_swamy.

data: end of item.

CALL FUNCTION 'ZBAPI_FM'

EXPORTING

MATERIAL = mat

IMPORTING

RETURN = bapiretn

TABLES

ITAB = item.

loop at item.

write:/ item-matnr, item-meins,item-mbrsh.

endloop.

Thanks & Regards,

SwamyKunche.

Reward if useful.