cancel
Showing results for 
Search instead for 
Did you mean: 

How to Restrict the sales order when inquiry is blocked ?

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Experts,

How to Restrict the sales order when Inquiry is blocked.Is there any badi or enhancement spots for that ?

if there is any please let me know ....

If that inquiry is blocked then it will not allow for creating of sales order....instead of that it should display an error message with

'This is blocked at Inquiry Level....'

Thanks ,

vamsi.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182915
Active Contributor
0 Kudos

HI,

USEREXIT_MOVE_FIELD_TO_VBAK

or

User_Exit_Save_Document



IN USEREXIT_MOVE_FIELD_TO_VBAK


SELECT VBELN  LIFSK FROM VBAK WHERE VBELN = vbak-vgbel

                                                                    and VBTYP =  'A' . "A for inquiry


HERE LIFSK IS Delivery block (document header).

IF U GET LIFSK IS BLOCK

   IF sy-subrc = 0.

    MESSAGE 'Reference Document IS Blocked...' Display LIKE 'E'.

    leave to TRANSACTION sy-TCODE.

   ENDIF.

Former Member
0 Kudos

Hi Swadhin.

why do you want to select the data from database when you are getting all the values inside the form routine USEREXIT_MOVE_FIELD_TO_VBAK.

Former Member
0 Kudos

Hi,

Try with MV45AFZZ routine USEREXIT_MOVE_FIELD_TO_VBAK.

check VBAK-VGTYP = 'A'.

get the Inquiry no VBAK-VGBEL.

check CVBAK-VBELN = VBAK-VGBEL and CVBAK-FAKSK is not initial.

CVBAK-FAKSK will have the billing blocks for your inquiry.

if you need to check other block find the respective field and give appropriate message.

Lakshmipathi
Active Contributor
0 Kudos

Standard process is Inquiry > Quotation > Sale Order and this being the case, I am not sure, why you were trying to block sale order from Inquiry; instead of quotation ?   Nevertheless, you have to try with MV45AFZZ

G. Lakshmipathi

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Sir ,

Thanks for quick reply ..

As per the client requirement we are not using Quotation ...instead of that directly Inquiry--->Sale Order....

Moreover ,

  We are using strategy 89 . whenever sale order is created automatically planned order will be generated .i need to Restrict Planned order when customer credit limit exceeds in sale order..

please give me the solution for this kind of scenario....

Thanks,

vamsi.

former_member223981
Active Contributor
0 Kudos

What field are you setting a block on in the inquiry?

0 Kudos

hi,

User Exit - User_Exit_Save_Document may help you .