cancel
Showing results for 
Search instead for 
Did you mean: 

message mapping

Former Member
0 Kudos

Hi experts

iam working on message mapping

my requrement is

i have a filed FILED1 = "1234phonex"

i need to take first 4 digits (offset) form the value and pass it another filrd FIELD2.

please tell me what is the function should be used in message mapping

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if you always want the first 4 chars you could use the standard Text function substring .

Regards

Patrick

Former Member
0 Kudos

Thanks for your reply.

actually my requriment is

if the SALESAREA = 'GE'

then convert DATE1 ( MMDDYY) to DATE3 (YYDDMM)

else

convert DATE2(DDMMYY) to DATE 3(YYDDMM)

here actual value of SALESAREA = 'GE12345678', i undestand that i have to use 'substring' and 'Transform date'

but please tell me more clearly to use the above condition

thanks

Former Member
0 Kudos

Use substring(0,2) to take "GE" and use "DateTrans" function to format the date into desired format.

Former Member
0 Kudos

Hi

tahnks for your replies.

you use the standard substring function and extract the first 2 characters,

SALESAREA -


> substring (0..2)--->constant (GE)-date1------> DATE1 > transfdate-> date2

if the above line is correct how can i add other condtion (if other tahn GE)

please explain what are all other finction should beused

thanks

Former Member
0 Kudos

it is very easy..just use ifthenelse and substring.

Former Member
0 Kudos

Hi


if the SALESAREA = 'GE'
then convert DATE1 ( MMDDYY) to DATE3 (YYDDMM)
else 
convert DATE2(DDMMYY) to DATE 3(YYDDMM)
here actual value of SALESAREA = 'GE12345678', i undestand that i have to use 'substring' and 'Transform date'

use this way


Sales area - > Substring (0,2) pass this to equalS 
now another parameter to equalS can be "GE" or anything you want

Date 1- Date Transform
Date 2- Date Transform

use ifThenElse 

if (Sales Area -> Substring(0,2) equalS "GE") then (Date1 ->Date Transform) Else (Date 2-> Date Transform)

Thanks

Gaurav

Former Member
0 Kudos

Thanks you all.

finally i designed the mapping and the date also displaying in the required format. but still iam have a probelm that

if the file contain only one line with one date evrthing working fine

suppose afile contain 2 lines then only the first date in first line converting proeprly and the second date coming as blank

can you please tell how can i find the error in my message mapping

thanks

vasavi

Answers (2)

Answers (2)

Former Member
0 Kudos

its sloved

former_member193376
Active Contributor
0 Kudos

Hi

First of all, you use the standard substring function and extract the first 2 characters, and check if your SALESAREA is equal to it,if it is, then DATE1->TRANSFORM DATE->TARGET FIELD.

Thanks

Saiyog