Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy pspnr field of PA in contract to Sales order

Former Member
0 Kudos

hello experts,

This is a SD-ABAP Issue,

I have a problem in which I am totally stuck,

my client wants the field WBS which is filled in a pop  up under profit segment button in account assignment tab of contract to be copied into the sales order at time of creation.

This filed is related to Profitability Analysis and I know that i should handle it by writing a custom routine in copy control. The problem is after several times of debugging I have found the table in which data is stored PROGRAM: SAPLKEAK TABLE GT_CRITERIA but i don't know how to copy it from contract data when creating with reference to it in transaction va01.

I have found the userxits for COPA but all of them are activated only if you push the button for entering profit segment data in sales order. but what I want is to copy it straightly from contract and not maintain it in sales order.

Please help me come up with a solution.

thanks,

4 REPLIES 4

moazzam_ali
Active Contributor
0 Kudos

Hi

Have you looked in table S260? You need to find the table where system saves WBS with contract number. When you get this reference, you can write code in routine easily.

In table S260 there is sale order/contract number and document type reference w.r.t WBS.

Also check in  S260BIW1,  S260BIW2.

Thank$

0 Kudos

Hi MoazzaM,

Thank you for your reply, but I am afraid the mentioned table is not what  I am looking for. I have to modify CE4XXXX_ACCT and CE4XXXX tables, but I have no idea how the records in these two tables generated per document and per item.

Regards,

Mozhan

0 Kudos

Hi

Have you checked the tables I mentioned in my earlier post? Is there any data in those tables sales document and line item wise?

Thank$

Former Member
0 Kudos

Hi,

Did you explore the userexit USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ?

R