Skip to Content
0

How to create an instance of BO AccountingDocument programmaticly in ByD?

Sep 18, 2017 at 11:09 AM

171

avatar image

Hi,

It seems there is not Create method in BO AccountingDocument. So, How can I create an instance in ABSL?

We found a Web service ManageJounalEntryIn in ByD Service Explorer (Application and User Management Work Center).

However, there is not the Web service in SAP Cloud Applications Studio in Repository Explorer.

Please, could you help us?

Thank you.

000105.jpg (108.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Marlene Katzschner
Sep 21, 2017 at 12:36 PM
0

Hi Aleksei,

yes, Horst is right. If you want to create accounting documents, you need to start with the business transaction. Please check if the

Business Object AccountingEntry is what you were looking for. This Business Object creates Journal Entry Vouchers. If you have different requirements, please share more details.

Best regards
Marlene.

Share
10 |10000 characters needed characters left characters exceeded
Horst Schaude
Sep 18, 2017 at 11:33 AM
0

Hello Aleksei,

As the documenation of an AccountingDOcument states:

  • A representation of changes to values of general ledger and subledger accounts resulting from a business transaction and relating to a company and a set of books.

it is the result of transactions. It can not manually be created or maintained. The system takes care of that.
Of course you can query for it retrieve the data.

HTH,
. Horst

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Horst,

I have been trying to retrieve or query an accounting document instance using its ID and fiscal year. It never worked although it gave me the result in the repository explorer. Can you help me with that? Please see the code below.

var query = AccountingDocument.QueryByElements;

var sel_par = query.CreateSelectionParams();

sel_par.Add(query.ID.content, "I", "EQ", this.ID_JE.content);

sel_par.Add(query.FiscalYearID, "I", "EQ", this.fiscal_yr);

result = query.Execute(sel_par);

Here the result is empty.

Thanks,

Neenu

0

Hello Neenu,

Sometimes an ID has leading zeros which are not handled as expected.

Try first with only the fiscal year and compare the returned ID with the value from "this.ID_JE.content"

HTH,
. Horst

0
Former Member
Horst Schaude

Hi Horst,

This is weird. I tried passing fiscal year alone still no results. I can see that the leading zeroes are already added by the system.

Thanks,

Neenu

0

Hello Neenu,

Can your provide the example using the Repository Explorer (which returns some result) together with the data for the ABSL code (which does not)?

Bye,
. Horst

0
Aleksei BELOUSOV Sep 22, 2017 at 08:52 AM
0

Thank you, Marlene,

As far as I can see we can use BO AccountingEntry (Journal Entry Voucher) for that purpose. If I am not mistaken it does the same what BO AccountingDocument does - creates a new accounting entry in the accounting journal.

In our case, we have invoices where the gross amount value is different from the exact value (=quantity*price*(1*tax%) - it is rounded in some irregular way (it is supposed to be input manually).

If invoices let negative items we could just create one more item in the invoice - for the rounding difference (negative or positive)

For now, we have found some work around by creating a Credit Memo for each invoice, quite complicated way, though.

Thank you.

Aleksei

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi experts,b

I can't add entry to AccountingEntry BO,

i have an action in custom business object called Post, using data in elements of BO i want to create manual journal entry voucher i have tried to create instance in accounting Entry but errors says that elements is read only.

Do i have to create instance in another BO, please support

Regards,

  //Get all Accounting Entires on the system 
var qry = AccountingDocument.QueryByElements.Execute();
if (qry.Count() == 0 ) { Root.ID.content = "1" ; Root.CompanyUUID = "AREEGY" ; Root.PostingDate = "12/11/2017";
Root.AccountingDocumentTypeCode = "00047" ;
Root.BusinessTransactionTypeCode = "601" ;
Root.TransactionCurrencyCode = "EGP" ;
NewIns = AccountingEntry.CreateWithReference(Root) ;
0