cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Message mapping

Former Member
0 Kudos

Hi,

I am working on EDI 850 data to flat file conversion scenario.

Here i am getting struck in this case.

If data present in input field then I need to map that field to output field

else i need to map output field as a space.

How would I map.

Thanks,

Singh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if mapwithDefault does not work..then try with the exists function...

as if element exists then map to target else map constant(with blank values ) to target...

HTH

Rajesh

Former Member
0 Kudos

Hi,

You have to use either mapwithDefault or exists function.

if Value exists mapp with Target else Constant remove Constatvale with emptytag.

if-----XXXXXXX->>exists -


Then mapp-->.Target ELSE

Constant(Remonename)------>Target

Thanks

Ravi

Former Member
0 Kudos

Hi,

thanks for ur reply.

Suppose In input side i have record rec which has 4 fields.

field 1 ha length 2 value ab

field 2 has length 60 but no value in input file

field3 has length 2 value CD

field 4 has length 10 has value 123456789

FOr this in Receiver CC How would i give in FCC.

RECORD.field FixedLength values-------> 2,2, 10

or

2,6,2,10

here 2 nd field has mapped like space as constant.

Plzz help me on this issue

Thanks,

Singh.

Edited by: vcpsingh on Mar 5, 2010 4:18 PM

Edited by: vcpsingh on Mar 5, 2010 4:24 PM

Former Member
0 Kudos

Hi,

U give it as

RECORD.fieldFixedLength values-------> 2,6,2,10

RECORD.fixedLengthTooShortHandling -->ignore

Even if the field is getting the number of chars less than specified.. it will be ignored.

Babu

Edited by: hlbabu123 on Mar 5, 2010 4:41 PM

Former Member
0 Kudos

Thanks,

Babu for your help.

Thanks,

Singh.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

mapWithDefault is correct. This is the documentaion of this function:

Replaces empty contexts in the inbound queue with a default value, which you specify in the function properties.

Example:

If u201CDefaultu201D is the default value and

A|B1,B2| |C| |D

is the inbound queue,

mapWithDefault returns the following outbound queue:

A | B1,B2 | Default | C | Default |D.

The function corresponds to the following combination of standard functions:

If(

[]field,

exists([]field),

Constant([value=default]))

you could find the documentation of the standard functions here:

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

Regards

Patrick

Former Member
0 Kudos

Hi,

Use std fun called "MapWithDefault" in between your source and target. Double click on MapWithDefault and just give one space.

Regards,

Sarvesh