‎2006 Sep 19 6:02 AM
We have a form which writes out the description of a material:
<b>&MAKT-MAKTX&</b>
Usually this is fine but sometimes materials include '&' in this text: eg
<b>Complete 2&2&1 R 1.0TBAG</b>
The users are complaining that materials like these have their descriptions changed when printed by this form: eg
<b>Complete 22.1 R 1.0TBAG</b>
I think what is happening is that the form is interpreting the embedded &2& as a symbol and of course replaces it in the description with '2.'.
I want to know if there is any way I can tell the form to inhibit placeholder replacement so that the description can be printed correctly.... or has anybody got another way to print the description properly?
‎2006 Sep 19 6:14 AM
Hi Neil,
Dont use the standard paragraph format for descrription, create you own paragraph/character format and Assign it to <b>&MAKT-MAKTX&</b>.
Warm Regards:-
<b>Santosh.D</b>
‎2006 Sep 19 6:14 AM
Hi Neil,
Dont use the standard paragraph format for descrription, create you own paragraph/character format and Assign it to <b>&MAKT-MAKTX&</b>.
Warm Regards:-
<b>Santosh.D</b>
‎2006 Sep 19 6:18 AM
ya realy it is tricky...
one thing u do. if give gap b/w two(gap b/w & and 2) like that.
& <b>2&</b> <b>2&</b> <b>2&</b> than it will work.
‎2006 Sep 19 6:23 AM
Try checking by passing material to some other varible and displaying.Check in debugging mode what is happendning in this case.
Let me know if u still face the problem.
Regards
‎2006 Sep 19 6:23 AM
Neil,
I can not able to trace this error in my system. What I did is, I just changed the description of the Material with <b>&</b>. Then took the output. It was comming perfectly along with <b>&</b> sign. I did this in 4.6C.
Which version you are using? Might be a problem with paragraph format. Wild guess
thomas
‎2006 Sep 19 7:14 AM
thanks for replies guys, I'm checking them out........
Thomas, did you have two '&'s? you need to have &2& or similar to replicate my problem. One & comes out fine. I'm on SAP R/3 Enterprise (4.7?).
Santosh, character and paragraph formats don't seem to affect this problem.
Kishan, I am unable to manipulate the data in that way..it is entered by users.
Ravi, I will play about with variables but I thought there might be some 'across the board' solution as it seems that any of our sapscripts will have this problem with makt-maktx for materials with embedded &s.
‎2006 Sep 19 7:50 AM
But a space in between the & is working perfectly. Even though the data is inserted by the user, a space can be inserted inbetween making use of REPLACE. I mean
Putting the value to a variable then replace
all the '&' with 'space&'.
~thomas
‎2006 Sep 19 7:53 AM
ya thomas is rite u can do that way ....
but i think it is not looking gud in printout....it is better that u change the sign ...repalce & with another one ...
‎2006 Sep 19 9:59 AM
Hi Neil,
its a regular issue we hear from users(clients) as developers.
YES.that will work like that only. the ONLY solution is
avoid such symbols inthe texts.
ask the users not have any special symbols in the descriptions.By this only we can overcome that issue.
we can do NOTHING in the script to overcome this issue.
Earlier i had the similar problem,where i am printing some text(using INCLUDE). In that text,users entered '&' symbol instead of writing 'and'. So when displaying SAP interpreted it differently and printing was truncated after this symbol.
so we may come into the scenarios like this,where users has to take care of such a scenarios by not using them in the texts.
Hope you got it.
Regards
Srikanth
‎2006 Sep 20 7:32 AM
Hi Srikanth,
as it turns out there IS something we can do to fix this issue in SAPscript! I did some digging in OSS and found note 658270 - Deactivating low-level symbols replacement for individual symbols. This note was already applied at my site. All I had to do was insert the following in my form:
/: PERFORM OSS_NOTE_0658270 IN PROGRAM SAPLSTXC
/: USING &MAKT-MAKTX&
/: ENDPERFORM
This turned 'off' symbol replacement only for field MAKT-MAKTX and therefore the embedded ampersands printed out.
Technically this was satisfying to find the solution and it could prove useful in the future but in fact in this case we are going to get the users to change their descriptions,
eg, 'Complete 2&2 &1 R1.0t Bag' will print out correctly whereas 'Complete 2&2&1 R1.0t Bag' will not.
The main reason being that although users have only complained about the issue in one sapscript it will occur in all sapscripts so the best approach is to get the source data fixed.