cancel
Showing results for 
Search instead for 
Did you mean: 

Add Header condition type in invoice via ABAP program

Former Member
0 Kudos

Hi

We have requirement to add header condition type at in invoice only during creation of invoice via ABAP program, and subsequently it should pass to item level proportionally based on net value of item.

We are facing below issue in standard process.

For example if i entered condition type manually at header (Without ABAP code),, the value is not passing from header to item, even i can not see the condition type itself at item,

also at header the value of condition type is not appearing in condition value field, but i can see in amount field, as per the standard, after entering the value at header condition type, if we activate the button, the value of header condition type from amount is flow into condition value.. but it is not happening in my case..

Condition type characteristics as follows

  • Cond. class   A Discount or surcharge
  • Calculat.type B Fixed amount
  • Group condition  -activate
  • Header condition - activate

we have tried with Few user exists and enhancement to get the price but it is not working.., please note we are getting value of condition type from Z table.

Please advise.....

Accepted Solutions (0)

Answers (3)

Answers (3)

naveen_kaluti
Active Participant
0 Kudos

Hello Vanrajsinh,

Copy the standard condition type HB00 and create a Z condition type, this is resolve the 1st part of you problem. i.e. applying header discount amount proportionality at item level.

Now coming to the other requirement, develop a alternative calculation type and assign it to the newly created condition type in the required pricing procedure.

You can use the logic as: trigger this condition type whenever the document category is "M" invoice & "O" credit memo, just in case is the same amount has to be credited back, and the same can be used to add code so that correct amount is pulled from the z table

Now coming to part on how it should be automatically triggered you can use a userexit.

Regards,

Naveen K.

piyush_gajera
Participant
0 Kudos

Hello,

Please mark condition as header and item condition and group condition also. After that condition should appear in line item.

Regards,

PG

Former Member
0 Kudos

Thanks Piyush, We already checked this option.. but not working..

jobis
Contributor
0 Kudos

Hi Vanraj,

"

we have tried with Few user exists and enhancement to get the price but it is not working.., please note we are getting value of condition type from Z table.  "

Could you give a little more detail about this, Are u maintaining the condition record in a Z table?

Or are u giving it manually at header..?

In std, when you are inputting the header condition at the header level manually,initially its value will not appear in 'condition value' column, but only in 'amount' column, but the corresponding amount will be applied to each items.. And later if you check or after saving the document, then the 'value' column will show the value in header.

Please check if you have an access sequence assigned in the header condition.

Also, is any group condition routine, assigned to the condition type?

Regards

Jobi

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Please, see these notes as a checklist of possible sources of troubles.

SAP Note 876617 - FAQ: Header conditions/header condition screen

SAP Note 24832 - Pricing rules / TVCPF

I hope this helps you

Regards

Eduardo

Former Member
0 Kudos

Thanks Eduardo,, but that is not helpfull...