<?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: Transfering Substitution data trough BAPI. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116809#M1186819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I achieved what i was going for, however this bapi shows poor preformance for me - its slower than inserting by PA30 !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way to speed things up ?&lt;/P&gt;&lt;P&gt;Im wondering if theres a way to insert one records that spans for a few days - ie ENDDA &amp;lt;&amp;gt; BEGDA - bacause now i create new header interval pair for each day and id like to insert more data at once - any ideas on this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jan 2009 18:32:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-24T18:32:04Z</dc:date>
    <item>
      <title>Transfering Substitution data trough BAPI.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116807#M1186817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm aiming to use BAPI to insert new records to IT2003 infotype (substitutions)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i only want to supply start time end time date and PERNR for the records - because thats all data i have and it should be sufficient (it is sufficient when manually inserting data trogh PA30)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ah - all data are individual schedules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i use this small ABAP to fill interface tables :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
        geninfo like BAPI7031_1 OCCURS 0 WITH HEADER LINE,
        intervals like BAPI7031_2 OCCURS 0 WITH HEADER LINE,
        ret LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.


  geninfo-EXTSYSTEM = 'DEVCLNT010'.
  geninfo-EXTAPPLICATION = 'EXT'.
  geninfo-EXTDOCUMENTNO = '0001'.


  geninfo-EMPLOYEENUMBER = 6.
  geninfo-DATE = sy-datum.

  append geninfo.
  intervals-EXTSYSTEM = 'DEVCLNT010'.
  intervals-EXTAPPLICATION = 'EXT'.
  intervals-EXTDOCUMENTNO = '0001'.
  intervals-START_TIME = '080000'.
  intervals-END_TIME = '160000'.
*  intervals-DWS_INTERVALTYPE = ''.
  append intervals.



  CALL FUNCTION 'BAPI_PTMGREXTWOSCHED_INSWCOST'
    TABLES
      WORKSCHEDULE_GENERAL_INFO       = geninfo
      WORKSCHEDULE_INTERVALS          = intervals
      RETURN                          = ret
            .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
          .
WRITE 'OK'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basicaally after that i have record in all 3 interface tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run report &lt;STRONG&gt;RPTEXTPT&lt;/STRONG&gt; to transfer data.&lt;/P&gt;&lt;P&gt;Report finishes whithout errors - says that 1 record was "booked".&lt;/P&gt;&lt;P&gt;After clicking on i icon (blue one - summary) it says that 1 record header was procesed but - interval records were.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have any idea about the cause of this ?&lt;/P&gt;&lt;P&gt;My guess is i dont have all required data in the structures - but i have no idea where to look for each field explanation.... (SE11 dosent help much)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 11:48:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116807#M1186817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T11:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering Substitution data trough BAPI.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116808#M1186818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay - so i investigatd further :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Record is inserted in "direct mode" when field DAILYWORKSCHED is set.&lt;/P&gt;&lt;P&gt;However i aim to supply only &lt;STRONG&gt;Start time&lt;/STRONG&gt; and &lt;STRONG&gt;end time&lt;/STRONG&gt; for interval - &lt;STRONG&gt;whithout schedule&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When i run it in background mode it gives me error type S because PA2003-VARIA is hidden in my case - even if i supply empty field it it -it still wants to fill it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i run the following code :&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
        geninfo like BAPI7031_1 OCCURS 0 WITH HEADER LINE,
        intervals like BAPI7031_2 OCCURS 0 WITH HEADER LINE,
        ret LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.
  DELETE FROM PTEX2003SPEC.
  DELETE FROM PTEX2003GEN.
  DELETE FROM PTEXDIR.


  geninfo-EXTSYSTEM = 'DEVCLNT010'.
  geninfo-EXTAPPLICATION = 'CATS'.
  geninfo-EXTDOCUMENTNO = '0001'.


  geninfo-EMPLOYEENUMBER = 6.
  geninfo-DATE = sy-datum.
  geninfo-WS_SPEC_TYPE = '01'.
  geninfo-DAILYWORKSCHED = 'WH'.

  append geninfo.
  intervals-EXTSYSTEM = 'DEVCLNT010'.
  intervals-EXTAPPLICATION = 'CATS'.
  intervals-EXTDOCUMENTNO = '0001'.
  intervals-START_TIME = '080000'.
  intervals-END_TIME = '160000'.
*  intervals-DWS_INTERVALTYPE = ''.
  append intervals.



  CALL FUNCTION 'BAPI_PTMGREXTWOSCHED_INSWCOST'
    TABLES
      WORKSCHEDULE_GENERAL_INFO       = geninfo
      WORKSCHEDULE_INTERVALS          = intervals
      RETURN                          = ret
            .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
          .
WRITE 'OK'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a result i have &lt;STRONG&gt;DAILYWORKSCHED&lt;/STRONG&gt; inserted ok but &lt;STRONG&gt;no hours&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;My guess is that somehow interval data canot be hooked up with header data - but question is - why ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jacek Zebrowski on Jan 22, 2009 11:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 10:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116808#M1186818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T10:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Transfering Substitution data trough BAPI.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116809#M1186819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I achieved what i was going for, however this bapi shows poor preformance for me - its slower than inserting by PA30 !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way to speed things up ?&lt;/P&gt;&lt;P&gt;Im wondering if theres a way to insert one records that spans for a few days - ie ENDDA &amp;lt;&amp;gt; BEGDA - bacause now i create new header interval pair for each day and id like to insert more data at once - any ideas on this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2009 18:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/transfering-substitution-data-trough-bapi/m-p/5116809#M1186819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-24T18:32:04Z</dc:date>
    </item>
  </channel>
</rss>

