Solved

Posting Invoices (BAPI_ACC_BILLING_POST) through Accounting Interface

Posted on 2004-04-14
3
2,630 Views
Last Modified: 2013-12-08
Hi,

I try to post customer invoices using the BAPI BAPI_ACC_BILLING_POST but when called, it returns an error: "Field Prof.segmt is a required field for G/L account...". How do I specify this profitability segment in the SAP Request?

Here is the SAP Request I use in my EAI tool:

<SAPREQUEST>
<STRUCT_IMPORTS>
<DOCUMENTHEADER>
<COMP_CODE>MYCO</COMP_CODE>
<USERNAME>myuser</USERNAME>
<FISC_YEAR>2003</FISC_YEAR>
<DOC_DATE>20030401</DOC_DATE>
<PSTNG_DATE>20030401</PSTNG_DATE>
<DOC_TYPE>FD</DOC_TYPE>
<REF_DOC_NO>290505</REF_DOC_NO>
</DOCUMENTHEADER>
</STRUCT_IMPORTS>
<TABLES>
<ACCOUNTRECEIVABLE>
<item>
<ITEMNO_ACC>1</ITEMNO_ACC>
<CUSTOMER>0000002183</CUSTOMER>
</item>
</ACCOUNTRECEIVABLE>
<ACCOUNTGL>
<item>
<ITEMNO_ACC>2</ITEMNO_ACC>
<GL_ACCOUNT>0000307000</GL_ACCOUNT>
<COSTCENTER>0000001700</COSTCENTER>
<PROFIT_CTR>0000001700</PROFIT_CTR>
<ITEM_TEXT>TEXT TEXT TEXT TEXT TEXT</ITEM_TEXT>
</item>
</ACCOUNTGL>
<ACCOUNTTAX>
<item>
<ITEMNO_ACC>3</ITEMNO_ACC>
<GL_ACCOUNT>0000217100</GL_ACCOUNT>
<ACCT_KEY>MWS</ACCT_KEY>
<TAX_CODE>D0</TAX_CODE>
</item>
</ACCOUNTTAX>
<CURRENCYAMOUNT>
<item>
<ITEMNO_ACC>1</ITEMNO_ACC>
<CURRENCY>CHF</CURRENCY>
<CURR_TYPE>00</CURR_TYPE>
<AMT_DOCCUR>-100</AMT_DOCCUR>
</item>
<item>
<ITEMNO_ACC>2</ITEMNO_ACC>
<CURRENCY>CHF</CURRENCY>
<CURR_TYPE>00</CURR_TYPE>
<AMT_DOCCUR>100</AMT_DOCCUR>
</item>
<item>
<ITEMNO_ACC>3</ITEMNO_ACC>
<CURRENCY>CHF</CURRENCY>
<CURR_TYPE>00</CURR_TYPE>
<AMT_DOCCUR>0</AMT_DOCCUR>
<AMT_BASE>0</AMT_BASE>
</item>
</CURRENCYAMOUNT>
</TABLES>
</SAPREQUEST>

And here is the error:

<RETURN>
<item>
<TYPE>E</TYPE>
<ID>RW</ID>
<NUMBER>609</NUMBER>
<MESSAGE>Error in document: BKPFF $</MESSAGE>
<LOG_NO></LOG_NO>
<LOG_MSG_NO>000000</LOG_MSG_NO>
<MESSAGE_V1>BKPFF</MESSAGE_V1>
<MESSAGE_V2>$</MESSAGE_V2>
<MESSAGE_V3></MESSAGE_V3>
<MESSAGE_V4></MESSAGE_V4>
<PARAMETER></PARAMETER>
<ROW>0</ROW>
<FIELD></FIELD>
<SYSTEM></SYSTEM>
</item>
<item>
<TYPE>E</TYPE>
<ID>F5</ID>
<NUMBER>808</NUMBER>
<MESSAGE>Field Prof.segmt is a required field for G/L account
MYCO 307000</MESSAGE>
<LOG_NO></LOG_NO>
<LOG_MSG_NO>000000</LOG_MSG_NO>
<MESSAGE_V1>Prof.segmt</MESSAGE_V1>
<MESSAGE_V2>TASA</MESSAGE_V2>
<MESSAGE_V3>307000</MESSAGE_V3>
<MESSAGE_V4>40</MESSAGE_V4>
<PARAMETER></PARAMETER>
<ROW>0</ROW>
<FIELD></FIELD>
<SYSTEM></SYSTEM>
</item>
</RETURN>

Thanks in advance for your help!

0
Comment
Question by:mgerson
3 Comments
 
LVL 3

Accepted Solution

by:
sharadd earned 500 total points
ID: 10866493
Hi
Your COPA setting fields and values should be passed on to the structure BAPIACKECR

See the function module ' BAPI_ACC_BILLING_POST'.  and tables   CRITERIA which has structure of  BAPIACKECR. Now in this you should pass the values for fields of your COPA operating concern.


Structure of  CRITERIA  is as follows.

ITEMNO_ACC     " Accounting document line item number
FIELDNAME        "Field name
CHARACTER      " Characteristic (concrete use ==> EDIMAP)

I hope this will help you.

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
microsoft dynamic NAV ERP 3 118
e-Discovery Software 8 195
crm 2010 on premise 5 77
Why do software vendors ask for organization's yearly revenue 3 75
Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question