cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the Condition on Rental Object

Former Member
0 Kudos

Hi SAP Gurus,

     I wanted to update my rental object condition using BAPI in LSMW, but it won't update becuase of the interval of date

Example.My Condition is Rental that have validity dates from 01/01/2012 and leave the valid to <blank>, means it is until 31/12/9999.

So  when i edit the condition manually, and add additional Rental with a valid from date, it automatically ends the validitly date of the first rental before my new rental commence. But when i do it in LSMW, it won't upload successfully and gives me the error of interval date.

     One more, In LSMW how to use the LSMW change indicator U, because I always use I to add, and i wanted to use the change indicator to update the first condition date but it gives me the error of source condition cannot found.

Please help me on this, SAP Gurus.

Thanks,

Migs

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Miguelito,

the proper way to do it is to have old condition updated with change indicator 'U' (provide the valid to date as 31/12/2011, fill all other important fields with old values too, otherwise it may overwrite information in the old rental condition); at the same time add new rental condition with change indicator 'I' (fill all relevant fields, date from = 01/01/2012 and date to 31/12/9999). I guess there is no easier way to do it in LSWM.

HTH,

BTW, use preferably standard report for "Adjustment of Condition" TC REAJPR for normal business cases if you can,

Siarhei

Former Member
0 Kudos

Hi Guru Siarhei,

i also did that, but it always give me the error of "source condition not found", I just change the indicator to "U" and change the valid to date from the file i uploaded but it always give me the error. Is there any field that need to fill up when using "U".

Many Thanks,

Migs

Former Member
0 Kudos

Hi Miguelito,

yes, you need to fill at least all the key fields in order to identify the condition record to be updated. You can look up in the FM documentation for the condition table, at the end there are 5 fields named. They must be specified so that update runs successfully.

Have a nice day,

Siarhei

former_member342013
Contributor
0 Kudos

hi Miguelito,

Even i'm facing the same issue while updating Condition purpose in condition tab in Real estate contract .

When im trying to load the data , getting error as "Source condition not found" .

can you please tell me wt all fields are mandatory to pass the value ...


Former Member
0 Kudos

Hi,

look for BAPI_RE_CN_CHANGE and table CONDITION.

five key fields are:

CONDITION_TYPE

EXTERNAL_PURPOSE

CALCULATION_OBJECT_TYPE

CALCULATION_OBJECT_ID

VALID_FROM

Regards,

Siarhei

former_member342013
Contributor
0 Kudos

hi Siarhei ,

Thank you very much for reply .

Still i'm facing the same issue . i'm getting error as "Source condition was not found"

im passing below values

E1BP_RE_CONDITION_DATC-CHANGE_INDICATOR = 'U'.

E1BP_RE_CONDITION_DATC-CONDITION_TYPE = 'G200'.

E1BP_RE_CONDITION_DATC-CALCULATION_OBJECT_TYPE = 'IB'.

E1BP_RE_CONDITION_DATC-CALCULATION_OBJECT_ID = 'GB01/10200369/1'.

E1BP_RE_CONDITION_DATC-VALID_FROM = '20070101'.

E1BP_RE_CONDITION_DATC-EXTERNAL_PURPOSE = 'A'.

Can you please help me on this ?

Regards

Smitha

Former Member
0 Kudos

Hi Guru Siarhei,

yeah, same with smitha, i also did it, All the field that i have uploaded using change indicator I is the same as the fields that I've been using in the change indicator U, I just change the the change indicator I from U and the date.. All the Five key fields has been field up, because this is also needed when using change indicator I, but still error in "source condition was not found", is there any BAPI that need to use while using change indicator U?

Thanks for patiently helping us.

Migs

Former Member
0 Kudos

Hi Miguelito,

could you please explain which field are you trying to update in an existing condition?

Siarhei

Former Member
0 Kudos

Hi Ms. Siarhei,

I wanted to update the Valid to date on the condition. In my First step of uploading, in my initial upload, i have this field all filed up.

     COMP_CODE_EXT                             0400

     BUSINESS_ENTITY_NUMBER_EXT     0410

     RENTAL_OBJECT_NUMBER_EXT       4D

     CHANGE_INDICATOR                         I

     CONDITION_TYPE                              Z100

     CALCULATION_OBJECT_ID                 0400/0410/4D

     VALID_FROM                                     20100101

     VALID_TO                                          20141231

     UNIT_PRICE                                       100000

     CALC_RULE                                       A

     EXTERNAL_PURPOSE                       G

Now I wanted to change the date of the "Valid to" to 20121231, and i use the same file with the same field above, I just change the Indicator to "U" and also the "valid to" date from 20141231 to 20121231. and give the error of source condition not found.

Many thanks,

Migs

former_member342013
Contributor
0 Kudos

hi Migs and Siarhei,

I'm also facing the same issue, when i try to change field value for External Purpose field in condition tab...

Regards

Smitha

Former Member
0 Kudos

HI Migs,

are you working with the same object as Smitha - BUS1505? If yes, then please check your field assignment for CALCULATION_OBJECT_TYPE, or any other LSMW mappings. Because I think it should normally work in your case.

Regards, Siarhei

Former Member
0 Kudos

Hi Ms. Siarhei,

     Thanks, I thought it won't need the CALCULATION_OBJECT_TYPE when using change indicator U, because when I use the change indicator I, it didn't require me to put it. Now it's OK. I just need to put the CALCULATION_OBJECT_TYPE whenever i use the change indicator u.

Many Thanks For the Help..:-)

Migs

former_member342013
Contributor
0 Kudos

hi Siarhei / Migs,

Can you both help me now ?

any other way to update External purpose data ?

Regards

Smitha

Former Member
0 Kudos

Hi Smitha,

     I also did try to change the external purpose, but it seems it won't work. There must be some field needed to fill up, because mine is working now, i just need to include the CALCULATION_OBJECT_TYPE in my file. I let you know when i found the solution.

Regards,

Migs

Former Member
0 Kudos

Hi Smitha,

i still believe that the only way to do it is:

1. Make an Update i.e:

E1BP_RE_CONDITION_DATC-CHANGE_INDICATOR = 'U'.

E1BP_RE_CONDITION_DATC-CONDITION_TYPE = 'G200'.

E1BP_RE_CONDITION_DATC-CALCULATION_OBJECT_TYPE = 'IB'.

E1BP_RE_CONDITION_DATC-CALCULATION_OBJECT_ID = 'GB01/10200369/1'.

E1BP_RE_CONDITION_DATC-VALID_FROM = '20070101'.

E1BP_RE_CONDITION_DATC-EXTERNAL_PURPOSE = 'X'. "old value

E1BP_RE_CONDITION_DATC-VALID_TO = '20121231'.

2. Make an Insert:

E1BP_RE_CONDITION_DATC-CHANGE_INDICATOR = 'I'.

E1BP_RE_CONDITION_DATC-CONDITION_TYPE = 'G200'.

E1BP_RE_CONDITION_DATC-CALCULATION_OBJECT_TYPE = 'IB'.

E1BP_RE_CONDITION_DATC-CALCULATION_OBJECT_ID = 'GB01/10200369/1'.

E1BP_RE_CONDITION_DATC-VALID_FROM = '20130101'.

E1BP_RE_CONDITION_DATC-EXTERNAL_PURPOSE = 'A'. "new value

E1BP_RE_CONDITION_DATC-VALID_TO = '99991231'.

Regards,

Siarhei

former_member342013
Contributor
0 Kudos

hi Siarhei,

how it is possible to do both insert and update in one LSMW ?

i don't know how to do that, can you please suggest .

Thank you very much for your quick reply .

Regards

Smitha

Former Member
0 Kudos

Hi Smitha,

yes it's possible. If you have several source structures, than you can make sure that there are two corresponding lines in your source file for the structure of condition - one with U and one with I as Migs did.

There is also another way, if you have only one structure and one line per contract.

You do the mapping normally as for the 'U' case and then you change the rule for the __END_OF_RECORD__ after all the fields of E1BP_RE_CONDITION_DATC (just double click on the line with "Default Settings".

You would basically need to extend here the coding after transfer_record macro so that the same fields you filled up before get their new values for the 'I' case.

The coding will look something like this:

transfer_record.  "  'U' case will be recorded

E1BP_RE_CONDITION_DATC-CHANGE_INDICATOR = 'I'.

E1BP_RE_CONDITION_DATC-VALID_FROM = '20130101'.

E1BP_RE_CONDITION_DATC-EXTERNAL_PURPOSE = 'A'.

E1BP_RE_CONDITION_DATC-VALID_TO = '99991231'.

transfer_record.    " 'I' case will be recorded

HTH,

Siarhei

Former Member
0 Kudos

Hi Smitha,

I think for a simple used in lsmw, i think it's not possible to change the external-purpose as this will be part of the key field of reference.

There is a solution for that, delete the condition that you want to change using the change indicator "D", and add the new condition for upload with the correct external purpose.With this, it will resolve your problem as I already tested this scenario.

Regards,

Migs

Former Member
0 Kudos

Hi Smitha,

I think for a simple used in lsmw, i think it's not possible to change the external-purpose as this will be part of the key field of reference.

There is a solution for that, delete the condition that you want to change using the change indicator "D", and add the new condition for upload with the correct external purpose.With this, it will resolve your problem as I already tested this scenario.

Regards,

Migs

Answers (0)