on 02-25-2013 9:17 AM
Hello gurus,
I'm facing an odd problem in SAP SRM 7.
Basically; I'm dealing with a custom smartform which should be able to print eventual notes which are part of the purchasing document (PO, or Contract).
The problem is as follows:
when I get the text from the system, these are filled with '#' to represent the carriage return. I've seen that the standard smartform has a routine to get rid of these separators, so in a certain way we could say that this problem could be solved using a code routine.
BUT....
..the problem: once I have the text stored in an internal table, the only way to print it on the smartforms is a LOOP routine. And doing so, the alignment is completely lost. Just to provide an example, suppose I have an internal table which contains the following text:
row 1: This is just an example which shows that a very long line without any Carriage Return leads to a problematic print
row 2: and that's a problem.#
row 3: Alignment/text formatting seems not to be good.#
I could work on that text and rebuild the following structure:
row 1: This is just an example which shows that a very long line without any Carriage Return leads to a problematic print
row 2: and that's a problem.
row 3: Alignment/text formatting seems not to be good.
Now; to print this text, I would LOOP on the table, but supposing the space in the form for the text is too short for the first line, that's the output I'd get:
This is just an example which shows that a very long line without any Carriage Return leads to a probl
ematic print
and that's a problem.
Alignment/text formatting seems not to be good.
That's because:
What if I use INCLUDE TEXT directly using an access key to the DB standard table (STXH)?
There TDFORMAT field is considered, so text formatting could be ok. The problem is that i get a sharp char # on any Carriage Return or unknown char.
Has anyone a suggestion on how to overcome the problem?
Thanks
Hi Matteo,
I think while creating the notes, you should avoid putting the "#" in the notes. It may requirement for your other system where carriage return is required. But as SAP can handle it using include text, you should find a way to get rid of that character while loading the notes in the Contract OR PO.
Alternatively, can you try Read_text? get all the details in a internal table. Replace all your # in that internal table. This will keep your formats as it is.
Then with modified Internal table, create a new Temporary Text using "Create_text" or Save_text and use this text for printing. After your use, you can delete this temporary text.
- Harshad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
if you're referring to the '#' problem, then note 1546761 is what you're looking for:
https://service.sap.com/sap/support/notes/1546761
Consider that there are a couple of notes as prerequisite, and that the note applies to standard Smartform so you'll have to "adapt" it to you own customs.
Consider also:
https://service.sap.com/sap/support/notes/1740523
https://service.sap.com/sap/support/notes/1740705
Hope this helps, in case you don't get the solution please refer further details on your specific problem.
At the moment I cannot access the system but maybe it could be helpful to see how I solved text-related problems.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.