Extrating SAP Table, date field does not show correct value

Hi All,

I stucked in a very strage situation.

We upload couple of Date fields in SAP EKPO tables. and the Load files have Values for these date fields.

Having said that the SAP TAble EKPO should have either Blank or NULL in thes fields.

However when I check with Data Services, I see a value of 1900.01.01,
when I check on SAP GUI it is blank, and if directly check SAP tAble in SAP ECC, it show 00/00/0000.

Please find the snapshots attached.

I can place a check on the Value while extracting data from SAP Tables, but I’m curious to know the reason behind the Value 1900.01.01 being shown in data services
SAP_EKPO_SNAPSHOTS.zip (160.0 KB)


SoniVx (BOB member since 2010-12-10)

Can you set the Options --> SAP --> Convert SAP null to null and see if that works?


ganeshxp :us: (BOB member since 2008-07-17)

Thanks Ganesha for you reply. That option is already checked…

any other clue?


SoniVx (BOB member since 2010-12-10)

I am missing some information. You have UPloaded data in to EKPO? How? BAPI, idoc, direct insert, LSMW?

What is the data type definition of the Z field?


Johannes Vink :netherlands: (BOB member since 2012-03-20)

Data is being uploaded thorugh LSMW in EKKO table.

Z field is of type DATE in SAP. What i discovered is that if I convert this field into a VARCHAR field while extracting data it returns me all Zeros ‘00000000’. Is there any setting in DS Jobserver so that SAP Blank is Treated as Blank and NULL as NULL?

Regards,
Virendra


SoniVx (BOB member since 2010-12-10)

LSMW accepts flat files as input. Ensure that BODS does output a flat file where the Z data field is truly empty.

Then test it. If that does not work, then in LSMW define in the mapping that when the source is empty, do not map the field on the target field. Maybe that works.


Johannes Vink :netherlands: (BOB member since 2012-03-20)

Load file was truely Blank. As of the now the Data is already loaded into SAP.

So can’t change anything onthe LSMW side :(.

I can cutomize my job to Replace 1900.01.01 with a blank or NULL, but I do wonder if there is some option in Configurations of BODS Job server. This will save some efforts for me. :slight_smile:


SoniVx (BOB member since 2010-12-10)

If the flat file is showing nothing for the date, the problem is on the LSMW side. If you cannot have that changed, then you need to accept the outcome…

Oh wait, you are saying that you want to change the data that is already loaded in SAP. That depends on how the LSMW is designed and if an update is possible. In the LSMW the field should be mapped to a nothing ABAP notation. But I am not sure what that is…

I think you should call in some help from an ABAP developer. Most of the time they know how to fix these kind of things.


Johannes Vink :netherlands: (BOB member since 2012-03-20)

This is SAP Data Services behavior.
Please vote up an Enhancement to set the SAP NULL TO NULL on the job level on the SAP Idea place
https://ideas.sap.com/D8223

Here is some documentation on SAP Null values:

  1. SAP Data Services Supplement for SAP - DS 4.2 SP8
    http://help.sap.com/businessobject/product_guides/sbods42/en/ds_42_sap_en.pdf

9.3.2 Working with null values from SAP applications (P197)9.3.4
Null dates (this seems to be talking about ADF)The concept of a null date
in SAP applications is represented by a value called INITIAL that is a property
of every SAP application

In the default configuration of Data Services (where Convert SAP null to null is disabled), INITIAL dates are written to an ABAP data file as NULLs. In ABAP data files, NULLs are represented by empty strings. They are then read by the parent data flow, which converts every empty string to a single space. If passed through again without data type or value change, Data Services converts the single blank into 01-JAN-1900 before loading it into a target.


JDRoble (BOB member since 2009-06-22)