cancel
Showing results for 
Search instead for 
Did you mean: 

How to exclude a document subset from ATP scope of check...

Former Member
0 Kudos

Hi All,

I hope you can help me with this issue.

The deployment team at my client site uses STRs as a reference document for STO creation from DC1 to DC2. It is not used for the ATP check. This is a process I cannot change.

I would like to use STRs as a real document to ATP against between a storage warehouse and DC1. These STRs need to be visible as real receipt elements at DC1. The deployment teams STRs should not be visible.

Is it possible to exclude a subset of STRs from visibility in the scope of check.

I have two thoughts:

1. Create the STR with a different ATPCat.

This does not seem likely as you cannot assign an R/3 doc to a non-SAP ATPCat.

2. Remove the subset of STRs in a user exit before or after the check.

3. Create the req in R/3 for the deployment STRs but do not create the req in APO.

They must generate a requirement, but this req can be read from R/3 and not APO.

Is it possible to exclude the deployment STRs in the CIF as they get created.

Any thoughts would be appreciated.

-JIM.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

The best way I found to attack this was to exclude non-relevant documents from going over to APO. The non-relevant STRs are not necessary for ATP or for planning. They are simply informational.

I created a new document type 'ZB' for the ATP relevant STRs.

User Exit EXIT_SAPLMEAP_001 is called during STR save and just before the document is carried over to APO in the CIF.

In this user exit, we applied the following code to exclude any STR other than a ZB from passing through the CIF. It's a bit of a crude solution, but relevant for the current situation. When the non-ZB STRs become relevant for planning and ATP, we will remove this code.

I am still curious to hear alternate solutions.

Regards, -JIM.

types: begin of t_banfn,

banfn type banfn,

end of t_banfn.

data: l_banfn type banfn,

wt_banfn type table of t_banfn,

wa_banfn like line of wt_banfn.

loop at it_output.

select banfn

into l_banfn

from eban up to 1 rows

where BANFN = IT_OUTPUT-DOC and

BNFPO = IT_OUTPUT-ITEM and

BSART <> 'ZB'.

endselect.

if sy-subrc = 0.

move l_banfn to wa_banfn.

collect wa_banfn into wt_banfn.

endif.

endloop.

loop at wt_banfn into wa_banfn.

delete it_outputx where doc = wa_banfn.

delete it_output where doc = wa_banfn.

endloop.