<?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: Customizing Sap Script ???? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359582#M178790</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi VJ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you forward the documentation of notes on SAPScripts and Smartforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 May 2006 17:56:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-12T17:56:25Z</dc:date>
    <item>
      <title>Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359576#M178784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am customizing predefined form MEDRUCK and making the 3 forms ZMEDRUCK1,ZMEDRUCK2,ZMEDRUCK3 each form i am adding different fields which are not available in the predefined form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using predefined print program SAPFM06P i dont want to change the predefined program, where should i write the logic for the added fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking in advance.,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359576#M178784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T02:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359577#M178785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL a PERFORM - ENDFORM from sap script and define a subroutine pool to write your own logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Check the links&lt;/P&gt;&lt;P&gt; &lt;A href="http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The code will be something similar.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT YLSD999A.
DATA  W_LENGTH TYPE I.
*   GENERAL PURPOSE SUBROUTINES FOR CALLING FROM SAPSCRIPTS
*-----------------------------------------------------------------------
*----------------------------------------------------------------------
FORM DISPLAY_POUND TABLES IN_TAB STRUCTURE ITCSY
                          OUT_TAB STRUCTURE ITCSY.
  DATA: COUNT TYPE P VALUE 16.
  DATA: W_VALUE(17) TYPE C.        "defined as 7 chars to remove pence
  DATA: W_CHAR TYPE C.
  DATA: W_DUMMY TYPE C.
  DATA: W_CURR(3) TYPE C.
*    Get first  parameter in input table.
  READ TABLE IN_TAB INDEX 1.
  WRITE IN_TAB-VALUE TO W_VALUE .
* get second parameter in input table
  READ TABLE IN_TAB INDEX 2.
  MOVE IN_TAB-VALUE TO W_CURR.
  IF W_CURR = 'GBP'.
    W_CURR = '£'.
  ENDIF.
  W_LENGTH = STRLEN( W_CURR ).
*    look for first space starting at right.
  WHILE COUNT &amp;gt; -1.
    W_CHAR = W_VALUE+COUNT(1).
*  W_CHAR = IN_TAB-VALUE+COUNT(1).
    IF W_CHAR = ' '.
      COUNT = COUNT - W_LENGTH + 1.
      W_VALUE+COUNT(W_LENGTH) = W_CURR.
      COUNT = -1.
    ELSE.
*     W_VALUE+COUNT(1) = W_CHAR.
      COUNT = COUNT - 1.
    ENDIF.
  ENDWHILE.
* read only parameter in output table
  READ TABLE OUT_TAB INDEX 1.
  OUT_TAB-VALUE = W_VALUE.
  MODIFY OUT_TAB INDEX SY-TABIX.
ENDFORM.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; PERFORM ... IN PROGRAM .... USING.. CHANGING ..   &lt;/P&gt;&lt;P&gt;ENDPERFORM&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      To call ABAP subroutines from within  a form we use the   &lt;/P&gt;&lt;P&gt;     PERFORM... IN PROGRAM ... statement , the advantage of     &lt;/P&gt;&lt;P&gt;     using it  is that the print program is not required to cahnge and we  &lt;/P&gt;&lt;P&gt;     can get the new data from the subroutine which is placed in a Z   &lt;/P&gt;&lt;P&gt;     report . To pass and get the values from th subroutine the   &lt;/P&gt;&lt;P&gt;     parameters are passed which are of  type structure ITCSY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     e.g. /:PERFORM get_date IN PROGRAM zreport &lt;/P&gt;&lt;P&gt;            /:USING &amp;amp;SALESORDER&amp;amp;&lt;/P&gt;&lt;P&gt;            /:CHANGING &amp;amp;S_DATE&amp;amp;&lt;/P&gt;&lt;P&gt;            /:ENDPERFORM   &lt;/P&gt;&lt;P&gt;            The date &amp;amp;S_DATE&amp;amp; ....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           The  ABAP Code would be&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           REPORT zreport.&lt;/P&gt;&lt;P&gt;           TABLES ztab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           FORM get_date TABLES in_tab STRUCTURE ITCSY out_tab &lt;/P&gt;&lt;P&gt;           STRUCTURE ITCSY .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           READ TABLE in_tab INDEX 1.&lt;/P&gt;&lt;P&gt;           SELECT some_date FROM ztab WHERE salesorder = in_tab-value.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;           READ TABLE out-tab INDEX 1.&lt;/P&gt;&lt;P&gt;           MOVE ztab-somedate TO out_tab-value&lt;/P&gt;&lt;P&gt;           MODIFY out_tab INDEX 1.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;           ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            In the above code USING is used to pass the value to the &lt;/P&gt;&lt;P&gt;          subroutine while changing is used to recieve the value from th &lt;/P&gt;&lt;P&gt;          subroutine ,for further paramters we can use either USING or &lt;/P&gt;&lt;P&gt;           CHANGING .&lt;/P&gt;&lt;P&gt;           In the subroutine the type of paramter is always an internal table of &lt;/P&gt;&lt;P&gt;           type ITCSY  irrespective of the value passed.The VALUE field &lt;/P&gt;&lt;P&gt;           of the internal table is used to fill and recieve the values   .      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vijayendra  Rao&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:31:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359577#M178785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T02:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359578#M178786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi VJ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where we call this subroutinue in the print program, since iam using this program for 3 customized forms how can the program detect when to execute which form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:42:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359578#M178786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T02:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359579#M178787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The subrotuine is called from the SAP SCRIPT. You have modified the MEDRUCK into ZMEDRUCK rite? Add a PERFORM and ENDFORM statement in the ZMEDRUCK and the subroutine will be called automatically when the script is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Here is the flow&lt;/P&gt;&lt;P&gt; 1). SAPFM06P will call the ZMEDRUCK based on your customization of the output types.&lt;/P&gt;&lt;P&gt; 2). ZMEDRUCK will call the Subrotuine&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Hope this answer ur queries.&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 02:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359579#M178787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T02:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359580#M178788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;GOOD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DONT THINK WITHOUT CHANING THE STANDARD PROGRAM YOU CAN ADD THE EXTRA FIELD IN THE SAP SCRIPT FROM ,BECAUSE ANYWAY YOU R GOING TO PASS THE VALUE TO THOSE FIELD USING YOUR DRIVER PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 03:38:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359580#M178788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T03:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359581#M178789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;if u have to call these 3 forms under some diff conditions, then theres no way u can do it without changing the print program, because the program decides which form to call...u can definitely make the setting in NACE for the form, but it allows only one form at a time..as ur requirement is to call the forms conditionally, i suggest u to copy the print program n make the required settings... that would be more appropriate/..&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 05:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359581#M178789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-11T05:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Sap Script ????</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359582#M178790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi VJ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you forward the documentation of notes on SAPScripts and Smartforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2006 17:56:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/customizing-sap-script/m-p/1359582#M178790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-12T17:56:25Z</dc:date>
    </item>
  </channel>
</rss>

