cancel
Showing results for 
Search instead for 
Did you mean: 

file to file scenario

Former Member
0 Kudos

Hi Expert,

I have requirement to develop the file to file scenario,

source file :

customer_no           name       desc_EN         desc_GM          desc_FR

target file;

customer_no

name

desc

lang

we have to check the description(desc) language, and have to create a new record for it -if desc value is not equal to null .

Please suggest in developing the mapping for it .

Thanks in advance,

MK

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Assume the src structure like this..

customer_details

->customer_no(1...unbounded)

->name(0..1)

->desc_en(0..1)

->desc_gm(0..1)

->desc_fr(0..1)

check with the following mapping

desc>exists>and>not>desc>equalsS>constant(null)->createif>customer_details

others are one to one mapping...

Edited by: malini balasubramaniam on Jul 18, 2008 8:31 AM

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi MK,

you create a node for language.

and in the condition for language use IF DESC NOT EqualsS then Constant(give the language for this constant)..

Reward points if this is helpful

Thanks,

Madhu

Former Member
0 Kudos

Hi mk,

the simplest way to achive this is by creating duplicate subtree in the message mapping.

source structure:

<Record>

<Cust_no>

<Name>

<Desc_En>

<Desc_Gm>

<Desc_Fr>

</Record>

Receiver Structure:

<Rec>

<Cust_no>

<Name>

<Decscription>

<Language>

</Rec>

Now in mapping at receiver side right click on Root node( Rec ),select duplicate subtree, do the same thing again(take one more subtree).

At receiver side now u will get 3 Rec nodes.

For the first Rec mapping:

take the Desc_En field and Constant with ""(Null) and map to Equals(Text catogery) fuction and the map that out put to Not(boolian) function then pass it to ifwithoutelse and map Record to <Rec>(First one).

Now map the Cust_No to Cust_no,name to name,Desc_En to Description,Constant with "ENGLISH" to Lang.

For the second Rec mapping:

take the Desc_GM field and Constant with ""(Null) and map to Equals(Text catogery) fuction and the map that out put to Not(boolian) function then pass it to ifwithoutelse and map Record to <Rec>(second one).

Now map the Cust_No to Cust_no,name to name,Desc_GM to Description,Constant with "GERNANY" to Lang.

For the Third Rec mapping:

take the Desc_FR field and Constant with ""(Null) and map to Equals(Text catogery) fuction and the map that out put to Not(boolian) function then pass it to ifwithoutelse and map Record to <Rec>(third one).

Now map the Cust_No to Cust_no,name to name,Desc_FR to Description,Constant with "FRANCE" to Lang.

if any doubts plz let me know.

Reward points if helpfull.

Regards,

Sreedhar Goud

Former Member
0 Kudos

Thank you all,

As I duplicated the subtree in the target message.

the souce file is TAB delimited.

and we need to overwrite target file, if it already exsists. And also the target file is also a text file.

Please explain the File content conversion parameter configuration in the sender and receiver communication channels.

Many thanks,

MK

Former Member
0 Kudos

hi........

In sender communication channel:

Record.fieldSeparator : '/t'

Record.endSeparator : '/n'

For receiver communication channel also give same parameters.

For over writing the target file in processing parameters give,

File construction mode as create and below that u will get a checkbox override existing file enable that check box.

Regards,

Sreedhar Goud

Former Member
0 Kudos

Hey,

I gues you need to implement File Content Conversion on your Sender side.

refer to this link.

also refer to this link for different parameters that can be utilized.

http://help.sap.com/saphelp_nw04/helpdata/en/44/79973cc73af456e10000000a114084/frameset.htm

reward points if useful.

regards,

Milan

Former Member
0 Kudos

hi mk,

use Boolean functions in your mapping,it will solve your issue

regards

kummari

Former Member
0 Kudos

Thanks Kummari for the Reply,

can you please show me how can I really implement the boolean functions, as I am not really familiar with the mapping.

Many thanks,

MK