cancel
Showing results for 
Search instead for 
Did you mean: 

Date format disappears after 3 or 4 executions

former_member193376
Active Contributor
0 Kudos

Hi

My requirement is that i have to set my "current date" format as yyMMdd, setting this format is fine. It executes also normally with the desired output. After executing 3 or 4 times, the target format of my date ,ie yyMMdd disapears and hence the output is a blank. its a bit weird.

Any idea why this is happening.

Thanks in advance

Saiyog

Accepted Solutions (0)

Answers (3)

Answers (3)

GabrielSagaya
Active Contributor
0 Kudos

Try to use this udf to achieve your output

imports java.util.Date;java.text.SimpleDateFormat;

function currentdate(Container container)

{

Date useddate=new Date();

SimpleDateFormat useddateformat=new SimpleDateFormat("yyMMdd");

String enterdate=new String(useddateformat.format(useddate).toString());

return enterdate;

}

Former Member
0 Kudos

Hi,

I beleive you are using Graphical mapping and Date is disappearing after producing the values for earlier occurences of field.

The only reason due to which it can happen is that you are not handling the context of occurence of source field. The occurence of source date should be equal to occurence of date field n target.

you may need to write some UDF or You can use SAP standard functions to achieve it.

Kulwinder

Reward if helpful

Former Member
0 Kudos

Hi,

don't understand exactly what is disappearing where?

Please clarify...

Thanks

Patrick

former_member193376
Active Contributor
0 Kudos

Hi Patrick

am doing a graphical mapping.

i use the "current date" function and have to set my target date format as yyyyMMdd. this is succesfully done and execeuted succesfully.(its a straight mapping to the target) , After i execute it a no of times, i get a blank output , why? cause the date format(yyyyMMdd) has disapeared from the "current date" function where i set it earlier.

Hope this is clear.

Thanks

Saiyog

Former Member
0 Kudos

Hi,

>why? cause the date format(yyyyMMdd) has disapeared from the "current date" function where i set it earlier.

Yes if the date format disappear no data will be passed. But how could this happen? Do you have saved and activated your mapping?

Regards

Patrick

Former Member
0 Kudos

Hi,

I had now the same bug (with the date trans function)?!

It helped to remove the function and inserting it again.

Hope it helps.

Regards

Patrick