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: 

Updating start date and end date at header level for a contract

Former Member
0 Kudos
1,275

As per the requirement I have to create a contract and assign the start date and end date to the contract.

I am using BAPI_CONTRACT_CREATEFROMDATA for creating a contract. I am assigning value for start date and end date for header data of contract in fields

-CT_VALID_F and CT_VALID_T of CONTRACT_HEADER_IN import parameter and also setting the corresponding indicator in CONTRACT_HEADER_INX parameter.

The BAPI executes successfully and does not return any error but when I check the start date and end date for contract in va43 the values are not assigned.

I also want to update the start date and end date for contract in other case for which I am using BAPI_CUSTOMERCONTRACT_CHANGE and passing date values to the same fields as those create but it give me an error while executing. The error is as follows:

Field 'GUEEN' cannot be changed, VBAKKOM 2000000162 ready for input.

Can anyone suggest what can be done for update the date values?

Thanks in advance.

Komal

6 REPLIES 6

Former Member
0 Kudos
348

Hi Komal,

The fields for the validity period in the header are:

data:

zlv_header TYPE BAPIMEOUTHEADER.

zlv_header-vper_start = <start date>

zlv_header-vper_end = <end date>

Regards,

John.

0 Kudos
348

Thanks for the reply

But there are no such fields in bapi.

I am using 'BAPI_CONTRACT_CREATEFROMDATA ' and 'BAPI_CUSTOMERCONTRACT_CHANGE'

0 Kudos
348

Could be a release issue. On what SAP release are you on?

Regards,

John.

0 Kudos
348

we are using ECC 6.0

0 Kudos
348

So are we... The BAPI BAPI_CONTRACT_CREATE has the following importing parameters:

HEADER TYPE BAPIMEOUTHEADER

HEADERX TYPE BAPIMEOUTHEADERX

VENDOR_ADDRESS TYPE BAPIMEOUTADDRVENDOR

TESTRUN TYPE BAPIFLAG-BAPIFLAG

TECHNICAL_DATA TYPE BAPIMEOUTTECH

Change the HEADER and HEADERX parameters as I have indicated in my first post.

Regards,

John.

Former Member
0 Kudos
348

Hi,

are you using BAPI on stand alone system

If yes it wont show an output in system

and if not run BAPI_Transaction_commit to c the results

Edited by: Prajakta Shringarpure on Jun 18, 2008 7:33 PM