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: 

SETLEAF in SELECT CASE STATEMENT

0 Kudos

Dear folks,

I am new to ABAP. I am stuck below.

I have created a set table for GL accounts (SKA1-SAKNR) and retrieved the values to an internal table int_values using CALL FUNCTION 'G_SET_GET_ID_FROM_NAME'.

Now, my requirement is to use the values in the int_values in my below CASE statement to replace the hardcoded GL values.

SELECT a~rldnr, a~rbukrs,a~belnr, a~gjahr,a~blart,a~budat,a~buzei,a~racct,a~kunnr,a~koart,a~rhcur,a~hsl,a~umskz,a~bstat, a~gkont, a~bschl,

CASE

WHEN a~gkont EQ '0011001060' THEN CAST( a~hsl * -1 AS DEC( 23, 2 ) )

END AS hsl_cash,

Regards,

0 REPLIES 0