cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript symbols instead of values

Former Member
0 Kudos

I am trying to run a sapscript form that seems to only pring the page symbols, not the values assigned to them with the print program. The program data is named exactly the same in the form and print program except adding the &AMPERSANDS& in the form, and the data is as global in the print program as it can be. I have also fully debugged th print program and tracked the data to make sure there are actually values for the symbol data. All other printing functions work fine with it, and it is reading from the print program correctly because it loops and prints the correct number of rows, but instead of a print program value I get the form &SYMBOL&, even with system symbols. What other kinds of things could be causing everything on the form to be printed correctly from the program except the &SYMBOLS& are showing up instead of the value?

Accepted Solutions (1)

Accepted Solutions (1)

vamshi_mohan
Participant
0 Kudos

Hi,

The reason could be anything ranging from name of the script being called to spaces in the code to paragraph specifications.

To start with just post a few screenshots of the script issue windows in line editor.

Regards,

Vamshi.

Answers (2)

Answers (2)

Former Member
0 Kudos

Your post seems to suggest that you have coded only a fieldname or variable name?

Have you compared your MAIN window content with something from SAP that works correctly? I believe you have something very basic wrong in your SAPScript layout set. Are you pointing to a &TABLE-FIELDNAME& or &STRUCTURE-FIELDNAME& or an element you have created with DEFINE &something& = 'some value' in your layout set, or created via USING...CHANGING, etc.?

Please post a short snippet of the SAPScript MAIN window content that is showing the '&TABLE-FIELDNAME&' instead of the data value for that row/column or variable.

Former Member
0 Kudos

Hi friend,

From your post i am able to understand that you are getting the variable name with in ampersand instead of the value for that variable.

If i am correct just take my below idea if am wrong please explain me once again the problem deeply.

My suggestion is that values may not be getting displayed because the values from the print program is not correctly passed to the form.

Else the name which you have declared in the form in text element may be wrong with the data declared globally.

Or the type mentioned for the variable may not be global.

There are few scenarios like this so please check all these and activate the program and execute it and see.

If i am correct i think this will solve your problem any issues please revert back to me i will help you.

Thanks,

Sri Hari

Former Member
0 Kudos

Sri Hari,

You are correct that I am getting the symbol name and ampersands instead of the value. I have checked to make sure all names in the program and the form match, including the elements and the form name being called. I have also made sure that the variable names in the program and their types are as global as they can get. I am not sure if this is significant, but even the system symbols show up that way, i.e. &DATE&.

Another question, is there any sort of difference in the way one would define symbols on the form in graphical vs. non-graphical editor. I noticed that if I create the symbol in the graphical editor and then view it in the non-graphical editor it turns &SYMBOL& into <(>&<)>SYMBOL<(>&<)>. I have tried creating them in the non graphical editor, and taking away the <)> around the ampersands on symbols that had them added, but that made nothing print where there was a symbol.

Former Member
0 Kudos

the variable names in the program and their types are as global as they can get.

What exactly does that mean? They are either global or not.

Rob

Former Member
0 Kudos

That simply means that they are global to the program and not to a class. After mentioning that the data was globaI in the first place there was a suggstion to make sure the data was global, so I wanted to make sure someone would not think that it was possibility that the data was visible within the class that calls the write form but not visible outside the class.

Former Member
0 Kudos

Update:

The problem was that I used the graphical(Microsoft Word embeded in SAP) text editor, and it seems that something is wrong in translation between the graphical and non graphical editors. I decided to try clearing a window completely and re-writing it in the non-graphical editor, and everything just worked- no issues. I have no idea what the deal is with SAP doing some sort of conversion between the editors, as in my post above with turning &SYMBOLS& into <(>&<)>SYMBOLS<(>&<)>. Deleting the added characters individually did not work, but deleting the entire window and re-doing all of it through the non-graphical editor did. Thanks for your help, and hopefully the solution can help others and answer some questions about the sapscript text editors.