cancel
Showing results for 
Search instead for 
Did you mean: 

PA segment update during sales order creation

dhanani_sanjayshamji
Participant
0 Kudos

Hello Experts,

We have requirement where contract number to be updated in PA segment at line item level when sales order is created.

Initially Contract is created via VA43 in system. later, Sales order is created and contract number is manually assigned at header level.

Since contract number is assigned at header level, this is not updated directly in sales order at item level in PA segment.

Business required these contract number should be updated automatically at line item level in Sales order.

Operating concern is active and contract number is attached to it as characteristics.

we tried updating it via KEDR table lookup but it works only when sales order number is available in VBAK table.

can someone guide as to how we can achieve this solution?.

is there any enhancement point which can help in COPA or SD level?

Best Regards

Sanjay D

Accepted Solutions (0)

Answers (2)

Answers (2)

ajaycwa1981
Active Contributor
0 Kudos

Hi Sanjay

Which Table holds the link between Contract and Sales Order? you can try Table LOOKUP based on that Table

You can also try by maintaining Entry in Table TKEZU from SM30

Last Option is user exit COPA0001

Rgds

Ajay M

dhanani_sanjayshamji
Participant
0 Kudos

Hi Ajay,

Thanks for reply. Table VBAK holds contract number in reference document field but that is once sales order is created and saved. I tried table lookup on this but since sales order number is not available during order creation, it does not trf to PA segment.

Can you help me to understand what we call in user exit that allows to push to PA segment during sales order creation mode.

I understand there are three components in exit COPA0001 but not sure which component and what code we write there to push to PA segment.

also, I see other characteristics (product, sale div etc) are update in PA segment under account assignment tab but not sure how that auto derived by system.

Best Regard

Sanjay D

ajaycwa1981
Active Contributor
0 Kudos

Hi Sanjay

1. You can redetermine PSG using steps in note 70231 (OKC9)

2. You can schedule the report ZZEROBJ from note 79847 to run every minute. This note updates the PSG in Sales Order

Ajay M

dhanani_sanjayshamji
Participant
0 Kudos

Hi Ajay,

SAP note 70231 details for re-determination PSG at billing document.

We have third party scenario where PR and PO auto generated when sales order is created. since sales order level Contract number is not populated in PSG, in PR and PO also it's not carried and there by in IR.

would point # 2 SAP note help to achieve our requirement?.

Please advice.

Thanks and Regards

Sanjay.

ajaycwa1981
Active Contributor
0 Kudos

Hi Sanjay

I think it should help

Ajay M

sanilbhandari
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

Are you using Account based COPA? If yes, you might look at COPA001 enhancement to populate the same when the sales order is created. Use KEDR to update the same using COPA001 enhancement

Regards

Sanil Bhandari

dhanani_sanjayshamji
Participant
0 Kudos

Hi Sanil,

Thanks for reply. We use Costing + account based COPA. Can you please elobarate in details like what we call in enhancement to push to Contract number characteristic.

FYI, I tried table lookup in KEDR but since sales order number is not available in VBAK during order creation. it fails to update contract number (stored in VBAK -VGBELN).

Regards

Sanjay D

ajaycwa1981
Active Contributor
0 Kudos

Simple Solution would be to re-determine PSG during Billing, because by then the Sales Order no is there

You can re-determine the PSG using CO substitution in OKC9..(User Exit)

Regards

Ajay M