<?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 Error on OBJ_KEY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991878#M953689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saktivel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     You need to pass a value from the Object Types for Accounting Table 'TTYP' for instance you can send 'BKPF' as a value in OBJ_TYPE, or push the data from the Reference Transaction field 'AWTYP' from database table BKPF which you have selected. .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OBJ_KEY should be provided with the reference key 'AWKEY' field from the database table BKPF which you have selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly the OBJ_SYS should be provided with the Logical system field  'AWSYS'  from BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked for me .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 15:52:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-18T15:52:23Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991875#M953686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear GURUs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using BAPI_ACC_DOCUMENT_POST for clearing open items ( Actual Transaction F-04). &lt;/P&gt;&lt;P&gt;I am passing &lt;STRONG&gt;DOCUMENTHEADER&lt;/STRONG&gt;  &lt;STRONG&gt;ACCOUNTGL&lt;/STRONG&gt; and &lt;STRONG&gt;CURRENCYAMOUNT&lt;/STRONG&gt; tables only. &lt;/P&gt;&lt;P&gt;I am passing &lt;STRONG&gt;AC_DOC_NO&lt;/STRONG&gt; in &lt;STRONG&gt;ACCOUNTGL&lt;/STRONG&gt; for which the clearing should happen . But I am getting the following errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E RW                   609 Error in document:&lt;/P&gt;&lt;P&gt;E RW                   602 Required field OBJ_TYPE was not transferred in parameter DOCUMENTHEADER&lt;/P&gt;&lt;P&gt;E RW                   602 Required field OBJ_KEY was not transferred in parameter DOCUMENTHEADER&lt;/P&gt;&lt;P&gt;E RW                   602 Required field OBJ_SYS was not transferred in parameter DOCUMENTHEADER&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to resolve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sakthivel.N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991875#M953686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T15:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991876#M953687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must fill these fields in structure DOCUMENTHEADER. Look next sentences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;look at TTYP table for correct value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DOCUMENTHEADER-OBJ_TYPE = 'BKPFF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to obtain this value you need to construct a FORM which obtain a document number using FM NUMBER_GET_NEXT according with document type you want to create&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DOCUMENTHEADER-OBJ_KEY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;look at TBDLS table for correct value or construct a FORM which use FM OWN_LOGICAL_SYSTEM_GET to obtain correct value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DOCUMENTHEADER-OBJ_SYS = 'WF2100'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafael Rojas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991876#M953687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T15:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991877#M953688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to populate all these fields in structure OCUMENTHEADER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJ_TYPE    Sender identification&lt;/P&gt;&lt;P&gt;OBJ_KEY    Reference number of source document&lt;/P&gt;&lt;P&gt;OBJ_SYS    Logical system of source document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following way u can populate these fields:&lt;/P&gt;&lt;P&gt;  call function 'OWN_LOGICAL_SYSTEM_GET'&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      own_logical_system = gd_documentheader-obj_sys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OBJ_TYPE has to be replaced by customers object key (Y* or Z*)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  gd_documentheader-obj_type   = &amp;lt;Your prog. name&amp;gt;.&lt;/P&gt;&lt;P&gt;  gd_documentheader-obj_key    = 'TEST000001BAPICALL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991877#M953688</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T15:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991878#M953689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saktivel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     You need to pass a value from the Object Types for Accounting Table 'TTYP' for instance you can send 'BKPF' as a value in OBJ_TYPE, or push the data from the Reference Transaction field 'AWTYP' from database table BKPF which you have selected. .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OBJ_KEY should be provided with the reference key 'AWKEY' field from the database table BKPF which you have selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly the OBJ_SYS should be provided with the Logical system field  'AWSYS'  from BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked for me .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 15:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991878#M953689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T15:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991879#M953690</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;Don't transfer any value in AC_DOC_NO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 16:13:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991879#M953690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T16:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991880#M953691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;very much Thanks you all rafael, joyjit, santhosh, max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im getting the following Error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;E F5 702 Balance in transaction currency&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I unable to find why this error is coming. Can you help over this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;---------------------------------------------------------------------*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp; Report  ZTEST_ACC_DOC_POST&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;---------------------------------------------------------------------*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;amp;---------------------------------------------------------------------*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REPORT  ztest_acc_doc_post line-size 350.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: w_accheader TYPE bapiache09,&lt;/P&gt;&lt;P&gt;        i_accglitem TYPE STANDARD TABLE OF bapiacgl09,&lt;/P&gt;&lt;P&gt;        i_acccusitem TYPE STANDARD TABLE OF  bapiacar09,&lt;/P&gt;&lt;P&gt;        i_accamount TYPE STANDARD TABLE OF  bapiaccr09,&lt;/P&gt;&lt;P&gt;        i_return    type standard table of BAPIRET2,&lt;/P&gt;&lt;P&gt;        w_accglitem TYPE bapiacgl09,&lt;/P&gt;&lt;P&gt;        w_acccusitem TYPE bapiacar09,&lt;/P&gt;&lt;P&gt;        w_accamount TYPE bapiaccr09,&lt;/P&gt;&lt;P&gt;        w_return    type BAPIRET2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: l_objtype TYPE awtyp,&lt;/P&gt;&lt;P&gt;        l_objkey  TYPE awkey,&lt;/P&gt;&lt;P&gt;        l_objsys TYPE  awsys,&lt;/P&gt;&lt;P&gt;        l_objtran TYPE glvor,&lt;/P&gt;&lt;P&gt;        l_belnr   type belnr_d,&lt;/P&gt;&lt;P&gt;        l_qty type INRI-QUANTITY,&lt;/P&gt;&lt;P&gt;        l_rtncode type INRI-RETURNCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR:w_accheader ,&lt;/P&gt;&lt;P&gt;        i_accglitem ,&lt;/P&gt;&lt;P&gt;        i_acccusitem,&lt;/P&gt;&lt;P&gt;        i_accamount ,&lt;/P&gt;&lt;P&gt;        w_accglitem ,&lt;/P&gt;&lt;P&gt;        w_acccusitem,&lt;/P&gt;&lt;P&gt;        w_accamount .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************SETTING OBJECT TYPE&lt;/P&gt;&lt;P&gt;  l_objtype = 'IDOC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************GETTING NEXT ACCOUNT NUMBER TO FRAME OBJECT KEY&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'NUMBER_GET_NEXT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      nr_range_nr                   = '01'&lt;/P&gt;&lt;P&gt;      object                        = 'RF_BELEG'&lt;/P&gt;&lt;P&gt;     QUANTITY                      = '00000000000000000001'&lt;/P&gt;&lt;P&gt;     SUBOBJECT                     = 'TIL'&lt;/P&gt;&lt;P&gt;     TOYEAR                        = '2009'&lt;/P&gt;&lt;P&gt;     IGNORE_BUFFER                 = ' '&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     NUMBER                        = l_belnr&lt;/P&gt;&lt;P&gt;     QUANTITY                      = l_qty&lt;/P&gt;&lt;P&gt;     RETURNCODE                    = l_rtncode&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     INTERVAL_NOT_FOUND            = 1&lt;/P&gt;&lt;P&gt;     NUMBER_RANGE_NOT_INTERN       = 2&lt;/P&gt;&lt;P&gt;     OBJECT_NOT_FOUND              = 3&lt;/P&gt;&lt;P&gt;     QUANTITY_IS_0                 = 4&lt;/P&gt;&lt;P&gt;     QUANTITY_IS_NOT_1             = 5&lt;/P&gt;&lt;P&gt;     INTERVAL_OVERFLOW             = 6&lt;/P&gt;&lt;P&gt;     BUFFER_OVERFLOW               = 7&lt;/P&gt;&lt;P&gt;     OTHERS                        = 8&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate l_belnr 'TIL 2009' into l_objkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************GETTING LOGICAL SYSTEM DATA&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     OWN_LOGICAL_SYSTEM                   = l_objsys&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     OWN_LOGICAL_SYSTEM_NOT_DEFINED       = 1&lt;/P&gt;&lt;P&gt;     OTHERS                               = 2&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_accheader-OBJ_TYPE = l_objtype.&lt;/P&gt;&lt;P&gt;  w_accheader-OBJ_KEY = l_objkey.&lt;/P&gt;&lt;P&gt;  w_accheader-OBJ_SYS = l_objsys.&lt;/P&gt;&lt;P&gt;  w_accheader-BUS_ACT = 'RFBU'.&lt;/P&gt;&lt;P&gt;  w_accheader-USERNAME = sy-uname.&lt;/P&gt;&lt;P&gt;  w_accheader-HEADER_TXT = 'test'.&lt;/P&gt;&lt;P&gt;  w_accheader-COMP_CODE = 'TIL'.&lt;/P&gt;&lt;P&gt;  w_accheader-DOC_DATE = '20080617'.&lt;/P&gt;&lt;P&gt;  w_accheader-PSTNG_DATE = '20080617'.&lt;/P&gt;&lt;P&gt;  w_accheader-FISC_YEAR = '2009'.&lt;/P&gt;&lt;P&gt;  w_accheader-DOC_TYPE = 'SA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_accglitem-ITEMNO_ACC = '0000000001'.&lt;/P&gt;&lt;P&gt;  w_accglitem-GL_ACCOUNT = '0000244557'.&lt;/P&gt;&lt;P&gt;  w_accglitem-ITEM_TEXT = 'ITEM CREDIT'.&lt;/P&gt;&lt;P&gt;  w_accglitem-ac_doc_no = '0090000031'.&lt;/P&gt;&lt;P&gt;  w_accglitem-acct_type = 'S'.&lt;/P&gt;&lt;P&gt;  w_accglitem-DOC_TYPE = 'SA'.&lt;/P&gt;&lt;P&gt;  w_accglitem-COMP_CODE = 'TIL'.&lt;/P&gt;&lt;P&gt;  w_accglitem-fisc_year = '2009'.&lt;/P&gt;&lt;P&gt;  w_accglitem-PSTNG_DATE = '20080617'.&lt;/P&gt;&lt;P&gt;  w_accglitem-VALUE_DATE ='20080617'.&lt;/P&gt;&lt;P&gt;  w_accglitem-ALLOC_NMBR = '124587'.&lt;/P&gt;&lt;P&gt;  w_accglitem-DE_CRE_IND = 'H'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append w_accglitem to i_accglitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear w_accglitem.&lt;/P&gt;&lt;P&gt;  w_accglitem-ITEMNO_ACC = '0000000002'.&lt;/P&gt;&lt;P&gt;  w_accglitem-GL_ACCOUNT = '0000244215'.&lt;/P&gt;&lt;P&gt;  w_accglitem-ITEM_TEXT = 'ITEM DEBIT'.&lt;/P&gt;&lt;P&gt;  w_accglitem-ref_key_3 = '0000000128'.&lt;/P&gt;&lt;P&gt;  w_accglitem-acct_type = 'S'.&lt;/P&gt;&lt;P&gt;  w_accglitem-DOC_TYPE = 'SA'.&lt;/P&gt;&lt;P&gt;  w_accglitem-COMP_CODE = 'TIL'.&lt;/P&gt;&lt;P&gt;  w_accglitem-fisc_year = '2009'.&lt;/P&gt;&lt;P&gt;  w_accglitem-PSTNG_DATE = '20080617'.&lt;/P&gt;&lt;P&gt;  w_accglitem-VALUE_DATE ='20080617'.&lt;/P&gt;&lt;P&gt;  w_accglitem-ALLOC_NMBR = '124587'.&lt;/P&gt;&lt;P&gt;  w_accglitem-DE_CRE_IND = 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append w_accglitem to i_accglitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  w_accamount-ITEMNO_ACC = '0000000001'.&lt;/P&gt;&lt;P&gt;  w_accamount-CURRENCY   = 'INR'.&lt;/P&gt;&lt;P&gt;  w_accamount-AMT_DOCCUR = '3000'.&lt;/P&gt;&lt;P&gt;  append w_accamount to i_accamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear w_accamount.&lt;/P&gt;&lt;P&gt;  w_accamount-ITEMNO_ACC = '0000000002'.&lt;/P&gt;&lt;P&gt;  w_accamount-CURRENCY   = 'INR'.&lt;/P&gt;&lt;P&gt;  w_accamount-AMT_DOCCUR = '3000'.&lt;/P&gt;&lt;P&gt;  w_accamount-amt_doccur =   w_accamount-amt_doccur * -1.&lt;/P&gt;&lt;P&gt;  append w_accamount to i_accamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;            documentheader          = w_accheader&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;           OBJ_TYPE                = l_objtype&lt;/P&gt;&lt;P&gt;           OBJ_KEY                 = l_objkey&lt;/P&gt;&lt;P&gt;           OBJ_SYS                 = l_objsys&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;            ACCOUNTGL               = i_accglitem&lt;/P&gt;&lt;P&gt;            currencyamount          = i_accamount&lt;/P&gt;&lt;P&gt;            return                  = i_return .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   loop at i_return into w_return.&lt;/P&gt;&lt;P&gt;     write:/ w_return-TYPE(1),&lt;/P&gt;&lt;P&gt;             w_return-ID(2),&lt;/P&gt;&lt;P&gt;              w_return-NUMBER(3),&lt;/P&gt;&lt;P&gt;              w_return-MESSAGE(50),&lt;/P&gt;&lt;P&gt;              w_return-LOG_NO(1),&lt;/P&gt;&lt;P&gt;              w_return-LOG_MSG_NO(3),&lt;/P&gt;&lt;P&gt;              w_return-MESSAGE_V1(30),&lt;/P&gt;&lt;P&gt;              w_return-MESSAGE_V2(30),&lt;/P&gt;&lt;P&gt;              w_return-MESSAGE_V3(30),&lt;/P&gt;&lt;P&gt;              w_return-MESSAGE_V4(30).&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sakthivel n on Jun 20, 2008 5:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2008 07:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991880#M953691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-19T07:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991881#M953692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of the entries in currencyamount has to be negative&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 15:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991881#M953692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T15:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991882#M953693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The account balance of &lt;STRONG&gt;i_accamount&lt;/STRONG&gt; always must be zero. Values added to this internal table must contain the minus sign ( - ) at the beginning of number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafael Rojas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 15:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991882#M953693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T15:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991883#M953694</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;U need to transfer the currency type and don't clear the structure w_accamount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;w_accamount-ITEMNO_ACC = '0000000001'.
CURRENCYAMOUNT-CURR_TYPE  = '00'. &amp;lt;--------------------------
w_accamount-CURRENCY = 'INR'.
w_accamount-AMT_DOCCUR = '3000'.
append w_accamount to i_accamount.

*clear w_accamount.                                &amp;lt;-------------------------- ERRORR      
w_accamount-ITEMNO_ACC = '0000000002'.
CURRENCYAMOUNT-CURR_TYPE  = '00'. &amp;lt;--------------------------
w_accamount-CURRENCY = 'INR'.
w_accamount-AMT_DOCCUR = '3000'.
w_accamount-amt_doccur = w_accamount-amt_doccur * -1.
append w_accamount to i_accamount.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway you shouldn't get the FI number out of BAPI, u don't need to transfer it, the BAPI should get it automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u should delete this piece of code (else u risk to loose FI number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;***********GETTING NEXT ACCOUNT NUMBER TO FRAME OBJECT KEY
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'RF_BELEG'
QUANTITY = '00000000000000000001'
SUBOBJECT = 'TIL'
TOYEAR = '2009'
IGNORE_BUFFER = ' '
IMPORTING
NUMBER = l_belnr
QUANTITY = l_qty
RETURNCODE = l_rtncode
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 7
OTHERS = 8
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 15:52:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991883#M953694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-20T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991884#M953695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope I am very near to the solution. &lt;/P&gt;&lt;P&gt;I tried with all your suggesions. But the same error is coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E RW 609 Error in document: IDOC 0090000129TIL 2009 CLNT400   000 IDOC                           0090000129TIL 200&lt;/P&gt;&lt;P&gt;E F5 702 Balance in transaction currency                      000 00                                      3,000.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any SD custom setting related to currency? will it be a problem for this error??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beacuase I used the same BAPI other purpose in IDES server. There I got the same error(Balance in Transaction Currency). But I tried with dev server. It got posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expecting your valuable reply..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.........................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sakthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 07:00:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991884#M953695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T07:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991885#M953696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Dnt know much abt the first error, but ur second error is coz ur debit values and credit values do not nullify each other. In your excel sheet, add your debit values together and add all the credit values together. The total of both sshud be the same. Its then that the addition turns to zero and the system will then allow you to post the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nayan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 07:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991885#M953696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T07:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991886#M953697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nayan, &lt;/P&gt;&lt;P&gt;I did the same. But still the same error &lt;STRONG&gt;"Balance in transaction Currency"&lt;/STRONG&gt; is coming. I am still hanging on this problem sir......&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;Sakthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2008 12:15:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991886#M953697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-24T12:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991887#M953698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Its ot possible mate, i have alo faced the same problem and upon making the values of debit and credit same i have managed to remove the error. Check the values again, im dead sure this is the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2008 12:17:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991887#M953698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-24T12:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991888#M953699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;Thanks to all of you.&lt;/P&gt;&lt;P&gt;I unable to bring the solution over this problem. So I did BDC. its working fine. If anybody have the same problem, please send the mail. I will help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 07:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991888#M953699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T07:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST Error on OBJ_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991889#M953700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sakthivel n, I'm having the exact same problem you had.  I know you decided to go with BDC, but did you ever figure out a solution for the BAPI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand the ramifications of setting the OBJ_TYPE and OBJ_KEY.  I ended up setting OBJ_TYPE = 'IDOC' which allowed me to set OBJ_KEY = to whatever I wanted.  Not sure what ramifications this will have...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I'm now getting error:&lt;/P&gt;&lt;P&gt;E F5 702 Balance in transaction currency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever figure out why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 01:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-error-on-obj-key/m-p/3991889#M953700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-27T01:35:43Z</dc:date>
    </item>
  </channel>
</rss>

