Skip to Content

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

comparing values in scripts

Hi Gurus,

I have defined a variable in my script as

Define &N& = ' '.

So here Variable N is automatically converted into CHAR format.

I am passing this variable in my SUBROUTINE in the script.

I get an integer value inside the SUBROUTINE .

When i transport this value back to the script it gets converted to CHAR format.

Now In the script If i use

IF N > '1'.

write 'sucess'.


It does not function properly.

Could anyone please help me solving this issue.

I mean after getting an integer value in the subroutine i need to use that value as an integer in the script so that i could easily compare two integer values inside my SCRIPT.

Please help me.


Roshan Lilaram Wadhwani.

Former Member
Former Member replied


SAPscript is only interested in character format, so to get round the problem use your subroutine to set a flag based on the condition.

In your script

/: DEFINE &FLAG& = ' '

So in your subroutine

IF N > '1'.

FLAG = 'X'.


Then back in your form

IF &FLAG& = 'X'.

write 'sucess'.




0 View this answer in context

Helpful Answer

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