cancel
Showing results for 
Search instead for 
Did you mean: 

how to copy transaction no. into follow-up transaction document

Former Member
0 Kudos

Hello experts,

I have a Sales Order which is created as a follow-up from a Contract.

I need to copy the Contract no. (field OBJECT_ID) into the Sales Order.

I have the following questions regarding this.

(a) Is the field "Ext. Reference" (PO_NUMBER_SOLD) most appropriate field in the Sales Order to copy the Contract Transaction no.?

If answer is 'no', which is the most appropriate field in Sales Order where the Contract transaction no. should be copied as a best practice.

(b) How this copying can be achieved - Is a copying routine required?

I understand that by using spro path "copying control of business transactions"

"source transaction type -> target transaction type", there is a field "Copy PO data".

If I keep this box checked, will the external reference no. of preceding transaction (contract) get copied into target transaction (sales order) ?

I am using CRM 7.0 version

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Animesh,

If you are creating a follow up sales order from contract, then maintain the copying control settings.

SPRO - CRM - Transactions - Basic Settings - Copying Control for Business Transactions.

Under this, you will have to maintain settings for the first three nodes. One for tx. type. and one for item category and the third one for determination of item category. Once this is done, and if you try to create a follow up sales order from contract, the contract number will appear under assignment block, 'Transaction Histroy' in Sales Order.

Now if you create a sales order and then want to assign a contract number to it, then this can be acheived using Object reference. You will have to create a object reference profile, SPRO - CRM - Transactions - Basic Settings - Define Object Reference Profile. Assign this object ref. profile to your sales order tx. type. U will get an AB in sales order in which you can mention your contract number.

Let me know in case you have further doubts.

Cheers,

MG

Former Member
0 Kudos

Hi Mangesh,

Thanks for your helpful answer.

We already have the preceding document no. in the "Transaction History" AB.

But we are actually replicating the sales order to R3 and we need the preceding document no. (contract no.) in a particular field in R3 sales order.

The problem is that the mapping in our design is such that the GUI field "External Reference  (PO_NUMBER_SOLD)" of Sales Order is mapped to this particular field in R3.

The preceding document no. is not available in "External Reference" field of GUI and hence this is not replicated to R3.

So, I asked this above question as to how to have this preceding document no. populated in "External Refernce" field.

Former Member
0 Kudos

Hi,

You can create an implementation of ORDER_SAVE badi. With the method, check_before_Save, call the FM CRM_ORDER_READ to read the docflow table to read the preceding service contract id and then call FM CRM_ORDER_MAINTAIN to update it in PO_SOLD_NUMBER in IT_SALES table.

Hope this helps!!!

Prerna

Former Member
0 Kudos

Hi,

The mapping in your design is correct. Usually Ext Reference field is filled with precedding transaction number. To acheive this you can do an implementation of CRM COPY BAdi ...

In this BADI , you can map ur precedding transaction number to Ext Reference of the new document.

For reference , you can check out the default implementation of the BADI

CL_DEF_IM_CRM_COPY_BADI

Hope it helps

Regards

Vishal

Answers (0)