<?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 Issues with BAPI: BAPI_ALM_ORDER_MAINTAIN (table: SRULE) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-bapi-bapi-alm-order-maintain-table-srule/m-p/834098#M43740</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;Hi,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I have some issues to configure this BAPI correctly.&lt;/P&gt;
  &lt;P&gt;Create am pm order isn`t a issue and this is working fine, but while I am trying to set up the setllement-rule i am running in trouble.&lt;/P&gt;
  &lt;P&gt;The return of the bapi is:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;E IWO_BAPI2 104 Entry 1 in table SRULE (method CREATE) was not found
E IWO_BAPI2 113 Error during processing of BAPI methods
E IWO_BAPI 121 Error reading the order %00000000001 in the document tables
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I configured the BAPI (methods) in this way:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;*Start HEADER CREATE
  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = 'HEADER'.
  wa_methods-method = 'CREATE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
  IF im_exnumber EQ 'E'.
    wa_methods-objectkey = im_aufnr.
  ELSE.
    wa_methods-objectkey = '%00000000001'.
  ENDIF.

  APPEND wa_methods TO it_methods.
  CLEAR wa_methods.
*Ende HEADER CREATE


*Start HEADER RELEASE
  IF im_release EQ 'X'.
    wa_methods-refnumber = '000001'.
    wa_methods-objecttype = 'HEADER'.
    wa_methods-method = 'RELEASE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
    IF im_exnumber EQ 'E'.
      wa_methods-objectkey = im_aufnr.
    ELSE.
      wa_methods-objectkey = '%00000000001'.
    ENDIF.


    APPEND wa_methods TO it_methods.
    CLEAR wa_methods.
  ENDIF.


*ENDE HEADER RELEASE


*Start Operation CREATE
  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = 'OPERATION'.
  wa_methods-method = 'CREATE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
  IF im_exnumber EQ 'E'.
    wa_methods-objectkey = im_aufnr &amp;amp;&amp;amp; '0010'.
  ELSE.
    wa_methods-objectkey = '%00000000001'.
  ENDIF.


  APPEND wa_methods TO it_methods.
  CLEAR wa_methods.


*Ende Operation CREATE


*Start Components
  IF im_component EQ 'X'.
    wa_methods-refnumber = '000001'.
    wa_methods-objecttype = 'COMPONENT'.
    wa_methods-method = 'CREATE'.
    wa_methods-objectkey = '%00000000001'.


    APPEND wa_methods TO it_methods.
    CLEAR wa_methods.
  ENDIF.
*Ende Components


*Start Abrechnungsvorschrift / SRULE
  IF im_srule EQ 'X'.
    wa_methods-refnumber = '000001'.
    wa_methods-objecttype = 'SRULE'.
    wa_methods-method = 'CREATE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
    IF im_exnumber EQ 'E'.
           wa_methods-objectkey = im_aufnr.
    ELSE.
            wa_methods-objectkey = '%00000000001'.
    ENDIF.


    APPEND wa_methods TO it_methods.
    CLEAR wa_methods.
  ENDIF.


*ENDE Abrechnungsvorschrift / SRULE




*START SAVE
  "  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = ''.
  wa_methods-method = 'SAVE'.
  wa_methods-objectkey = '%00000000001'.


  APPEND wa_methods TO it_methods.
  CLEAR wa_methods.
*ENDE SAVE


It doesn`t matter how the structure IT_SRULE is configured...

It would be great if someone have a idea how I could fix this issue.

Regards, Julian&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Feb 2019 15:08:13 GMT</pubDate>
    <dc:creator>former_member606695</dc:creator>
    <dc:date>2019-02-27T15:08:13Z</dc:date>
    <item>
      <title>Issues with BAPI: BAPI_ALM_ORDER_MAINTAIN (table: SRULE)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-bapi-bapi-alm-order-maintain-table-srule/m-p/834098#M43740</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;Hi,&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I have some issues to configure this BAPI correctly.&lt;/P&gt;
  &lt;P&gt;Create am pm order isn`t a issue and this is working fine, but while I am trying to set up the setllement-rule i am running in trouble.&lt;/P&gt;
  &lt;P&gt;The return of the bapi is:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;E IWO_BAPI2 104 Entry 1 in table SRULE (method CREATE) was not found
E IWO_BAPI2 113 Error during processing of BAPI methods
E IWO_BAPI 121 Error reading the order %00000000001 in the document tables
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I configured the BAPI (methods) in this way:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;*Start HEADER CREATE
  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = 'HEADER'.
  wa_methods-method = 'CREATE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
  IF im_exnumber EQ 'E'.
    wa_methods-objectkey = im_aufnr.
  ELSE.
    wa_methods-objectkey = '%00000000001'.
  ENDIF.

  APPEND wa_methods TO it_methods.
  CLEAR wa_methods.
*Ende HEADER CREATE


*Start HEADER RELEASE
  IF im_release EQ 'X'.
    wa_methods-refnumber = '000001'.
    wa_methods-objecttype = 'HEADER'.
    wa_methods-method = 'RELEASE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
    IF im_exnumber EQ 'E'.
      wa_methods-objectkey = im_aufnr.
    ELSE.
      wa_methods-objectkey = '%00000000001'.
    ENDIF.


    APPEND wa_methods TO it_methods.
    CLEAR wa_methods.
  ENDIF.


*ENDE HEADER RELEASE


*Start Operation CREATE
  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = 'OPERATION'.
  wa_methods-method = 'CREATE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
  IF im_exnumber EQ 'E'.
    wa_methods-objectkey = im_aufnr &amp;amp;&amp;amp; '0010'.
  ELSE.
    wa_methods-objectkey = '%00000000001'.
  ENDIF.


  APPEND wa_methods TO it_methods.
  CLEAR wa_methods.


*Ende Operation CREATE


*Start Components
  IF im_component EQ 'X'.
    wa_methods-refnumber = '000001'.
    wa_methods-objecttype = 'COMPONENT'.
    wa_methods-method = 'CREATE'.
    wa_methods-objectkey = '%00000000001'.


    APPEND wa_methods TO it_methods.
    CLEAR wa_methods.
  ENDIF.
*Ende Components


*Start Abrechnungsvorschrift / SRULE
  IF im_srule EQ 'X'.
    wa_methods-refnumber = '000001'.
    wa_methods-objecttype = 'SRULE'.
    wa_methods-method = 'CREATE'.


*Prüfung wenn externe Nummernvergabe, dann externe Nummer - sonst interne
    IF im_exnumber EQ 'E'.
           wa_methods-objectkey = im_aufnr.
    ELSE.
            wa_methods-objectkey = '%00000000001'.
    ENDIF.


    APPEND wa_methods TO it_methods.
    CLEAR wa_methods.
  ENDIF.


*ENDE Abrechnungsvorschrift / SRULE




*START SAVE
  "  wa_methods-refnumber = '000001'.
  wa_methods-objecttype = ''.
  wa_methods-method = 'SAVE'.
  wa_methods-objectkey = '%00000000001'.


  APPEND wa_methods TO it_methods.
  CLEAR wa_methods.
*ENDE SAVE


It doesn`t matter how the structure IT_SRULE is configured...

It would be great if someone have a idea how I could fix this issue.

Regards, Julian&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2019 15:08:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issues-with-bapi-bapi-alm-order-maintain-table-srule/m-p/834098#M43740</guid>
      <dc:creator>former_member606695</dc:creator>
      <dc:date>2019-02-27T15:08:13Z</dc:date>
    </item>
  </channel>
</rss>

