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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded