Skip to Content

What is the use of cast function in SAP BODS?

Hello,

I have seen many scenarios in which date variable is contain cast function. Can anyone please help what and where exactly cast function is used? I tried to print the variable value and its giving system date then why is cast function used.

I am naive to this community. Please also guide me how could I start a discussion on SAP BODS.

Thanks,

Rajan

script.png (69.8 kB)
job.png (97.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 21, 2016 at 09:16 PM

    Hey Rajan,

    Cast is to convert the datatype from one to another. Example Int to Varchar.

    Best Regards,

    Matthew Ong

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2016 at 08:22 AM

    Refer Data Services Reference Guide for more details

    Explicitly converts an expression of one data type to another.
    Syntax
    cast(expression,data_type)

    Return Value
    Returns the same value in data_type.

    E.g. cast('20.3','decimal(3,1)')

    print(cast(sysdate(),'varchar(10)'));

    Regards

    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded