<?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 error.. pls help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709526#M310460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Make sure the parameter as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: bapiache09 LIKE bapiache09,
gl_account LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
py_account LIKE TABLE OF bapiacar09 WITH HEADER LINE,
ret_tab LIKE TABLE OF bapiret2   WITH HEADER LINE,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still if you have an issue, post your data declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raja T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Nov 2006 14:54:27 GMT</pubDate>
    <dc:creator>raja_thangamani</dc:creator>
    <dc:date>2006-11-28T14:54:27Z</dc:date>
    <item>
      <title>BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709521#M310455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I would like to call function "BAPI_ACC_DOCUMENT_CHECK" &lt;/P&gt;&lt;P&gt;and I encounter the error: &lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Type conflict when calling a function module (field length).&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I upload an excel file.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* _______________________________________________________ 
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      FILENAME                = p_file
      I_BEGIN_COL             = '1'
      I_BEGIN_ROW             = '7'
      I_END_COL               = '21'
      I_END_ROW               = '999'
    TABLES
      INTERN                  = intern
    EXCEPTIONS
      INCONSISTENT_PARAMETERS = 1
      UPLOAD_OLE              = 2
      OTHERS                  = 3.
 
 SORT intern by row col.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;* I loop at the intern and append to an internal table 'xcel'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;then I fill in the bapi document header 'bapiache09'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    bapiache09-doc_type   = 'PC'. 
    bapiache09-doc_date   = sy-datum.
    bapiache09-pstng_date = p_budat.   "p_budat is declared as 
                                       "bapiache09-pstng_date on selection screen
    bapiache09-comp_code  = 'B000'. 
    bapiache09-header_txt = 'SCTA (AB28)-P11/06'.
    bapiache09-ref_doc_no = 'Test'. 
    bapiache09-username = sy-uname.
    bapiache09-bus_act = 'RFBU'.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;* now i fill in the line items into &amp;lt;b&amp;gt;account gl, account payable &amp;lt;/b&amp;gt;and &amp;lt;b&amp;gt;current amount&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  LOOP AT xcel INTO wa_xcel.
     ADD 1 to item_no.
" internal table of gl account, type bapiacap09
    IF wa_xcel-post_key EQ '40' OR wa_xcel-post_key EQ '50'.
      wa_gl_account-itemno_acc = item_no.
      wa_gl_account-doc_type   = wa_xcel-fld2.
      wa_gl_account-gl_account  = wa_xcel-fld3.
      wa_gl_account-costcenter = wa_xcel-fld7.
      wa_gl_account-alloc_nmbr = wa_xcel-fld11.
      wa_gl_account-item_text  = wa_xcel-fld12.
      wa_gl_account-cs_trans_t = wa_xcel-fld18.
      wa_gl_account-tax_code   = wa_xcel-fld20.
      APPEND wa_gl_account TO gl_account.
      CLEAR wa_gl_account.
" internal table of payable account, type bapiacap09
    ELSEIF wa_xcel-post_key EQ '21' OR wa_xcel-post_key EQ '31'.
      wa_py_account-itemno_acc = item_no.
      wa_py_account-vendor_no  = wa_xcel-fld3.
      wa_py_account-bline_date = wa_xcel-fld5.
      wa_py_account-alloc_nmbr = wa_xcel-fld11.
      wa_py_account-item_text  = wa_xcel-fld12.
      wa_py_account-sp_gl_ind  = wa_xcel-fld14.
      wa_py_account-tax_code   = wa_xcel-fld20.
      APPEND wa_py_account TO py_account.
      CLEAR wa_py_account.
    ENDIF.
 
" internal table of currency amount, type bapiaccr09.
    wa_curr_amt-itemno_acc = item_no.
    wa_curr_amt-currency = wa_xcel-fld6.
    wa_curr_amt-amt_doccur = wa_xcel-fld15.
    APPEND wa_curr_amt TO curr_amt.
    CLEAR wa_curr_amt.
  ENDLOOP.
 
  PERFORM bapi_check.
 ENDFORM.                    " fill_line_item
 
*_______________________________________________
FORM bapi_check . 
  CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
    EXPORTING
      DOCUMENTHEADER    = bapiache09
    TABLES
      ACCOUNTGL         = gl_account
      ACCOUNTRECEIVABLE = py_account
      CURRENCYAMOUNT    = curr_amt
      RETURN            = ret_tab.
ENDFORM.                    " bapi_check
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does anyone know what is the exact problem as I declared all the internal tables according to the type in FM 'BAPI_ACC_DOCUMENT_CHECK'. Why I get the error of type conflict?&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;ying..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709521#M310455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T14:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709522#M310456</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; Can you send me the declaration part also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709522#M310456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T14:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709523#M310457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check if ur filname of type RLGRAP-FILENAME and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :p_file like RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;data : intern   like alsmex_tabline occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        chandrasekhar jagarlamudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:48:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709523#M310457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T14:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709524#M310458</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;If the error you are facing is the syntax error, you can just define all your variables like the one in Associated Type column which is next to the Parameter names in your FM Interface&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:51:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709524#M310458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709525#M310459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The dump analysis will clearly state for which parameter did this happen.&lt;/P&gt;&lt;P&gt;If not the bapi fm, it must be the other fm.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709525#M310459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T14:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709526#M310460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Make sure the parameter as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: bapiache09 LIKE bapiache09,
gl_account LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
py_account LIKE TABLE OF bapiacar09 WITH HEADER LINE,
ret_tab LIKE TABLE OF bapiret2   WITH HEADER LINE,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still if you have an issue, post your data declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raja T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 14:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709526#M310460</guid>
      <dc:creator>raja_thangamani</dc:creator>
      <dc:date>2006-11-28T14:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709527#M310461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My declarations of data objects and internal tables are as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"Table that used as document header in BAPI_ACC_DOCUMENT_CHECK
TABLES: bapiache09.

"internal table used in FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'
DATA : intern TYPE TABLE OF alsmex_tabline.

" xcel will be used to store data from intern
TYPES: BEGIN OF st_excel.
             fld1 TYPE bapiache-itemno_acc,
             fld2 TYPE bapiacgl-doc_type,
             fld3 TYPE bapiacgl-gl_account,
             fld4 TYPE bapiache-doc_date,
             fld5 TYPE bapiacap-bline_date,
             fld6 TYPE bapiache-itemno_acc,
             fld7 TYPE bapiacgl-costcenter,
             fld8 TYPE bapiache-comp_code,
             fld9 TYPE bapiache-header-txt,
             fld10 TYPE bapiache-ref_doc_no,
             fld11 TYPE bapiacgl-alloc_nmbr,
             fld12 TYPE bapiacgl-item_text,
             post_key(2),
             fld14 TYPE bapiacap-sp_gl_ind,
             fld15 TYPE bapiachecr-amt_doccur,
             fld16 TYPE bapiaccr-currency,
             fld18 TYPE bapiacgl-cs_trans_t,
             fld20 TYPE bapiacgl-tax_code,
        END OF st_excel.

DATA: xcel TYPE STANDARD TABLE OF st_excel,
      wa_xcel LIKE LINE OF xcel.

"internal table which will be used in FM 'BAPI_ACC_DOCUMENT_CHECK'  
DATA: gl_account TYPE TABLE OF bapiacgl09,
      py_account TYPE TABLE OF bapiacap09,
      curr_amt TYPE TABLE OF bapiaccr09,
      wa_gl_account LIKE LINE OF gl_account,
      wa_py_account LIKE LINE OF py_account,
      wa_curr_amt LIKE LINE OF wa_curr.

DATA: item_n TYPE bapiache09-itemno_acc.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2006 15:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709527#M310461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-28T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI error.. pls help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709528#M310462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have figured out what is the problem, I passed the py_account to ACCOUNTRECEIVABLE. It should be ACCOUNTPAYABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM bapi_check . 
  CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
    EXPORTING
      DOCUMENTHEADER    = bapiache09
    TABLES
      ACCOUNTGL         = gl_account
*      ACCOUNTRECEIVABLE = py_account
      &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;b&amp;gt;ACCOUNTPAYABLE &amp;lt;/b&amp;gt;= py_account&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"should be payable account, not receivable account

      CURRENCYAMOUNT    = curr_amt
      RETURN            = ret_tab.
ENDFORM.                    " bapi_check
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;ying&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 01:52:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-error-pls-help/m-p/1709528#M310462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-29T01:52:58Z</dc:date>
    </item>
  </channel>
</rss>

