Skip to Content
author's profile photo Former Member
Former Member

Copy pspnr field of PA in contract to Sales order

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.


image 3.jpg (162.1 kB)
image 2.jpg (98.4 kB)
image 1.jpg (192.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 20, 2015 at 11:55 AM


    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.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2015 at 09:07 AM


    Did you explore the userexit USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ?


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.