Skip to Content
-1

question on hana db type casting

Hi ,

generally we do a lot of type casting when joining two tables for example if we want get data from iflo view based on entries in equi table ( which we are using for all entries )

like for example

if lt_equi is not initial

select tplnr tplma from iflo into table lt_iflo for all entries in lt_equi where tplnr eq = lt_equi-equnnr.

here we need to type cast as equnnr is char 18 and tplnr is equal to char 30 . how to achieve this cast in hdb.

thanks

Add comment
10|10000 characters needed characters exceeded

  • Hi Balakrishna

    Try to append leading zeroes in a new column say equnnr_new of internal table lt_equi which stores 12 leading zeroes and then 18 char equnnr via LOOP statement. Then compare like below:

    if lt_equi is not initial

    select tplnr tplma from iflo into table lt_iflo for all entries in lt_equi where tplnr eq = lt_equi-equnnr_new.

    thanks

    Sushil.

  • Get RSS Feed

1 Answer

  • May 16 at 10:26 AM

    Hi Balakrishna

    Try to append leading zeroes in a new column say equnnr_new of internal table lt_equi which stores 12 leading zeroes and then 18 char equnnr via LOOP statement. Then compare like below:

    if lt_equi is not initial

    select tplnr tplma from iflo into table lt_iflo for all entries in lt_equi where tplnr eq = lt_equi-equnnr_new.

    thanks

    Sushil.

    Add comment
    10|10000 characters needed characters exceeded