cancel
Showing results for 
Search instead for 
Did you mean: 

BPM/File Content and Dynamic File Name

Former Member
0 Kudos

Bit of a double whammy here!

I am running a BPM : R/3 Proxy > XI > BPM > File Adapter (x4)

All working to a point.....

The file I receive splits into two files, then I pass a Count file - number of records to a separate file and then a file that simply says "ready" on completion. Four files are:

Data file, Lookup (values and descripton for legacy), Count file and Ready file.

To top this off, it will be run for 12 separate countries so hope to use the country code to add to the file naming - so generating 48 files (if successful). Data_GB.dat, lookup_GB.dat, Count_GB.dat and ready_GB.dat etc....

The first three, I can do (with maybe a little help!), I have looked at the use of dynamic file naming and think I can do this, however, the count file uses the initial file sent, but the ready file passes across the word "ready" to destination file. How can I utilise the dynamic naming convention if I do not use the original file for this?

Also, the "ready" file is being created but it is empty. It is okay using the the File Adapter, but when I convert it, the file is empty (but still created!) IN sxmb_moni, it is showing correctly but once the file content conversion happens, it is empty!

Any thoughts?

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Barry,

><i>I have looked at the use of dynamic file naming and think I can do this</i>

Sorry to be a party spolier, but there is an issue with DynamicConfiguration and BPM.

You cannot set the filename inside a mapping in the BPm, i.e , the DynamiCConfiguration for the FileName is not available inside the BPM in a transformation step. You will need to ensure that this mapping is done outside the BPM at the interface determination level.

><i>however, the count file uses the initial file sent, but the ready file passes across the word "ready" to destination file. How can I utilise the dynamic naming convention if I do not use the original file for this?</i>

Am kind of confused here,

1. The ready File should just contain the word Ready? Is it the requirement?

If yes, why not use a mapping other than graphical mapping, like java mapping and let the output of this mapping be the word Ready.

><i>How can I utilise the dynamic naming convention if I do not use the original file for this?</i>

The target filename has nothing to do with the source filename. You can use the DynamiCConfiguration to read the source filename and also create any dynamic target file name.

Regards

Bhavesh

PS: Do my answers make sense? If no, maybe I am confused with the question here

Former Member
0 Kudos

Bhavesh, I will hopefully be using the file adapter to write the countrycode into the filename (unless you say this will not work!) Configuring the receiver file adapter - using the variable from the XML Schema - http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

The requirement is that on completion of the three files (Data, Mapping and Count) to pass the word ready across in a text file. If I require the "ready" file to have the country code in the filename, it will need to be linked to the original document, otherwise how else will I get the GB/IE/DE part into the naming convention?

I cannot seem to convert the word "ready" from XML to TXT using file content conversion - it creates a blank file (I have checked the payload in communciaiton channel monitoring and it is all correct )! Same with the count file. It counts the correct number of records and creates the XML but does not convert it to text. It maybe the parameters I have used in the Content Conversion Parameters - but it seems overkill for a single word!

bhavesh_kantilal
Active Contributor
0 Kudos

Barry,

Dynamic File Name with the receiver file adapter will work. Just make sure that the mapping in which you use the Java Code to create the filename happens outside the BPM in the interface determination level.

Regarding your content conversion not working as expected, if you can give us the target XML that is created in the file with the cotent conversion parameters the reason for this can be traced out.

Regards

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh.

Time Stamp Status Description

2007-05-08 17:43:57 Success Message successfully received by messaging system. Profile: XI URL: http://host.fqdn.net:55000/MessagingSystem/receive/AFW/XI Credential (User): XIISUSER

2007-05-08 17:43:57 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.

2007-05-08 17:43:57 Success Message successfully put into the queue.

2007-05-08 17:43:57 Success The message was successfully retrieved from the receive queue.

2007-05-08 17:43:57 Success The message status set to DLNG.

2007-05-08 17:43:57 Success Delivering to channel: EPIW_FTP_Receiver_EmployeeReady

2007-05-08 17:43:57 Success MP: entering

2007-05-08 17:43:57 Success MP: processing local module localejbs/CallSapAdapter

2007-05-08 17:43:57 Success File adapter receiver: processing started; QoS required: ExactlyOnce

2007-05-08 17:43:57 Success File adapter receiver channel EPIW_FTP_Receiver_EmployeeReady: start processing: party " ", service "XE_DEV_3RD_EPIW_001"

2007-05-08 17:43:57 Success Connect to FTP server "ftp.ftp.ftp.ftp", directory "/ECS/Target"

2007-05-08 17:43:57 Success Write to FTP server "ftp.ftp.ftp.ftp", directory "/ECS/Target", file "xi_epiw_ready20070508-174357-635.dat"

2007-05-08 17:43:57 Success Transfer: "BIN" mode, size 156 bytes, character encoding -

2007-05-08 17:43:57 Success Start converting XML document content to plain text

2007-05-08 17:43:57 Success File processing complete

2007-05-08 17:43:57 Success MP: leaving

2007-05-08 17:43:57 Success The message was successfully delivered to the application using connection File_http://sap.com/xi/XI/System.

2007-05-08 17:43:57 Success The message status set to DLVD.

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:EPIWReadyFile xmlns:ns0="urn:com.xerox.esap.hr.epiwextract">

<recordReady>READY</recordReady>

</ns0:EPIWReadyFile>

Transfer: Binary

File Type : Text

File Content Conversion:

Record Set Structure: Detail

Detail.fieldSeparator ,

Detail.endSeparator 'nl'

It maybe something simple...

Hopefully you can help : )

Thanks

Barry

bhavesh_kantilal
Active Contributor
0 Kudos

Barry,

You need to make a few changes here,

1,. The target datatype should look as follows,

<?xml version="1.0" encoding="UTF-8" ?> 
<ns0:EPIWReadyFile xmlns:ns0="urn:com.xerox.esap.hr.epiwextract">
<Detail>
<recordReady>READY</recordReady> 
</Detail>
</ns0:EPIWReadyFile>

Insert a Detail node and then use the Content Conversion Parameters mentioned in your reply and things will work fine.

Regards

Bhavesh

Former Member
0 Kudos

so simple when you know how....

I can't believe I overlooked that !

All working!

Thanks Bhavesh!

Beers are on me! (next time you are in London!)

bhavesh_kantilal
Active Contributor
0 Kudos

Barry,

You are most welcome

Regards

Bhavesh

PS: Might end up in London in a month if things go accorsding to plans

henrique_pinto
Active Contributor
0 Kudos

> Sorry to be a party spolier, but there is an issue

> with DynamicConfiguration and BPM.

>

> You cannot set the filename inside a mapping in the

> BPm, i.e , the DynamiCConfiguration for the FileName

> is not available inside the BPM in a transformation

> step. You will need to ensure that this mapping is

> done outside the BPM at the interface determination

> level.

Thats strange news.

I have successfully written/read DynamicConfiguration objects in mappings within Transformation steps of BPMs. Is that issue particular to FileName?

I do have had problems with correlation strings in BPM defined for DynamicConfiguration objects (for custom Context Objects created with fake Adapter Metadata).

Regards,

Henrique.

Former Member
0 Kudos

Henrique,

I remember Bhavesh mentioning about this in other threads as well. If I remember his words correctly, "Certain Dynamic Configuration objects are not accessible with in a BPM, though I dont have a list on what properties are available and what properties are not".

May be FileName is not accessible from with in a BPM. Can you let us know if you have accessed FileName property successfully with in a BPM.

Regards,

Jai Shankar

henrique_pinto
Active Contributor
0 Kudos

As I have said, not filename itself, but rather a custom dynamic configuration.

So it is strange a custom one works but not a standard one.

But, of course, it is possible...

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique , Jaishankar and All,

I just tried to access the Dynamic file Name and I am able to do this inside a transformation step in a BPM.

My earlier answer was incorrect. Maybe a service pack issue. I tried the same on SP 14 once and then i wasn ot able to do this or maybe I was just doing something wrong.

The bottom line,

DynamicConfiguration can be accessed inside the BPM inclduing the FileName. Apologise for the confusions so far.

Regards

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

> The bottom line,

>

> DynamicConfiguration can be accessed inside the BPM

> inclduing the FileName.

Unless you use them in correlation definition, then it won't work (but won't give any error in compilation or non-zero return code; it only gives error in runtime, and you will have to check the workflow details in order to see the correlation message).

Also, reading dynamic configuration objects in container operation steps will give non-zero return code. I have not tested but probably it will happen to switch, loop and fork steps too.

Regards,

Henrique.

Answers (0)