Skip to Content
avatar image
Former Member

help to do code in elgant way

hi

i have to do a 2 selects one is above i get in pro_type value

like if value is F1or F2 or F3

i have to do the next select from table ZZEVER_NEW1

if i get in pro_type like X0 or XE or XI or XS

i have to ZZEVER_NEW2

and so on

what is the elgant and short way to do taht

SELECT SINGLE prart

FROM prps

INTO pro_type

WHERE pspnr = ps_posnr.

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 19, 2007 at 01:18 PM

    HI FRINDS

    I TRY TO DO IT LIKE THAT BUT THERE IS BETTER WAY MAYBE FIELD SYMBOLS?

    IF ( project_type EQ 'C0' OR project_type EQ 'CB' OR project_type EQ 'C+' ).

    proj_tab = 'ZZEVER_3'.

    ELSEIF ( project_type EQ 'F5' OR project_type EQ 'F6' OR project_type EQ 'F3' ).

    proj_tab = 'ZZEVER_6'.

    ELSEIF project_type EQ 'F0'.

    proj_ta = 'ZZEVER_NO'.

    ELSEIF ( project_type EQ 'X1' OR project_type EQ 'X2' OR project_type EQ 'XI' OR project_type EQ 'XS').

    proj_ = 'ZZEVER4'.

    ENDIF.

    REGARDS

    Add comment
    10|10000 characters needed characters exceeded