<?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: PO creation using BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677146#M1868637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Bapi functiona module returns Return table which is having error and successful records information . i.e. mes type, msg variables...etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call format_mesage function module to get error messsage by passing above msg type, and msg variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;collect all these in one internal table and call gui_download to download the file in local system.&lt;/P&gt;&lt;P&gt;or use open data set to download the file in al11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Polu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2014 07:24:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-10-22T07:24:48Z</dc:date>
    <item>
      <title>PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677142#M1868633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement that I need to create a Purchase Order using BAPI&amp;nbsp; by uploading excel file which contains PO header data and Item data.&lt;/P&gt;&lt;P&gt;while creating the PO , info record also need to be craeted. if the PO already have inforecord , then its should be updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i&amp;nbsp; tranfered the data from excel file to internal table by using the function module&amp;nbsp; &lt;STRONG&gt;TEXT_CONVERT_XLS_TO_SAP&lt;/STRONG&gt; .This internal table now contain both PO header and multiple line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. How to pass this internal table to BAPI " &lt;STRONG&gt;BAPI_PO_CREATE1 "&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; to create&amp;nbsp; PO ? (internal table contain mutiple line item ).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. How to create info record ?&amp;nbsp; if any FM available for both creating and updating info record?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. If the info record cant be created, then PO should not be created.. how to acheive this?&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 12:48:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677142#M1868633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-21T12:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677143#M1868634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;EM&gt;1. How to pass this internal table to BAPI " &lt;STRONG&gt;BAPI_PO_CREATE1 "&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; to create&amp;nbsp; PO ? (internal table &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;contain mutiple line item ).&lt;/EM&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Depending by relations between each record you should break for Purch organization/vendor and fill the corresponding structures of BAPI_PO_CREATE1&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;EM&gt;2. How to create info record ?&amp;nbsp; if any FM available for both creating and updating info record?&lt;/EM&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can use FM &lt;STRONG&gt;ME_DIRECT_INPUT_INFORECORD&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;EM&gt;3. If the info record cant be created, then PO should not be created.. how to acheive this?&lt;/EM&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After calling the inforecord's creation, you can test if successfull or not and then process PO or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 13:07:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677143#M1868634</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2014-10-21T13:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677144#M1868635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To create Purchase Info Record you could try use FM IDOC_INPUT_INFREC or ME_DIRECT_INPUT_INFORECORD (after ME_INITIALIZE_INFORECORD) Either check success directly (exception like ERROR_MESSAGE) or thru call of BAPI_INFORECORD_GETLIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the BAPI BAPI_PO_CREATE1, did you read its general documentation and the documentation of parameters POITEM[X]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 13:20:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677144#M1868635</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2014-10-21T13:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677145#M1868636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another doubt that after the BAPI execution, the error or success details from the BAPI should be stored in&amp;nbsp; a file. &lt;/P&gt;&lt;P&gt;How to store this details as a sepereate file in the system ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 07:09:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677145#M1868636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-22T07:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677146#M1868637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Bapi functiona module returns Return table which is having error and successful records information . i.e. mes type, msg variables...etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call format_mesage function module to get error messsage by passing above msg type, and msg variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;collect all these in one internal table and call gui_download to download the file in local system.&lt;/P&gt;&lt;P&gt;or use open data set to download the file in al11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Polu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 07:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677146#M1868637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-22T07:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677147#M1868638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You can create a new internal table with all the information you need and after the bapi fill it with the needed record on RETURN table.&lt;/P&gt;&lt;P&gt;THen, once processed all the input file, you can download your table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 07:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677147#M1868638</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2014-10-22T07:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677148#M1868639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to run this report program in background ? because a excel file need to be uploaded to execute the progam which is in the presentation server. So how to schedule this program to run in background?&lt;/P&gt;&lt;P&gt;Can we read file which is in desktop in background ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 05:15:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677148#M1868639</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-23T05:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677149#M1868640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;When executing in Background Mode, it is not possible to read from Presentation Server as the program is not aware of the foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;The ideal way would be to load the file to Application Server (AL11) and then in background execution mode, read the file from the Application Server and continue with execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Also, since it is a custom report, you can disable foreground execution mode (as it is a mass creation) and enable only background execution. This will ensure no time out issues also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; color: #333333; background: #ffffff;"&gt;George Abraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 06:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677149#M1868640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-23T06:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677150#M1868641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing it in IDES as a training for me. I don't have a access to AL11. So is any other way to read this file from presentation server?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 07:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677150#M1868641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-23T07:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: PO creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677151#M1868642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In simple terms, to access a file in background job, it has to take it from some server - ideal would be Application Server. There is also a possibility of storing it on some FTP server also and accessing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that GUI_UPLOAD will not work when run in Background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While researching through SCN, I had happened to stumble upon this document written by Former Member which mentions about an RFC approach - basically a PI connection - in which we create an RFC destination on the R/3 system to connect with the Front End when communicating through a background job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not yet tested this approach, as we generally use the Application Server approach. However, you can give it a try and also mention if it works &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1063/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-10362"&gt;http://scn.sap.com/docs/DOC-10362&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;George Abraham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 08:00:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/po-creation-using-bapi/m-p/10677151#M1868642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-10-23T08:00:38Z</dc:date>
    </item>
  </channel>
</rss>

