<?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: Invoice Upload Program in FB50 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517194#M845922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Yes, you can go for that option too but i prefer using BAPI for the purpose bcoz&lt;/P&gt;&lt;P&gt;it is easy to use and code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done a test recording for that transaction(F-43) and i dint come across any issues.&lt;/P&gt;&lt;P&gt;So, you can try BDC too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2008 04:43:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-18T04:43:32Z</dc:date>
    <item>
      <title>Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517180#M845908</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;   I need to develop an invoice upload program for transaction code FB50. The data will be from an Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   As I'm new to program in accounting, is there anyone has sample code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I'm not sure what function module to use to save the invoice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Hope someone can help me. Many thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 06:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517180#M845908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T06:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517181#M845909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I briefly explain how to go about this. Follow these steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Upload data from Excel :&lt;/P&gt;&lt;P&gt;This can be done using the FMs 'GUI_UPLOAD' or 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Now, you can use the following BAPIs for the posting or checking the documents&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BAPI_ACC_DOCUMENT_POST&lt;/STRONG&gt; - Posting the documents&lt;/P&gt;&lt;P&gt;Using this method you can create a posing in accounting for certain business transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wan to check whether a document can be created or not, then use the bapi&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BAPI_ACC_DOCUMENT_CHECK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you want to PARK the documents instead of the Posting then you can use a &lt;/P&gt;&lt;P&gt;standard SAP program 'RFBIBL00'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this information will be helpful to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want anymore help, get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 08:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517181#M845909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T08:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517182#M845910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your guide. I'll try next week and if I still have some problem, I hope you can help me further. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 09:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517182#M845910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517183#M845911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Can you give more information of the function module BAPI_ACC_DOCUMENT_POST?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   What should I input to the parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 03:08:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517183#M845911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T03:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517184#M845912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     It generally depends on what sort of postings you are doing.&lt;/P&gt;&lt;P&gt;You can refer to following code, it is for the posting of invoices.&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="Code"&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;    Document Header&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;           wa_document_header-comp_code  = c_company_2001.&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;    One time vendor&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Concatenate the text and account number and pass it as a line item text&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Check for the Payee name and use vendor number accordingly&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Check if amount value is more than '0'&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Vendor line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     GL Account line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Get currency details for vendor line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Get currency details for GL Account line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Pass suitable posting key&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Pass suitable posting key&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;             When posting amount is less than zero&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Vendor line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Get currency details for vendor line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Get currency details for GL Account line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     GL Account line item&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Pass suitable posting key&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Pass suitable posting key&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Check if one time vendor data is available&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Call the BAPI 'BAPI_ACC_DOCUMENT_POST' to create the invoices&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;      Check if bapi return table is intial&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Maintain a error log with all BAPI returned messages&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Get only error\abort messages into error table&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     check if flag has been enabled&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Check for the message type in the return table and&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     if it is success then commit the transaction.&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Concatenate the message text and refund id into a variable&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     append success messge to the error table&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Refresh the internal tables&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;     Clear the work areas and variables&lt;/LI&gt;&lt;/UL&gt;
         LOOP AT it_record INTO wa_record.


              wa_document_header-username   = sy-uname.

              wa_document_header-comp_code  = v_compcode.
              wa_document_header-doc_date   = wa_record-bkpf_bldat.
              wa_document_header-pstng_date = sy-datum.
              wa_document_header-doc_type   = v_doctype.
              wa_document_header-ref_doc_no = wa_record-bkpf_xblnr.


              wa_customercpd-name       = wa_record-bsec_name1.
              wa_customercpd-name_2     = wa_record-bsec_name2.
              wa_customercpd-postl_code = wa_record-bsec_pstlz.
              wa_customercpd-city       = wa_record-bsec_ort01.
              wa_customercpd-country    = v_country.
              wa_customercpd-street     = wa_record-bsec_stras.
              wa_customercpd-tax_no_1   = wa_record-bsec_stcd1.
              wa_customercpd-tax_no_2   = wa_record-bsec_stcd2.
              wa_customercpd-region     = wa_record-bsec_regio.


              CONCATENATE text-008 wa_record-bseg_sgtxt INTO v_item_text              " Refund for Acc no
                                                        SEPARATED BY space.


              IF wa_record-bsec_name1 = c_name_heap.
                v_vendor_no = v_vendor_heap.
              ELSE.
                v_vendor_no = v_vendor_onetime.
              ENDIF.


              IF wa_record-bseg_wrbtr GT 0.

                wa_acc_payable-itemno_acc = c_itemno_1.
                wa_acc_payable-vendor_no  = v_vendor_no.
                wa_acc_payable-item_text  = v_item_text.
                APPEND wa_acc_payable TO it_acc_payable.
                CLEAR: wa_acc_payable.


                wa_accountgl-itemno_acc = c_itemno_2.
                wa_accountgl-gl_account = v_glaccount.
                wa_accountgl-item_text  = v_item_text.
                APPEND wa_accountgl TO it_accountgl.
                CLEAR: wa_accountgl.


                wa_currency_amount-itemno_acc  = c_itemno_1.
                wa_currency_amount-currency    = c_currency_usd .
                wa_currency_amount-amt_doccur  = - ( wa_record-bseg_wrbtr ).
                APPEND wa_currency_amount TO it_currency_amount.
                CLEAR: wa_currency_amount.


                wa_currency_amount-itemno_acc  = c_itemno_2.
                wa_currency_amount-currency    = c_currency_usd .
                wa_currency_amount-amt_doccur  = wa_record-bseg_wrbtr.
                APPEND wa_currency_amount TO it_currency_amount.
                CLEAR: wa_currency_amount.


                wa_extension2-structure   = c_structure.
                wa_extension2-valuepart1  = c_itemno_1.
                wa_extension2-valuepart2  = c_newbs_31.          " Credit indicator( Vendor side )
                APPEND wa_extension2 TO it_extension2.
                CLEAR: wa_extension2.


                wa_extension2-structure   = c_structure.
                wa_extension2-valuepart1  = c_itemno_2.
                wa_extension2-valuepart2  = c_newbs_40.          " Debit indicator( GL Account side )
                APPEND wa_extension2 TO it_extension2.
                CLEAR: wa_extension2.


              ELSE.

                wa_acc_payable-itemno_acc = c_itemno_1.
                wa_acc_payable-vendor_no  = v_vendor_no.
                wa_acc_payable-item_text  = v_item_text.
                APPEND wa_acc_payable TO it_acc_payable.
                CLEAR: wa_acc_payable.


                wa_currency_amount-itemno_acc  = c_itemno_1.
                wa_currency_amount-currency    = c_currency_usd .
                wa_currency_amount-amt_doccur  = wa_record-bseg_wrbtr.
                APPEND wa_currency_amount TO it_currency_amount.
                CLEAR: wa_currency_amount.


                wa_currency_amount-itemno_acc  = c_itemno_2.
                wa_currency_amount-currency    = c_currency_usd .
                wa_currency_amount-amt_doccur  = - ( wa_record-bseg_wrbtr ).
                APPEND wa_currency_amount TO it_currency_amount.
                CLEAR: wa_currency_amount.


                wa_accountgl-itemno_acc = c_itemno_2.
                wa_accountgl-gl_account = v_glaccount.
                wa_accountgl-item_text  = v_item_text.
                APPEND wa_accountgl TO it_accountgl.
                CLEAR: wa_accountgl.


                wa_extension2-structure   = c_structure.
                wa_extension2-valuepart1  = c_itemno_1.
                wa_extension2-valuepart2  = c_newbs_21.          " Debit indicator( Vendor side )
                APPEND wa_extension2 TO it_extension2.
                CLEAR: wa_extension2.


                wa_extension2-structure   = c_structure.
                wa_extension2-valuepart1  = c_itemno_2.
                wa_extension2-valuepart2  = c_newbs_50.          " Credit indicator( GL Account side )
                APPEND wa_extension2 TO it_extension2.
                CLEAR: wa_extension2.
              ENDIF.


              IF wa_customercpd IS NOT INITIAL.


                CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
                  EXPORTING
                    documentheader = wa_document_header
                    customercpd    = wa_customercpd
                  TABLES
                    accountgl      = it_accountgl
                    accountpayable = it_acc_payable
                    currencyamount = it_currency_amount
                    return         = it_return
                    extension2     = it_extension2.


                IF it_return IS NOT INITIAL.


                  LOOP AT it_return INTO wa_return WHERE type = c_msgtype_e OR
                                                         type = c_msgtype_a.
                    CONCATENATE wa_return-message text-013 wa_record-bkpf_xblnr INTO v_msg_text
                                                           SEPARATED BY space.
                    MOVE v_msg_text TO wa_return-message.


                    APPEND wa_return TO it_error.
                    CLEAR: wa_return,
                           v_msg_text.
                    f_error_ind = c_true.
                  ENDLOOP.


                  IF f_error_ind EQ c_true.
                    EXIT.
                  ELSE.
                    DESCRIBE TABLE it_return LINES v_tabix.



                    READ TABLE it_return INDEX v_tabix INTO wa_return.
                    IF sy-subrc = 0.
                      v_total_amount = ABS( wa_record-bseg_wrbtr ) + v_total_amount.    " Total posting amount


                      CONCATENATE wa_return-message text-013 wa_record-bkpf_xblnr INTO v_msg_text
                                                             SEPARATED BY space.
                      MOVE v_msg_text TO wa_return-message.


                      APPEND wa_return TO it_success.
                      CLEAR: wa_return,
                             v_msg_text,
                             v_tabix.
                    ENDIF.
                  ENDIF.
                ENDIF.
              ELSE.
                wa_return-type     = c_msgtype_e.
                wa_return-message  = text-009.                   " One time vendor details are not found
                APPEND wa_return TO it_error.
                CLEAR: wa_return.
                EXIT.
              ENDIF.


              REFRESH: it_return,
                       it_acc_payable,
                       it_currency_amount,
                       it_accountgl,
                       it_extension2.


              CLEAR: wa_document_header,
                     wa_customercpd,
                     wa_record,
                     v_vendor_no,
                     v_item_text.
            ENDLOOP. 
&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam, before making the postings directly, try using 'BAPI_ACC_DOCUMENT_CHECK' so that &lt;/P&gt;&lt;P&gt;you will get to mo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope, it will be helpful to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want any more help, get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517184#M845912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517185#M845913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really thanks for your quick response. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm doing a posting of invoice actually.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 06:53:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517185#M845913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T06:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517186#M845914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Is this code suitable for transaction F-02 or F-43?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Irene&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Irene Sam on Mar 16, 2008 7:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 03:22:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517186#M845914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T03:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517187#M845915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   What should I put for item wa_extension2-structure = c_structure? What is the data declaration for c_structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Besides, what should I put for wa_acc_payable-itemno_acc and wa_acc_gl-itemno_acc? What is the data declaration for c_itemno_1 and c_itemno_2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Is the input for customercpd into the FM a must?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Hope you can reply me as soon as possible.&lt;/P&gt;&lt;P&gt;   Many thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Irene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 06:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517187#M845915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T06:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517188#M845916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I think, You can use that BAPI code for these transactions (F-02 and F-43 ) too.&lt;/P&gt;&lt;P&gt;The difference between these transactions is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F-02 - General Posting &lt;/P&gt;&lt;P&gt;F-43 - Invoice - General &lt;/P&gt;&lt;P&gt;FB50 - Enter G/L Account Document &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use these transactions for posting but only change will be the screens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In FB50 transaction you can have option of providing many line items at a time where as&lt;/P&gt;&lt;P&gt;in other transactions you have to provide only one line item details in the initial screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you need to post the invoices, pass the data to the tables parameter 'accountpayable'  of the BAPI.&lt;/P&gt;&lt;P&gt;If the vendor is one time vendor, you need to pass the vendor details also through 'customercpd' parameter&lt;/P&gt;&lt;P&gt;of the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want any more help, get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 06:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517188#M845916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T06:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517189#M845917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks for helping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   However what about the item I mentioned above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I put for item wa_extension2-structure = c_structure? What is the data declaration for c_structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides, what should I put for wa_acc_payable-itemno_acc and wa_acc_gl-itemno_acc? What is the data declaration for c_itemno_1 and c_itemno_2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 06:50:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517189#M845917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T06:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517190#M845918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I didn't see your latest reply while answering last time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was using the 'extension2' parameter to overwrite\Set the posting keys. For the purpose, I have &lt;/P&gt;&lt;P&gt;implemented one BADI for that BAPI. If you want to implement that BADI too then follow this procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to the BAPI 'BAPI_ACC_DOCUMENT_POST' source code there you will find &lt;/P&gt;&lt;P&gt;following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM call_badi&lt;/P&gt;&lt;P&gt;            TABLES extension2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double click on that perform, it will take you to the subroutine. There you will find the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD g_exit-&amp;gt;change&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      flt_val      = gs_aw-awtyp&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      c_acchd      = ls_acchd&lt;/P&gt;&lt;P&gt;      c_accit      = it_accit&lt;/P&gt;&lt;P&gt;      c_acccr      = it_acccr&lt;/P&gt;&lt;P&gt;      c_accwt      = it_accwt&lt;/P&gt;&lt;P&gt;      c_acctx      = it_acctx&lt;/P&gt;&lt;P&gt;      c_extension2 = p_extension[]&lt;/P&gt;&lt;P&gt;      c_return     = lt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now click on the method 'Change' and it will ask for BADI implementation. you can do the same through SE18 and SE19 transactions too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the BADI implementation part, plug in following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Change the Posting keys - Code*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: wa_extension  TYPE  bapiparex,&lt;/P&gt;&lt;P&gt;      wa_accit      TYPE  accit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT c_extension2 INTO wa_extension.&lt;/P&gt;&lt;P&gt;  IF wa_extension-structure = 'POSTING_KEY'.&lt;/P&gt;&lt;P&gt;    CLEAR wa_accit.&lt;/P&gt;&lt;P&gt;    READ TABLE c_accit INTO wa_accit&lt;/P&gt;&lt;P&gt;                       WITH KEY posnr = wa_extension-valuepart1.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      wa_accit-bschl = wa_extension-valuepart2.&lt;/P&gt;&lt;P&gt;      MODIFY c_accit FROM wa_accit INDEX sy-tabix TRANSPORTING bschl.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what ever structure name you provide in that implementation, you need to use the same&lt;/P&gt;&lt;P&gt;in your program also. In my case it is 'POSTING_KEY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that BAPI, we don't have any parameter to pass the posting keys (like 31 ,40 etc) to the BAPI and&lt;/P&gt;&lt;P&gt;it has got only one field 'DE_CRE_IND' in table parameter 'BAPIACGL09' where we can &lt;/P&gt;&lt;P&gt;set whether line item is a Credit or Debit. So, i have implemented the BADI to overcome this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take the decision after analyzing your scenario whether to implement the BADI or not.&lt;/P&gt;&lt;P&gt;If you are not doing that, then there is no need to fill the 'EXTENSION2' parameter data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding Item numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can declare them in a following way.&lt;/P&gt;&lt;P&gt;             c_itemno_1          TYPE posnr_acc         VALUE '1',                   " Line item number&lt;/P&gt;&lt;P&gt;             c_itemno_2          TYPE posnr_acc         VALUE '2',                   " Line item number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally, BAPI will co-relate the line item details passed to it based on the &lt;/P&gt;&lt;P&gt;line item number (ITEMNO_ACC) provided in the tables parameter.&lt;/P&gt;&lt;P&gt;if it is 1st line item, simply pass the value '1'  to that parameter (ITEMNO_ACC) and&lt;/P&gt;&lt;P&gt;similarly '2', if it is second line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want anymore help, get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 07:20:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517190#M845918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T07:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517191#M845919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I try to test the FM in SE37, but it keeps give me the error regarding BUS_ACT in structure 'DOCUMENTHEADER'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    What should I input?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 08:04:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517191#M845919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T08:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517192#M845920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Yes, It will give you the error as these are the mandatory fields.&lt;/P&gt;&lt;P&gt;Try using following data for them in the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference Transaction (obj_type)  - 'IDOC'&lt;/P&gt;&lt;P&gt;Reference Key (obj_key)              - 'TEST000001BAPICALL'&lt;/P&gt;&lt;P&gt;Business Transaction  (bus_act)   - 'RFBU'&lt;/P&gt;&lt;P&gt;Logical system (obj_sys)             - Use the FM to fetch this ('OWN_LOGICAL_SYSTEM_GET'')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want any more info, refer to the BAPI documentation or get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 08:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517192#M845920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T08:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517193#M845921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Can we use BDC recording for T-Code F-43 instead of using the Function Module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 03:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517193#M845921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T03:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517194#M845922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Yes, you can go for that option too but i prefer using BAPI for the purpose bcoz&lt;/P&gt;&lt;P&gt;it is easy to use and code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done a test recording for that transaction(F-43) and i dint come across any issues.&lt;/P&gt;&lt;P&gt;So, you can try BDC too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jallu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 04:43:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517194#M845922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T04:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Invoice Upload Program in FB50</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517195#M845923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jallu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you mentioned "Or if you want to PARK the documents instead of the Posting then you can use a &lt;/P&gt;&lt;P&gt;standard SAP program 'RFBIBL00'", can you also help with the What should  the parameters be input if I want to park invoices through Excel file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 15:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/invoice-upload-program-in-fb50/m-p/3517195#M845923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-31T15:18:58Z</dc:date>
    </item>
  </channel>
</rss>

