Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issues in creation of Contract through BAPI

Former Member
0 Kudos

Hi,

I'm working on R/3 4.6C.

I have created a program for Contracts creation using bapi BAPI_CONTRACT_CREATEFROMDATA.

And it worked fine contracts are created but i have 2 issues:

1. Configuration Setting that is Characterstics Values are not getting populated through this BAPI.How can I do this.

2. Also in this BAPI there is no provision or any table for populating the billing details like billing plan start date, billing rule etc. of the contract. So how can I do this is ther any other bapi for this?

Regards,

Divya

5 REPLIES 5

Former Member
0 Kudos

Any take on this................

Former Member
0 Kudos

resolved by myself

0 Kudos

if you answer you're own question it is also nice if you post the answer for future use for sdners who might run into the same question in the future how would you find it if you searched for something and the only answer that came by would be 'resolved by myself'

kind regards

arthur

0 Kudos

Ya sure...Please find the solution below:

In the bapi BAPI_CONTRACT_CREATEFROMDATA:

the structure ORDER_ITEMS_IN has a field "PO_ITM_NO" which can simply be

a sequential number. E.g. first item is 000001, second item is 000002,

etc.

The structure ORDER_CFGS_REF is used to do the mapping with the

Config_ID and the Root ID. Both Config ID and Root ID can be sequential

numbers with the same value for both of them.

E.g. Assume you want to set the config for the item that has PO_ITM_NO =

000002, the record would be:

POSEX: 000002 CONFIG_ID: 000001 ROOT_ID: 00000001

For the next configuration, simply do +1 on config and root ID

The structure ORDER_CFGS_INST creates the instance reference. For that

take the config ID from above, assign the same value to the Instance ID,

set the object type to "MARA" and the object Key is the material code

Lastly comes in the structure ORDER_CFGS_INST which has the details of

the configuration. For that use the same config ID and instance ID has

assigned above, then in field "CHARC" put the characteristic and the

value in the field VALUE. The same combination of config ID / Instance

ID can exist multiple times there is there are multiple characteristics

to be set.

Hope this helps others

Bye

Divya

Former Member
0 Kudos

Hi Divya,

I am doing Migration of Contracts from 4.6C to ECC 6.0. I have fetched contract data from 4.6C via bapi BAPISDORDER_GETDETAILEDLIST and creating contract via bapi BAPI_CONTRACT_CREATEFROMDATA in ECC 6.0. And it is working fine contracts are created but i have 2 issues:(Similar to yours)

1. Configuration Setting that is Characterstics Values are not getting populated through this BAPI.How can this be done.

2. Also in this BAPI there is no provision or any table for populating the billing plan. So how can I do this is

there any other bapi for this?

For the above tables,that you have mentioned in the solution, I have mapped the fields of 4.6C and ECC6.0, But it is not populating the characteristics value.Will the solution mentioned by you work for my case.

Also,can you please paste the code that u have used for more clarity on populating the mentioned tables.

Thanks in Advance.