cancel
Showing results for 
Search instead for 
Did you mean: 

MII 12.1 TimeUnavailable insted of nulldate

Former Member
0 Kudos

Hi,

I'm currently facing a problem in MII 12.1.

I have a SQL query template, that executes a sql statement on an ORACLE database like

select field from table

The field is of datatype date and can be null.

I'm calling this sql query in a transaction and iterate over the result rows with a repater.

In the repeated code I wan't to do different things depending on if the field is null or not.

In MII 12.0 I used the conditional action and added the following as input:

Repeater_0.Output{/Row/field}==nulldate

But in MII 12.1 this condition always returns false. The only way I found to get this working was to use the following condition

Repeater_0.Output{/Row/field}=="TimeUnavailable"

It seems to me that it is not possible to get null values from date fields in a transaction?!

If I do the same for a char field and compare with nullstring, it does work.

Does anyone know this behaviour and has a solution?

Regards Timo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Timo,

what version of 12.1 are you using?

The function "nulldate" should return "TimeUnavailable" like in 12.0. [In this thread|http://forums.sdn.sap.com/click.jspa?searchID=48350486&messageID=8655469] it is mentioned that there has been an error in 12.1.3 and a fix for this.

Michael

Former Member
0 Kudos

I'm using MII 12.1 SP 05 Patchlevel 12 (In the MII start image is shown Version 12.1.5 Build(99) ).

I just added a tracer to my transaction and linked nulldate to the message item of the tracer.

The output of the tracer is

[INFO] [Tracer_2]

That seems to me that nulldate isn't replaced by "TimeUnavailable" in the current version.

Regards Timo

Former Member
0 Kudos

Just out of curiousity: is "nullstring" replaced by "---" and "nullnumber" by "NA" ?

Michael

Former Member
0 Kudos

This is the ouput of three tracers, that have nulldate, nullnumber and nullstring as message:

[INFO] [Tracer_1]
[INFO] [Tracer_2]NA
[INFO] [Tracer_3]---

Regards Timo

Former Member
0 Kudos

This looks like the problem described in the thread for 12.1.3. I guess you should create a SAP Message describing this error, as you have already implemented the latest path.

Michael

Former Member
0 Kudos

That's exactly what I've done now.

I'll come back here and post the relevant information when the SAP support has answered or pointed out a solution to me.

Timo

Answers (2)

Answers (2)

0 Kudos

Does anybody solve this issue? I always received a true with a conditional using:

qrySQLgetLast.Results{/Rowsets/Rowset/Row/initialdate} != nulldate

qrySQLgetLast.Results{/Rowsets/Rowset/Row/initialdate} != ""

qrySQLgetLast.Results{/Rowsets/Rowset/Row/initialdate} != "TimeUnavailable"

qrySQLgetLast.Results{/Rowsets/Rowset/Row/initialdate} != null

qrySQLgetLast.Results{/Rowsets/Rowset/Row/initialdate} != nullstring

Can you help me, please

0 Kudos

Well I fount it, converting it to String

With a conditional

datefromxmlformat(repeater.Results{/Rowsets/Rowset/Row/START_TIME}, "yyyy-MM-dd") != ""

Former Member
0 Kudos

Try using NVL or NVL2 function it might solve your problem.