cancel
Showing results for 
Search instead for 
Did you mean: 

Condition for Receiver Determination

Former Member
0 Kudos

Hi experts,

i designed a file to JDBC scenario. I pick the file on different folders of the FTP.

For now on, I have a condition in my Receiver Determination that says if one field = xx then send to one BS or another.

My question is : is it possible to send the file to a specific BS according to in which folder the file has been picked.

I.e :

if the file comes from the folder /ABC, then send it to BS_ABC

if the file comes from the folder /DEF (from the same FTP), then send it to BS_DEF

Any help woulf be greatly appreciated.

Kind Regards,

Jamal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi experts,

Ive made some tests, but it is not possible to create two sender agreements for the same BS (correct me if im wrong).

Which means i have to create as many BS as folders.

To remind you, my requirement is as follow :

- Folder ABC from BS_A has to send files to BS_ABC

- Folder DEF from BS_A has to send files to BS_DEF

- Folder GHI from BS_A has to send files to BS_GHI

Is it possible without creating a BS per folder ?

Kind regards,

Jamal

Former Member
0 Kudos

Hi Jamal,

This is what an Enhanced receiver determination does. All you would need to do is create a UDF that will read the dynamic configurations (Note, using dynamic configuration object, you can access the technical objects of the message which contains lots of information like the dir path) and based on the dir path value obtained, manipulate it in the UDF to get the receiver. Hope this solves your problem.

For more information on Enhanced receiver determination, please refer to the following blog:

/people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16

Thanks!!!

Sidhartha

Edited by: Sidhartha Patra on Jan 22, 2009 4:18 PM

henrique_pinto
Active Contributor
0 Kudos

No need for multiple BSs, enhanced RD or adapter module.

Create 3 sender file CCs (one for each folder) in your sender BS.

You'll also need 3 sender agreements for each one.

In each of these CCs, select the "Set Adapter Specific Message Attributes" and the "Directory" flags.

If all of your sender agreements refer to the same Message Interface, you'll be able to maintain one single Receiver Determination. If not, you'll need one RD for each Sender Interface.

I'm considering you have one single Sender Message Interface, right?

If that's the case, in the receiver determination, go into the condition editor for each of your receivers.

In the expression editor for the left side, select the Context Object radio button and click in its match code. You should be able to see the <Directory / http://sap.com/xi/XI/System/File>; Context Object.

In the right side, put the value of the folder name that should be sent to that receiver.

The Sender Adapters fill the directory context object during runtime, since you selected the flags. Then, in the RD, the directory value is evaluated to select the proper receiver.

Regards,

Henrique.

Answers (7)

Answers (7)

Former Member
0 Kudos

I checked the buton 'virtual receiver' to create as many sender agreements as I needed.

It works perfectly fine now!!!!!

THANKS A LOT HENRIQUE, your solution was PERFECT.

Regards,

Jamal

henrique_pinto
Active Contributor
0 Kudos

Cheers

Another option would be to use one single sender CC/agreement and in the additional files, include several input folders.

Regards,

Henrique.

Former Member
0 Kudos

Thanks all,

Henrique, your answer is really helpful, but there is one thing, how do I create 3 sender agreements for the same BS ? I get the error 'No suitable sender agreement found' for the ohter CCs.

Kind regards,

Jamal

Edited by: ba_da_boom on Jan 22, 2009 4:19 PM

Former Member
0 Kudos

Thanks a lot guys for your answers.

I'll make some tests and let you know how it works.

Kindly,

Jamal

Former Member
0 Kudos

Hi,

thanks for your answer, but how is it going to know where to send the file ? Correct me if im wrong, but in your case, it will send all files to all BS no ?

SudhirT
Active Contributor
0 Kudos

Your receiver agreement will contain this info like first will be sendA and recvA And second will be sendB and recvB Business service. and sender agreement wil contain sender CC means diff. directory.

thanks.

Former Member
0 Kudos

Hi ,

Basically here you will be having two File to JDBC interfaces.

One : File Sender ( folder/ABC) to BS_ABC

& Second : File Sender( folder/DEF) to BS_DEF.

The receiver determination will decide where to send the file coming from Folder/ABC and where to send the file if coming from the Folder/DEF.

Thanks,

Pooja

prateek
Active Contributor
0 Kudos

Better and easier option would be creation of two channels. But still if you want to manage same channel, then it would be a difficult task. You will have to write an adapter module and use Dynamic Configuration there to retrieve the dir name and edit the payload to add this name to it. Then you may use this name in Conditions of receiver deteremination.

Regards,

Prateek

SudhirT
Active Contributor
0 Kudos

Hi, in addition to the above also create 2 receiver agreements for different receiver and sender and Dont give any condition in receiver determination.

thanks.

Former Member
0 Kudos

You can do it using

1) Create two communications channels under your business system by mentioning the two different folders

2) Creating two receiver identifications (having same sender )

but different receivers

3)Create 1 Inteface mapping

4) two sender agrrements ( mentioning the two different comm channels)

5) One reciever Identications