cancel
Showing results for 
Search instead for 
Did you mean: 

blank field getting converted into wrong date

abhay_aggarwal
Participant
0 Kudos

Dear All,

I have one date field in SAP table in which there are some entries and some blank entries.

when Proxy is sending this data from ECC blank entries are converted into 00000000 and through XI in file

this

00000000 entry for date getting converted into wrong date like 30.11.0002 in file.

I have taken data type as string do I need to take data type as date.

My doubt is if there is no entry in table why it is convertng to 00000000 and after passing from XI why it is converting into

30.11.0002 .

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

abhay_aggarwal
Participant
0 Kudos

Solved

0 Kudos

Hi Abhay,

It will be very useful if you can give a gist of how u solved it!!

Thanks

Prasanna

Former Member
0 Kudos

HI,

Check for some conversion routines getting triggered when Proxy is executed in ECC.

Check for the Date format parameters if you have used in mapping.

Regards

Praveen.

Shabarish_Nair
Active Contributor
0 Kudos

check you proxy implemenmtation.

Is proxy logic creating empty dates with value 000000000?

Also if you want to avoid incorrect conversions, do a check on the mapping of the date field in PI.

Use a string comparison or equals functions to check for 00000000 and then do the required processing.

Also I suggest converting the data type of the date field to string in the proxy.

abhay_aggarwal
Participant
0 Kudos

Hi Shab,

Yes I have checked the ECC side moni these empty tags are getting converted into 00000000 for this do I have ask abper to send same empty tags beacuse these tags converting into 00000000 in ECC MONI only .and for data type I have take string and ECC side also it is string.

Regards

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi Shab,

>

> Yes I have checked the ECC side moni these empty tags are getting converted into 00000000 for this do I have ask abper to send same empty tags beacuse these tags converting into 00000000 in ECC MONI only .and for data type I have take string and ECC side also it is string.

>

>

> Regards

yes. Ask the ABAP folks to default to blank instead of converting it to zeros. The logic resides in ABAP proxy code

abhay_aggarwal
Participant
0 Kudos

why this empty tags are converting into 000000000?

Regards

stefan_grube
Active Contributor
0 Kudos

> yes. Ask the ABAP folks to default to blank instead of converting it to zeros.

That would not help. The mapping includes a DateTrans function which leads to an error, when an empty String is processed.

So the mapping has to be adjusted with an if clause.

It seems to be a bug in the DateTarns function, as the result of 00000000 should be 0000000 as well.

Regards

Stefan

stefan_grube
Active Contributor
0 Kudos

> why this empty tags are converting into 000000000?

The tag is not empty. ABAP provides an initial date value, this is 00000000.

abhay_aggarwal
Participant
0 Kudos

Hi ,

My date format like this

source --yyyyMMDD

target-DD.MM.YYYY

so if

source is

00000000

should comes like this

target

00.00.0000

but it is converting into

30.11.0002

every where in file values for 00000000 is coming like 30.11.0002

Regards

abhay_aggarwal
Participant
0 Kudos

yes stefan you are absloutly correct these 00000000 are coimg from ECC MONI only

Shabarish_Nair
Active Contributor
0 Kudos

Stefan,

the mapping has to be changed in anycase to handle the date as mentioned by me earlier. DateTrans will not handle blank or input date as 00000000

stefan_grube
Active Contributor
0 Kudos

> every where in file values for 00000000 is coming like 30.11.0002

This could be

- a bug

- an expected behaviour,

anyway you have to use an if clause to deal with the initial date.

abhay_aggarwal
Participant
0 Kudos

Hi stefan,

|This could be- a bug- an expected behaviour

Is there any reason why these empty tags are getting converted into 00000000 in ECC MONI only(data when getting converted into XML)

Regards

stefan_grube
Active Contributor
0 Kudos

> Is there any reason why these empty tags are getting converted into 00000000 in ECC MONI only(data when getting converted into XML)

In fact the values are not converted. The 00000000 are the values which are stored in db table.

This is the default value for an initial (non-existing) date.

abhay_aggarwal
Participant
0 Kudos

Hi Stefan,

thanks for reply...

my doubt is why 00000000 are getting convertd in unexpected 31.02.0002 date ? is there any specific reason for this

Regards

Abhay

0 Kudos

Hi,

If you are using date transform in your mapping, It is always advisable to use ifthenelse.

Coming to your actual question, check this thread might be of some help

Thanks

Prasanna

stefan_grube
Active Contributor
0 Kudos

> my doubt is why 00000000 are getting convertd in unexpected 31.02.0002 date ? is there any specific reason for this

I have already answered this.

Former Member
0 Kudos

Abhay,

This is default Java behavior (see also ).

If you want to treat "00000000" as a special case, please use some kind of if-then-else construction to catch this.

Regards,

Koen