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: 

Net price not updating thorugh BAPI_Contract_create

former_member672218
Participant
0 Kudos
1,697

Hi,

I am trying to create a contract(ME31K) through BAPI_CONTRACT_CREATE. I have filled in all the details and have filled the field NET_PRICE in the TABLES structure 'ITEM' and have filled in the correspodning field as "X' but still i get an error message "Enter Net Price". Can someone help?

Thanks,

Venkat

1 ACCEPTED SOLUTION

Former Member
0 Kudos
357

Hi

Even u need to pass the value in strcuture ACCOUNT & ACCOUNTX.

Regards,

Raghu.

6 REPLIES 6

Former Member
0 Kudos
358

Hi

Even u need to pass the value in strcuture ACCOUNT & ACCOUNTX.

Regards,

Raghu.

0 Kudos
357

hi,

i have tried the same as well.still the same error

0 Kudos
357

Hi,

Please refer to the function module documentation and also the sample code given over there.

It explains how the values are set and the conditions to be set.

Regards

Keerthi

Former Member
0 Kudos
357

HI,

For creation you may try

giving header tableX - updateflag = 'I".

and account X - update flag = 'I' " i for india

before calling for create you can check document to be posted by any bapi available for check

then call bapi for create

then

use bapi transaction commit with wait ='X'.

former_member182040
Active Contributor
0 Kudos
357

you can use BAPI_CONTRACT_CREATEFROMDATA



* Create Contract Order Number [BAPI_CONTRACT_CREATEFROMDATA]


  CALL FUNCTION 'BAPI_CONTRACT_CREATEFROMDATA'
       EXPORTING
         contract_header_in      = header
         convert                 = 'X'
       IMPORTING
         salesdocument           = v_order
       TABLES
         return                  = t_return
         contract_items_in       = itab_item
         contract_items_inx      = itemx
         contract_partners       = t_partners
         contract_conditions_in  = t_conds
         contract_conditions_inx = t_condsx
         contract_data_in        = t_contract
         contract_text           = t_texts.


0 Kudos
357

Thanks. The main reason was that the Currency field in the Header strucutre was not filled. On filling the same, the error gets disappeared and it reappears if is removed. I never thought that could be the reason. Many thnaks for all your help.