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: 

BAPI_CONTRACT_CREATEFROMDATA contract Va41

Former Member
0 Kudos

Hi,

I am using BAPI BAPI_CONTRACT_CREATEFROMDATA to create contract . It is working fine.


Since I have created a contract but i could not able to add a line item for the already created contract or existing contract .


I tried passing the created contract as reference no but still it is giving me error as "ENTER THE DOCUMENT TYPE" .

What is the way to change the existing contract.?

Regards,

Vijay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Pass all the values again in the same parameters and pass the Document no in SALESDOCUMENTIN, where in updateflag should be 'U'.

Also You can try BAPI BAPI_CUSTOMERCONTRACT_CHANGE.

Hope this helps.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Pass all the values again in the same parameters and pass the Document no in SALESDOCUMENTIN, where in updateflag should be 'U'.

Also You can try BAPI BAPI_CUSTOMERCONTRACT_CHANGE.

Hope this helps.

0 Kudos

HI Gaurav,

I tried with update flag but it did not work .

0 Kudos


What values did you pass in updateflag,

It should be U for sales document header and in ITEM since you are trying to add lines update flag should be I.

Go to the FM documentation for more clarity.

Hope this helps.

0 Kudos

HI Gaurav,

This Bapi is working fine when I try to insert the item values for the created contract .

In return parameter i am getting success message like contract saved .

But BAPI transaction Commit is not giving me dump.

When an Open SQL array insert is performed, trying to insert a record

into the database causes the function to terminate if a record with the

same key already exists.

The database table was "VBPA" item values are not saved in VBPA .

SO i could not able to save.