Solved

Posting Invoices (BAPI_ACC_BILLING_POST) through Accounting Interface

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction This article provides a high-level overview of the Quick Campaign and Campaign features of Microsoft CRM. The purpose of both types of campaign is to track outgoing marketing activity and customer responses in a single record. F…
When CRM stops functioning propperly or mysteriously disappears then this is something you should always check. This can be useful when looking at an end users machine or your own machine if you are the end user. It may be fairly obvious to some but…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

867 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

20 Experts available now in Live!

Get 1:1 Help Now