<?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: Getting table data from subroutine to SAPScript in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851789#M1786513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some buffering should happen, if you actually use the same standard text for every contract, also if you don't use some COMMIT WORK / COMMIT_TEXT results can be ... interesting. Did you check return code of SAVE_TEXT in subsequent executions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So either &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Identify a FM to refresh buffer, look at FM like DELETE_TEXT_FROM_CATALOG , GET_TEXT_MEMORY and FREE_TEXT_MEMORY. (NB: What will happen when two or more users&amp;nbsp; print simultaneously ?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use another solution than this creation of a temporary text. (e.g. returning an internal table of text to Sap Script ?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Nov 2013 08:13:01 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2013-11-06T08:13:01Z</dc:date>
    <item>
      <title>Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851782#M1786506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement which asks to display 3 new fields on the MEDRUCK form. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Copied the MEDRUCK form to ZMEDRUCK.&lt;/P&gt;&lt;P&gt;&amp;gt; To display the whole table data, I selected the rows from the table and using 'SAVE_TEXT' function module I am writing all the records to standard text.&lt;/P&gt;&lt;P&gt;After writing in the standard text, using INCLUDE statement I am displaying in the form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, I had an issue in displaying the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute the ME4N transaction, I could see list of contracts in which I select one and print preview, the data displays fine for the first time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when I go back and select another contract from the list of contracts and print preview, I could see the same data which is displayed for first contract is being displayed for this contract too. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to clear the standard text after printing on the form?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any inputs are highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 07:40:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851782#M1786506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T07:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851783#M1786507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again Sandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are you sure your program didn't select the first contract and the second contract ?&amp;nbsp; (maybe you have several pages)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 07:42:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851783#M1786507</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2013-11-06T07:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851784#M1786508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;Hai Sandeep,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;1) You can use READ_TEXT to get the Standard Text in Script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;2) Kindly check whether the OBJECT ID varies as per the Selection before passing into the function module .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;Please try this READ_TEXT FM and check , please update if any issues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: georgia, palatino;"&gt;S.Rajendranath Raparthi.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 07:54:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851784#M1786508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T07:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851785#M1786509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fred,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I confused you with my explanation. Let me make it clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; When executed ME4N transaction, I could see some 10 contracts (say for eg: 100,200,300,400,500,...,1000)displayed.&lt;/P&gt;&lt;P&gt;&amp;gt; I select one (for eg: 100) and print preview it. As this is the first time the data is displaying fine.&lt;/P&gt;&lt;P&gt;&amp;gt; But when I come back and select another contract (say 200) , I am again seeing the same data which is displayed for 100 contract.&lt;/P&gt;&lt;P&gt;&amp;gt; But when I completely come out and start executing ME4N transaction again, I could see the data fine whichever contract is print previewed for the first time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is there any way to clear out the standard text after displaying it in SAPScript text elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 07:54:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851785#M1786509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T07:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851786#M1786510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try to debug if I have to manage this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/h &lt;/P&gt;&lt;P&gt;call stack &lt;/P&gt;&lt;P&gt;and see why it takes the first contract &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 08:00:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851786#M1786510</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2013-11-06T08:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851787#M1786511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am learning scripts now and pardon me for basic things. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your statement, I understand that after saving the data retrieved from database using select query we can read the text using READ_TEXT. But after saving in the standard text, I am displaying it using INCLUDE Z_TXT OBJECT TEXT ID ST LANGUAGE &amp;amp;EKPO-SPRAS&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data in Z_TXT is saved by calling SAVE_TEXT FM in the subroutine pool program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how to use READ_TEXT. Could you please let me know?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 08:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851787#M1786511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T08:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851788#M1786512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Fred. I have checked in debug. Forgot to mention this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I put the Sapscript and subroutine program in debug, the select query is returning the data needed for that contract but after perform statement in SAPscript, when the below executed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE ZMM_DRAD_DATA OBJECT TEXT ID ST LANGUAGE &amp;amp;EKPO-SPRAS&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data retrieved is not the one we got from select query but the previous contract data is shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did I miss anything here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 08:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851788#M1786512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T08:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851789#M1786513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some buffering should happen, if you actually use the same standard text for every contract, also if you don't use some COMMIT WORK / COMMIT_TEXT results can be ... interesting. Did you check return code of SAVE_TEXT in subsequent executions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So either &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Identify a FM to refresh buffer, look at FM like DELETE_TEXT_FROM_CATALOG , GET_TEXT_MEMORY and FREE_TEXT_MEMORY. (NB: What will happen when two or more users&amp;nbsp; print simultaneously ?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use another solution than this creation of a temporary text. (e.g. returning an internal table of text to Sap Script ?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 08:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851789#M1786513</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2013-11-06T08:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851790#M1786514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could find only one possibility of displaying internal table data on to the script. That is by storing the data in some standard text and display them on the form. I could not find any other method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is selecting a single record then 'modify' statement does it all but our query returns more than one record and we need to display all of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, after calling the SAVE_TEXT function module do you want to execute DELETE_TEXT_FROM_CATALOG? Could you please describe it more as I am new to these concepts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Sandy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 08:22:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851790#M1786514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T08:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851791#M1786515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any inputs on the above scenario? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I see in SO10, the data in the standard text is selecting fine but while printing on the form, I am getting the previous or first contracts details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to clear the standard text?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2013 12:21:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851791#M1786515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-06T12:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851792#M1786516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Sandeep , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have you used READ_TEXT Function module ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;S.Rajendranath Raparthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 08:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851792#M1786516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-07T08:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting table data from subroutine to SAPScript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851793#M1786517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I resolved the issue by dynamically creating separate standard texts for each contract and deleting the text using DELETE_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we select from STXH table and use DELETE_TEXT FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sandy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Nov 2013 16:44:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-table-data-from-subroutine-to-sapscript/m-p/9851793#M1786517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-07T16:44:05Z</dc:date>
    </item>
  </channel>
</rss>

