Solved

Posting Invoices (BAPI_ACC_BILLING_POST) through Accounting Interface

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Note: You must have administrative privileges in order to create/edit Sharing Rules. 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 an…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now