cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop generate copa document for return sales order for the same billing type

Former Member
0 Kudos

Hi Friends,

My scenario is business doing return sales (credit memo). Return sales order creation and invoicing for " Products " and also for " Empties " and the billing type is same for both. Here user requirement. When the " Products " are return sales quantity need to update in COPA. When " Empties " are retune sales quantity need not update to COPA.

In above both conditions it is not possible to go with Reset COPA value field (KE4W) because billing type is same for both.

I need to go with functional exit. i am trying to use exit COPA0005 (EXIT_SAPLKEII_001 and EXIT_SAPLKEII_002). This is not working out..

I tested above exit with breakpoint.. it is not stoping after VF01 save. copa document get generating.

Can someone help me here.

Thanks 

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Mrao

did you have success with COPA0005?

I have the same issue.

Kind Regards

Mayumi

Former Member
0 Kudos

Hi Ajay,

I found this exit EXIT_SAPLKEDRCOPA_001. please suggest is this will work. if its work, what logic can I give inside exit.

Thanks

Former Member
0 Kudos

Hi Ajay,

I tried exit COPA0005 (EXIT_SAPLKEII_001) with breakpoint. While running VF01 it is not stopping any ware. ABAPr conforming this is not useful.

Thanks

Former Member
0 Kudos

HI Ajay,

Thanks for reply...

I tested COPA0005 with ABAPr by putting break point. After run VF01.. System it is allowing to post document, it is not stopping any ware. Can you please . could I know what is the SMOD documentation can you please explain.

Thanks

ajaycwa1981
Active Contributor
0 Kudos

Hi Rao

I would prefer a separate Bill Type because you are expecting a different behaviour... Thats the ideal process

You should be able to use the exit COPA0002 or COPA0005.. COPA0002 is used for valuation, to populate the Value Fields with desired Qty

COPA0005 is definitely triggered before any COPA doc is posted

The sample code for both exits can be found in SMOD -> Documentation

Br, Ajay M