cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: File name in receiver FILE adapter

Former Member
0 Kudos

Hi Experts,

i have Scenario proxy to file

from source side i got input values in one field(long String). in the target side i need to split that field

finallly i need get the out put file like this

q2344eretrnnsd sewewerereefre wereretrtrtreeterte ertrterwytdyt rtretyeytyutueyt

sdgfghfhyghhjhj sdfgfdhdghgjgjh sdfgdfhgfhjgjgjfgh dfgdhdgghgh dfghfgfgfgfgfgf

sfdggggggggddf sdfdfsddfdfdfdfd sdfdfdfdfdfddfdfs sdfsdfdfdsfd asdfsdafdsfds

the problem is while place file in the target directory the file need save as according to the "version no" (it is included in the long string of source field)

file name should be change according to the "version no"

so please suggset to me how can i change the file name according to the version no which is include in the long string in the source side

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

First split that long string and retrieve the version number from that and then use dynamic configuration.

/people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name

Thanks

Amit

manikandan_shanmugam3
Active Participant
0 Kudos

Hi,

you can go for variable substitution.take the value from the filed and dynamically change the file name.

refer this links

/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi

Regards,

Manikandan

Former Member
0 Kudos

Hi All,

Thanks for the reply

for using the variable subtitution we need the particular field value which we want to set as a file name

but in my requirement i will not get any field values separatley. it alway s coming into as long string field

please suggest me how to acheive it

please correct me if anything wrong

Thanks in advance

manikandan_shanmugam3
Active Participant
0 Kudos

Hi,

are you doing mapping? if yes then

  • write a UDF to substring the required version no and append the version no in file name and return the file name.

*Set the ASMA properties for File name in Advance mode in ID

Refer the below links for ASMA properties and Sample UDF

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm

Regards,

Manikandan

Former Member
0 Kudos

Hi Mani kandan,

thanks for the reply can you please tell me one more thing in FCC

source side we have only one field which is long string so we need put the value of that field in to the below format in target location

source (field value==<line>sapsdnforumsprocessintigration</line>) ocurs multiple times

in target file it has to appear as in below format.

sap sdnforums processintegration

sap sdnforums processintegration

sap sdnforums processintegration

sap sdnforums processintegration

please suggest wat type of file cotent conversion parameter rquired to achive this in the receiver communication channel

Thanks in advance

Edited by: katakoti on May 17, 2011 8:44 AM

Edited by: katakoti on May 17, 2011 9:28 AM

Former Member
0 Kudos

Hi All,

Can anyone give the solution for above format.. how to acheive using content conversion.

Thanks,

Katakoti

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

katakoti

you cannot solve itso simple. besides de file name that comes from the source system, you need to append the version number, value that you dont know at runtime. if the version number has not requiered you can solve your scenario with a UDF--> see Dinamyc file name blogs (Dynamic configuration) the isna particular blog from Michal K. that has the code already.

the solution for your issue is not so simple. i reccomend you to meet the functional source system and check with him if the version number could be omited or maybe replace it with a timestamp in the file, configuration that is standard in the channel. the timestamp is other way to version files.

hope that help.

Regards

RP

Former Member
0 Kudos

Hi Alejandro,

Ok.. i will ask ABAPer to remove the version and replace it with time stamp. We may get 3 to 4 files in a single proxy trigger.

So how we can handle file with time stamp which is coming from source system[ABAP Proxy].

Thanks in adbance,

Katakoti

former_member181962
Active Contributor
0 Kudos

Hi Katakoti,

How would you know when you have to break the long string?

do you have the field lengths? Then you can use the FCC parameter for fieldLengths. to split the single string into multiple fields.

Best Regards,

ravi

Former Member
0 Kudos

Hi Ravi,

i have the sample out put file based on that i can decide the field lengths(the length of the eachfiled is 83 charecter).But the FCC parameter LINE.filedFixedLength(line is input filed name) is not work for Single field which is containg the long string.

NameA.absoluteRowWidth=<noOfColumns>. this parameter deviates entire string into no columns

like this

input =

sapsdnforums

output:

sap

sdn

forums

i wnat the output like this

sap sdn forums

Thanks in advance

Edited by: katakoti on May 25, 2011 11:41 AM

RKothari
Contributor
0 Kudos

>>the file need save as according to the "version no" (it is included in the long string of source field)

You can try using dynamic configuration concept.

Refer the below wiki:

https://wiki.sdn.sap.com/wiki/display/XI/Combining%20three%20different%20aspects%20of%20PI%20in%20on...

-Rahul