<?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: Problems with SAP Script print program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070002#M94451</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 the responses.  I was hoping that there would be a more elegant solution to this problem than using Import/Export.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Nov 2005 17:05:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-10T17:05:57Z</dc:date>
    <item>
      <title>Problems with SAP Script print program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1069999#M94448</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;I have the following scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a workflow which prints a sapscript with data stored in the workflow container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The workflow method 'executeform' populates a selection table and submits it to the print program using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This print program then populates the form with data and calls the OPEN_FORM/WRITE_FORM/CLOSE_FORM FM's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that some of the variables in the workflow container are CHAR255, when these get moved to the selection table (seltab-low) they get truncated as seltab-low is a CHAR45.   Is there a way round this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the first time I have used sapscript, I notice that the variables printed on the form correspond to the parameters defined in the Print Program.  I assume therefore that this is why the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;has been used and why the OPEN_FORM/WRITE_FORM/CLOSE_FORM was not coded directly in the workflow executeform method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any guidance on how to proceed with this would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 10:29:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1069999#M94448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T10:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SAP Script print program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070000#M94449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use ABAP memory to overcome the length limitations of selection set . &lt;/P&gt;&lt;P&gt;Before Submit use EXPORT to MEMORY .&lt;/P&gt;&lt;P&gt;In the program ZPRINT_FORM  use IMPORT from MEMORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sapscript can print global variable of the print program so I guess it is used this way as you cannot define your variables in global section of workflow program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 10:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070000#M94449</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T10:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SAP Script print program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070001#M94450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;   In general, in the statement&lt;/P&gt;&lt;P&gt;SUBMIT ZPRINT_FORM WITH SELECTION-TABLE sel_table.&lt;/P&gt;&lt;P&gt;sel_table is an internal table with the structure RSPARAMS. &lt;/P&gt;&lt;P&gt;This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime. &lt;/P&gt;&lt;P&gt;You can use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure RSPARAMS. By using SUBMIT ... WITH SELECTION-TABLE seltab, you can then pass these values on directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The work around for the variables that cannot be passed using the submit statement, can be exported to Global memory ids and the same can be retrieved in the print progra.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax for the export and import statements is something like this.&lt;/P&gt;&lt;P&gt;TABLES INDX. &lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ITAB3_TYPE, &lt;/P&gt;&lt;P&gt;          CONT(4), &lt;/P&gt;&lt;P&gt;       END OF ITAB3_TYPE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE', &lt;/P&gt;&lt;P&gt;      F1(4), F2 TYPE P, &lt;/P&gt;&lt;P&gt;      ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH NON-UNIQUE &lt;/P&gt;&lt;P&gt;                 DEFAULT KEY INITIAL SIZE 2, &lt;/P&gt;&lt;P&gt;      WA_INDX TYPE INDX. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill the data fields before CLUSTR &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;before the actual export &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INDX-AEDAT = SY-DATUM. &lt;/P&gt;&lt;P&gt;INDX-USERA = SY-UNAME. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Export der Daten. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXPORT F1    FROM F1 &lt;/P&gt;&lt;P&gt;       F2    FROM F2 &lt;/P&gt;&lt;P&gt;       ITAB3 FROM ITAB3 &lt;/P&gt;&lt;P&gt;       TO DATABASE INDX(ST)  FROM WA_INDX ID INDXKEY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************TYPES: BEGIN OF TAB3_TYPE, &lt;/P&gt;&lt;P&gt;          CONT(4), &lt;/P&gt;&lt;P&gt;       END OF TAB3_TYPE. &lt;/P&gt;&lt;P&gt;DATA: INDXKEY LIKE INDX-SRTFD, &lt;/P&gt;&lt;P&gt;      F1(4), F2 TYPE P, &lt;/P&gt;&lt;P&gt;      TAB3 TYPE STANDARD TABLE OF TAB3_TYPE WITH &lt;/P&gt;&lt;P&gt;                NON-UNIQUE DEFAULT KEY, &lt;/P&gt;&lt;P&gt;      WA_INDX TYPE INDX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INDXKEY = 'INDXKEY'. &lt;/P&gt;&lt;P&gt;IMPORT F1   = F1 &lt;/P&gt;&lt;P&gt;       F2   = F2 &lt;/P&gt;&lt;P&gt;       TAB3 = TAB3 FROM DATABASE INDX(ST) ID INDXKEY &lt;/P&gt;&lt;P&gt;       TO WA_INDX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 10:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070001#M94450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T10:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SAP Script print program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070002#M94451</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 the responses.  I was hoping that there would be a more elegant solution to this problem than using Import/Export.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2005 17:05:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070002#M94451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-10T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with SAP Script print program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070003#M94452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use of seltab is optional.&lt;/P&gt;&lt;P&gt;You can also pass the parameters this way -&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RANGES SEL FOR DBTAB-FIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEL-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;SEL-SIGN = 'I'&lt;/P&gt;&lt;P&gt;SEL-LOW = '&amp;lt;YOUR_LONG_VALUE&amp;gt;'.&lt;/P&gt;&lt;P&gt;APPEND SEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT PROG ... WITH p IN sel .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DBTAB-FIELD used above should be same as the one used for select option P in PROG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 01:43:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-sap-script-print-program/m-p/1070003#M94452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T01:43:35Z</dc:date>
    </item>
  </channel>
</rss>

