cancel
Showing results for 
Search instead for 
Did you mean: 

Creating the receiver file name dynamically

suman_lakkimsetty2
Participant
0 Kudos

Hi Friends

Here I have a scenario IDOC to File, I am not using any mapping or creating any repository objects. My requirement is to pass the sender IDOC to receiver in an xml file format. While posting the file at receiver file directory I suppose to post it with a file name File_IDOCnumber#.xml i.e., i need to include idocnumber in the file name. As I am not using any mapping objects I might not be able to use Dynamic configuration option, kindly suggest me with a solution.

Am using PI7.1 version

--

Regards

Suman.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Suman,

Depending on your backend application, you can create a XML file port in WE21 and use that in your Partner Profile configuration. You can create your own function module to generate the filename based on your requirements.

Alternatively, if you really want to pass through PI, you can use variable substitution in your Receiver File Adapter:

Under File Access Parameters in Target Tab:

File Name Scheme: File_IdocNumber_%idoc%.xml

Under Variable Substituion in Advanced Tab:

Enable : Yes

Variable Name: idoc

Reference: payload:IDOCTYPE,1,IDOC,1,EDI_DC40,1,DOCNUM,1

Regards,

Erwin

Edited by: Erwin de Gula on Apr 28, 2011 7:57 AM

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Suman,

In SAP you have a function module EDI_PATH_CREATE_CLIENT_DOCNUM. This FM gives you the directory name + file name + idoc number. Create an xml port and then give this port for your Message type in your partner profile WE20. It should work for your requirement.

Else you can write a simple abap FM by copying the above FM and change. Else you need to do mapping in PI. If you write this FM it would be helpful for other interfaces also if you have.

Regards,

---Satish

Former Member
0 Kudos

Hi Suman,

No need of mapping as your scenario is : IDoc -> IDoc XML file.

Not possible to use DynamicConfiguration, as you have not a mapping

No need of Module... this solution is too complex just for a simple need.

The good answer is this one providen by Erwin: Variable substitution.

Regards.

Mickael

Edited by: Mickael Huchet on Apr 28, 2011 2:19 PM

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>As I am not using any mapping objects I might not be able to use Dynamic configuration option, kindly suggest me with a solution.

I think it is possible without mapping. See this link and here use file adapter module instead of jms adapter on the receiver side.

/people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping

Hope that helps.

Former Member
0 Kudos

It could be achieved with an adapter module but that would require some custom java coding

Former Member
0 Kudos

Hi,

you have to use the mapping if idoc no needs to be passed in file at receiver end...

with out mapping this cannot be achieved...

HTH

Rajesh