<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Smartforms and longtexts issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954820#M1694462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another question: I tried to make some experiments on a smartform, and managed how to assign a row type to my longtexts. &lt;/P&gt;&lt;P&gt;So, up to now I defined a row type as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE, which is split in 2 subsection; the first one is 2,5 CH (characters) long, while the second subsection, which will contain the text, is 66 char long; see the attached screenshot:&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/133464" width="450" /&gt; &lt;/P&gt;&lt;P&gt;However, when I assign this row type to my longtext cell (ignore the first section, just to be considered as a margin), I notice that MORE that 66 chars are filling the row; this is probably due to the fact there's a style assigned to the document (ZBBP).&lt;BR /&gt;Specifically, these are the parameters of the paragraph type used to print the longtexts:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/133499" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, it's clear that Helvetica, 10 pts. is actually smaller than the CH unity of measure used in my tab definition, as more that 66 chars are shown by the smartform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a rule to convert from CH u.o.m. to specific font dimension? I need to modify the smartform so that each text line can contain up to 66 chars.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Aug 2012 12:45:24 GMT</pubDate>
    <dc:creator>matteo_montalto</dc:creator>
    <dc:date>2012-08-30T12:45:24Z</dc:date>
    <item>
      <title>Smartforms and longtexts issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954819#M1694461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all gurus,&lt;/P&gt;&lt;P&gt;I'm not an expert on the argument as I've worked on Smartforms just for minor corrections... I need your help and suggestions.&lt;/P&gt;&lt;P&gt;We have some Z smartforms in our SRM system; they are used to print purchase orders and contracts previews, but there's an issue regarding longtexts; in attachment you can see the structure of a smartform (others are similar to this one).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, for each item of the document that is processed, there's a loop over a longtext internal table and the corresponding text row is printed out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was the way the original smartform was structured; anyway now we've some problems as such a procedure doesn't allow to format correctly the text.&lt;/P&gt;&lt;P&gt;In fact, TDFORMAT field of wa_longtext work area is never evaluated in such schema so it is non-relevant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, given that wa_longtext has type BBP_PDS_LONGTEXT, we know that TDLINE can contain up to 132 chars.&lt;/P&gt;&lt;P&gt;In our smartform, there's a fixed width place in TA_ITEM table to store longtexts, and this leads sometimes to unwanted start of a new line.&lt;/P&gt;&lt;P&gt;To provide an example, consider the following text note:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example note to show the specific "start of a new line" problem related to the missing evaluation of the tdformat field of the structure wa_longtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This string is 160 chars long, so it will be splitted into 2 different row of the longtext internal table:&lt;/P&gt;&lt;P&gt;1) This is an example note to show the specific "start of a new line" problem related to the missing evaluation of the tdformat field &lt;/P&gt;&lt;P&gt;2) of the structure wa_longtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose now that in our smarform the longtext node has enough space for ... say... 120 chars ( I did not understand yet how to check for this value as the TA_ITEM node table doesn't mention explicitly where TE_longtext will be inserted): the resulting output would then be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example note to show the specific "start of a new line" problem related to the missing evaluation of the tdf&lt;/P&gt;&lt;P&gt;ormat field&lt;/P&gt;&lt;P&gt;of the structure wa_longtext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is quite awful &lt;SPAN __jive_emoticon_name="shocked" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/952/images/emoticons/shocked.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that we should reconsider from scratch the longtext routines on these smartforms, anyway any hint or specific suggestion on the argument would be highly appreciated, even on the best practice in order to achieve our desiderata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, kind regards,&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 12:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954819#M1694461</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2012-08-28T12:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms and longtexts issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954820#M1694462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another question: I tried to make some experiments on a smartform, and managed how to assign a row type to my longtexts. &lt;/P&gt;&lt;P&gt;So, up to now I defined a row type as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINE, which is split in 2 subsection; the first one is 2,5 CH (characters) long, while the second subsection, which will contain the text, is 66 char long; see the attached screenshot:&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/133464" width="450" /&gt; &lt;/P&gt;&lt;P&gt;However, when I assign this row type to my longtext cell (ignore the first section, just to be considered as a margin), I notice that MORE that 66 chars are filling the row; this is probably due to the fact there's a style assigned to the document (ZBBP).&lt;BR /&gt;Specifically, these are the parameters of the paragraph type used to print the longtexts:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/133499" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, it's clear that Helvetica, 10 pts. is actually smaller than the CH unity of measure used in my tab definition, as more that 66 chars are shown by the smartform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a rule to convert from CH u.o.m. to specific font dimension? I need to modify the smartform so that each text line can contain up to 66 chars.&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 12:45:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954820#M1694462</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2012-08-30T12:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms and longtexts issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954821#M1694463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you just use the 'Include text' in text type in the smartform?&lt;/P&gt;&lt;P&gt;Then SAP handles all the formatting according the format of the original text. If you want to edit the formatting, just go to SO10, and edit the original text (preferably in the old text editor).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954821#M1694463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-30T13:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms and longtexts issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954822#M1694464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding the characters space. I would experiment with placing 66 characters in a row in your desired font, making sure the cell in which the characters are is defined in cm's or mm's. Then shrink the size of the cell till the 66 characters do not fit anymore. As such, you know how much space your 66 characters need.&lt;/P&gt;&lt;P&gt;Alternatively, define a variable type c length 66 and migrate your data into this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Steven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954822#M1694464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-30T13:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms and longtexts issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954823#M1694465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help, Steven&lt;/P&gt;&lt;P&gt;my doubt is that I cannot find a corrispondence between CH u.o.m. and string length; this would probably be possible if I was using a monospace font, but that's not the case. So, filling a string with an hundred "i" and filling a string with an hundred "m" would probably result in different CH length. &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your other suggestion could instead be intesting; fixing a defined length, I could in the initialization form split texts on that measure,being sure that this length fits properly on the page width.&lt;/P&gt;&lt;P&gt;This is off course a workaround, anyway, better than nothing &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/952/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I just tried, results are not that good, however better than nothing. Considering the worst case, which I assumed to be a string filled with "m" (largest character using Helvetica font), the maximum string lenght is 73... In order to consider this as the upper bound, an average string of text of 73 chars fills more or less half the width of the page, which is quite horrible to see &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/952/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:57:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954823#M1694465</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2012-08-30T13:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Smartforms and longtexts issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954824#M1694466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wondering ... is there any FM or method that could "measure" the length of a text string in terms of effective space on the screen?&lt;BR /&gt;Something that could say, in example, that the string "Hello this is an example of text", written in a certain font A with size 10 will fill approximately 10 cm (or other unit of measure, as TW, IN, MM, PT) ?&lt;/P&gt;&lt;P&gt;This should be *really* helpful as it could be used to determine width of string printed with a proportional font (as Helvetica, or Times).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's a way to get it, I could build a routine which will dinamically build each text line until the maximum available space is reached,&lt;/P&gt;&lt;P&gt;Referring to the example above, and considering a space of 7,5 cm, the routine should act as follows:&lt;/P&gt;&lt;P&gt;1) evaluating hello" written in Helvetica, 10 --&amp;gt; width of 3 cm;&lt;/P&gt;&lt;P&gt;2) is 3 &amp;lt; maximum available space ? Yes, so repeat step 1 with the following word &lt;/P&gt;&lt;P&gt;3) If 2) is ok, then concatenate ammissible words in a string separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could be an optimal solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 12:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartforms-and-longtexts-issue/m-p/8954824#M1694466</guid>
      <dc:creator>matteo_montalto</dc:creator>
      <dc:date>2012-08-31T12:16:41Z</dc:date>
    </item>
  </channel>
</rss>

