Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

question on hana db type casting

bala_krishna007
Participant
0 Kudos
321

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

2 REPLIES 2

0 Kudos
218

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 Kudos
218

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.