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

Updating vendor data using IDOC or BAPI

Former Member
0 Likes
1,753

We need to update create or update a vendor in R/3 the data will be sent thru PI .

We need to decide if we can use the IDOC- CREMAS or BAPI_VENDOR_CREATE/ EDIT.

It is needed that we return a vendor number in case of succesful creation of Vendor or a message to indicate that the change has been made .

Any suggestions ??

Thanks in Advance .

Anjali

8 REPLIES 8
Read only

Former Member
0 Likes
1,339

Hi,

Better to use BAPI, and after succesful cretaion of vendor bapi will return vendor number in return messages...

Revrt back if any issue,

regards,

Naveen

Read only

Former Member
0 Likes
1,339

Hi,

Vendor creation or updating be using IDOC-CREMAS would be best option, you are getting idoc through PI so it would be easy as per configuration perspective also, just you need to go for SAP to SAP ALE settings(Idoc adapter at PI, rfc destination, port creation and partner profile settings at receiver system). But we know that idoc communication is asynchronous, so you would not be able to get response back to PI system until unless you are not doing the configuration for ALEAUD message type at receiver system. Even after doing the ALEAUD configuration you will get the idoc number and the status of idoc which was created at receiver system not the vendor number (As required).

In case of using the BAPI BAPI_VENDOR_CREATE/ EDIT you can achieve the synchronous communication with the target system. So I would suggest go for BAPI in this scenario.

Thanks,

Asit Purbey.

Read only

0 Likes
1,339

Hi

I will go ahead and use a BAPI but when i use BAPI_VENDOR_CREATE it returns me the vendor number but in BAPI_VENDOR_EDIT i dont get a vendor number back.

Is there any other BAPi that i can use .

Anjali

Read only

0 Likes
1,339

HI,

Evn though BAPI_VENDOR_EDIT doesn't return vendor number, it will return success message ( type S) on change of particular vendor ( which yu sent to Bapi), so you know the vendor number as u r passin g the vendor to BAPI ( no need for bapi to return vendor number again) ..

y do u need bapi to return again vendor number which yu are passing to bapi .

revert back,,

regards,

Naveen

Read only

0 Likes
1,339

Hi

We am trying to call the 2 BAPI's from PI.

I tried calling the 2 BAPI's from a program but both are online BAPI's so go into transactions Xk01 and Xk02 .

Are there any BAPI's which i can use to call from PI or just a program and send the data across so that the vendor will be create/changed .

I am also looking at the BAPI

PI_BP_PROXY_BAPI_VENDOR.

Are there any examples i can refer to ???

If these 2 BAPI's dont work then what other options i have for creating the vendor or changing the vendor??

Thanks in Advance.

Anjali

Read only

0 Likes
1,339

Hi,

what is the prob ur facing while using Online bapi's ( go into transactions Xk01 and Xk02 ).

as u r trying to call BAPI frm PI, the bapi's will be exceuted in R/3 system only and not in PI , so as per my understanding online bapi's wont create any problem...

revrt back..

Regards,

Naveen

Read only

0 Likes
1,339

Thanks for the input .My problem with onlne BAPI's is that they dont have any export parameters so i cant send a file with the data in it .So the option of using the BAPI's does not exist any more .

We are now trying to use a function module idoc_input_creditor and trying to send the idoc from PI.

My problem is that how do i get the structure of what i will need to run the function module ie the input parameters .and will it give me back vendor numbers that i need.

Thanks

Anjali

Read only

0 Likes
1,339

Thanks for the input .My problem with onlne BAPI's is that they dont have any export parameters so i cant send a file with the data in it .So the option of using the BAPI's does not exist any more .

We are now trying to use a function module idoc_input_creditor and trying to send the idoc from PI.

My problem is that how do i get the structure of what i will need to run the function module ie the input parameters .and will it give me back vendor numbers that i need.

Thanks

Anjali