cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Header Data in BAPI_CONTRACT_CREATE from BODS

Former Member
0 Kudos

Hi all,

I am new to BODS.

I am trying to create contract using BAPI_Contract_Create from BO-Data Services XI 3.2 to ECC 6.0.

In the New Function Call, while defining the "Input Parameters" for Header (and HeaderX), I can only select single column. Actually I should be able to pass multiple values for header data. For example fields like company code, document type, vendor etc. are mandatory entries.

Please let me know how to pass multiple values in the header data provided as varchar (10) in BODS.

Thanks,

Pradeep Kumar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Could you elaborate where you get stuck?

I would start by creating a table with all the contract fields that you want to load. Then you create a query that has this table as a source, and create a function call to 'BAPI_CONTRACT_CREATE' in the target column. When I look at that in BODS 3.2, I see the individual fields e.g. NUMBER as varchar(10), COMP_CODE as varchar(4). By mapping the columns from that source table to the input parameters of you function, you should be able to create the contracts. The SAP supplement for BODS also comes with additional documentation.

Alternatively, you might want to look at the Best Practices for Data Migration. This is a package that contains jobs that allow loading objects like Contracts to ECC. SAP Note 1613550 has more information on that and a lot of documentation. These jobs use an IDoc load instead of a BAPI call and work well with minor modifications for the respective environment.

Former Member
0 Kudos

Thanks for the reply.

Following are the steps that I have performed:

1) I have created tables with required contract data.

2) Then data flow is created with contract table as input to the query.

3) In the query, I have added the new function call and selected BAPI_CONTRACT_CREATE as function name.

4) I am stuck at the next screen "Define Input Parameter(s)": I don't see any individual fields like company code, doc tyep etc. I just see single field as "Header".

5) To check the field details under "Header", I used the path SAP_Repo->Functions-> BAPI_CONTRACT_CREATE. On the schema screen under Input Parameters, 'Header' has type varchar (10) whereas 'Item' is a table with various columns.

Please let me know how to pass data in 'Input Parameters' for header contract data.

Regards,

Pradeep Kumar

Former Member
0 Kudos

The behavior you describe seems to me like you are not doing anything wrong. Instead, it seems like the BAPI is not correctly imported.

If I look at my import parameters for BAPI_CONTRACT_CREATE, I see

AL_LANGUAGE

:HEADER:NUMBER

:HEADER:COMP_CODE

:HEADER:DOC_TYPE

etc.

Please try to Reimport the BAPI - Right-click on SAP_REPO->Functions->BAPI_Contract_Create and select Reimport from the context menu. If that does not change anything, maybe try the same thing in a fresh repository or ask a colleague to do the same if possible.