This website is not affiliated with, sponsored by, or approved by SAP AG.

Can SAPscript print text that were created w/ text control?

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Can SAPscript print text that were created w/ text control?

Postby norinori1 » Wed May 12, 2004 12:21 pm

I created a screen with text control for users to type as long as they want. The text goes into SO Item Text using BAPI. When the user print out Contract of Sales using SAPscript, the text has no line break but print out "##" at the place of line break. For example,

in SO Item Text, it looks like

abcdefg
hijklmnop

but after SAPscript "INCLUDE &VBDPA-TDNAME& OBJECT VBBP ID 0001"
it looks like

abcdefg##hijklmnop

Once I go to VA02 and type something in the Item Text (even a space), it shows right like the first one.

Can anyone tell me how I can fix this??

I'm new to SAPscript.

Thanks!
norinori1
 
Posts: 43
Joined: Thu Feb 19, 2004 10:12 am
Location: TX

Can SAPscript print text that were created w/ text control?

Postby norinori1 » Thu May 13, 2004 1:03 pm

Found the answer by myself! Just for the people who are interested in knowing the answer :lol:

Use Funtion CONVERT_STREAM_TO_ITF_TEXT

and came out with all right though some how there is a "*" at the top of each line...
norinori1
 
Posts: 43
Joined: Thu Feb 19, 2004 10:12 am
Location: TX

Postby norinori1 » Tue May 18, 2004 7:21 am

I thought that I found it, but now, "regular text" (which user typed in VA02 directly) lost line breaks. What I typed multiple lines show up as 1 line.

Does anyone know a "universal solution" that works all situation?

Thanks.
norinori1
 
Posts: 43
Joined: Thu Feb 19, 2004 10:12 am
Location: TX

Postby norinori1 » Wed May 19, 2004 9:48 am

I again found the answer myself! :lol:
After READ_TEXT, I checked the returned tables' field TDFORMAT. When it's empty, I used the function CONVERT_STREAM_TO_ITF_TEXT to read soft line breaks.
When there is something in the TDFORMAT (in my case "*"), I skipped the function. I'm not sure if this works universally, though.

Sorry, it may not a big finding for others, but I just wanted share my excitment. :oops: I hope this may help someone else.
norinori1
 
Posts: 43
Joined: Thu Feb 19, 2004 10:12 am
Location: TX


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 4 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.