<?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: How to create Service PR using BAPI_PR_CREATE? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818918#M2026116</link>
    <description>&lt;P&gt;Here is how to work with BAPI, usually you have one BAPI_*_GETDETAIL and one BAPI_*_CREATE:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create the object manually (ask someone at your location if you can't do it yourself)&lt;/LI&gt;&lt;LI&gt;Create a program which reads this object via BAPI_*_GETDETAIL and see all the values of the exported parameters&lt;/LI&gt;&lt;LI&gt;Create a program which creates a copy of this object via BAPI_*_CREATE by passing the values of the BAPI_*_GETDETAIL exported parameters&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jan 2024 19:09:16 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2024-01-06T19:09:16Z</dc:date>
    <item>
      <title>How to create Service PR using BAPI_PR_CREATE?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818917#M2026115</link>
      <description>&lt;P&gt;How to create Service PR using BAPI_PR_CREATE?&lt;/P&gt;
  &lt;P&gt;Please send the &lt;STRONG&gt;complete working code&lt;/STRONG&gt; as I am able to create the PR with ITem but for PR, it is giving error "Enter only one true account assignment Message no. KI249".&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 18:59:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818917#M2026115</guid>
      <dc:creator>gary07a</dc:creator>
      <dc:date>2024-01-06T18:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Service PR using BAPI_PR_CREATE?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818918#M2026116</link>
      <description>&lt;P&gt;Here is how to work with BAPI, usually you have one BAPI_*_GETDETAIL and one BAPI_*_CREATE:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create the object manually (ask someone at your location if you can't do it yourself)&lt;/LI&gt;&lt;LI&gt;Create a program which reads this object via BAPI_*_GETDETAIL and see all the values of the exported parameters&lt;/LI&gt;&lt;LI&gt;Create a program which creates a copy of this object via BAPI_*_CREATE by passing the values of the BAPI_*_GETDETAIL exported parameters&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 19:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818918#M2026116</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-01-06T19:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Service PR using BAPI_PR_CREATE?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818919#M2026117</link>
      <description>&lt;P&gt;And of course, refer to the SAP documentation and to SAP notes like &lt;A href="https://me.sap.com/notes/1950319/E"&gt;1950319 - BAPI_PR_CREATE: Template for creating service PR - SAP for Me&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 19:10:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818919#M2026117</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-01-06T19:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Service PR using BAPI_PR_CREATE?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818920#M2026118</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Can you please help where I am doing wrong in the below code.. I am getting this error -&lt;STRONG&gt; "Enter only one true account assignment"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;gs_header-pr_type = 'NB'."&lt;BR /&gt;gs_headerx-pr_type = 'X'.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_item.&lt;BR /&gt;ls_item-preq_item = '00010'.&lt;BR /&gt;ls_item-PURCH_ORG = wa_output-ekorg.&lt;BR /&gt;ls_item-pur_group = wa_output-ekgrp."&lt;BR /&gt;ls_item-short_text = 'PR Text'.&lt;BR /&gt;ls_item-plant = wa_output-werks.&lt;BR /&gt;ls_item-quantity = wa_output-menge.&lt;BR /&gt;ls_item-DES_VENDOR = wa_output-lifnr.&lt;BR /&gt;ls_item-FIXED_VEND = wa_output-lifnr.&lt;BR /&gt;ls_item-matl_group = wa_output-matkl."&lt;BR /&gt;ls_item-item_cat = '9'.&lt;BR /&gt;ls_item-acctasscat = 'N'.&lt;BR /&gt;ls_item-pckg_no = '0000000001'."&lt;BR /&gt;APPEND ls_item to lt_item.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_itemx.&lt;BR /&gt;ls_itemx-preq_item = '00010'.&lt;BR /&gt;ls_itemx-PURCH_ORG = 'X'.&lt;BR /&gt;ls_itemx-preq_itemx = 'X'.&lt;BR /&gt;ls_itemx-pur_group = 'X'."&lt;BR /&gt;ls_itemx-short_text = 'X'."&lt;BR /&gt;ls_itemx-plant = 'X'."&lt;BR /&gt;ls_itemx-quantity = 'X'.&lt;BR /&gt;ls_itemx-DES_VENDOR = 'X'.&lt;BR /&gt;ls_itemx-FIXED_VEND = 'X'.&lt;BR /&gt;ls_itemx-matl_group = 'X'."&lt;BR /&gt;ls_itemx-item_cat = 'X'."&lt;BR /&gt;ls_itemx-acctasscat = 'X'."&lt;BR /&gt;ls_itemx-pckg_no = 'X'."&lt;BR /&gt;APPEND ls_itemx to lt_itemx.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_account.&lt;BR /&gt;ls_account-preq_item = '00010'.&lt;BR /&gt;ls_account-serial_no = '01'.&lt;BR /&gt;*account-quantity = '0.955'.&lt;BR /&gt;ls_account-CO_AREA = 'SBCC'.&lt;BR /&gt;*ls_account-gl_account = wa_output-kstar.&lt;BR /&gt;*ls_account-costcenter = wa_output-kstar.&lt;BR /&gt;ls_account-NETWORK = wa_output-aufnr.&lt;BR /&gt;ls_account-activity = wa_output-vornr.&lt;BR /&gt;ls_account-wbs_element = wa_output-posid.&lt;BR /&gt;*account-profit_ctr = '9999999999'.&lt;BR /&gt;APPEND ls_account to lt_account.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_accountx.&lt;BR /&gt;ls_accountx-preq_item = '00010'.&lt;BR /&gt;ls_accountx-serial_no = '01'.&lt;BR /&gt;ls_accountx-preq_itemx = 'X'.&lt;BR /&gt;ls_accountx-serial_nox = 'X'.&lt;BR /&gt;ls_accountx-CO_AREA = 'X'.&lt;BR /&gt;*accountx-quantity = 'X'.&lt;BR /&gt;*accountx-distr_perc = 'X'.&lt;BR /&gt;*ls_accountx-gl_account = 'X'.&lt;BR /&gt;ls_accountx-wbs_element = 'X'.&lt;BR /&gt;*ls_accountx-costcenter = 'X'.&lt;BR /&gt;ls_accountx-NETWORK = 'X'.&lt;BR /&gt;ls_accountx-activity = 'X'.&lt;BR /&gt;*accountx-co_area = 'X'.&lt;BR /&gt;*accountx-profit_ctr = 'X'.&lt;BR /&gt;APPEND ls_accountx to lt_accountx.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_service.&lt;BR /&gt;ls_service-doc_item = '00010'.&lt;BR /&gt;*ls_service-outline = '0000000001'.&lt;BR /&gt;ls_service-srv_line = '0000000010'.&lt;BR /&gt;ls_service-short_text = wa_output-ktext1.&lt;BR /&gt;ls_service-quantity = wa_output-menge.&lt;BR /&gt;ls_service-uom = wa_output-meins.&lt;BR /&gt;ls_service-gross_price = wa_output-tbtwr.&lt;BR /&gt;ls_service-currency = 'SAR'.&lt;BR /&gt;*service-matl_group = 'AS07'."物料组&lt;BR /&gt;APPEND ls_service to lt_service.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_servicex.&lt;BR /&gt;ls_servicex-doc_item = '00010'.&lt;BR /&gt;*ls_servicex-outline = '0000000001'.&lt;BR /&gt;ls_servicex-srv_line = '0000000010'.&lt;BR /&gt;ls_servicex-short_text = 'X'.&lt;BR /&gt;ls_servicex-quantity = 'X'.&lt;BR /&gt;ls_servicex-uom = 'X'.&lt;BR /&gt;ls_servicex-gross_price = 'X'.&lt;BR /&gt;ls_servicex-currency = 'X'.&lt;BR /&gt;*servicex-matl_group = 'X'.&lt;BR /&gt;APPEND ls_servicex to lt_servicex.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_serviceaccount.&lt;BR /&gt;ls_serviceaccount-doc_item = '00010'.&lt;BR /&gt;ls_serviceaccount-outline = '0000000001'.&lt;BR /&gt;ls_serviceaccount-srv_line = '0000000010'.&lt;BR /&gt;ls_serviceaccount-serial_no = '01'.&lt;BR /&gt;ls_serviceaccount-serial_no_item = '01'.&lt;BR /&gt;ls_serviceaccount-percent = '100'.&lt;BR /&gt;APPEND ls_serviceaccount To lt_serviceaccount.&lt;BR /&gt;&lt;BR /&gt;CLEAR: ls_serviceaccountx.&lt;BR /&gt;ls_serviceaccountx-doc_item = '00010'.&lt;BR /&gt;ls_serviceaccountx-outline = '0000000001'.&lt;BR /&gt;ls_serviceaccountx-srv_line = '0000000010'.&lt;BR /&gt;ls_serviceaccountx-serial_no = '01'.&lt;BR /&gt;ls_serviceaccountx-serial_no_item = 'X'.&lt;BR /&gt;ls_serviceaccountx-percent = 'X'.&lt;BR /&gt;APPEND ls_serviceaccountx To lt_serviceaccountx.&lt;BR /&gt;&lt;BR /&gt;  CALL FUNCTION 'BAPI_PR_CREATE'&lt;BR /&gt;    EXPORTING&lt;BR /&gt;      prheader  = gs_header&lt;BR /&gt;      prheaderx = gs_headerx&lt;BR /&gt;*     TESTRUN   =&lt;BR /&gt;    IMPORTING&lt;BR /&gt;      number    = lv_preq_no&lt;BR /&gt;*     PRHEADEREXP                  =&lt;BR /&gt;    tables&lt;BR /&gt;      return    = lt_return&lt;BR /&gt;      pritem    = lt_item&lt;BR /&gt;      PRITEMX    = lt_itemx&lt;BR /&gt;*     PRITEMEXP =&lt;BR /&gt;*     PRITEMSOURCE                 =&lt;BR /&gt;     PRACCOUNT = lt_account&lt;BR /&gt;*     PRACCOUNTPROITSEGMENT        =&lt;BR /&gt;     PRACCOUNTX                   = lt_accountx&lt;BR /&gt;     SERVICELINES                 = lt_service&lt;BR /&gt;     SERVICELINESX                = lt_servicex&lt;BR /&gt;     SERVICEACCOUNT               = lt_serviceaccount&lt;BR /&gt;     SERVICEACCOUNTX              = lt_serviceaccountx&lt;BR /&gt;    .&lt;BR /&gt;&lt;BR /&gt;  READ TABLE lt_return INTO wa_return WITH KEY type = 'E'.&lt;BR /&gt;  IF sy-subrc = 0.&lt;BR /&gt;    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.&lt;BR /&gt;  ELSE.&lt;BR /&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;BR /&gt;      EXPORTING&lt;BR /&gt;        wait = 'X'.&lt;BR /&gt;  ENDIF.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 19:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818920#M2026118</guid>
      <dc:creator>gary07a</dc:creator>
      <dc:date>2024-01-06T19:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Service PR using BAPI_PR_CREATE?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818921#M2026119</link>
      <description>&lt;P&gt;Do what I said.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 19:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-service-pr-using-bapi-pr-create/m-p/12818921#M2026119</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-01-06T19:48:47Z</dc:date>
    </item>
  </channel>
</rss>

