cancel
Showing results for 
Search instead for 
Did you mean: 

One time customer only for quotes

Former Member
0 Kudos

Dear All,


We have a requirement to setup the ONE CUSTOMER which should be only used within the quotes.

When we refer the same quote to create a sales order, it should prompt to create a new customer (standard-0001) and it should not allow to use the ONE TIME customer in sales orders. Is there a way we can acheive this standard behaviour?

If it requires customization, would you please advice how best we can acheive this functionality ?

Thanks!

Regards,

Ram

Accepted Solutions (1)

Accepted Solutions (1)

jignesh_mehta3
Active Contributor
0 Kudos

Hello,

The SAP Standard solution for this is to assign Routine 002 - Header-diff.customer in Header COpy Controls of Quotation to Sales Order. (T-Code VTAA). This will allow you to Copy the Quotation into Sales order & enter difference Customer Code.

Now coming to your specific requirements - If you require controls like say Quotation should allow only specific Customer code & system should give a pop-up to change Customer code while Creating Sales order, then you will have to apply ABAP Code in Program - MV45AFZZ in User Exit -

  USEREXIT_FIELD_MODIFICATION or USEREXIT_MOVE_FIELD_TO_VBAK.

Hope this helps,

Thanks,

Jignesh Mehta

Answers (1)

Answers (1)

Jelena
Active Contributor
0 Kudos

What Jignesh said except we had to use USEREXIT_SAVE_DOCUMENT_PREPARE to add an error message, so that the users could not save a sales order with one time customer. The other user exits were triggered too early for our requirements.

We used special account type for one time customers. Here is the actual code for the message: 

DATA: LV_KTOKD TYPE KTOKD.


IF VBAK-VBTYP <> 'B'.

  SELECT SINGLE KTOKD INTO LV_KTOKD

  FROM KNA1 WHERE KUNNR = VBAK-KUNNR.

  IF LV_KTOKD = 'CPD'.

    MESSAGE <...>
  ENDIF.

ENDIF.

Former Member
0 Kudos

Thank you so much for the answers from Jignesh and Jelena..

I will try the below and let you know .

Thanks!

Best Regards,

Ram