Application Development 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: 

Question about BAPI-ALE interface

Former Member
0 Kudos
241

Hi,

I want to distribute the purchase order data to another system. The business object 'PurchaseOrder' has an ALE message type 'PORDGD'. I am trying to use the related outbound function module and I have some difficulties.

Maybe I don't understand the purpose of the outbound function module OR I don't know how to execute it correctly.

As I understand I have to provide the function module the purchase order and select the segments that I want the IDoc to contain. I also provide the name of the receiver system and to maintain the distribution model.

Does the outbound function module should retrieve the relevant data and create an IDoc ?

Thanks, Nir.

4 REPLIES 4

Former Member
0 Kudos
126

hi, don't consider it too complex.

The ALE message is for convert a BAPI call to a IDOC message.

E.G. the BO BUS1006 has a method BAPI_BUPA_CENTRAL_SAVEREPLICA, if you create a ALE message type for it through BDBG, the system will generate two function automatively.

In this cast, the function is

ALE_BUPA_CENTRAL(outbound)

IDOC_INPUT_BUPA_CENTRAL(inbound).

In the outbound function, it will create a IDOC.

In the inbound function, it will call the BAPI_BUPA_CENTRAL_SAVEREPLICA.

Both of their interface are very familiar with the BAPI interface. Only add some ALE info like IDOC control segement, which should be filled.

You can fill them just like you do in IDOC world.

Hope my answer will be helpful.

0 Kudos
126

Hi,

just to be sure... so the steps to follow are:

1. Execute the BAPI and retrieve the data

2. For each record retrieved in the BAPI, call the outbound FM (ALE...) to create an iDoc

Am I correct ?

Thanks, Nir.

Former Member
0 Kudos
126

Hi, my friedn.

Not correct.

Actually, you only need to call ALE_BUPA_CENTRAL in my example.

you will find the interface of it is very likely to the BAPI. so you can even paste your code, jus do some change.

Former Member
0 Kudos
126

Something additional to my formerly reply.

when you call ALE_BUPA_CENTRAL , it will generate the IDOC, which include the content you input as parameter.

And at last the IDOC will be sent to the specify target system according to your input on the IDOC control parameter.

Hope it is clear enough for you.