3 Replies Latest reply: Dec 30, 2011 3:05 AM by Saveen Kumar RSS

Characteristic routine - Date field not filling up

Murali R
Currently Being Moderated

Hi,

 

I have a requirement as follows.  There are 2 date fields, Clearing date & Posting date in Datasource.  I have to create a Z Infoobject in DSO & fill in the same using this 2 fields.  If Clearing date field has data, it should go in to the Z field.  If the Clearing date field is Blank, i have to get posting date data & fill it in the Z field.

 

In Transformation from Datasource to DSO, I wrote a Characteristic routine as below for the Z Object mapping Clearing date & Posting date to the Z field.

 

IF SOURCE_FIELDS-AUGDT EQ ' '.

   RESULT = SOURCE_FIELDS-BUDAT.

ELSE.

   RESULT = SOURCE_FIELDS-AUGDT.

ENDIF.

 

  • AUGDT is Clearing Date

  • BUDAT is Posting Date

 

Problem is when i execute the load, in the Z Object output i get values only when Clearing date field has values.  For the rows where Clearing date field is empty, i am not getting the Posting date value in the Z Object output. 

 

I am sure that the code above is right, but why is not putting the Posting date value in the Z Object when Clearing date is empty.

 

Regards,

Murali