cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in blocking that amount in the sales order through routein

Former Member
0 Kudos

Dear Experts,

We are facing a problem in Routine,

We have developed a Z rebate module in that we are saving the accrual value for a perticular customer in "Z" Table.

We are having a senerio of adjusting that perticular accrued amount in the next month sales order as a discount at the item level. In table itself we fix this much amount as to flow to sales order for a Perticular material (EX- for 100001 material 5 rs per TON).

We have devaloped 901 routine that will go to "z" table and check any accrued amount is there then depending on the quantity ordered it will take accrual amount (simultanusly it will block the respective amount in the "z" table) and it will come and update in sales order pricing. Once we save sales order then it will reduse the perticular amount in from "z" table.

Now we are facing a problem, when we create a sales order first time depending on quantity routine will pull the value from "z" table and it will block respective amount in the "z" table. but before saving the sales order if you change the quantity again (EX- from 100 qty to 200 qty) then the routine is not pulling any value because the amount is already blocked.

Can any one tell me how check in run time this was the earlier quantity and this is changes quantity Or is there any logic to block that perticular amount.

Regards

Nagesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sree N

As per you post this is what I understood:

Routine is running updating the sales order and blocking the amount in Z table.

If again before saving sales order you are changing qty routine is running again but this time amount is blocked so no updation in sales order.

In my understanding use User exit while saving the sales order and that time, block the amount in Z table not at routine time.

it will solve your problem.

try and revert.

Former Member
0 Kudos

Hi,

Thanks for your reply, this we have tried and it is working out, in case user creates the sales order with only one item level. in case they are creating with multiple items in same sales order it is not working.

Regards,

Sree

Former Member
0 Kudos

hi sree

Could you please explain me why it is not working with multiple line items?

Former Member
0 Kudos

eg..

Discount is given for item level not header level.

Customer code : 100009

Maximum discount : Rs.200 /- (z table)

In case if we enter the item 1, it is calculating discount for Rs. 200/-. in case if we are not blocking this amount.... when we create the next line item it will check the maximum disocount and it takes again Rs. 200/-. Total discount will come as Rs.400/- but customer eligible to get the discount upto Rs.200/-

Regards,

Sree

Former Member
0 Kudos

HI Sree

Could you please justify your post stating

"Now we are facing a problem, when we create a sales order first time depending on quantity routine will pull the value from "z" table and it will block respective amount in the "z" table. but before saving the sales order if you change the quantity again (EX- from 100 qty to 200 qty) then the routine is not pulling any value because the amount is already blocked. "

Your discount is based on qty, so when you are adding new item means order qty increased, so discount is applicable.

Or please put your requirement clearly

Former Member
0 Kudos

Looks like you are updating your Z table even if you do not intend to save the sales order.