Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If then else with load

Hi Guys,

why does not this work? It must here load from PARTNER_HIST_FR.qvd because month <> 2. It still loads from PARTNER_FR.qvd

(qvd);

why?

if month(today()=2) then

table:

LOAD MANDANT,

     ID_PARTNER,

     PARTNER_ROLLE,

     PARTNER_KURZBEZ,

     ARCHIV_KZ,

     SACHB_KZ,

     AEN_DATUM

PARTNER_FR.qvd

(qvd);

else

table:

LOAD MANDANT,

     ID_PARTNER,

     GUELTIG_VON,

     GUELTIG_BIS,

     PARTNER_BEZ,

     ID_PERSON,

     DEBITORNUMMER,

     KREDITORNUMMER,

     EXTID_PARTNER,

     ARCHIV_KZ,

     SACHB_KZ,

     AEN_DATUM

FROM

PARTNER_HIST_FR.qvd

(qvd);

end if

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Sravan,

Try like this

LET vTemp = If((Month(Today()) * 1) = 2, 'PARTNER_FR.qvd', 'PARTNER_HIST_FR');

Temp:

LOAD *

FROM

$(vTemp)

(qvd);

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi,

try with this

if month(today())=2 then

----

this will work I think 🙂