cancel
Showing results for 
Search instead for 
Did you mean: 

How to influence the net amount of CustomerInvoice(Items)?

Former Member
0 Kudos

Hi,

is it possible to change the value of a CustomerInvoiceRequest (Item) or of a CustomerInvoice (Item)?

We need to implement a alternative time-dependent pricing, for sales order items?

many thanks for your replies.

Regards

Jürgen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Now, this is a good question because the relevant node is deep inside somewhere. You can not manipulate the prices you see directly under Item. I will tell you the path considering Customer Invoice Request as example.

Currency for entire invoice request is set at,

CustomerInvoiceRequest --> PricingTerms --> CurrencyCode


Net Amount for each Item per unit,

CustomerInvoiceRequest --> Item --> PriceAndTaxCalculationItem --> ItemMainTotal --> Rate/DecimalValue

Hope this helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Srivatsava,

thanks for your reply. I tried to handle with this influencing a project invoice request, but with no success. Is project invoice request a different BO to the CustomerInvoiceRequest? How may i find out the correct BO to enhance.

many thanks

regards

Jürgen

Former Member
0 Kudos

Type 1460 Customer Project Invoice falls under CustomerInvoiceRequest BO.

and the path for Net amount is also correct.

What is the error you are getting? Can you post it here?

Former Member
0 Kudos

Hi,

i get no error, for test pupose i simply added the following coding in on Event Validation-OnSave:

/*

Add your SAP Business ByDesign scripting language implementation for:

Business Object: CustomerInvoiceRequest

Node: CustomerInvoiceRequest

Validation: OnSave


Script file signature

----------------------------

Returns: Boolean

*/


import

ABSL;


return

false;

But changes and saving is still possible. So i thought i have'nt the right  BO.

Furthermore the Amount on save doesn´t show any effect of my coding:

this.PriceAndTaxCalculationItem.ItemMainTotal.Rate.DecimalValue = 100;

in Event BeforeSave of item.node.

what i'm doing wrong??

by the way, how do you find out, that  Project invoice request falls under CustomerInvoiceRequest (i first thougt so, too, because this is the only BO i found named invoice request in PSM).

many thanks for your hints.

Former Member
0 Kudos

Whenever there are associations you are dealing with, then you have to check if they are Set are not before filling them.

Of course, if they are not set, you will get a dump if you try to access any child nodes within.

As you are not at all getting a dump, I would request you to use the tracing and debugging functionalities to detect changes in this node.

Check CustomerInvoiceRequest --> TypeCode datatype for more info on what all types of Customer Invoice Request you can create. May be you can use your devpt. tenant to create some instances instead of blocking it in OnSave validation and then see them in Partner Development Shell.

Former Member
0 Kudos

Hi,

i get no dump and in "normal" CustomerInvoiceRequest the Debugger stops in the Validation OnSave - but not in the project invoice request.

I don´t understand what you mean with the "Check CustomerInvoiceRequest --> TypeCode" because in the PSM I only find this info,

Definition

A coded representation of the document type that occurs in business transactions. The document type describes the (business) nature of similar documents and defines the basic features of this type of document.

May you tell me where to look for the info you mean?