Solved

Posting Invoices (BAPI_ACC_BILLING_POST) through Accounting Interface

Posted on 2004-04-14
3
2,653 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

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…
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 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