on 07-27-2012 2:42 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
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
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
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
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
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
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.