IP - Characteristic Relationship with exit class URGENT

Hi experts,
I need to derive two infoobjects from other one. I know that I have to use a exit class and there implement the ABAP code for especify the derivation.
I have copied the exit class CL_RSPLS_CR_EXIT_BASE. I suppose that the code of the derivation has to be implemented in the IF_RSPLS_CR_METHODS~DERIVE method. But, does anybody know the structure witch contain the source and target fields where is/are defined?
Thanks in advanced.

Hi,
set a break-point in the factory method get_instance to check whether the class is called. In the planning modeler make sure that you  use an external break-point.
Or use rsrt an change a cell value: Derivation is called in the delta buffer to derive from the fields contained in the aggregation level. So check also that the source fields are contained in the aggregation level or can be derived via a a chain of derivations.
Also make sure that all source fields have to be non-initial. The system will not call derivation for initial source fields since in this case there is not unique target, cf. http://help.sap.com/saphelp_nw70/helpdata/en/43/1c3d0f31b70701e10000000a422035/frameset.htm
Remark: The attached document of note 994853 is about the disaggregation feature but it also contains a section about the characteristic relationships. Observe also that the template exit classes are documented in SE24.
Regards,
Gregor

Similar Messages

  • Characteristic relationship with Exit class is not applied correctly

    We are using a characteristic relationship (with derivation) type Exit class. For that we have created class ZCL_RSPLS_ARTICLE_FROM_PLMOD as a copy of the standard class CL_RSPLS_CR_EXIT_BASE.
    Target and source characteristics are members of the aggregation level.
    We want to generate a list of valid combinations of characteristics planning models and articles which should be planned in the planning query.
    For that we are using the method IF_RSPLS_CR_METHODS~CREATE:
    Source is characteristic Model ZMATMOD and we determine in the exit class all active articles ZMATART.
    We get a list of active (planning relevant) models and articles in our exit class (table e_th_chas).
    --> For instance 6 combinations
    Until here everything works fine.
    The problem is that in the query 8 combinations are displayed.
    We have no idea why more than the generated combinations are displayed.
    One reason could be that the characteristic article ZMATART is an attribute from characteristic model ZMATMOD.
    So from a master data point of view 8 combinations would be relevant.
    But we use the exit class in order to reduce the number of combinations to planning relevant items.
    If we use the method IF_RSPLS_CR_METHODS~CHECK we could flag the 2 combinations which are not planning relevant to not valid.
    But these are then displayed in the query. 6 combinations in change mode; 2 combinations in display mode. This would not help us.
    We would like to see only the planning relevant combinations  6 combinations
    Can anyone please help me urgently?
    Best regards
    Martin

    Hi,
    set a break-point in the factory method get_instance to check whether the class is called. In the planning modeler make sure that you  use an external break-point.
    Or use rsrt an change a cell value: Derivation is called in the delta buffer to derive from the fields contained in the aggregation level. So check also that the source fields are contained in the aggregation level or can be derived via a a chain of derivations.
    Also make sure that all source fields have to be non-initial. The system will not call derivation for initial source fields since in this case there is not unique target, cf. http://help.sap.com/saphelp_nw70/helpdata/en/43/1c3d0f31b70701e10000000a422035/frameset.htm
    Remark: The attached document of note 994853 is about the disaggregation feature but it also contains a section about the characteristic relationships. Observe also that the template exit classes are documented in SE24.
    Regards,
    Gregor

  • Derive method of characteristic relationship with exit class BI IP

    Hi All,
    We have below four fileds in real time planning cube.
    Quantity
    Unit of measure
    Converted Quantity
    Converted UOM
    We have implemented characteristic relationship of type exit between UOM and converted UOM. We need to populate values of converted UOM using characteristic relationship.
    do we need to implement derive method to fulfil this requirement ?
    if yes, when derive method of exit class is getting called ?
    Awaiting for your reply.
    Regards,
    Mitesh.

    Hi Andrey,
    Thanks for your reply.
    I have tried approach suggested by you however break-point did not stop yet to derive method.
    I will give little more details on what i have implemented, probably it may help you.
    I implemented CREATE method and generated below combinations. No other method has been implemented yet.
    UOM            Converted UOM
    G                 KG
    KG              G
    clear ls_unit.
      ls_unit-unit = 'G'.
      ls_unit-unit1 = 'KG'.
      APPEND ls_unit to lt_unit.
      clear ls_unit.
      ls_unit-unit = 'KG'.
      ls_unit-unit1 = 'G'.
      APPEND ls_unit to lt_unit.
    E_TH_CHAS = lt_unit[] .
    Kindly suggest,
    1. any specific configuration at query level is required to call derive method
    2. what code should i need to write if i want to derive above combination using derive method
    Thanks,
    Mitesh.

  • How can i erase an account with relationship with some class of tax

    how can i erase an account with relationship with some class of tax

    Hi Enrique,
    I am not sure what you mean by this, can you please explain in more detail? You cannot erase accounts that already have transactions posted to it.
    Hope it helps,
    Adele

  • Characteristic relationships with derivation. I don't quite understand...

    Hi, experts!
    I'm trying to figure out all about using derivation in characteristic relationships and even though I seem to generally understand what it's for, some moments are still unclear.
    Let me describe the task: I have, for example, 10 item categories, all of them are in the real time info-cube. I have unique combinations for them, which are loaded into the DSO and I'm trying to create char. rel-ps based on that DSO.
    In the first aggregation level I'm using only the first 3 levels of item categories. The other 7 are not included.
    Let's assume I've planned my key figures for those 3 levels, and saved the plan. I need the system to distribute (disaggregate) the values among the remaining 7 category levels, so when I open another plan, based on an aggregation level that includes all 10 item categories, I would see all the data correctly and all the necessary combinations.
    As I understand, in that case I need to have characteristic relationships with derivation.
    But SAP demands that all the "target" characteristics should be held in the "Data Fields" section of DSO. And therefore they won't be key fields.
    I don't really get it - why should they be "data fields"? If I use them as "Data Fields" in the DSO, I won't be able to load all the possible combinations, because in some cases these 3 item categories that are the keys of the DSO, will match, only the remaining 7 will be different...
    How do I solve the described task?
    Thanks.
    Best regards,
    Andrey

    Hi Andrey,
    derivation is a function, given the source fields the derive functions fills the target fields. In other words, given a relation with two characteristics A, B with A source and B target the derive function F modeled in the relation 'calculates'  F(a) = b with a, b members of A,B, respecitvely. Since F is a function for a given a there are not two differen b1, b2 with F(a) = b1 and F(a) = b2.
    Using a derivation relation modeled in a data store the function F is defined by the active table of the data store. So A has to be the key and B has to be a an attribute (non-key). If this is not the case and A, B are key fields you can have the combinations
    A    B
    a    b1
    a    b2
    and this is by defintion not a derivation relation, but an n:m relation.
    On other words derivation fills redundant fields.
    It seems that you want to do just the opposite. It is a common problem to plan on a 'higher level' and to disaggregate from the higher level to lower levels, but of course only valid combinations should get values. You can use planning functions or the disaggregation feature in the query. Characteristic relationships are used to model the valid combinations.
    An example is as follows: We have Product -> Product Group -> Product line, the arrows indicate a derivation relation. The query uses all three characteristics in the aggregation level but has only Product Line and Product Group in the rows. Using disaggregation in the query changed key figure values will be disaggregated to Product (and maybe other characteristics used in the aggregation level). The system uses characteristic relationships that can be applied for the aggregation level to check the consistency of the records. Observe that a derivation relations can also be used to check the consistency of a combinations if both source and target fields are filled. Observe that for disaggregation of the above mentiond fields are filled and thus can and have to be checked using the derivation relations (and maybe other modeled relations).If 'access mode for result values' based on characteristic relationships is used in the query the relations can also be used to create all valid combinations needed for disaggregation.
    So you have to check whether the constraints you need are really of type n:m, then all fields have to be key in the data store or whether you have a derivation relation. By the way, derivations can be combined as in the Product -> Product Group (first relation) and Product Group -> Product Line (secdond relation) example.
    Regards,
    Gregor

  • DBM Creation of New Vehicle and the relationship with Valuation Class

    HI SAP,
    I'm having problem when creating new vehicle in /DBM/VM.  The Valuation Class that i use for VEHI is 4010. when i click
    on save the system show valuation class 3200 not allowed for material type vehicle config. i already check my valution class
    configuration, My Materia Type VEHI does not link with 3200. how do i resolve this issue ?

    Commander Sauk,
    From the error message it appears that valuation class tied up with your vehicle model is 3200.
    Is it a very new model for which no vehicles created so far?
    Can you please post accounting 1 view of material too showing valuation class as well as valuation category settings?
    Please also check split valuation is correctly setup for plant you are selecting for vehicle.
    check and reply with findings.
    Thanks
    Ritesh

  • Characteristic Relationship - displaying data

    Hi All,
    I implemented characteristic relationship (through ABAP class) and it is working fine except one thing.
    It displays the desired combinations, but also posted data in infoprovider in planning mode, that were suppose to be hidden (according to char. rel. logic).
    I set for all the relevant characteristics "characteristic relationship" in query designer....
    Any idea what I am doing wrong?
    Many Thanks!
    Pavel

    Hi Pavel,
    sorry, maybe your exist does not work in all cases (implementation of the check method).
    From your description it seems that you want to control access or maybe only make something not input ready. In the first case use authorization, in the latter use data slices.
    When you say 'measures' it is also not clear for me whether you mean 'key figures'. You can not control key figures with characteristics relations, except you are using a characteristic to model key figures (account model). But again, characteristic relationships are a means to control the valid combination in the cube (so to say they define the 'truth' in the cube or what are 'consistent' data records). Data slices are a concept to protect data from being changed (typical example: lock a planning version).
    Regards,
    Gregor

  • Urgent: Many to many relationship with Objects

    create type c1 as object (id varchar2(5),
    descr varchar2(200))
    create table c1_otab of c1(id primary key) object id primary key;
    create type c2 as object (id varchar2(5), descr varchar2(200), cat1 ref c1)
    I want a many to many relation between c1 and c2.
    How do I create an object table of c2 having id,cat1.id as primary key?
    Thanks

    Mina,
    As with relational tables, you can create a third table that has 1-n relationship with these two object tables. With 'cat1' as a REF attribute, an instance of c2 in c2_otab points to a c1 instance in c1_otab through the OID column. There is no need to explicitly create primary/foreign key. In fact, to prevent dangling REFs, the REF column should be declared as foreign key pointing to c1_otab.id (i.e. the primary key).
    Regards,
    Geoff
    create type c1 as object (id varchar2(5),
    descr varchar2(200))
    create table c1_otab of c1(id primary key) object id primary key;
    create type c2 as object (id varchar2(5), descr varchar2(200), cat1 ref c1)
    I want a many to many relation between c1 and c2.
    How do I create an object table of c2 having id,cat1.id as primary key?
    Thanks

  • Characteristic Relationship

    I am using a characteristic relationship (without derivation) on Employee for Cost Center.
    I have a cube that contains Key figures for each period for each planned cost center (with employee = #). I am wanting to copy these key figures to the employees within each cost center.
    ex:
    CC   Plan Hrs
    1238  155
    2345  200
    3425  175
    I have employee 10134 (CC = 1238)
    I am wanting to use ONE copy function to copy all key figures changing Employee:
    Employee = # to Employee = 10134
    I was hoping setting the Characteristic relationship would only copy the plan hours according to Master Cost Center (155 hours to 10134, etc). Instead, it will fail stating
    "Combination '10134,DEL/2345' is invalid; Valid is '10134,DEL/1238': Characteristic 0EMPLOYEE'".
    How can I set this characteristic relationship to only allow the copy to employees within the cost center without having it fail? I do not want to allow this function to copy the KF for CC 3425 to employees within another cost center.
    Thanks!

    Hi,
    it seems that you have combinations employee = #, CC = DEL/2345 in your copy source, the system then tries to copy such combinations to  '10134,DEL/2345' and this combination is not valid. This will only happen in the special case that you have employee = # as copy source and 10134 as target and employee is the only field to be changed, i.e. source and target have only single value selections.
    You can work around this effect as follows: allow more more values in the target for employee or by adding CC to the fields to be changed (if this characteristic is not restricted to a single value in the filter used in the planning function).
    Another option is to decomment the following lines in class CL_RSPLFC_COPY, method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE
            ELSE.
            .... restriction to single values => check the combination (much faster)
              MOVE-CORRESPONDING <s_block_line> TO <s_chas>.
              LOOP AT l_s_rule-t_to_sel INTO l_s_sel.
                ASSIGN COMPONENT l_s_sel-chanm OF STRUCTURE <s_chas> TO <cha>.
              precondition:  l_s_sel-t_rng contains just one line with sign = 'I' and opt = 'Eq'
                LOOP AT l_s_sel-t_rng INTO l_s_rng.
                  <cha> = l_s_rng-low.
                  EXIT.
                ENDLOOP.
              ENDLOOP.
              cl_rsplfr_controller=>p_r_cr_controller->check( EXPORTING i_s_chas = <s_chas>
                                        IMPORTING e_t_mesg = l_t_contr_msg
                                                  e_is_valid = l_is_valid ).
              IF l_is_valid = abap_false.
                continue.                                                                                "<== insert
              create context without real message
               me->msg_with_context( EXPORTING i_r_msg_src = l_r_msg         "<== begin of change
                                               i_s_rule = l_s_rule
                                     CHANGING  c_r_msg_trgt = l_r_i_msg ).
               LOOP AT l_t_contr_msg INTO l_s_contr_msg.
                 MESSAGE ID l_s_contr_msg-msgid TYPE 'E' NUMBER l_s_contr_msg-msgno
                       WITH l_s_contr_msg-msgv1 l_s_contr_msg-msgv2
                            l_s_contr_msg-msgv3 l_s_contr_msg-msgv4
                       INTO l_dummy.
                 l_r_i_msg->add_msg( ).
               ENDLOOP.
               RETURN. " all messages are error. => planning function stops.     "<== end of change
              ENDIF.
    Regards,
    Gregor

  • Charaction Relationship User Exit

    Hi, all.
    In our project we encountered with one problem with BI IP. We have characteristic relationship based on attribute without derivation, but the problem in that control date don't work correct. We tried solve this problem, but we didn't its. And now we want instead CR based on attribute use CR based on User Exit. But I don't clearly understand what method of interface IF_RSPLS_CR_METHODSI must use.
    I know how use DERIVE method of this interface, but this method is triggered, when we try to save data. But in this case I need create combinations of relationship during executing query.
    Anybody know or have any documentation about methods CREATE and CHECK of this interface.
    wbr,
    Fanil.

    Hi, Haritha.
    I say about Characteristic Relationship based on Exit without derivation. Maybe I don't clearly understand you.
    wbr,
    Fanil.

  • Characteristic Relationship - Derive week from 0CALWEEK

    I need an exit for characteristic relationship, deriving week (to a custom characteristic ZWEEK) from 0CALWEEK. I.e. I should be filling ZWEEK with the week number 1-52 based on 0CALWEEK's YYYYWW. Anyone have something like this already in place and would perhaps be so generous as to share the code or experiences?
    Regards,
    Thomas

    Hi Thomas,
    here you are:
    FUNCTION Z_DERIVE_ZWEEK.
    *"*"Local interface:
    *"       IMPORTING
    *"             VALUE(I_AREA) TYPE  UPC_Y_AREA
    *"             REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"             REFERENCE(ITO_SOURCE) TYPE  UPC_YTO_CHA
    *"             REFERENCE(ITO_TARGET) TYPE  UPC_YTO_CHA
    *"       CHANGING
    *"             REFERENCE(XS_CHAS) TYPE  ANY
    *"       EXCEPTIONS
    *"              FAILED
      FIELD-SYMBOLS: <calweek> TYPE ANY, <zweek> TYPE ANY.
      READ TABLE ito_source TRANSPORTING NO FIELDS WITH
        KEY CHANM = '0CALWEEK'.
      if sy-subrc = 0.
        ASSIGN COMPONENT '0CALWEEK' OF STRUCTURE xs_chas TO <calweek>.
        READ TABLE ito_target TRANSPORTING NO FIELDS WITH
          KEY CHANM = 'ZWEEK'.
        if sy-subrc = 0.
          ASSIGN COMPONENT 'ZWEEK' OF STRUCTURE xs_chas TO <zweek>.
          <zweek> = <calweek>+4(2).
        endif.
      endif.
    ENDFUNCTION.
    Regards,
    Marc
    SAP NetWeaver RIG

  • BPS Layout / planning level / characteristic relationship issue

    Hi ,
    I have a design question.
    I have a characteristic relationship for 0CALMONTH(Cal. Year/Month) The below are derived attributes
    Calendar month
    Quarter
    Cal. Year/Quarter
    Calendar year
    Fiscal year/period
    Posting period
    I am not using 0CALMONTH in my level/layout.
    Question1 : When I save the layout by changing the key figure, the system creates another record with what ever the changes perfectly but it is not copying all the characteristics that were in the original line. One example of this issue is for characteristic relationship object.
    Question2 : I do have the problem with other characteristics that NOT in the level since I am not using it but when I make a change for key figure in the layout and save it , it is not copying to the new line with all the characteristics.
    Can I design this way? If yes why the values are not copied over to the new line? Any user exits where I can check / debug during the layout save?
    I do not have any problem when I use standard BPS copy function, have these problems during the layout save.
    Thank you for looking into it , appreciate any inputs......
    Raju

    Thank you Mayank. Very helpful/excellent.  I think I am very clear/ all set , I will solve some of them by using derived charaterstic relationships.
    One  more important questions :  How can We provide a solution where We can not use a particular characterstics at level because of the agrregation behavior of the layout and can not be derived ? but while We save the layout We need to get those characterstics like copy function does copy all the characterstics even if they are not in the level.
    Is this make sense ? may not be valid question ?  any thoughts ?
    Appreciate your help.

  • Integrated Planning 'Exit Classes'

    Characteristic Relationships can use 'exit classes'(se24) instead of user exits(se37).  Can anyone tell me what the difference is between the two? 
    Thanks
    Tim

    Hi Tim,
    the exits work basically the same way. In BI-IP they are implemented in ABAP OO (which has stricter syntax checks).
    For exit planning functions, the ABAP OO "exit" function types in BI-IP provide additional functionality (option to work on all data vs internal packaging, option to read reference data).
    Regards
    Marc
    SAP NetWeaver RIG

  • Fields missing in Characteristic Relationship

    Hi Experts,
    I want to derive Currency Key from Company code using Characteristic Relationship. I am using 'With Derivation' and master data attributes. But in the source fields I see only two fields Cost Center and Controlling Area. Not sure why I am missing rest of the fields from the Cube. Does this mean, I have to have Aggregation levels maintained before I look at Characteristic Relationships??
    Thanks,
    DV

    Hi,
    derivation is used to fill characteristic values from other characteristics in the InfoCube. So to derive 'Currency Key' from 'Company Code' means that both characteristics have to be inculded in your InfoCube. I think, Currency Key is an attribute of Company code, so you can create a derivation relation based on characteristic Company Code.
    If you don't need 'Currency Key' in the InfoCube, you also may use Currency Key as a navigation attribute. Then you need not characteristic relationship for this, the system automatically know about the link between Company Code and Currency Key.
    Regards,
    Gregor

  • Characteristic Relationship Challenges in IP

    All,
    I'm having a bit of a problem with characteristic relationships in IP.
    We have a simple planning cube with no data.  It has the characteristics 0CALMONTH, 0MATERIAL, 0SALESORG, 0SALES_GRP, 0SALES_OFFICE, and 0PAYER.  We want to build a query which allows us to plan on specifically designated valid combinations of 0SALESORG, 0SALES_GRP, 0SALES_OFFICE, and 0PAYER.  However, instead of displaying only the valid combinations we desire, things seem to be showing up as the Cartesian Product of the characteristics.
    We thought we could accomplish this through a characteristic relationship and we tried establishing one (first by creating a DSO and then by creating a hierarchy).  But all combinations seem to yield only one of the following results:
    *Only the first level of the hierarchy
    *The Cartesian product
    *The 2nd level of the hierarchy (and only the 2nd level) but unfortunately containing ALL options in master data
    Has anyone here ever managed to do in IP what I'm trying to do (display only certain valid combinations of characteristics)?  If so can you give me a step by step outline of how you did it?
    According to SAP hosting we have all of the latest Service Packs.

    All, the issue is partially corrected.  Instead of fighting with hierarchies, I stepped back and re-attacked this problem by creating a characteristic relationship based on a DSO.  (I had tried this initially but it failed for a reason I will explain below.)
    We do top-down planning and so I need these valid combinations at each level of granularity.  I created a DSO with the key 0SALESORG, 0SALES_GRP, 0SALES_OFFICE, 0PAYER, and populated it with the valid combinations.  However, when I tried to create the characteristic relationship it does not allow me to select 0PAYER as a "Source Characteristic".  This results the relationship being inconsistent.
    So then I created a DSO with the key 0SALESORG, 0SALES_GRP, 0SALES_OFFICE, and populated the valid combinations.  It worked perfectly for my query at that level of granularity but not for the higher level of simply 0SALESORG and 0SALES_GRP and so I found myself creating another DSO and characteristic relationship to handle that level.
    Now I have the valid combinations down to a certain level of granularity displaying properly, but not all the way to the 0PAYER level.  I'm not sure why it has a problem aside from perhaps the fact that 0PAYER is a reference char based on 0CUSTOMER.  Does anyone know why it has this problem with 0PAYER?
    Additionally I have found that I can no longer execute a simple copy function on my cube because it "cannot find reference data for characteristic combination" in an insistance when I planned on a characteristic with a blank value.

Maybe you are looking for

  • Can't Connect to wireless- new mac user!

    I just purchased a MacBook and trying to connect to my house's wireless internet. My network showed up on the list and I typed in the password a million times and it says incompatible security and everywhere else I tried it told me I might have typed

  • Just downloaded CC 2014 trial. I cannot select any images and it's ruining the files

    Just downloaded CC 2014 trial. I cannot select any images and it's ruining the files

  • Connecting Two WRV200s Wirelessly?

    Due to layout of the house and lack of wire access, need to connect two WRV200's wirelessly. One will be connected to my cable modem and the other will need to provide additional coverage but act as an access point to the net. Can someone tell me how

  • Iweb 08 and livejournal

    I know someone more then likely uses livejournal and has a mac. Ok i am wanting to make a blog using iweb but i have 4 years of livejournal entries that i dont want to get rid of. what is the best way of linking the two so i can work from iweb and pu

  • I updated Safari above what is permitted on OSX 10.7.5. How do I fix this?

    I have a computer that is running 10.7.5 and I updated safari to version 6 but apparently it is not supported on this version of OSX but now I cannot revert back to an older version because for some reason it prevents me from doing so. Does anybody k