<?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_ACC_DOCUMENT_POST with funds commitment doc number and item in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124441#M986125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joao,&lt;/P&gt;&lt;P&gt;I have developed one program for the below requirement .&lt;/P&gt;&lt;P&gt;Please take a look I think this might take a great help to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;*********&lt;STRONG&gt;Reward Point if helpful&lt;/STRONG&gt;*************&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZCC_ACCPOST_BAPI
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

report  zcc_accpost_bapi no standard page heading..

*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

*REPORT  Z9_LALIT_ACCTPOST_BAPI

*Name: Chidanand Chauhan
*Desc: To Update the table for account posting using bapi.
*Date: 30/04/2007


**********************************************************************
*                    DATA DECLARATION
**********************************************************************

*
*&amp;amp;---HEADER DECLARATION
data: header type bapiache09.                " HEADER DATA

**********************************************************************

*              INTERNAL TABLE DECLARATION
**********************************************************************

*&amp;amp;----G/L ACCOUNT ITEM
data: accountgl type standard table of bapiacgl09.

*&amp;amp;---g/l Account tax
data: account_tax type standard table of bapiactx09.


*&amp;amp;---CURRENCY ITEMS
data: currency_amount type standard table of bapiaccr09.

*&amp;amp;----RETURN PARAMETER
data: return  type standard table of bapiret2 with header line.


**********************************************************************

*                      WORK-AREA DECLARATION
**********************************************************************


*&amp;amp;----WORKAREA FOR G/L ACCOUNT ITEM
data: wa_accountgl type bapiacgl09.

*&amp;amp;---WORKAREA FOR CURRENCY ITEMS
data: wa_currency_amount type bapiaccr09.

*&amp;amp;---WORKAREA FOR TAX ITEMS
data: wa_tax type bapiactx09.



**********************************************************************

*                    INITIALIZATION
**********************************************************************



header-header_txt  = 'TEST HEADER'.
header-username    = 'DEVUSER'.
header-comp_code  = '0001'.
header-fisc_year  = '2008'.
header-doc_date    = '20080625'.
header-pstng_date  = '20080625'.
header-trans_date  = '20080625'.
header-doc_type    = 'RV'.
header-ac_doc_no   = '90000014'.
header-bus_act    = 'RFBU'.



wa_accountgl-itemno_acc  = '0000000010'.
wa_accountgl-gl_account = '0000012000'.
wa_accountgl-item_text  = 'SO_DOC'.
wa_accountgl-de_cre_ind = 'S'.
append wa_accountgl to accountgl.
clear wa_accountgl.

wa_accountgl-itemno_acc  = '0000000020'.
wa_accountgl-gl_account = '0000113020'.
wa_accountgl-item_text  = 'SO_DOC'.
wa_accountgl-de_cre_ind = 'H'.
append wa_accountgl to accountgl.
clear wa_accountgl.

wa_currency_amount-itemno_acc = '0000000010'.
wa_currency_amount-amt_doccur = '500'.
wa_currency_amount-currency  = 'INR'.
append wa_currency_amount to currency_amount.
clear wa_currency_amount.

wa_currency_amount-itemno_acc = '0000000020'.
wa_currency_amount-amt_doccur = '-500'.
wa_currency_amount-currency  = 'INR'.
append wa_currency_amount to currency_amount.
clear wa_currency_amount.


*WA_TAX-ITEMNO_ACC = '0000000010'.
*WA_TAX-TAX_CODE  = 'V0'.
*APPEND WA_TAX TO ACCOUNT_TAX.
*CLEAR WA_TAX.
*
*WA_TAX-ITEMNO_ACC = '0000000020'.
*WA_TAX-TAX_CODE  = 'V0'.
*APPEND WA_TAX TO ACCOUNT_TAX.
*CLEAR WA_TAX.
**************************************************************
*                START-OF-SELECTION
**************************************************************

start-of-selection.



call function 'BAPI_ACC_DOCUMENT_POST'
  exporting
    documentheader          = header
*  CUSTOMERCPD            =
*  CONTRACTHEADER          =
* IMPORTING
*  OBJ_TYPE                =
*  OBJ_KEY                =
*  OBJ_SYS                =
  tables
  accountgl              =  accountgl
*  ACCOUNTRECEIVABLE      =
*  ACCOUNTPAYABLE          =
*  ACCOUNTTAX              =  ACCOUNT_TAX
    currencyamount          = currency_amount
*  CRITERIA                =
*  VALUEFIELD              =
*  EXTENSION1              =
    return                  = return
*  PAYMENTCARD            =
*  CONTRACTITEM            =
*  EXTENSION2              =
*  REALESTATE              =
          .


if return-type na 'EA'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
  wait          = 'X'.
* IMPORTING
*  RETURN        = RETURN.

  write:/ return-message.
else.
  write:/ return-message.
endif.

write:/ return-message+36(10).

write:/ return+36(10).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jun 2008 16:49:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-26T16:49:58Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124439#M986123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im trying to create an FI document, but having the requirement that at least one item has to have the funds commitment doc number and doc number item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do this with this bapi? i've already search in the tables that the bapi uses, but didnt found any field for this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone knows?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance, &lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;João Martins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone?!?!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: joao martins on Jun 26, 2008 11:23 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2008 16:52:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124439#M986123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-25T16:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124440#M986124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys sorry to be boring but i really need help on this.&lt;/P&gt;&lt;P&gt;Can anyone help me on this subject??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 16:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124440#M986124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T16:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124441#M986125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joao,&lt;/P&gt;&lt;P&gt;I have developed one program for the below requirement .&lt;/P&gt;&lt;P&gt;Please take a look I think this might take a great help to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;*********&lt;STRONG&gt;Reward Point if helpful&lt;/STRONG&gt;*************&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZCC_ACCPOST_BAPI
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

report  zcc_accpost_bapi no standard page heading..

*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

*REPORT  Z9_LALIT_ACCTPOST_BAPI

*Name: Chidanand Chauhan
*Desc: To Update the table for account posting using bapi.
*Date: 30/04/2007


**********************************************************************
*                    DATA DECLARATION
**********************************************************************

*
*&amp;amp;---HEADER DECLARATION
data: header type bapiache09.                " HEADER DATA

**********************************************************************

*              INTERNAL TABLE DECLARATION
**********************************************************************

*&amp;amp;----G/L ACCOUNT ITEM
data: accountgl type standard table of bapiacgl09.

*&amp;amp;---g/l Account tax
data: account_tax type standard table of bapiactx09.


*&amp;amp;---CURRENCY ITEMS
data: currency_amount type standard table of bapiaccr09.

*&amp;amp;----RETURN PARAMETER
data: return  type standard table of bapiret2 with header line.


**********************************************************************

*                      WORK-AREA DECLARATION
**********************************************************************


*&amp;amp;----WORKAREA FOR G/L ACCOUNT ITEM
data: wa_accountgl type bapiacgl09.

*&amp;amp;---WORKAREA FOR CURRENCY ITEMS
data: wa_currency_amount type bapiaccr09.

*&amp;amp;---WORKAREA FOR TAX ITEMS
data: wa_tax type bapiactx09.



**********************************************************************

*                    INITIALIZATION
**********************************************************************



header-header_txt  = 'TEST HEADER'.
header-username    = 'DEVUSER'.
header-comp_code  = '0001'.
header-fisc_year  = '2008'.
header-doc_date    = '20080625'.
header-pstng_date  = '20080625'.
header-trans_date  = '20080625'.
header-doc_type    = 'RV'.
header-ac_doc_no   = '90000014'.
header-bus_act    = 'RFBU'.



wa_accountgl-itemno_acc  = '0000000010'.
wa_accountgl-gl_account = '0000012000'.
wa_accountgl-item_text  = 'SO_DOC'.
wa_accountgl-de_cre_ind = 'S'.
append wa_accountgl to accountgl.
clear wa_accountgl.

wa_accountgl-itemno_acc  = '0000000020'.
wa_accountgl-gl_account = '0000113020'.
wa_accountgl-item_text  = 'SO_DOC'.
wa_accountgl-de_cre_ind = 'H'.
append wa_accountgl to accountgl.
clear wa_accountgl.

wa_currency_amount-itemno_acc = '0000000010'.
wa_currency_amount-amt_doccur = '500'.
wa_currency_amount-currency  = 'INR'.
append wa_currency_amount to currency_amount.
clear wa_currency_amount.

wa_currency_amount-itemno_acc = '0000000020'.
wa_currency_amount-amt_doccur = '-500'.
wa_currency_amount-currency  = 'INR'.
append wa_currency_amount to currency_amount.
clear wa_currency_amount.


*WA_TAX-ITEMNO_ACC = '0000000010'.
*WA_TAX-TAX_CODE  = 'V0'.
*APPEND WA_TAX TO ACCOUNT_TAX.
*CLEAR WA_TAX.
*
*WA_TAX-ITEMNO_ACC = '0000000020'.
*WA_TAX-TAX_CODE  = 'V0'.
*APPEND WA_TAX TO ACCOUNT_TAX.
*CLEAR WA_TAX.
**************************************************************
*                START-OF-SELECTION
**************************************************************

start-of-selection.



call function 'BAPI_ACC_DOCUMENT_POST'
  exporting
    documentheader          = header
*  CUSTOMERCPD            =
*  CONTRACTHEADER          =
* IMPORTING
*  OBJ_TYPE                =
*  OBJ_KEY                =
*  OBJ_SYS                =
  tables
  accountgl              =  accountgl
*  ACCOUNTRECEIVABLE      =
*  ACCOUNTPAYABLE          =
*  ACCOUNTTAX              =  ACCOUNT_TAX
    currencyamount          = currency_amount
*  CRITERIA                =
*  VALUEFIELD              =
*  EXTENSION1              =
    return                  = return
*  PAYMENTCARD            =
*  CONTRACTITEM            =
*  EXTENSION2              =
*  REALESTATE              =
          .


if return-type na 'EA'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
  wait          = 'X'.
* IMPORTING
*  RETURN        = RETURN.

  write:/ return-message.
else.
  write:/ return-message.
endif.

write:/ return-message+36(10).

write:/ return+36(10).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 16:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124441#M986125</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T16:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124442#M986126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chidanand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply, but i didnt get it where did you the funds commitment doc number and doc item...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as i know, it should be posted on the extension1 table, but it's giving me an error....&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply, &lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;João Martins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 17:05:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124442#M986126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T17:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124443#M986127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the field in Bseg? I log in spanish and can't find them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't see them in the table, you need to use the extension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The extension goes to a user exit where you need to move those fields to the tables, it doesn't work just putting information, you need to write the user exit also&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 17:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124443#M986127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124444#M986128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you are right, you need to populate the extension structure and then move the fields in extension structure to accounting document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For populating the accounting document from extension structure, you can either use the a BTE event RWBAPI01 or the enhancement spot badi BADI_ACC_DOCUMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the BAPI_ACC_DOCUMENT_POST documentation for more information on extension structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Romit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 17:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124444#M986128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T17:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST with funds commitment doc number and item</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124445#M986129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys thanks all for your anwsers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already figured out. Besides the exit to pass the funds commitment doc number, tyhat i allready had it, it was missing the geber, aufnr fistl etc to the strcture of the item... i wasn't passing becaus i thought that the bapi get it the information directly from the funds commitement.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again to all &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;João Martins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps - Points were rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 18:52:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-with-funds-commitment-doc-number-and-item/m-p/4124445#M986129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T18:52:36Z</dc:date>
    </item>
  </channel>
</rss>

