cancel
Showing results for 
Search instead for 
Did you mean: 

Changing pricing date not always working

Former Member
0 Kudos

Hi all

I am trying to change the pricing date(prsdt) for sd order to be the same as req delv. date , but the change is not always being performed and wrong  pricing date is occuring in some cases according to our requirement.

where does the pricing date  come from and why the use exit coding is ignored in some cases ... is there any condition I should look at.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

shashi_thakur
Contributor
0 Kudos

Hi Mehraj,

Please change the code to

        IF xvbak-vdatu IS NOT INITIAL.

           IF xvbak-vdatu <> xvbkd-prsdt.

                xvbkd-prsdt = xvbak-vdatu.

                modify xvbkd index sy-tabix.

              ENDIF.       

        ENDIF.

and see if it works. Also please check if you already have any other custom code which is undoing your change.

Regards,

Shashi

Former Member
0 Kudos

Hi Shahsi

Sorry but id did not help .

in minor saces it is still occuring , If I check the table KONV (vbak --- > konv ) , I can se the correct pricing date is under a specifik condition.

anyway I am going to give it back to the application people to fight with it

Thanks  a lot.

former_member187610
Active Participant
0 Kudos

Hi Merhej,

Could you please let me know whether you are changing the pricing date at Header level or Item level? Ideally, If the pricing date is changed at Header level then all line items in the SO will fetch the price from the maintained condition record based on the new changed date.

Thanks & Regards,

Sharan

Former Member
0 Kudos

Hi Sharan

I am using exit move fields to vbkd and save prepare , så I suppose the changes are in the header.

May be you are rigth about taking the price date form a condition in the item level

How can I check that ?

Thanks

former_member187610
Active Participant
0 Kudos

Hi Merhej,

You could check whether the pricing date in Header and Item level are the same or different by double clicking on the line item. In Sales A tab there is a pricing date field.

Regards,

Sharan

moazzam_ali
Active Contributor
0 Kudos

Hi

First thing is how you are chjanging pricing date? in which userexit and by what logic? Could you please share the logic if possible.

Second thing is in which case it is not the same as delivery date? Check in that case what is delivery date. There can be a reason that system runs availability check and prpsoe a new delivery date but your logic is not catering this. You have to check and analyze the difference in both cases (1 where pricing date is ok 2 where pricing date and delivery dates are different).

Please check and update.

Thank$

Former Member
0 Kudos

Thanks for the reply

I am using the exit  SAVE DOCUMENT PREPARE

coding .

IF vbak-vdatu <> xvbkd-prsdt.

                xvbkd-prsdt = vbak-vdatu.

                modify xvbkd index sy-tabix.

              ENDIF.

This works fine but it is ignored i some cases which I do not know how.

if the order has contract , then it takes the contract price , and this also works fine , the problem occurs for order without contract with pricing date not equal to delivery date.

Thanks

moazzam_ali
Active Contributor
0 Kudos

Hi

The logic seems ok to me. Try this in  USEREXIT_MOVE_FIELD_TO_VBKD too. The best way to get the issue is to create a new order with similar values in which dates are different and debug the issue. Check in debug mode why system is not making XVBKD-PRSDT same as VBAK-VBATU. If you are ABAPER then you know very well what I mean and if you are not like me then take help of your abaper.

I think the issue will be with availability check. Check what is different points in both cases i.e correct one and with wrong date.

Thank$

Former Member
0 Kudos

I will do .

Thanks

Hi again

I dit as suggested but in some cases it is still taking a wrong pricing date , can it be it is taking the pricing date from the condition type

How can i check if the price is coming from delivery date or conditon type

Thanks

Former Member
0 Kudos

Hello Merhej,

If it's specifically for those Orders that are without Contract reference then please check up with the 'Prop.f.pricing date' for your Sale Document Type in VOV8. Also, as suggested earlier to you try to check the case in Debugger Mode and see that why the values aren't being populated as they should be. Thanks.

Former Member
0 Kudos

Hello Ammarah

Thank you for your reply.

in VOV8 it is the req delivery date , and I am using several exits to tjek the pricing  date , but it is still occuring , and the worst is I can not debug because I do not know when and why this occurs. it is in some cases which can occurs at any time, but for sure according to some reason

Thanks

Former Member
0 Kudos

Dear Mehrej,

For those cases specifically when this issue arises you can also check in Debugger Mode your Internal Table in which you're updating the values, check from where it's getting the pricing date in ITAB. Also check up with the loops logic as if it's okay because i'm sure that there's some issue in it. Thanks, try to give a shot and i'm sure this will gonna work out.