<?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: BAPI_REQUISITION_CREATE Not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291628#M1989472</link>
    <description>&lt;P&gt;thank you sir, the probelm was solved.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Sep 2020 06:29:50 GMT</pubDate>
    <dc:creator>former_member635273</dc:creator>
    <dc:date>2020-09-17T06:29:50Z</dc:date>
    <item>
      <title>BAPI_REQUISITION_CREATE Not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291623#M1989467</link>
      <description>&lt;P&gt;I create program that using BAPI_REQUISITION_CREATE, but it's not work. when i click CONVERTPR button nothing happend.&lt;/P&gt;
  &lt;P&gt;anyone help me, thanks.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;MODULE user_command_0110 INPUT.
  CASE sy-ucomm.
    WHEN 'CONVERTPR'.
      CALL METHOD g_grid_cart2-&amp;gt;check_changed_data.
      PERFORM fm_convert_doc.
  ENDCASE.
ENDMODULE.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;FORM fm_convert_doc .

  DATA : lv_type_pr TYPE bapiebanc-doc_type.
  IF    lv_plant = 'BM01'.
    lv_type_pr = 'ZBMT'.
  ELSEIF lv_plant = 'CA01'.
    lv_type_pr = 'ZCAT'.
  ELSEIF lv_plant = 'DB01'.
    lv_type_pr = 'ZDBT'.
  ELSEIF lv_plant = 'ES01'.
    lv_type_pr = 'ZEST'.
  ELSEIF lv_plant = 'GB01'.
    lv_type_pr = 'ZGBT'.
  ELSEIF lv_plant = 'IF01'.
    lv_type_pr = 'ZIFT'.
  ELSEIF lv_plant = 'IM01'.
    lv_type_pr = 'ZIMT'.
  ELSEIF lv_plant = 'MP01'.
    lv_type_pr = 'ZMPT'.
  ELSEIF lv_plant = 'OI01'.
    lv_type_pr = 'ZOIT'.
  ELSEIF lv_plant = 'PF01'.
    lv_type_pr = 'ZPFT'.
  ELSEIF lv_plant = 'PP01'.
    lv_type_pr = 'ZPPT'.
  ELSEIF lv_plant = 'QT01'.
    lv_type_pr = 'ZQTT'.
  ELSEIF lv_plant = 'WR01'.
    lv_type_pr = 'ZWRT'.
  ENDIF.

  SELECT * FROM ztblzmrp_item INTO CORRESPONDING FIELDS OF TABLE it_mrp2_convert
    WHERE mrpno = lv_mrpno.

  LOOP AT it_mrp2_convert INTO wa_mrp2_convert.
    wa_requisition_items-trackingno   = wa_mrp2_convert-mrpno.
    wa_requisition_items-doc_type   = lv_type_pr.
    wa_requisition_items-pur_group  = 'TR1'.
    wa_requisition_items-preq_name  = wa_mrp2_convert-requisitioner.
    wa_requisition_items-material   = wa_mrp2_convert-matnr.
    wa_requisition_items-plant      = lv_plant.
    wa_requisition_items-quantity   = wa_mrp2_convert-orderqty.
    wa_requisition_items-unit       = wa_mrp2_convert-meins.
    wa_requisition_items-deliv_date = wa_mrp2_convert-req_del_date.
    wa_requisition_items-c_amt_bapi = wa_mrp2_convert-price.
    wa_requisition_items-gr_ind     = wa_mrp2_convert-requisitioner.
    wa_requisition_items-ir_ind     = 'X'.
    wa_requisition_items-purch_org  = 'X'.
    wa_requisition_items-currency   = wa_mrp2_convert-curr.
    APPEND  wa_requisition_items TO  it_requisition_items.
    CLEAR  wa_requisition_items.
  ENDLOOP.

  CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    EXPORTING
      skip_items_with_error          = 'X'
      automatic_source               = 'X'
* IMPORTING
*     NUMBER                         = ld_number
    TABLES
      requisition_items              = it_requisition_items
      requisition_account_assignment = it_requisition_account_assign
      requisition_item_text          = it_requisition_item_text
      requisition_limits             = it_requisition_limits
      requisition_contract_limits    = it_requisition_contract_limits
      requisition_services           = it_requisition_services
      requisition_srv_accass_values  = it_requisition_srv_accass_val
      return                         = it_return
      requisition_services_text      = it_requisition_services_text
      requisition_addrdelivery       = it_requisition_addrdelivery
      extensionin                    = it_extensionin.

ENDFORM.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Sep 2020 04:03:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291623#M1989467</guid>
      <dc:creator>former_member635273</dc:creator>
      <dc:date>2020-09-17T04:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_REQUISITION_CREATE Not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291624#M1989468</link>
      <description>&lt;P&gt;check if the BAPI generates the PR number by uncommenting the below code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;NUMBER                         = ld_number&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;check if any errors or warnings are there in the &lt;STRONG&gt;it_return &lt;/STRONG&gt;param&lt;/P&gt;&lt;P&gt;then at the end call FM &lt;STRONG&gt;bapi_transaction_commit&lt;/STRONG&gt;, without calling this, PR will not be created.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 05:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291624#M1989468</guid>
      <dc:creator>maheshpalavalli</dc:creator>
      <dc:date>2020-09-17T05:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_REQUISITION_CREATE Not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291625#M1989469</link>
      <description>&lt;P&gt;Hello &lt;SPAN class="mention-scrubbed"&gt;saddam.id&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;You have to add below snippet post the BAPI is called, ensure the BAPI call was successful before using the below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;          call function 'BAPI_TRANSACTION_COMMIT'
            exporting
              wait = 'X'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can refer the &lt;A href="https://wiki.scn.sap.com/wiki/display/ABAP/BAPI_REQUISITION_CREATE" target="_blank"&gt;LINK&lt;/A&gt; for more details on the implementation part.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 05:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291625#M1989469</guid>
      <dc:creator>former_member1716</dc:creator>
      <dc:date>2020-09-17T05:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_REQUISITION_CREATE Not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291626#M1989470</link>
      <description>&lt;P&gt;BAPI_REQUISITION_CREATE does not require a separate commit (also mentioned in &lt;A href="https://launchpad.support.sap.com/#/notes/0000394058"&gt;394058 - BAPI_REQUISITION and COMMIT WORK&lt;/A&gt;). &lt;/P&gt;&lt;P&gt;Anyways, it is unclear if the creation was successful or not (no information from the OP about any debugging analysis).&lt;/P&gt;&lt;P&gt;It is unclear what is understood by nothing happens - no PR was created, some message is expected to be shown (this is probably only a part of the code).&lt;/P&gt;&lt;P&gt;If I had to troubleshoot this, I would probably start not from the BAPI creation, but by placing a breakpoint at &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM fm_convert_doc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If the debugger stops there, at least it will mean that it makes sense to start troubleshooting this part of the code before looking into other parts of the program.&lt;/P&gt;&lt;P&gt;Then it would be a good idea to check what is the content of it_return, based on which it may be needed to check what is passed to the BAPI, what is in ztblzmrp_item, and so on.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:08:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291626#M1989470</guid>
      <dc:creator>VeselinaPeykova</dc:creator>
      <dc:date>2020-09-17T06:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_REQUISITION_CREATE Not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291627#M1989471</link>
      <description>&lt;P&gt;thanks  &lt;SPAN class="mention-scrubbed"&gt;veselina.peykova&lt;/SPAN&gt;, I have checked, it_return and then i know what the problem and message. and I can solve it. The error because the input of purchasing organization is wrong. &lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:28:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291627#M1989471</guid>
      <dc:creator>former_member635273</dc:creator>
      <dc:date>2020-09-17T06:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_REQUISITION_CREATE Not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291628#M1989472</link>
      <description>&lt;P&gt;thank you sir, the probelm was solved.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:29:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-requisition-create-not-working/m-p/12291628#M1989472</guid>
      <dc:creator>former_member635273</dc:creator>
      <dc:date>2020-09-17T06:29:50Z</dc:date>
    </item>
  </channel>
</rss>

