Updating existing fields in ODS

Experts,
I would like to update existing fields in the ODS after doing some calculations if a new record that is being loaded meet a certain condition. In turn I would want to update the record being loaded with a value from the record in the ODS just updated. Can someone tell me a way without having to resort to writing a separate code in ABAP to do this in the transfer routines. Also if you could provide example code for such a routine.

Hello Rue,
Your code in start routine should look like this
DATA: it_tab like <active table of ODS> occurs 0 with header line.
select * from <active table of ODS>
        into corresponding fields of table it_tab.
loop at DATA_PACKAGE.
  read table it_tab with key <field> = DATA_PACKAGE-<field>.                            
  if sy-subrc eq 0.
    <logic for processing data>.
  endif.
endloop.
If you need assistance in code for logic for processing data, please post the logic.
Hope it helps.
Regards,
Praveen

Similar Messages

  • Update a characteristic field in ODS after validations

    Hi ,
        I need to update a field in an ODS structure only if the field is not populated.
    How do I validate the fields in the ODS structure in update routines ?
    thanks,
    Rajesh.

    Thanks Praveen for the quik reply.
    I should have explained myself better. Anyways, I have a 'FEILD1' in ODS1 and 'FIELD2' in ODS2 and ODS1 updates ODS2. I need to populate 'FIELD2' fom 'FEILD1'
    only if 'FIELD2' is empty. I need to validate the field in the target structure, not in the source structure. So I can't use the way that you suggested.
    I know I can make a lookup on my target structure, but I was wondering if there is any better alternative.
    regards,
    Rajesh.

  • Access to unmapped field of ODS in the update rule of CUBE

    Hi Gurus,
    I have 8 fields in ODS out of which only 5 are mapped to the characteristics in the CUBE. I have to write a start routine in the update rules of the cube. But, I need to access one field, which is in ODS but not mapped to characteristic in the cube.
    So, is it possible to use that field in the logic of start routine. Or do I have to create a new characteristic in the CUBE for that 6th field also.
    Thanks,
    Regards,
    aarthi
    [email protected]

    Hi
    You certaily should insert your infobject field in the cube to populate it. After This you can choose if populate it by direct mapping or by routine.(start routine or transfer routine)
    A classic example of start routine to populate infobject from master data
    tables : /bi0/pcostcenter.
    data : lt_data_package like DATA_PACKAGE occurs 0 with header line,
    lt_costcenter like /bi0/pcostcenter occurs 0 with header line.
    select * from /bi0/pcostcenter into table lt_costcenter.
    lt_data_package[] = DATA_PACKAGE[].
    loop at lt_data_package.
    read table lt_costcenter with key costcenter = comm_structure-costcenter.
    if sy-subrc = 0.
    lt_data_package-/bic/zpcaccgh = lt_costcenter-/bic/zpcaccgh.
    modify lt_data_package.
    endif.
    endloop.
    DATA_PACKAGE[] = lt_data_package[].

  • How to only update existing records when loading master data ?

    Hello experts, I need your lights one more time.
    Here is my need :
    I have created an infoobject (IO) which is a very simple version of 0material, let's call it Znewmat --> Znewmat has material type and trademark as attributes, those two fields are available in 2 different datasources :
    - 0MATERIAL_ATTR for material type (field MTART)
    - 0MAT_SALES_ATTR for trademark (field MVGR2)
    When loading my new IO from 0MATERIAL_ATTR I use a filter (at DTP level) to get only a few material types (I get something like 1000 records),
    here is my issue : when I load from 0MAT_SALES_ATTR the field "material type" is not available to keep the same filter as for 0MATERIAL_ATTR and existing records are updated with the trademark, but I also get 5000 records I don't need, and my master data is "polluated" with useless lines.
    *and my question : is there a way while performing the second loading to ONLY UPDATE EXISTING RECORDS AND NOT ADD ANY
    NEW RECORDS ? (i didn't find anything in main options of my DTP)*
    (I'd like to avoid the solution to update the 0MAT_SALES_ATTR datasource to add the missing field)
    Thanks in advance for any help, points will be distributed.
    Guillaume P.
    Still no idea ?

    in the start routine of transformation from 0MAT_SALES_ATTR to znewmat do the following:
    select materials from /BIC/PZNEWMAT into i_mat
    for all entries in source_package where material eq source_package-material.
    loop at source_package.
    p_ind = sy-tabix.
    read table i_mat with key material = source_package-material.
    if sy-subrc ne 0.
    delete i_mat index p_ind.
    endif.
    this way you'll only update records that have previously been loaded by 0MATERIAL_ATTR DS
    loading sequence:
    first load ZNEWMAT from 0MATERIAL_ATTR. then activate ZNEWMAT. then load 0MAT_SALES_ATTR to ZNEWMAT.
    M.

  • Updating form field Acrobat 9.0

    I'm programming in Visual Basic and I'm able to read a form field but I when I try to update it's value, nothing happens. This code works fine in Acrobat 7.0.
    set f =jso.getobject("fieldname")
    f.value = "New Value"
    The field updates fine in Acrobat 7.0, but does nothing in Acrobat 9.0. Acrobat 7.0 has been uninstalled on the machine and only Acrobat 9.0 is installed. I can read the existing field values, but the code line doesn't work in 9.0. What am I doing wrong?

    http://forums.adobe.com/message/3128922#3128922
    I don't see any documentation like that except in Life Cycle and I need to change the fields programmatically in VB. I ran across this discussion you had with another poster that is basically the same question I had. Can you give me a link or something?

  • (Administration - Marketing - Import), you can set a parameter value "Import mode" for what to do in case of duplication as "update existing records", "Import new records". The final report of this import is presented as a text file that can be viewed in

    Administration - Marketing -> Import, you can set a parameter value "Import mode" for what to do in case of duplication as "update existing records", "Import new records". The final report of this import is presented as a text file that can be viewed in Business Administration - Marketing -> Import -> Exceptions. Whatever the exception, including duplication import occurs during import and recorded in a text file.   What are the fields that determine the duplicity? How I can I can change those?

    You will be returned anything that is in the option's value parameter. What is displayed in the dropdown and what is put in the value attribute do NOT need to be the same, so maybe you should start there.

  • Update Rules to an ODS

    I have a Data field as part of the Update Rules to an ODS.  By default it is able to get its value from the source field.  However, I want to modify this slightly so that I can strip out the brackets if they occur in the source field.  Would I need to write a routine and if so could someone advise on what should be written? Thanks

    Hi,
    Use like :
    REPLACE_ALL( ')', '', REPLACE_ALL( '(', '', BATCH ) )
    With rgds,
    Anil Kumar Sharma .P

  • CSV upload and update table fields

    Hi,
    Is there any way to update any field of the underlying table from HTMLDB while importing the CSV file?For e.g, if there are XYZ table have 200 ermployee where empno is primary key.
    Once we upload the data from CSV its fine.Now after 2 weeks i need to update the sal and ename corresponding to the previous 100 employees only.So now when i trying to update the data a unique constraints violation occurs since the empno have already present so my concern is that -- how to get out of this problem specially when updation of huge no. of records needed and also no updation required for some records already present?Do the CSV update be helpful on that circumstances?
    One thing we can do that we can track down the list of 100 employee whose information going to be updated.Put those info in excel and add rest 100 emplyee to that excel and again doing the CSV upload ?
    This is a huge issue and not only the tedious task but also errorprone and that task will be increased with the amount of data increasing in the table.
    Please anyone can suggest ?
    Regards,
    ROSY.

    The best way to solve your problem is next way.
    1º) Save the file with the data to import like a BLOV ITEM.
    Ok it can be done. CSV placed on BLOB data field.2º) Make a procedure to manage this BLOV item that can be fired by user pushing a buttom. (you can do it easy from HTMLDB).
    how to manage ? What need to be fire to push the CSV to the target table with the actual field population ?3º) Into this procedure insert the records freely and dont worry for anything more. (maybe you can be worry about duplicate records is so, only, into this same procedure make any pl/sql lines to be sure record is not duplicate before insert)
    ? ? ? If the data already exist it should be needed to truncate before insert that is not my reqr rather the existing data should be updated based on PK if any chages occurs in the CSV fo that data.4º) after you are sure the insert work properly and if you need any other treatment to record, with a trigger in the table or calling any other procedure from the same trigger make the traeataments that you need.
    that can be done highly .......before insert trigger.Remember. Dont put any commit.
    sure.......5º) Go down from horse. Dont take coffe or Tea in exceed. And remember all we are the same, people that only want go to eat with childs in week-end.
    i m in land no way to go down........nothing i take ya eat & eat much ....but this is not the right place for making comments about Weekend....Regards and good luck.
    anyway embargo starts...........enjoy Cheers...........Wish u All Hp XMas...

  • How does the Updated by Field Work....

    Hi Experts,
    Can anyone help on how the *Updated By* field values are populated, specially when the values are updated through a Workflow.
    I read the following in the MDM Documentation.
    If trigger action is Record Add, Record Update, or Record Import for a workflow. The [System] is the creator and launcher of the job but is not a real user.
    This is even true if the Owner of the workflow is the Admin.
    After our server migration was done, instead of showing [System] as the Updated By it now shows the Admin.
    What could be the reason for this. Do i need to contact SAP or is there something that needs to be done at the respository level to get the Updated By field to work as expected.
    Regards,
    Aditya.

    Hi Aditya,
    As far as i am concerned, this is not true. Field Updated by type of User Stamp should only show user's which are there in User's table of MDM console under node Admin-->Users. When we don't have any User of repository with name System, there is no point it will show you user System for field Updated by.
    Query 1: Can you please confirm, do you have this User "system" available in your repository under node admin-->Users in MDM console ?
    Query 2: Also, After our server migration was done, instead of showing System as the Updated By it now shows the Admin.
    I seriously have doubt on this. Can you please check do you have really user System for existing records too? I mean you can do Free-form search for field Updated by with value system. I am sure even for existing records (whether in before server migration or in existing) you will not get single record with field updated by "system" . Can you please confirm on this ?
    May be I am wrong, so kindly revert with your findings and confirm above both queries..?
    Regards,
    Mandeep Saini

  • Tracking source system table name for a field in ODS

    Hi Guys,
    I know this is pretty simple for many of you, Being a newbie, pls clarify for me :
    Consider field1 in ODS1. I want to know the database table which is updating that field. From transfer rules i can see which is the source system filed name but from which table that is coming???
          Thanks in advance!!!

    You can find the name of the data source if you right click on the ODS and click on Show Data Flow -- > You will be able to see the flow and get the data source name.
    Once you have the data source name ,  go to transaction RSO2 and see if the data source is based on a table or view or FM ..once you have this info you can analyze the table or the FM to find the source table and field..
    Hope it helps,
    Ashish..

  • Doubt on updating PROJN field in EKKN

    Hi Friends,
    I have a requirement to update the PROJN(old pos number) field in EKKN table with some shipment date from input file.
    i have checked with BAPI_PO_CHANGE for updation.
    I cannot accurately find a specific field where i need to update for PROJN  in that BAPI.
    Actually the PROJN field is not in use now.
    Can anybody help me with which field in ME22N denotes the PROJN field.
    Is there any ways to update an non-existing field with some other field.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

    As the field is no longer used I doubt if there is a bapi or other object that allows you to update the field. Even if there was a bapi then support for updating that field could be withdrawn in the future. To be safe you should look at using another field. If you get replies telling you to directly update ekkn-projn then ignore them, thats silly.

  • Update a field in bseg table

    Hi experts,
    i want to update a field in BSEG  table (field name is BUPLA).
    Using UPDATE statement i am going to update the bseg table.
    I know only update statement.
    This my immediate requirement.
    please give me suggesstion.

    Hi,
    If you want to update the existing table record or field.. it is always advisable to use MODIFY statement instead of  UPDATE.
    syntax: 
    fetch the BSEG data to internal table IT_BSEG and do you modificaltions.
    Loop at it_bseg.
        it_bseg- XYZ = 'ABC'.
        it_bseg-UVW = '123'.
       modify it_bseg transporting XYZ  UVW .
    endloop.
    MODIFY BSEG FROM TABLE IT_BSEG   (here it_bseg is the internal table)
    COMMITWORK.
    Modify always check in the database whether the record exists or not if it is there it will modify the existing one.. otherwise create a new record.... in Update statement.. there is always a chance of creating a new record.. instead of updating the existing one...

  • Time Based Workflow - update existing activities?

    Hi, I've added a checkbox field to my activities template, and wondered if it is possible to update this field on existing >124K activity records using a time based workflow. <br><br> Has anyone come across this requirement, or have any thoughts on how to solve the issue? <br><br> Thanking you in advance for assistance.
    Edited by: Sherry10602332 on Oct 11, 2010 12:07 PM

    Hello SKJ
    Your requirement is to send an email notification to an owner if the Opportunity remains with sales Stage = "Inquiry" for more than 90 days.
    New Record Saved.
    This means even the opportunity can be modified but the sales stage should not change. For e.g. when i create a new record, I can have the sales stage as "Inquiry" and save. At a later date I can modify the description of the opportunity (this would change the modified date), but the sales stage remains at Inquiry. Thus the notification should go 90 days after the sales stage has been set and not since last modified date. Keeping this in mind the condition the rule condition "Rule Condition : Sales stage = "Inquiry" and modified date = Created date" needs to be modified as Sales stage = "Inquiry".
    Coming to Modified Condition:
    Trigger Event - When Modified Record Saved
    Rule Condition : (PRE('<SalesStage>')<>[<SalesStage>] AND [<SalesStage>]="Inquiry") OR ([<SalesStage>]="Inquiry")
    Wait 90 Days
    Revaluate Conditon = 'Y'
    Action Send Email Notification
    Explanation
    When you set the sales Stage as "Inquiry", the condition (PRE('<SalesStage>')<>[<SalesStage>] AND [<SalesStage>]="Inquiry") would be satissfied and then the workflow would trigger. After 90 days if the sales stage is still in "Inquiry", the second part of the condition "[<SalesStage>]="Inquiry" would be satisfied and the email notification would be sent. If the sales stage has been changed to other sales stage, then the condition would fail and the notification would not be sent.
    Regards,
    Paul Swarnapandian

  • BAPI_EQUI_CREATE  to update custom fields.

    Is it possible to update custom fields in  Equipment master (EQUI table) using FM 'BAPI_EQUI_CREATE '? If yes, pls let me know which structure needs to updated.
    Thanks,
    Deepa

    I would think that just the name would be a key indicator.....CREATE but you want to Update....Why wouldn't you use BAPI_EQUI_CHANGE to update existing equipment records.  I would expect to have to extend the BAPI to handle the new fields.

  • Updating extended fields in SRM Business Partner Web Dynpro UI does not work

    Hey community,
    I'd like to extend the SAP SRM Business Partner Web Dynpro (SRM 7.13). I did it like in SAP Note 1386310 described. Everything works fine, the fields show the correct data. But updating these fields does not have any effect.
    I only want to extend the existent fields NAME_ORG3 and NAME_ORG4. I did the following steps:
    - Because of the fact that the fields are existent and not custom, I skipped the extension of structures INCL_EEW_BUT000 and INCL_EEW_BUT000_X (ok, in utter despair I even tried this, but of course I got the message "fields already exist...")
    - I added the 2 fields to the SRM business partner data transfer structure INCL_EEW_BP_CSF_COMPANY_DATA.
    - In Web Dynpro /SAPSRM/WDC_MODC_NAME, view V_PS_OIF_NAME I added the fields NAME_ORG3 and NAME_ORG4 to the context node COMPANY_DATA
    - I added corresponding Input fields and labels to the WD layout.
    - in view /sapsrm/v_mdfsbc I customized the new fields
    -> the new fields are visible in the WD, and, oh wow, they even show the correct data!
    -> Unfortunately, updating the fields does not work, but000 does not get any data.
    Debugging the function "bupa_central_extincl_change" brings up, that function BUP_MEMORY_BUT000_GET gets a but000 structure with filled NAME_ORG1 and NAME_ORG2, but NAME_ORG3 and NAME_ORG4 are empty.
    I also regarded SAP Note 1453747, but the code was already right.
    Any Ideas? Many thanks in advance!
    Steffi

    Hi  Stefanie Krause,
    I am also facing the same problem
    I added the one fields "APPROVAL_EMAIL” to the SRM business partner, data transfer structure '/SAPSRM/S_CLL_BP_COMPANY_DATA ' . I have appended the structure.
    I added corresponding Input fields and labels to the WD layout.
    -> the new fields are visible in the WD,
    -> i am able to visible the input field in WD,
    But if add some value press on next tab and back to the screen the value will be refreshed .
    Kindly help me
    Thanks and Regards,
    Maruthi.M

Maybe you are looking for

  • Google Latitude Friend list not visible on Firefox 3.6.12, but can be seen on Safari

    I, an Army of Awesome volunteer am posting on behalf of @littlecough on twitter. She can't view her friends list on Google Latitude but can see them on the map. The problem does not arise on her Safari. She uses Firefox 3.6.12. She has tried clearing

  • Applications can't locate music/photo files

    My photo/music files live on external drive - La Cie. I am trying to create a photo page in JAlbum but unable to locate my photo directory. Similar problem finding music. Every time I open Itunes, there are songs that require locating file before pla

  • Validate and set values of other attribute from the db or from the pl/sql

    Hi, I am working a validation of SSN field. I got around validating the entity attribute (SSN)(http://radio.weblogs.com/0118231/stories/2003/01/17/usingViewObjectsInEntityObjectsForAnEfficientExistenceCheck.html). Is it first of all possible to valid

  • Maintenance Optimizer config step-by-step

    Hi All, I am not a SAP Basis Person,I install Solution Manager 4.0. Now i want to configure it for SAP Service Pack downlod purpose. Can any one help me in this regard in simplest way to configure Maintenance Optimizer. Regds Gyan

  • Premiere elements 7 won't start

    newbie here.not computer savvy.  i have just purchased pe7. i have successfully loaded the file but when i go back to start program i get an error message and it must shut down. i've done everything according to instructions i.e. no anti virus or oth