Skip to Content

SRM SQL Query to get Contract Number for a Purchase Order

I need to write a SQL query to be able to extract the Contract Number for a Purchase Order number. I know the main tables are BBP_PD*, CRMD_ORDERADM_H & I, but I am unable to get a query working.

Any help appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2016 at 02:28 PM

    Hi,

    Contract number is maintained via the item details so it would be:

    CRMD_ORDERADM_H-OBJECT_ID -> get GUID

    With CRMD_ORDERADM_H-GUID as CRMD-ORDERADM_I-HEADER get GUID

    With CRMD_ORDERADM_I-GUID as BBP_PDIGP-GUID get CTR_HDR_NUMBER.

    A very useful transaction is BBP_PD in SRM it will give you all the involved tables for the document you want

    Regards,

    Robin

    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.