cancel
Showing results for 
Search instead for 
Did you mean: 

SAPScript ampersand (&) substitution in PERFORM

gabriel_pill-kahan
Active Participant
0 Kudos

Hi all,

My SAPScript has a PERFORM


PERFORM ROUTINE1 IN PROGRAM ZPROG
USING &VAR1&
CHANGING &VAR2&
ENDPERFORM

In the ABAP debugger I see the value of VAR2 as A&B&C, but when I go back to the form, the SAPScript debugger is showing the value as AC. My guess is that &B& is considered to be a symbol with a null value. How can I format VAR2 so it would come back as A&B&C?

Thanks and Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Are your variables declared with structure ITCSY in your form?

Rob

gabriel_pill-kahan
Active Participant
0 Kudos

Yes, they are.

Gabriel

aidan_black
Active Contributor
0 Kudos

Hi,

If a text like this was entered via the graphical Sapscript editor, it would have masked the text as A<(>&<)>B<(>&<)>C. If it was originally entered with the non-graphical Sapscript editor(line editor) and the masking characters were not used, then it would interpret the &B& as a symbol.

So VAR2 should contain A<(>&<)>B<(>&<)>C. i.e. the & characters need to be masked if they are to be interpreted as real ampersand characters rather thant he beginning of a symbol.

Regards,

Aidan

gabriel_pill-kahan
Active Participant
0 Kudos

Aidan,

I've tried it, manually setting the value in the ABAP debugger, but in the SAPscript debugger I see the value also as A<(>&<)>B<(>&<)>C.

Thanks for your suggestion.

Gabriel

aidan_black
Active Contributor
0 Kudos

Hi,

I believe it is correct that the sapscript debugger will show the characters in the sapscript internal ITF format.(with masking characters etc) You need to use the function module like CONVERT_ITF_TO_ASCII to convert the text to readable format.

regards,

Aidan