You are on page 1of 3

Community

Updated Rules of Engagement 

We have made some improvements to the way all of us engage within SAP
Community, namely how we share information, how we treat each other, and how
we can continue to learn. To continue to enjoy the Community, please adhere to
our updated SAP Community Rules of Engagement, documented here.

Ask a Question Write a Blog Post Login

Search Questions and Answers

Former Member
Dec 15, 2015 at 02:28 PM

Date value conversion in SAP BODS


1163 Views
0

Follow RSS Feed

SAP table PRPS has a date field 'USR08' and when trying to extract using BODS, blank date values in SAP are getting
converted into some default values.

When the target field is set as varchar ,

(i.e). SAP_PRPS.USR08(date) ---> BODS.USR08(VARCHAR)

Explicit usage of to_Char (Blank --> 19000101)

Direct casting to varchar (Blank --> 00000000)

both are giving different defaults in place of blank.

When the target field is also set as Date ,

(i.e). Direct extract of date


PRPS.USR08(date) ---> BODS.USR08(date)

(Blank --> 1900.01.01)

Format of date (YYYYMMDD,DDMMYYY,YYYY.DD.MM,YYYY-DD-MM) is not the issue. Default in places of blank is the
only issue.

What could be the reason for blanks getting converted into random defaults ?

Note : Version of BODS used : 4.2 , DB Connection : SQL Server management Studio 2008

Add a Comment | Alert Moderator

Assigned Tags

SAP Data Services

Similar Questions 
BODS special character conversion issue
Mihir Mishra Oct 07, 2021

Date Conversion in BODS


Anik biswas Nov 12, 2021

Join the Conversation 


SAP TechEd
Tune in for tech talk. Stay for inspiration. Upskill your future.

SAP BTP Learning Group


SAP Business Technology Platform Learning Journeys.

Coffee Corner
Join the new Coffee Corner Discussion Group.
1 Answer

Sort by: Votes | Newest | Oldest

Best Answer

Magesh Subramanian
Dec 15, 2015 at 04:44 PM

Can you check if Tool -> Options -> SAP -> Convert SAP null to null is set?. If not , choose this option
1 to get rid of default conversion.

Add a Comment | Alert Moderator | Share

 5 comments

Former Member Dec 16, 2015 at 07:03 AM

Yes , This is working . But the problem with having this option set is that it affects other SAP table 'Blank' values and in-turn
transformations built on them. Is there any option to set the same at table or field Or Job level ?
Like 0 | Share | Alert Moderator

Magesh Subramanian Dec 16, 2015 at 05:21 PM

There's no setting to do this at the job or table level I'm afraid

The work around would be,

Let DS convert the SAP NULL into 1900.01.01 , then you convert 1900.01.01 back to NULL or blank

Decode ( date_field = '1900.01.01' , NULL , date_field)

I hope PRPS table doesn't contain any records with date as '1900.01.01' 😉
Like 0 | Share | Alert Moderator

Former Member Dec 17, 2015 at 08:00 AM

This workaround was tried already and it didn't seem to work. Unfortunately , we have certain records with date '1900.01.01' ,
and when we tried this we were not able to differentiate '1900.01.01' actual values and defaulted values.
Like 0 | Share | Alert Moderator

Magesh Subramanian Dec 17, 2015 at 03:02 PM

I guess date 1900.01.01 in SAP is meant to be blank .I would suggest you to speak to the SAP functional consultant or the data
owner to see if they are valid dates.

You might also like