cancel
Showing results for 
Search instead for 
Did you mean: 

Customer blocking

Former Member
0 Kudos

Hi experts

Our requirement is we want to block the customer automatically if there is no business that means no sales order  for the customer from the last 1 year.Kindly suggest me how this requirement can be achieved??? can it be achieved in standard SAP or we need to go for the development??

Accepted Solutions (1)

Accepted Solutions (1)

gurunathkumar_dadamu
Active Contributor
0 Kudos

Hi Rohan sd,

Go to Include MF02DFEX--> click on spiral button--click show the implicit enhancement-->after the FM you will find one implict enhancement---create the enhancement and do the coding .

after following FM only you will find the place where you have write your logic to block the sales order

In this enhancement write the follwing logic.

*- to check whether sales order is there or not.

data:lv_vbeln type vbak-vbeln.

constant:c_block(1) type c value 'X'.

SELECT SINGLE vbeln   FROM vbak

                    INTO lv_vbeln

                     WHERE    kunnr = kna1-kunnr.

IF sy-subrc = 0.

*- sales order is created

ELSE.

*-sales order is not created,so that block the customer i.e sales order block.

kna1-sperr   = c_block.     " for all company codes.

kna1-aufsd  = pass the order of block.       "order block

kna1-lifsd    = pass the order of block.      "Delivery block.

kna1-faksd  = pass the order of block.      "billing block.

kna1-cassd = c_block.                            " all sales area

ENDIF.

if helpful award me,let me know any needful help.

Note:customer blocking we will check in XD05 tcode.

Regards,

Gurunath Kumar D

Former Member
0 Kudos

Thanks for the answer Gurunath

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos

Please search the forum before posting.  Check these threads

G. Lakshmipathi