<?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: f-02 uploading in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766806#M1877484</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Archana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went through the link of saptechnical website too...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My only querry is that whether I use BDC or BAPI, &lt;STRONG&gt;how to bundle all the line items with same header data into single document&lt;/STRONG&gt;. i.e. BELNR.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;for this particular condition which logic I need to put.&lt;/STRONG&gt; I am not getting the exact idea for this condition only in any of the link you sent me. Please give me any link or any idea through which I can fulfil the given condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope u understand my real requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Dec 2014 07:43:23 GMT</pubDate>
    <dc:creator>sanjeev_mishra_15aug</dc:creator>
    <dc:date>2014-12-10T07:43:23Z</dc:date>
    <item>
      <title>f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766798#M1877476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guide me that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to put all the line items with same header data or contents into single document no. i.e. belnr while uploading data using call session method in BDC, because the mentioned field is systematically generated once the data is uploaded into DB table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please put some logic in coding here.&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, 10 Dec 2014 04:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766798#M1877476</guid>
      <dc:creator>sanjeev_mishra_15aug</dc:creator>
      <dc:date>2014-12-10T04:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766799#M1877477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your question is not clear. Please explain what you need exactly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 05:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766799#M1877477</guid>
      <dc:creator>archanapawar</dc:creator>
      <dc:date>2014-12-10T05:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766800#M1877478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thanks Archana for ur reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tell you what exactly I want in my program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to upload contents from an excel file having following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BKPF table: BLDAT, BLART, BUKRS, BUDAT, WAERS, KURSF, WWERT, XBLNR, BKTXT &lt;/P&gt;&lt;P&gt;BSEG table: BSCHL, HKONT, UMSKZ, WRBTR, DMBTR, KOSTL, PROJK, AUFNR, PRCTR, SGTXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have to put the logic before inserting the contents from all the header data for the above mentioned condition i.e. &lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;All line items with same header data will be posted in one document(BELNR). If data in fields from BKPF table are same, treat it as a single document (BELNR).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;I hope now I am clear to you....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;So please send me some logic for this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS','sans-serif';"&gt;Thanks in advance....&lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1103/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 05:40:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766800#M1877478</guid>
      <dc:creator>sanjeev_mishra_15aug</dc:creator>
      <dc:date>2014-12-10T05:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766801#M1877479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you upload excel file into your internal table, you can use BAPI '&lt;SPAN style="color: #333333; font-size: 12px;"&gt;BAPI_ACC_DOCUMENT_POST' to upload data. It is better to use BAPI istead od BDC. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For, BDC, you need to goto tcode SHDB and do the recording of F-02 tcode and generate recording. On that basis you can write your code. &lt;/P&gt;&lt;P&gt;But, this requirement can be achieved using BAPI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 05:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766801#M1877479</guid>
      <dc:creator>archanapawar</dc:creator>
      <dc:date>2014-12-10T05:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766802#M1877480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Archana,&lt;/P&gt;&lt;P&gt;Can you please mention it in detail? I meant to say that whether this BAPI will work automatically for the mentioned condition or shall I have to put some logic for that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-family: 'Trebuchet MS', 'sans-serif';"&gt;Thanks in advance....&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 05:59:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766802#M1877480</guid>
      <dc:creator>sanjeev_mishra_15aug</dc:creator>
      <dc:date>2014-12-10T05:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766803#M1877481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Offcourse you need to code, you need to pass correct parameters to this BAPI, then only it will work.&lt;/P&gt;&lt;P&gt;You can refer below link, it explains how to use this bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.scn.sap.com/wiki/display/Snippets/Vendor+Invoice+Posting+using+BAPI"&gt;http://wiki.scn.sap.com/wiki/display/Snippets/Vendor+Invoice+Posting+using+BAPI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to pass your data in internal table to the BAPI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 06:12:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766803#M1877481</guid>
      <dc:creator>archanapawar</dc:creator>
      <dc:date>2014-12-10T06:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766804#M1877482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Archana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went through your link but unfortunately I couldn't get the idea where exactly and what exactly logic I should put in the referred program to fulfill my condition as I mentioned earlier. I again mention you that the document no. i.e. BELNR is systematically generated. So I need to put all the line items with same header data into same Document No..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ur suggestion is most valuable. Please suggest me. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 06:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766804#M1877482</guid>
      <dc:creator>sanjeev_mishra_15aug</dc:creator>
      <dc:date>2014-12-10T06:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766805#M1877483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanjeev,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to develope a program, where you will upload your excel file using FM, get the data into internal table. Once, you have your excel sheet data in internal table, fill the data into work area and tables mentioned in BAPI. E.g. In below example, header data should be passed to w_header. account details to t_item_gl, currencies to t_item_curr. When you execute the program, you will get success or error message in t_return in BAPI. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;BR /&gt;&amp;nbsp; EXPORTING&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; documentheader = w_header&lt;BR /&gt;&amp;nbsp; IMPORTING&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_type = g_obj_type&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_key = g_obj_key&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_sys = g_obj_sys&lt;BR /&gt;&amp;nbsp; TABLES&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accountgl = t_item_gl&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currencyamount = t_item_curr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return = t_return.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope below link will give you idea of how this BAPI works. It is explained with different transaction, but same BAPI can be used for F-02 posting as well. At the end of the document, code snippet is also attached.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechnical.com/Tutorials/BAPI/FI/Index.htm"&gt;http://www.saptechnical.com/Tutorials/BAPI/FI/Index.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 06:40:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766805#M1877483</guid>
      <dc:creator>archanapawar</dc:creator>
      <dc:date>2014-12-10T06:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766806#M1877484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Archana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went through the link of saptechnical website too...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My only querry is that whether I use BDC or BAPI, &lt;STRONG&gt;how to bundle all the line items with same header data into single document&lt;/STRONG&gt;. i.e. BELNR.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;for this particular condition which logic I need to put.&lt;/STRONG&gt; I am not getting the exact idea for this condition only in any of the link you sent me. Please give me any link or any idea through which I can fulfil the given condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope u understand my real requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 07:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766806#M1877484</guid>
      <dc:creator>sanjeev_mishra_15aug</dc:creator>
      <dc:date>2014-12-10T07:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766807#M1877485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use a basic LOOP/AT logic in your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;SORT itab BY (bkpf field lists) " insure those are the first fields of the structure&lt;/P&gt;
&lt;P&gt;LOOP AT itab ASSIGNING &amp;lt;fs&amp;gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; AT NEW (last field of bkpf)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " prepare new document&lt;/P&gt;
&lt;P&gt;&amp;nbsp; AT END.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; " prepare and add an item to document&lt;/P&gt;
&lt;P&gt;&amp;nbsp; AT END OF (last field of bkpf)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " call &lt;SPAN style="font-size: 10pt;"&gt;BAPI_ACC_DOCUMENT_POST&lt;/SPAN&gt; or bdc or POSTING_INTERFACE_DOCUMENT...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ENDAT.&lt;/P&gt;
&lt;P&gt;ENDLOOP.&lt;/P&gt;


&lt;/CODE&gt;&lt;/PRE&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>Wed, 10 Dec 2014 08:48:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766807#M1877485</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2014-12-10T08:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: f-02 uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766808#M1877486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Per document you want to create you call the bapi. (or the bdc functionality, does not make a difference)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In w_header there will be the header data and in the tables t_item_gl and t_item_curr holds the data of the "Bundled" line items (as you call it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your programm YOU need to bundle these line items that you want in one document and call the bapi or bdc with this set. After succes you can call the bapi/bds with the next set of header and items that need to go in one document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is clear now..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 08:54:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-02-uploading/m-p/10766808#M1877486</guid>
      <dc:creator>PeterJonker</dc:creator>
      <dc:date>2014-12-10T08:54:29Z</dc:date>
    </item>
  </channel>
</rss>

