cancel
Showing results for 
Search instead for 
Did you mean: 

Va01 when payer is changed do not change pay term

former_member220286
Participant

Dear All,

I have a requirement that while creating a sales order with reference and then changing the

goto --> header --> partner

changing the payer the payment term is also getting changed automatically .

I need to by pass the standard functionality that on changing the payer the payment term should not be changed .

It should remain the same as it as before changing the payer .

Please suggest some ideas to achieve this functionality .

Accepted Solutions (0)

Answers (3)

Answers (3)

Jelena
Active Contributor
0 Kudos

Sorry but I think this requirement just does not make a lot of sense. How does it correspond to real life? Let's say I have a customer and I have a general agreement with them on the payment terms, so I put those in the customer master. Then, for example, we sign a lucrative contract with the customer proposes but just for this contract they would like to have a different payment term. OK, so I enter a contract in SAP, the payment term is copied from the customer master but I just override it with the special term and save the contract. Then I use this contract as a reference for the consequent documents.

You might notice that Payer is not changed at any point in this scenario. So the real problem in your case is - why on Earth do you need to change the payer so frequently that the users would start losing track of the payment terms? Ship-to location could be changed frequently but Sold-to and Payer would normally be in the contract, so why would the change in the middle of it? Company merger / acquisition scenarios are not as frequent as to warrant a programming change.

Unless you can explain clearly what the business requirement is (and what you stated is not a business requirement, it's a functional spec), IMHO what you need is better business process and user training instead of a user exit.

former_member200754
Participant
0 Kudos

Hi Deep Bisht,

Do in user exit : USEREXIT_MOVE_FIELD_TO_VBKD in include : MV45AFZZ

Try to restrict to avoid any impact : order type, tcode ...

Ex: if VBAK-VBELN = 'OR' and sy-tcode = 'VA02'.

VBKD-ZTERM = YVBKD-ZTERM. ( YVBKD-ZTERM storage the old payment term )

Thanks,

John

former_member220286
Participant
0 Kudos

Dear John Vo ,

Thanks for reply .

I have updated the payment term in header part .

Below is the code lines what I have done :-

FORM USEREXIT_MOVE_FIELD_TO_VBAK.

ENHANCEMENT 1 ZPAYTERM_BYPASS. "active version

if vbkd-zterm is not initial .

kurgv-zterm = vbkd-zterm .

endif.
ENDENHANCEMENT.

Then in the USEREXIT_MOVE_FIELD_TO_VBKD I have written below code lines .

FORM USEREXIT_MOVE_FIELD_TO_VBKD.

kurgv-zterm = vbkd-zterm .

ENDFORM.

But in the line item part it is coming blank when there are multiple line items .

Payment terms are coming blank on changing the payer .

My requirement is that on changing the payer the payment term should not be changed (by pass standard functionality ) and it should remain same as it was before changing the payer in the header and as well as in the line item part .

Please suggest some ideas , code lines to achieve this functionality .

Regards

Deep

former_member200754
Participant
0 Kudos

Hi Deep,

This field vbkd-zterm is screen field on VA02 and you did change on kurgv-zterm, so may be it in correct.

did you do try what i said, it will do not change the payment term also in header and line item.

Thanks,

John

former_member220286
Participant
0 Kudos

Hi John Vo ,

I am doing it for Tcode : VA01 .

In summarized way , I am explaining it again .

My requirement is to By pass the standard functionality .

In standard the payment terms are automatically getting updated as soon as I change the payer .

But what I need is that : while creating sales order with reference .

the payment terms are displayed corresponding to the customer fetched at that time .This means that because payment terms are maintained differently for the Payer in the master and system picks the same into the sales order.

10245 : Z001 . 10489 : Z005.

Now when I goto --> header --> partner. and changing the partner from let say 10245 to 10489 then the payment terms are getting updated as Z005 it should not update . It must remain the previous one i.e Z001 , what it was before.

The payment term must remain the same as it was before with 10245 : Z001. It should also reflect the same as well in line item also .Also on manual changing the payment term, it must be changed automatically in header as well as in line item .

So this is what I required .Please help.

I have attached a screenshot for the same displaying where these payment terms are in sales order .

payment-term.jpg

former_member220286
Participant
0 Kudos

Dear All Gurus,

Please help .

Regards

Deep

siva_vasireddy2
Active Contributor
0 Kudos

Hi,

system takes payment Terms from the cusomer master.

so when the payment terms are maintained differently for the Payer in the master system picks the same into the sales order.

First you need to decide whether you need payment terms from the master or manula entry inthe sales order.

former_member220286
Participant
0 Kudos

Dear Shiva,

I agree that payment terms are maintained differently for the payer in the master which the system picks into the sales order . But I need to by pass this functionality in the below exit .

FORM USEREXIT_MOVE_FIELD_TO_VBAK.

* vbak-zzfield = xxxx-zzfield2.

ENDFORM.

On debugging I found that the payment term is updating in field : VBKD-ZTERM .

What is happening now is that on contionusly changing the payer it is updating the payment term also .
I need to bypass this functionality .

I need that payterm should be remain the same as it was before changing the payer this means that there should be no change in the payment term as the user is continously changing the payer .

The payment term should remain the same as it comes initially with whatever payer fetched initially in the sales order created with reference . On contionusly changing the payer by:- goto --> header --> partner

and changing the payer there . The payterm should not update .

This is what I need as per my requirement .And on manually changing the payment term it should change .

Please suggest some ideas to achieve this functionality .

Regards

Deep

former_member220286
Participant
0 Kudos

Dear Shiva Vasireddy,

Please reply .

Regards

Deep