Skip to Content
author's profile photo Former Member
Former Member

Routine in 3.X update rules


I Have 2 ODS Objects and also a infosource

source name : A1

Target Nabe : B1

we added a new field Name cityname to ODS B1 which is already in ODS A1 trying pull the data from A1 to B1

Actually B1 is updated by infosource 0000 in that update rules i am trying to write a field routine saying that the fields in ODS A1 has 0employee, startdate, enddate and the target B1 ODS also has 0employee,startdate, enddate where the conditions if the fields 0employee, startdate, enddate are equal in both the ODS ojects then insert the corresponding CityName from A1 to B1

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2011 at 04:10 AM


    First of all you will have to create an internal table with target DSO structure and then populate it in Start routine with target data so that it can be used during lookup.

    • In start routine select the required target data in above created internal table.

    SELECT *

    from Target_DSO

    into it_tab

    for all entries of source_package

    where key1 = source_package-key1

    key2= source_package-key2 etc..

    Once you select all the data you will have to do the comparisoin in Field routine. Pass the employee no., start date and end date as input to this routine.

    In the routine do the check on it_tab internal table.

    read table it_tab into wa_tab with key empno = input_empno start date = input_start date and so on..

    If sy-subrc = 0.

    RESULT = wa_tab-cityname.


    This way you can get the required value.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.