Enhancing a temi dependent master data datasource

Hi Gurus,
I need to enhance the 0PERSON_ATTR thats time dependent master data for the field division thats also i want to make it as time dependent.
Now what things i need to take care while enhancing this ?

Enhance the Extract structure for '0PERSON_ATTR' to add '0DIVISION'
In User Exit, write code to populate the 0DIVISION filed from the corresopnding infotype.
Following is sample code (we added Home Phone and Personal Cell) 
Data Source '0PERSON_ATTR'  Home Phone and Personal Cell            *
DATA: i_HRMS_BW_IO_PERSON LIKE HRMS_BW_IO_PERSON.
CASE i_datasource.
  WHEN '0PERSON_ATTR'.
    LOOP AT i_t_data INTO i_HRMS_BW_IO_PERSON.
      refresh: T_P0006.
      clear  : T_P0006.
      I_TABIX = SY-TABIX.
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          PERNR           = i_HRMS_BW_IO_PERSON-RFPNR
          INFTY           = '0006'
          BEGDA           = i_HRMS_BW_IO_PERSON-BEGDA
          ENDDA           = i_HRMS_BW_IO_PERSON-ENDDA
        IMPORTING
          SUBRC           = W_SUBRC
        TABLES
          INFTY_TAB       = T_P0006
        EXCEPTIONS
          INFTY_NOT_FOUND = 1
          OTHERS          = 2.
      IF SY-SUBRC = 0.
        DESCRIBE TABLE T_P0006 LINES W_LINES.
        IF W_LINES > 1.
          SORT T_P0006 BY ENDDA BEGDA DESCENDING.
        ENDIF.
        READ TABLE T_P0006 with key subty = '1' INTO L_T_P0006.
        IF SY-SUBRC = 0.
          CLEAR i_HRMS_BW_IO_PERSON-ZPERS_CELL.
          CLEAR i_HRMS_BW_IO_PERSON-ZHOME_PHONE.
          DO 6 TIMES
             VARYING com_grp-comtype FROM L_T_P0006-COM01 NEXT
                                                      L_T_P0006-COM02
             VARYING com_grp-comnum FROM L_T_P0006-NUM01 NEXT
                                                      L_T_P0006-NUM02.
            CASE com_grp-comtype.
              WHEN SPACE.
               do nothing.
              WHEN 'HOME'.
                i_HRMS_BW_IO_PERSON-ZHOME_PHONE = com_grp-comnum.
                exit.
            endcase.
          ENDDO.
          DO 6 TIMES
             VARYING com_grp-comtype FROM L_T_P0006-COM01 NEXT
                                                      L_T_P0006-COM02
             VARYING com_grp-comnum FROM L_T_P0006-NUM01 NEXT
                                                      L_T_P0006-NUM02.
            CASE com_grp-comtype.
              WHEN SPACE.
               do nothing.
              WHEN 'PCEL'.
                i_HRMS_BW_IO_PERSON-ZPERS_CELL = com_grp-comnum.
                exit.
            endcase.
          enddo.
          MODIFY i_t_data FROM i_HRMS_BW_IO_PERSON INDEX i_tabix.
        endif.
      endif.
    ENDLOOP.
ENDCASE.
Then in '0PERSON' infoobject 'Attributes" tab add '0DIVISION' as attribute and make sure 'Time-Dependent' check box 'ON'.
Maintain mapping in the transformation.
Hope this helps

Similar Messages

  • Changing time dependent master data records

    Hello All,
    I have a time dependent master data infoobject that has 39 million entries.
    Now we decided that we no longer need it time dependent.
    Hence we want to maintain constant value ( 01.01.1000 to 31.12.9999) going forward.(as changing the object's time dependency will have huge impact)
    But for the historical data, we want to fix this and maintain only one record per value which will be the last record.
    Can you please provide inputs on how this can be achieved as i tried various combinations of load( load to a copy object taking only last record, changing its valid to to 01.01.1000 and loading back) and its not working.
    e.g the value XXX has following entries currently:
    Object
    Valid To
    Valid From
    XXX
    15.06.2007
    01.01.1000
    XXX
    19.09.2007
    16.06.2007
    XXX
    28.01.2008
    20.09.2007
    XXX
    30.03.2009
    29.01.2008
    XXX
    31.03.2009
    31.03.2009
    XXX
    15.04.2009
    01.04.2009
    XXX
    31.12.9999
    16.04.2009
    we need to get to the below format:
    Object
    Valid To
    Valid From
    XXX
    31.12.9999
    01.01.1000

    Hi Dhanya,
             The approach u did (load to a copy object taking only last record, changing its valid to to 01.01.1000 and loading back) will not work on Master data because it is not a DSO, with the Proper keys in place, to overwrite all the previously existing data records. This approach will only work if the infoobject is not time dependent and in that case the question u posed will not arise at all .
    SOLUTION:
    One thing is Inevitable as Prashanth has prescribed, u have to delete the transaction data first at all the places, where and all it was used.
    Then just delete the entire master data from the info object and just do a FULL DTP load from the underlying datasource putting a FILTER like "VALID_TO = 31.12.9999" so that only the last record of a particular Value will be loaded. (No need to do a full load from the source because even in the source it might had been the same old Values and might not have been revamped.)
             Even for further delta's, it will be safer to maintain this filter at the DTP level if u r not sure of the  constant value maintenance at the source.
    Thanks & Regards
    Sasidhar

  • Problem with Time dependent master data

    Dear All,
    I have 0PERSON master data infoobject. It is getting records extracted from backend R3 and from a different datasource called 'Peoplesoft'. It has a field 'Date of Birth'. Point of concern here is - whether a particular employee is present in Peoplesoft or in R3, his date of birth is constant. Unfortunately someone hs made 'Date of Birth' as a time dependent attribute of the InfoObject 0PERSON.
    We extract data from Peoplesoft from 01.01.1900 to 31.07.2005. From 01.08.2005 onwards, data is getting extracted from R3.There are some employees which are present in Peoplesoft but they are not in R3.
    Problem is occuring when the user is reporting on a relevant Infocube containing this 0PERSON infoobject. He does not see the value for this 'Date of Birth' field for certain employees. The reason for this is that the 'Date of Birth' field is blank in the interval 01.08.2005 - 31.12.9999 as this employee was absent in R3 and hence no record/s got extracted.
    To view this value in the report - Please suggest me a possible remedy. I thought to write a routine but I dont think it is advisable to change a time dependent master data.
    Thanks,
    Srinivas

    Hi,
    There are two ways of solving your issue.
    - Remove the time dependent check box for 0person, delete the transactional data, load the master data again and reload the transactional data.
    - Write a program to extend the 'Date to' value to 31.12.9999 for all employees.
    Ravi

  • Customising Master Data datasources

    Hi All
    Can we Customise (add/remove field) for Master data datasources in LBWE.
    Cheers
    PB

    Hi,
    It seems you have posted this topic already..!?
    Here is your first post...
    Enhancing Masterdata Datasource
    Anyway, the answer is <b>NO</b>. <b><i>LBWE</i></b> is the <i>Logistics Customizing Cockpit</i> and is used to customized Logistics Data Sources.
    You Customize Master Data under tcode <b>RSA6</b>.
    If I have helped, grant me points...
    --Jkyle

  • Can V find Master data datasource by having Transaction data datasource?

    Hello All
    I have a datasource in r/3 side by this can v find Master data datasource?
    The Transaction datasource is 2lis_02_scl?
    how to find Master datasource for this?
    Many Thanks
    balaji

    AHP hello
    Thanks for info given
    Can v view same for customized datasources also?
    is it possible?
    so for datasource 2lis_11_vaitm,if v click on "Infosource Overview" v can view all the Infosource name,by this v can find our Master Datasource.?
    so for ex.,I can c infosource 0CUST_GRP1,so this is the datasource for Master data from r/3 side?
    Is it correct?
    Many Thanks
    balaji

  • Time-dependent master data in the cube and query

    Hello,
    I have a time-dep. masterdata infoobject with two time-dep attributes (one of them is KF). If i add this infoobject into the cube, what time period SID will be considered during the load? I assume it only matters during load, if i add the KF to the query it gets its value based on the SID in the cube.. right?
    Thanks,
    vamsi.

    If its Time Dependent Master Data object when you run your Master Data if that time any changes to the Master Data that value will be overwrite to the old value you will get the new value. When you run the Query execution the Infocube Master Data infoobject will having the SID that time it will to there it will be displayed at that moved what is the value you have in the Master Data table.
    This is what my experience.
    Thanks,
    Rajendra.A

  • Data not uploading in Time dependent Master data Infoobject

    Hello All,
    I have a master data infoobject for HR entity and have to load data from PSA to that info object.
    The HR entity infoobject already have sone data like below:
    HR Entity
    Version
    Date from
    Date To
    x
    A
    01.07.2013
    31.12.9999
    x
    A
    19.04.2013
    30.06.2013
    x
    A
    01.09.2012
    18.04.2013
    x
    A
    01.01.2012
    31.08.2012
    x
    A
    01.01.1000
    31.12.2011
    Now the data in PSA is as follows:
    HR Entity
    Start Date
    End Date
    X
    01.01.2012
    18.12.2013
    Once I loaded this data to the infoobject, i can not see this value which is the latest value of this HR entity.
    Can somebody please explain how the data gets loaded in the time dependent master data infoobject and why this entry is not getting loaded in the info object.
    Regards
    RK

    Hi,
    did you activate master data after your load?
    You can check also version 'M' records and see if your record is there.
    The load went green?
    The problem is, that your entry overlaps all exisitng time intervals, which can't be deleted or merged as there may be dependent transactional data. You have first to delete the transactional data for this entity.
    Then you can delete the time-dependent data and reoload it from your PSA.
    BW will build then correct time intervals.
    The easiest is to change the time interval in PSA, see example below:
    At the moment the time interval is not accepted. But you can add time intervalls before 31.12.2011 and after 01.07.2013, Then system will create remaiing time intervals, e.g. your new record is:
    HR Entity
    Start Date
    End Date
    X
    01.08.2013
    18.12.2013
    Result will be:
    HR Entity
    Version
    Date from
    Date To
    x
    A
    19.12.2013
    31.12.9999
    x
    A
    01.08.2013
    18.12.2013
    x
    A
    01.07.2013
    31.07.2013
    Regards, Jürgen

  • What is time dependent master data?

    Can anybody explain me in detail with an example for time dependent master data?
    Thanks in advance.
    Sharat.

    hi,
    the master data value changes with respect to some time characteristics.
    say- Salesregion is a char that have sales rep as master data(attribute)
    saleregion  date from  date to              sales rep
    sr001        20/10/2007  20/12/2007          Ram
    sr002        21/12/2007  12/05/2008          Ram
    in the above example Ram is in two sales region in different dates.
    these type of attributes were time dependent.
    usually time period will be defined in the data range of 01/01/1000 to 31/12/9999.
    Ramesh

  • Dependent master data for the Transaction data

    Hi,
    Wish u Happy New Year to All.
    I use to schedule daily some 250 master data.Then i will run transaction data.Because of this the system performance is effecting.I want to know, where i can find dependent master data objects for the particular transaction data?
    Thanks in Advance
    Regards,
    Siv

    Dear Siva
    In the Info Source Over View for the particular data target can shown dependent master data objects.
    Regards
    Saravanan.ar

  • Problems with language dependent master data

    Hi,
    I created a InfoObject with language dependent master data and I am trying to upload data from a flat file.
    My flat file has a 2 digit language code (EN,DE,FR,JP,ES) and when uploading the data it seems that SAP BW is only using the first digit which leads to the situation that EN and ES get treated as duplicate records.
    Any help would be appreciated
    thanks
    Ingo Hilgefort

    Hi,
    ES is the Language for spanish..But the Flat file should have to represent 'S' for Spanish.
    Check in Table T002 for the symbols which represent Languages and that to be used in flat file.

  • Modify code to pull the time dependent master data

    I fully under stand the suggestion below for the requirement to add the time dependent attribute comp code
    thanks fo rthe help but please tell me if there is a way i can modify the abap code and make the user enter the value for the date on which he want to pull th emaster data for company code or keydate to and from and pull the master data, so how will i proceede should i create the variable on 0doc_date and how to modify the code. please help . i have opened another question with same desc as above to assign points
    thanks
    soniya
    The literal within <..> is supposed to be replaced by the actual field name (as I didn't know the fields). In this case, I am changing your code for costcenter/company-code.
    data : wa like /bi0/qcostcenter.
    select single * from /bi0/qcostcenter into wa
    where costcenter = comm_structure-costcenter
    and objvers = 'A'
    and datefrom le comm_structure-<keydatefield>
    and dateto ge comm_structure-<keydatefield>.
    if sy-subrc = 0.
    result = wa-comp_code.
    endif.
    abort = 0.
    You can use this code for update rule of company_code. You have to replace '<keydatefield>' with a field name that contains the date on which the company is to be derived. If there is a date in your comm_structure (eg aedat) which you can use, you can specify that field in place of this literal (instead of comm_structure-<keydatefld> use comm_structure-aedat). If you have no such field, and you wish to use current date for getting the company code from time-dependent master data, you can use sy-datum (ie replace comm_strucutre-<keydatefld> with sy-datum).
    And it should work.
    The 'master data attribute' option is one of the options when you create update rule (one of the radio button options).

    That the code is doing anyway.
    If your txn data in the cube doesn't have a date, how does it know it is Feb data, or, it is March data?
    If it has a date or month field, you should modify and use this code to update the company based on that date instead of system date.
    Other than that minor variation, it is already doing what you look for.

  • Error in creating RSDS using transfer rules for master data datasources

    Hi ,
    when i am creating the transfermations(RSDS) using transfer rules for master data datasources while i want to migrate datasource.it is giving the error message saying that INITIAL ERROR OCCURED DURING GENERATION OF THE TRANSFERMATION.AND in the taskbar it is giving the message LOG IS BEING LOADED.
    MY QUESTION IS HOW CAN WE SEE THE LOG? AND
    PLEASE GIVE ME THE STEPS TO MIGRATE MASTER DATASOURCES.
    THANKS IN ADVANCE .

    Hi Ankit,
                  Yoy have to load data to the cube.For that you need update rules.
    Steps to load data to the cube
    1.Replicate the datasource.
    2.Assign Infosource
    3.Create transfer rules
    4.Maintain the update rules to the cube.
    5.Right click on the datasource and schedule an infopackage for it.
    Execute the Infopackage and pull the data to the cube.
    Hope this helps
    Regards
    Karthik

  • How to create generic master data  datasource .

    How to create generic master data  datasource which utilises ALE change pointers for extraction of master data.

    Hi,
    For any master data lets say, Material Master, for this you need to create a view
    based on your requirement by selecting one or more tables into your view and
    keeping all the required fields in the view as viewfields and go to RS02 create
    generic data source, select the view option as source and put the view, save and
    activate, at the same time set the delta pointer as to whether Numericpointer/date/timestamp..this way you can create a generic DS then transfer the stru. and at the BW side replicate the source system..and so on..
    Hope this helps..
    Assign points if useful.
    Need further info revert..
    Cheers,
    Pattan.

  • Time Dependency Master Data Load

    Hi:
    This is my first time to work on time dependency master data. I need help!
    I first deleted master data and cleaned up the PSA for material sales.
    Then I have turned on the feature of time dependent on the info object for material sales. Save it and activated the object.
    Then i have problems by loading the master sales attribute data in PSA. The error is: on every record of material, it has "invalid 'to' date '00/00/0000'" and "invalid 'from' data '00/00/0000'".
    Is every process i did wrong? What is the process to work on time dependent master data? and loading the data?
    Thank you!!

    Hi,
    After turning on the time dependence...you get an extra field in the key of the master data table Q table date to and a new field date from as a new field.
    These two fields needs to be mapped to date to and date from R/3 source as well.
    If there is no source field for these two then you need to make sure to get the values for these fields.
    Just check if you are getting any field like that from R/3...right now i think you have left the mappings for these fields as blank.
    Thanks
    Ajeet

  • Reporting on Time Dependent Master Date Info Provider

    Dear All.
    We have a info object Employee which is time dependent master data containing all the information with time dependency, when i create the query over this info object it give me the option to select the key date and it show the accurate information which is lying according to the key date.
    my requirement is to show all the records in the report which are there in master data but i am not able to show more then one record cause of the key date, can you please let me know how can i show all the records for any given employee id in the query.

    Hello Zeeshan,
    By standard if you create query directly on time dependent info object, it would display the active records as of the report execution (if no key date has been provided). In any case you can only see one record per the info object key, not the history.
    In order to fulfill this requirement, you may need to create infoset on this infoobject and select "date from" and "date to" as part of infoset fields.
    Then create bex query on the infoset and drag the "date from" and "date to" also into "rows" section of the query (apart from infoobject key, time dependent attributes). This will let you see the history of changes to time-dependent attributes of the infoobject.
    Cheers,
    Vasu

Maybe you are looking for

  • Camera raw update

    how to install camera raw update

  • HP pavilion g6 do not boot nothing from any media

    Hi, I have this notebook (HP Pavilion g6-1010sc) and one day it do not boot nothing from any media. I tried to boot linux, winxp, original win7-x64 from internal and external USB disks, but unfortunatelly. Notebook restarts or freezes after i tried t

  • I need to filter my report based in group totals

    Hello I'm creating a report for the invoices tables, I need to have the sum of all invoices of the clients by month (only the past three months based in the date of the report). The sum of the invoices is also based in the Item Code. I retrive the vo

  • WS-Security: Error while valdiating the digital signature

    Hi We are getting an exception (in the J2EE logs) when an external party calls our SOAP webservice with WS-Security. We are using their public certificate to verify their signature (self signed certificate). Their SOAP Security header looks correct -

  • Lost the isync folder....

    I'm having trouble syncing my calendar with my new 30GB ipod. It used to sync, but suddenly stopped. In my quest to fix things, I was exploring the ipod from 'My Computer' and looking at it's files as a hard drive. It contained four folders....calend