Skip to Content
0

Va01 when payer is changed do not change pay term

Apr 13, 2017 at 12:32 PM

387

avatar image

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 .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Jelena Perfiljeva
May 01, 2017 at 05:03 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Siva Prasad Vasireddy Apr 14, 2017 at 09:58 AM
0

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0

Dear Shiva Vasireddy,

Please reply .

Regards

Deep

0
avatar image
Former Member Apr 18, 2017 at 11:09 AM
0

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded

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

0
Former Member
Deep Bisht

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

0

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

payment-term.jpg (669.4 kB)
0

Dear All Gurus,

Please help .

Regards

Deep

0