Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Posting Invoices (BAPI_ACC_BILLING_POST) through Accounting Interface

Posted on 2004-04-14
3
Medium Priority
?
2,752 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
sharadd earned 2000 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

Supply Chain Event Management Supply chain visibility is the ability of a company to track its products and business processes in supply chain towards building operational excellence. The goal of supply chain visibility is to improve and strength…
Note: You must have administrative privileges in order to configure lead or case queues. Salesforce.com (http://www.Salesforce.com) is a cloud-based customer relationship management (CRM) system. It is widely used around the world by sales and ma…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

719 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