cancel
Showing results for 
Search instead for 
Did you mean: 

Availability in different SO (include and exclude Quality stock)

s_nevskaya
Explorer
0 Kudos

Storage location

Material number

QTY

Stock type

Sales Order

Availability

Group

Checking rule

1000

0002

5

Free

ZLF0 – standard

02

A - SD order

1

Quality

ZLF1 – scrap order

Delivery create automatically

02

B - SD delivery

For Checking rule “B”  - checkbox quality inspection stock enabled.

Order type ZLF1 created for scrapping damaged goods - utilization goods (in system it is stock type Q).

Is it possible in order (ZLF1) to use availability check only Quality stock?

I know problem can be fixed several ways:

  • different storage locations 
  • change program for uploading SO from client. 

but it is not a good way for us.

Accepted Solutions (1)

Accepted Solutions (1)

former_member223981
Active Contributor
0 Kudos

This is not possible.

In the standard system, unrestricted stock will always be automatically included in the availability check.

s_nevskaya
Explorer
0 Kudos

> Noel ConnollyThank you for your assistance.

former_member223981
Active Contributor
0 Kudos

One possibility could be to apply a modification here:

SAPLATP2 FUNCTION STOCK_RECEIPT_ISSUE_READ

* read database / buffer

* read stock

  PERFORM stock_read.

Form stock_read reads the unrestricted stock. So perhaps you could apply your own custom code just after this form with the following logic.

IF Order type  = ZLF1   (Order Type can be obtained from SAP Memory)

g_atpkxs-MNG01 = 0    <<<<<<< Set unrestricted stock to 0, overwriting the value set in form STOCK_READ

ENDIF.

You would have to discuss the exact correct syntax of the modification with your ABAPers. But along the lines of the above modification could be an option for you. Be aware though that modifications to the ATP functionality often lead to undesired results so you need to ensure that any such modification is tested throughly. Also, remember that the ATP functionality is used across many components areas (SD, PP, LE) so a change to the above code would have an impact on these areas as well.

Answers (0)