cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase Contract creation in SRM

Former Member
0 Kudos

Hi everybody,

I have a requirement. I need to create purchase contracts in SRM. Data is comming as a file from Oracle server. I tried searching for a BAPI to create contract, not able to find it out. Tring to use eCATT for this. Transaction BBP_CTR_MAIN is giving error in the recording of eCATT.

Pleae advice we how can I create the contracts in background from flat file.

Thanks in advance.

Mahitha

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Jagdesh

Thanks for your reply.

But I am using SRM 4.0 and the report you specified not present in my version. Can you suggest any alternate way to do my job.

Thankd in Advance.

Mahitha

Former Member
0 Kudos

Mahita,

Not sure whether you were able to resolve this issue.

We are also working on SRM 4.0 and we had a requirement to create Mass contracts using a flat file.

We achived this using Function module BBP_PD_CTR_CREATE.

Regards,

Upendra.

0 Kudos

Hi all experts,

I was unsuccessful like some of the users here in trying to create a contract at the backend. I have tried using "BBP_PD_CTR_CREATE" but i alway get 2 error message: create exactly one vendor and create exactly one employee. What could be wrong with the codes??

data: pc_id like CRMD_ORDERADM_H-OBJECT_ID.

data: pc_header_out like BBP_PDS_CTR_HEADER_IC.

data: pc_header_in like BBP_PDS_CTR_HEADER_D.

*data: pc_item type table of BBP_PDS_CTR_ITEM_D with header line.

data: pc_item type table of BBP_PDS_CTR_ITEM_ICU with header line.

data: pc_text type table of BBP_PDS_LONGTEXT.

data: pc_partner type table of BBP_PDS_PARTNER.

data: wa_part like line of pc_partner.

data: pc_org type table of BBP_PDS_ORG with header line.

data: pc_message type table of BBP_PDS_MESSAGES with header line.

Insert dummy data*****************************************************

pc_header_out-CURRENCY = 'SGD'.

pc_header_out-PROCESS_TYPE = 'PCTR'.

  • Insert Purchase Org data *********************************************

pc_org-PROC_ORG_RESP_ID = 'O 50000026'.

pc_org-PROC_ORG_ID = 'O 50000025'.

pc_org-PROC_GROUP_ID = 'O 50000026'.

  • Insert BP data - vendor, employee Purch Org and DSTA******************

*DSTA

wa_part-PARTNER_ID = '0000000001'.

wa_part-PARTNER_GUID = '4BD22A16AFA2B74D844E1595998AE7E5'.

wa_part-PARTNER_FCT = '00000038'.

wa_part-ADDR_TYPE = '1'.

wa_part-ADDR_NO = '0000010469'.

append wa_part to pc_partner.

clear wa_part.

*employee

wa_part-PARTNER_ID = '0000000006'.

wa_part-PARTNER_GUID = 'E3D4AAE842930D41B7B107F3CC60B44D'.

wa_part-PARTNER_FCT = '00000026'.

wa_part-ADDR_TYPE = '3'.

wa_part-ADDR_NO = '0000010472'.

wa_part-PERS_NO = '0000010474'.

append wa_part to pc_partner.

clear wa_part.

*vendor

wa_part-PARTNER_ID = '0000000311'.

wa_part-PARTNER_GUID = 'F0BC646129BE2D4BB7E301F8F3708B1E'.

wa_part-PARTNER_FCT = '00000019'.

wa_part-ADDR_TYPE = '1'.

append wa_part to pc_partner.

clear wa_part.

*purch org

wa_part-PARTNER_ID = '0000000002'.

wa_part-PARTNER_GUID = '48459C575651D04091BAF1B9A554CF51'.

wa_part-PARTNER_FCT = '00000051'.

wa_part-ADDR_TYPE = '1'.

wa_part-ADDR_NO = '0000010470'.

append wa_part to pc_partner.

clear wa_part.

  • Item data

pc_item-CATEGORY_ID = 'ARMOUR'.

pc_item-QUANTITY = '233'.

pc_item-PRICE = '1234'.

pc_item-VALUE = '4321'.

pc_item-UNIT = 'EA'.

pc_item-PRODUCT = 'B78A60018B6018418F6D0F1632E10F69'.

pc_item-DESCRIPTION = 'Russian T72 Tanks'.

*--Reset Buffer Tables

CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.

Create PC*************************************************************

call function 'BBP_PD_CTR_CREATE'

exporting

I_HEADER = pc_header_out

importing

E_HEADER = pc_header_in

tables

I_ITEM = pc_item

E_PARTNER = pc_partner

I_ORGDATA = pc_org

I_LONGTEXT = pc_text

E_MESSAGES = pc_message.

write: pc_header_in-guid.

the guid will be all 0s due to the error..... Thanks for taking time to read this. I will really appreciate if anyone is able to help me solve this. Of course point will be rewarded. Thanks again!

Former Member
0 Kudos

Hi Jagdesh

I am using SRM 4.0. I am working on conversion to create purchase contracts in SRM. I will get a flat file from Oracle server which i need to take and create purchase contracts. For this I searched IDOC and BAPI but no suitable one found. I need an approach to create purchase contracts from the data in flat file.

any help in this higly appreciated.

Thanks in advance

Mahitha.

Former Member
0 Kudos

Mahitha

I dont think it is possible to upload contracts directly from Oracle to SRM 4.0.

But there is a report BBP_CTR_INIT_UPLOAD in SRM 5.0 version which is used to upload contracts from SAP backend system(ERP) to SRM.

Regards

Jagadish

Former Member
0 Kudos

Mahitha

Can you please tell us what version of SRM you have and What scenario you are working with.

Regards

Jagadish