cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_RE_RO_CHANGE and condition valid_from

Former Member
0 Kudos

Hello experts,

I am stucking again. I want to change the validfrom-field of the conditions on a rental object. I am using BAPI_RE_RO_CHANGE and therefore, in the conditition table i an updating the valid_from-field with my new value.

But - this new valid date ain't approaching on table VICDCOND, neither it does on the condition tab of the rental object. Where's my mistake?

Regards

Markus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Markus,

Please check the following details to be used for updating RO values.

Change Indicator - 'I' to insert or 'U' to update

Condition_Type

Calculation_object_type- 'IM'

Calculation_Object_ID

Valid_From

You also need to execute BAPI_TRANSACTION_COMMIT after executing the above BAPI.

Regards,

Sid

Former Member
0 Kudos

Hi,

I am sorry for my late answer. Bad news: everything checked - everything was set as recommended.

Until now, in my tests I was only trying to update existing conditions. Therefore I used MOVE-CORRESPONDING for condition-type, calculation_object_type and calculation_object_id.

Unfortunately I do not have access to our development instance for the next couple of days, 'cause of processing ERP updates. So I am not able to try some code snippets.

Regards

Markus

former_member230443
Participant
0 Kudos

Hi Markus,

You are trying to change the valid from date which is one of the key fields. Therefore this field cannot be changed by API directly. You can change it from UI though and the way it works there is that the UI encapsulates the logic of deleting the existing record and inserting a new record with the new valid from date. You may probably need to do a similar thing add a record with deletion indicator for the old valid from date and do an insert of the same record with changed valid from date. This should solve your problem.

Regards,

Vimal

Former Member
0 Kudos

Hi Vimal,

you suggest to delete the existing condition (change-indicator 'D') and insert the condition with the new values (change-indicator 'I')? Sounds reasonable to me. I will try this when I get my system back

Regards

Markus

former_member230443
Participant
0 Kudos

Hi Markus,

Please make sure you pass the old (you may say current) valid from date while passing the 'D' indicator otherwise the record will not be found as the valid from is part of the key.

Regards,

Vimal

Former Member
0 Kudos

Thanks for the hint!

Former Member
0 Kudos

Hi,

your way helped me finally updating conditions. Thanks alot.

Regards,

Markus

Answers (1)

Answers (1)

Former Member
0 Kudos

I just figured out that unit_price of the conditions also remains untouched.

Former Member
0 Kudos

Hi Markus

Currently we are using conditions in Contracts and same conditions we are using for posting.

But can u throw some light on for what purpose u r using conditions in rental objects.

Regards

shantanu

Former Member
0 Kudos

Hi,

these are sonme kind of basic conditions for a rental object, like building costs, fixed costs for renters and so on. Those values need to be displayed on RE80 correctly as well als they are used for our webinterface tool.

Regards

Markus