Skip to Content
0

SRM SQL Query to get Contract Number for a Purchase Order

Dec 09, 2016 at 07:17 AM

78

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Dec 12, 2016 at 02:28 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded