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 Creation

Former Member
0 Likes
2,037

Hello Everyone,

I am looking for creating a Function Module to "create a Vendor". The transaction XK01 is currently used for creating a Vendor. But, we need a Function Module which uses the technology behind "XK01". Could anyone help me by explaining about the process of Creating a Function Module that uses the technology behind XK01. I hope you understand my requirement.

I would appreciate your help.

Thanks a lot for your help.

Regards,

Gopal.

11 REPLIES 11
Read only

Former Member
0 Likes
1,776

Hi,

There are three possible ways to create a BAPI for vendor master.

1) Use BAPI_VENDOR_CREATE which is a online BAPI which directly calls the XK01 transaction.

But this cannot be used if ur looking for a offline BAPI which communicates with a NON-SAP system

2) Create a BAPI with the following function modules

VENDOR_INSERT: To insert the vendor in vendor master

NUMBER_GET_NEXT : To get the Address number based on the account group for vendor.

ADDR_SAVE _INTERN: To update the address based on the address number found above.

BAPI_BANK_CREATE To update the bank details.

But using these FM's are also not advisiable as the data integrity between the various tables associated with the vendor master may be lost.

3) Probably the best way is to do a BDC recording on XK01 using CALL TRANSACTION in background mode and use it in the BAPI.

You can choose which best suits your requirement.

Regards,

Vik

Read only

0 Likes
1,776

Hi Vik,

Thanks a lot for your reply. The second way might be a bit helpful but, we are not so specific that we need it to be a BAPI. We need a Function Module, to create an online version of Vendor Creation using Webdynpro Java.

BAPI_Vendor_Create and the rest of the BAPIs similar to this are of no use for us. Because, they are just calling the Transaction "XK01", which is kind of no use for us. I hope you understand my requirement now.

Thanks alot for your help.

Regards,

Gopal.

Read only

Former Member
0 Likes
1,776

Hi Gopal ,

These BAPI's may be useful to you,

BAPI_VENDOR_CREATE Create Vendor Master Online

BAPI_VENDOR_DISPLAY Display Vendor Online

BAPI_VENDOR_EDIT Change Vendor Master Online

BAPI_VENDOR_EXISTENCECHECK Check existence

BAPI_VENDOR_FIND Vendor Matchcode

BAPI_VENDOR_GETDETAIL Vendor Detail Information

BAPI_VENDOR_GETINTNUMBER Supplies new internal vendor numbers

BAPI_VENDOR_GETPASSWORD Read the Entry for the Vendor Password

Rgrds,

Nikhil.

Read only

former_member585060
Active Contributor
0 Likes
1,776

Hi Gopal,

What you can do is,

1) Do the Recording of XK01 transaction and code the BDC program using Call Transaction.

2) Now build a BAPI, to get the data from outside interface

3) In that BAPI call the Call Transaction program, or trigger an event to call the Call Transaction program.

You can use FM BP_EVENT_RAISE to trigger the Call Transaction program

Refer this BAPI ISIDE_SM_VENDOR_DETAILS_GET for Vendor details fields & structure to be used

Oh BAPI_VENDOR_CREATE is available

Regards

Bala Krishna

Edited by: Bala Krishna on Aug 4, 2009 3:58 PM

Read only

former_member404244
Active Contributor
0 Likes
1,776

HI,

Use BDC method for upload the vendors..U can call the BDC in a custom function module ...This function module u can call in ur program to uplaod vendors.

else.

go for LSMW abd use the standard input method ...

OBJECT->0040

METHOD->0001

PROGRAM NAME->RFBIKR00

PROGRAM TYPE-> 'B'

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,776

You can use BAPI that below.

 BAPI_VENDOR_CHANGEPASSWORD     Change Vendor Password

 BAPI_VENDOR_CHECKPASSWORD      Check Vendor Password

 BAPI_VENDOR_CREATE             Create Vendor Master Online

 BAPI_VENDOR_CREATEPASSWORD     Create entry for vendor password

 BAPI_VENDOR_DELETE             Set Deletion Indicator Online for Vendor

 BAPI_VENDOR_DELETEPASSWORD     Delete entry for vendor password

 BAPI_VENDOR_DISPLAY            Display Vendor Online

 BAPI_VENDOR_EDIT               Change Vendor Master Online

 BAPI_VENDOR_EXISTENCECHECK     Check existence

 BAPI_VENDOR_FIND               Vendor Matchcode

 BAPI_VENDOR_GETDETAIL          Vendor Detail Information

 BAPI_VENDOR_GETINTNUMBER       Supplies new internal vendor numbers

 BAPI_VENDOR_GETPASSWORD        Read the Entry for the Vendor Password

 BAPI_VENDOR_INITPASSWORD       Initialize Vendor Password

I hope to help you.

Read only

0 Likes
1,776

Hello,

thanks for your reply. As, I mentioned in my earlier post that, the standard BAPIs like BAPI_VENDOR_CREATE doesn't serve my purpose as they are just calling the Transaction XK01. I need to call this BAPI from webdynpro and create online vendor creation forms. I hope this makes it clear!!

Thanks alot.

Regards,

Gopal.

Read only

0 Likes
1,776

hey gopal yarlagodda,

still do u have issue with vendor create, please let me know i have some solution.

Read only

0 Likes
1,776

Hi ,

please see how old this discussion is, i don't think Gopal is still waiting to hear from you.

Read only

0 Likes
1,776

ooh!. yep

Read only

0 Likes
1,776

Hi geven,

            Am struggling with the same issue. There is no standard BAPI for vendor creation in background. I wanna create vendor from NON SAP application.Could you help me?