cancel
Showing results for 
Search instead for 
Did you mean: 

IF .... ELSE ... in Script

Chaitanyat
Participant
0 Kudos

Hi,

I am working on a script and the coding block below is being used.

/: if value1 GT 0.

I1 &value1&,,&value2&.

/: else.

I1 &value1&.

/: endif.

But the condition ins't working actually. For values of VALUE1 less than equal to 0 the else condition is not working. Though simple but unable sort it out. Need solutions for the same.

Regards,

Chaits.

Accepted Solutions (0)

Answers (4)

Answers (4)

kesavadas_thekkillath
Active Contributor
0 Kudos

put the same condition in ur program and assign a character flag variable.

check that flag variable in ur script

Chaitanyat
Participant
0 Kudos

Thank you all for your replies, a change in the scenario and i no more had to do anything.

Regards,

Chaits

former_member210123
Active Participant
0 Kudos

/: IF &REGUP-KUNNR& = ' '

/: &value1&,,&value2&.

/: ELSEIF &REGUP-LIFNR& = ' '

/: &value1&,,&value2&.

/: ENDIF

It should be something like this...no full stops at the end...

Former Member
0 Kudos

Hi,

Check the medruckAddress window,in that IfElse is used.

Regards,

Shiva Kumar

Former Member
0 Kudos

Hi,

Use & in if condition.

if &value1& GT 0

Thanks,

Former Member
0 Kudos

Hi ,

As script doent check the very long conditions (more than 1 line)

The solution is :

Call the Perform Routine from ur script and with in SE38 editor, u have to mention all ur If.........else conditions.

witth in this condition pass the Flag to the variable .

Ex:

If.......

gv_x = 'X'.

else.

gv_x = ' '.

endif.

Now u can use this flag variable in the script editor to check whther it has passed IF condition , or ELSE Condition.

Regards

Kiran Sure