Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Request for Code to exclude single date value 1700

Former Member
0 Kudos

Hi experts,

Iam BW consultant ,Required your help for piece of code.

My requirement is as below.

We have 2 date filelds in source system ,EXample : DATE1,DATE2 ( The format of date is mm/dd/yyyy)

Similarly 2 Date fileds in Target system .Example : DATE1,DATE2( The format of date is mm/dd/yyyy)

The issue here is even though the DATE1 in source system is in mm/dd/yyyy for mat eg:05/26/2011

But in target system date is showing as 1700.

And system is throwing error.

Right now the mapping is one to one in BW..

To avoid this ,we are planning to write a routine in transformations in BW as below.

When ever we get , Date1 = 1700 replace Date1 with Date2.

To be clear again ..

Assume In Source date DATE1 = 1700.

Asumme in Source date DATE2 = 05/26/2011.

I need th result as below in Target.

DATE1 = DATE2

ie DATE1 = 05/26/2011 ( only for value 1700)

Please let me know the peice of code.

Appecaite your help ...

Thanks

Suresh..

Moderator message: cross-post locked, only one thread per problem, please.

Edited by: Thomas Zloch on May 26, 2011 1:25 PM

4 REPLIES 4

Former Member
0 Kudos

Hi Suresh,

I am afraid your question is not clear. If I understand it a bit you can acheive this nby creating a mapping custom table where you can store mapping values between source and target system. Let me know if this way is fine for you then i will give you the logic.

Regards

Ram

0 Kudos

Hi Ram

Sorry i am not getting your question

Can you please tell me what you need exactly

i had two fields in source side and two fields in target side .

If any error date occur in one date we need to replace that date with other date otherwise the date will not be changed

Former Member
0 Kudos

Hi,

Please try the below code


if  Date1 = 1700 .
date1 = date2.
endif.

Regards

Dande

Former Member
0 Kudos

Hi,

Please try the below code


if  Date1 = '1700' .
date1 = date2.
endif.

Regards

Dande