Skip to Content
-1

question on hana db type casting

May 14 at 11:31 AM

27

avatar image

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

10 |10000 characters needed characters left 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.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sushil Kumar Goel May 16 at 10:26 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded