cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript: Condition IF in form

Former Member
0 Kudos

Dear,

I have write if condition in my form.

like

/: IF &GS_OUTPUT_FORM_HEAD-VALUE_ZM00& not equal  '0.00' .
* <TB>&GV_ZGBT_TEXT24&</> ,, &GS_OUTPUT_FORM_HEAD-VALUE_ZM00&
/: ELSE.
*
/: ENDIF.

but during my debug the form, even if &GS_OUTPUT_FORM_HEAD-VALUE_ZM00& = 0.00

it still do not go command ELSE.

Anyone could help me?

Thanks a lot.

Sincerely,

Julie

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Use

IF &GS_OUTPUT_FORM_HEAD-VALUE_ZM00(C)& NE '0.00' .

this will work.

Gr., Frank

Former Member
0 Kudos

Dear,

it works, thanks a lot for your help, again.

Still I have another confused problem,

if I want to write

/: IF &PAGE& = &SAPSCRIPT-FORMPAGES& .

  • &via&

/: ENDIF.

is that right.

Thanks a lot.

Sincerely,

Julie

Former Member
0 Kudos

Hi

I don't think the same happens here.. but maybe you can check by debugging.

Scripts are a little tricky I guess

neways say thanks by points and mark the thread as answered.

Regards

Vijai

Edited by: Vijai Dixit on Jun 19, 2009 12:16 PM

Former Member
0 Kudos

Hi Julie,

you better use

/: IF &PAGE(C)& EQ &SAPSCRIPT-FORMPAGES(C)& .

  • &via&

/: ENDIF.

This will work

Gr., Frank

Former Member
0 Kudos

got it, thank you so much.

Sincerely,

Julie

Former Member
0 Kudos

Hi,

If your problems have been solved you can close this thread.

Gr., Frank

Answers (3)

Answers (3)

rashmi_purohit2
Explorer
0 Kudos

Hi,

Try this.

Use

/: IF &GS_OUTPUT_FORM_HEAD-VALUE_ZM00& NE 0 .

/: Else.

/: Endif.

Thanks,

Rashmi.

former_member585865
Contributor
0 Kudos

Hi Julie,

&GS_OUTPUT_FORM_HEAD-VALUE_ZM00& - Pass to this variable in your program

and make a condition if it is EQ 0 then make that variable clear.

then in your Sap Script check with the variable like below,

if <variable> ne ' '

<code>

else

<code>

endif.

Former Member
0 Kudos

Hi

Use

IF &GS_OUTPUT_FORM_HEAD-VALUE_ZM00& NE '0.00' .

Regards

Vijai

Former Member
0 Kudos

Dear,

Not work..................

Sincerely,

Julie

Former Member
0 Kudos

Hi

Check if the length of the variable is creating problem.

Get in debug mode in SAP script and then check for what is the initial value of variable, copy same value in the IF condition.

maybe some time you have to add spaces in the comparison value i.e. ' 0.00' instead of '0.00'.

Regards

Vijai