Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sapscript - condition wont work

Hi all,

I appreciate anyone who could help me

We have a sapscript and we have some conde on its 'Page' Windows.

Somehow everytime we execute the report the content of the condition and of the else statement are printed:

C9 Example

/: IF &REGUH-WEFAE& IS INITIAL

C9 ,, &reguh-AUSFD&,,,, &SY-DATUM&,,

/: ELSE

C9 ,, &reguh-WEFAE&,,,, &SY-DATUM&,,

/: ENDIF

Any idea why both lines (the one with reguh-ausfd and wefae) are being printed?

Thanks

Former Member
replied

Try like this:

/: DEFINE &L_WEFAE& = ' '
C9 Example
/: IF &REGUH-WEFAE& = &L_WEFAE&
C9 ,, &reguh-AUSFD&,,,, &SY-DATUM&,, 
/: ELSE 
C9 ,, &reguh-WEFAE&,,,, &SY-DATUM&,, 
/: ENDIF

Regards,

Naimesh Patel

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question