ABAP routine to join two ODS objects into one

Hi there,
i have two ODS objects related to each other. and i want to load them into another ODS object and join them so to say.
as far as i got now, it seems that the only way to do this is an ABAP routine in the update rules. ca nanyone give me a hint on how to do this? no clue how ABAP works yet.
i suppose there must be some template or something because i think others must have had the same issue before. anyone who already solved this?
i'd appreciate your help,
regards,
stefan

HI Stefan,
First add VTS_KUN (customer code)
VTS_BEDA (order date)
in ODS2 VTSNWBP2 and don't map to any field intransfer rule.
write this code in start routine of udpate rule between VTSNWBP2 and VTSNWBDN.
PROGRAM UPDATE_ROUTINE.
$$ begin of global - insert your declaration only below this line  -
<u>TABLES: /BIC/AVTS_NWBE00.</u>
DATA:   ...
$$ end of global - insert your declaration only before this line   -
The follow definition is new in the BW3.x
TYPES:
  BEGIN OF DATA_PACKAGE_STRUCTURE.
     INCLUDE STRUCTURE <i>/BIC/CS8ZODS2</i>.
TYPES:
     RECNO   LIKE sy-tabix,
  END OF DATA_PACKAGE_STRUCTURE.
DATA:
  DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
       WITH HEADER LINE
       WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
  TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
           MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
           DATA_PACKAGE STRUCTURE DATA_PACKAGE
  USING    RECORD_ALL LIKE SY-TABIX
           SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
  CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
$$ begin of routine - insert your code only below this line        -
fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
to make monitor entries
<b>DATA:  S_DATA TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
       WITH HEADER LINE
       WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
DATA:  ITEM_TABLE TYPE STANDARD TABLE OF /BIC/AVTS_NWBE00
       WITH HEADER LINE
       WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
*start of modification
*Populating the order number data from ODS1 table
SELECT * FROM  /BIC/AVTS_NWBE00 INTO TABLE ITEM_TABLE.
SORT DATA_PACKAGE BY VTS_BES  ASCENDING.
SORT <u><i>ITEM_TABLE</i></u> BY VTS_BES  ASCENDING.
LOOP AT DATA_PACKAGE INTO S_DATA.
   LOOP AT ITEM_TABLE WHERE VTS_BES = S_DATA-VTS_BES.
     MOVE-CORRESPONDING item_table to s_data.
     APPEND S_DATA.
   ENDLOOP.
ENDLOOP.
DATA_PACKAGE[] = S_DATA[].</b>
if abort is not equal zero, the update process will be canceled
  ABORT = 0.
$$ end of routine - insert your code only before this line         -
ENDFORM.
*TABLES: /BIC/AVTS_NWBE00.--ODS1 table
Lemme know this is working.
Regards,
San!
Message was edited by: San!

Similar Messages

  • How two join two ODS objects in an Infoset

    I have an infoset that is created on two ODS object, one ODS is a business content that contains more than 30 fields and 2 Key Fields, the second one that i created contains the 2 key fields plus one additional field which was initially missing in the original ODS. Then i created a Infoset with these two ODS, now the problem is i do not know how to link these two info objects and where to specify the join condition. i right clicked and selected left join, inner join etc. whatever i did and when i try to activate the infoset i keep getting this error "Not all objects are linked with ON conditions". How can i get rid of this please help
    Thanks
    Akila.R

    u will need to set the join between the key fields..
    place mouse on the key field in one ODS..hold mouse button and drag..and then drop cursor..on same key field in the 2nd ODS..u will see a line joining the key fields b/w the 2 ODS's..
    do same for other key fields too..
    the connected lines are the join condition..
    now activate..should work..
    cheers,
    Vishvesh

  • Merging Two Graphics2D objects into one

    Is it possible to accomplish this:
    1) have a method in class A that returns a Graphics2D object
    2) have a method in class B that returns a Graphics2D object
    3) have class C call both class A's and class B's methods that return Graphics2D objects
    4) lay those two Graphics2D objects into a new Graphics2D object within a component's paint(Graphic g) method
    What I am trying to do is a lot like a Viso diagram, that is drag a graphic onto another graphic x numberof times and perform some kind of layering technique.
    Thanks

    Why don't you pass a graphics 2D into each method, and get method to draw onto that. Then it becomes very simple to combine each.
    MArk

  • To Join two SAP fields into one info object

    Hi All,
    Can you please suggest the best method to concatenate values from two R/3 fields into one info object master data table?
    The requirement is to create a Sales report where I need to report on sales against  sales type.
    Sales type is a list of joint values of item category ( 0ITEM_CATEG) and bill type (0BILL_TYPE).
    So, I need a list of all item categories and billing types in a single object and report sales value against it.
    Please suggest.
    Thanks,
    Sharmishtha

    Hi Venkat,
    In DSO any case you will not be having more than 16 Keys. I am surprised seeing requirement of more than 16 keys, but anyways you need to go with some workaround.
    You can concatenate multiple Fields and map to one Dummy InfoObject which will be Key in DSO so in actual you have more than 16 Keys but have 16 Keys in system.
    But analyze requirement in detail because this will increase data redundancy and time for load will get increased.
    Also for new issues start new discussion otherwise people will not able to help you in this forum.
    Regards,
    Ganesh

  • Where did the possibility to join two smooth endpoints into one go?

    I used get a dialog box when joining two overlapping endpoint, that is if they truly were on top of each other. I would get a dialog box when selecting two endpoints and pressing cmd+j where I could choose either smooth or corner.
    Now in Illustrator CS6 I do not get any dialog box no matter what I do and it always joins the two endpoints as corner even thoug they both started out as smooth - that is had both their arms. Is there another way to do this now?

    Well ... since I use "Average and join" all the time and very seldom only "Join" I just switched the shortcuts, so now Join has the 4-keys shortcut.
    Actually I can't think of a time I needed the corner join. Most of the time I use Pen Tool, and join paths with that, and with corner joins I just remove any excess points, but with more difficult smooth path constructions I find I often need the smooth join.
    I never figured why one can't select more than one arm like you can select more than one point ... it would make altering symetric paths symetrically so much easier.

  • How to join two audio books into one

    Somehow the audiobook that i have had for a while got split into two different audiobooks
    Is there someway to merge them back together?

    The following solution will merge two audio streams of different formats and mix two audio streams of the same format... translation, make sure they're the same format before you merge them.
    http://web.archive.org/web/20080216001555/http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Merge.html

  • Infoset join two ODS no authrization

    I have created an Infoset joining two ODS's the primary ODS (grey) has 0Orgunit in it and the second  ODS's (white) hasn't. When you run the query against the infoset the authorization on the orgunit isn't working and you can see the whole of the organization no matter what level of authorization the user has.
    I have looked in RSSM and you can not add the Infoset into the Authorization objects.
    If anyone can shed any light on to why the authorization isn't working it would be appreciated.
    Many thanks
    Jane

    Thanks for your reply but isn't the join different between a infoset and multiprovider .
    Many thanks
    Jane

  • Linking two ODS objects using a multiprovider

    Hello Gurus,
    I need to link two ODS objects and both are having 3 common characteristics and the relationship between the two objects are one to many.
    My questions would be....
    1)When the relationship is one to many can I set it up in the multiprovider to sum it up and show in the report?
    2)I have 5 other charaterstics that I need to report(Slice and dice) on, but these are not common ones to both ODS objects. Is it possible for the user to get the report based on these charaterstics also? Or do I need to make sure that these 5 also exist in both DOS objects?
    Thank you,
    DM

    Hi Sh,
    Thank you very much for your reply. But I have few concerns.
    1)One to many relationship will not have any effect on the data linking since the multiprovider clubs the key figures on common characteristics. I tried this on the system and it worked.
    2)The problem would be not having similar characteristics on both infoproviders. So if I want to report on the chars individually it will have a problem( Will come as non assigned values)
    But the documentation says the multiprovider supports Homogenous and Heterogeneous cases. Please refer the following link.
    http://help.sap.com/saphelp_nw04/helpdata/en/52/1ddc37a3f57a07e10000009b38f889/frameset.htm
    I am not sure what I can do now....whether to get all the characteristics in both infoproviders by enhancing the them. Or is there another way?
    And lastly the scenario I am looking at is billing and cost of goods. So I might find records in cost of goods which may not have corresponding records in billing.(There can be goods in stock which need to be billed)The problem would be the way multiprovider link records(union) so it will have all the records from both sides even if they do not correspond to each other.
    Let me know what you think.
    Cheers,
    DM

  • How do I combine two PDF files into one?

    I want to merge two PDF files into one to make things easier when I take the file(s) to a professional printer.
    Can I do this in Preview?
    Thanks.

    You can't do in Preview.
    You can combine individual PDFs into one PDF using one of these freeware utilities.
    PDFMergeX @ http://www.malcom-mac.com/blog/pdfmergex/
    joinPDF @ http://www.macupdate.com/info.php/id/16604
    Combine PDFs @ http://www.monkeybreadsoftware.de/Freeware/CombinePDFs.shtml>
    PDFLab (join & split) @ http://pdflab.en.softonic.com/mac
     Cheers, Tom

  • Combining two sales documents  into one billing document

    Hi Friends,
    I need to combine two sales document into one billing document. Header data is same in both sales document.
    I have set factory calendar in the payer master.
    Tried for data transfer rotine at copy control of item level. But was not sure which routine to be set.
    Please let me know, what all settings are required to create one combine billing document.
    Regards
    Suman

    Hi,
    Is it delivery based billing or order based billing?
    2 orders / 2 deliveries and 1 invoice.
    For the above situation you need to write a routine which eliminates document number difference for Reference and Allocation.
    If you do not have different customer purchase orders for these two sales orders and in your copy control from delivery to billing your assignment and reference numbers are blank then system will club these deliveries and create one sales order.
    Else you need to eliminate these by writing a copy control routine and assign it at the header level.
    Hope this helps.  Pl. revert in case of further clarifications.
    Thanks
    Krishna.

  • OLM - Merging Multiple Learning Objects into One

    Does anyone have experience or success merging multiple OLM learning objects into one? I think that we are supposed to be able to do this by exporting a content folder that contains all the learning objects that we want to merge into one CBT. The export works for me, and the learning object plays, but the content is not complete or combined. I noticed that the new content contains files called metadata(0).xml and metadata(1).xml representing the two learning objects that I tried to merge into one. I wonder if there's something I'm supposed to do with these files. Has anyone been successful in merging content?

    Content can be combined into a course structure like:
    Course Learning Object
    -- Topic 1 learning object
    -- Topic 2 learning object
    By creating a parent "course" learning object and moving the individual objects underneath it. The offering is then tied to that course learning object, so that when a user enrolls, in order to complete it the user navigates through both objects.
    You cannot combine all the pages from separate objects into a single learning object as the pages themselves have no knowledge of each other.
    Does that make sense?
    Scott
    http://www.seertechsolutions.com

  • Insert PDF into new Adobe Form - merging two PDF files into one

    Hi everyone,
    I need to enable access to archive PDF files but within a new PDF file containing header and footer.
    Request is not to change archived PDF files at all.
    I use Web Dynpro application to upload PDF file and to display new PDF file.
    I thought converting archive PDF files into JPG files and than using an 'Image Field' object to display those in a new PDF file.
    I am dealing here with PDF version 1.3 files.
    I am also having trouble converting these PDF files into JPG files. Any sugestions one this problem?
    Does anyone have any suggestion on how to deal with this concerning the fact that archive PDF files can not be changed?
    Is there some other way to merge two PDF files into one using Adobe Designer?
    Regards,
    Amel

    Hello, Lukasz:
      I am also facing similar requirement from my customer.
      And I found one useful blog, hope this blog can help you.
      http://wiki.sdn.sap.com/wiki/display/WDJava/CombinePDFfileswithWebDynproforJava
      Best regards, Nick.

  • How can I combine two itunes accounts into one?

    How can I combine two itunes accounts into one?

    Items purchased from the iTunes Store are permanently associated with the account from which they were originally purchased.  Apple provides no way to change this.
    However, if you wish to put content from two accounts into a single iTunes library, you can easily do so.  Use the command File > Add File (or Folder) to Library.

  • HT204053 Can you merge two Apple IDs into one?  It was a common issue caused by the iPhone 4 and has been corrected, but transferring purchases in iTunes is a pain with two IDs.

    For a brief time when iPhone 4, iOS 4 came out, many of us ended up with two Apple IDs.  I want to know if anyone can please provide me with simple step-by-step instructions on merging two Apple IDs into one?  It would make transferring purchases on iTunes much easier and reliable.  I realize i desperately need an iOS update, but i had no laptop for over two years!  I'm posting a cry for help on that in another community.  Thank you all.

    No,
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • Best approach to join multiple statistics tables into one

    I have read different approaches to join multiple statistics tables into one, they all have a column "productobjectid".
    I want to get all data for each product and put it to excel and output a jpg statistic with cfchart.
    How would you do this, the sql part?
    Thanks.

    A couple suggestions:
    1) when joining tables, its best to list both table/fields that you are joining in the FROM clause:
    FROM shopproductbehaviour_views INNER JOIN shopproductbehaviour_sails ON shopproductbehaviour_views.productobjectid = shopproductbehaviour_sails.productobjectid
    2) You add tables to a SQL join by placing another join statement after the SQL above:
    SELECT *
    FROM TableA INNER JOIN TableB on TableA.myField = TableB.myField
    INNER JOIN TableC on TableA.anotherField = TableC.anotherField
    3) If you have columns in the tables that are named the same, you can use column aliases to change the way they appear in your record set:
    SELECT TableA.datetimecreated 'tablea_create_date', TableB.datetimecreated 'tableb_create_date'
    4) Certainly not a requirement, but you might want to look into using <cfqueryparam> in your where clause:
    WHERE shopproductbehaviour_sails.productobjectid = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#all.productobjectid#">
     You might want to consider checking out one of the many tutorials on SQL available online.  Many of the questions you posed in your post are covered in pretty much every basic SQL tutorial.  Alternately, a good SQL book is worth its weight in gold for a beginning web applications developer.

Maybe you are looking for

  • DVD Drive Doesn't recognize Media Disc

    I have an Envy dv7. Product # B6B75AV. DVD drive hpBD MLT UJ260 I have a program that will copy a dvd from the source, dvd drive #1, to the target same dvd drive #1. When it is done copying the disc it ejects the original and asks to have a writable

  • ISight not behaving in brand new MacBook

    Hi. I've had my MacBook three days. Whenever I launch Photo Booth, I get a few seconds of motion before the picture freezes. If I get click to another active window and back again, the same thing happens. If I click to take a picture, it takes an ima

  • How apex generate LOV values for Interactive report

    Scott, For interactive report, does APEX full table/index scan to generate the LOV drop down list every time user click the column header? If I set max row count to 100, does LOV values only derived from the first 100 rows that apex hits? If I enter

  • Issue with Hyperic HQ Java API

    Hello All, I use Hyperic 5.8.4 I have been using Hyperic HQ Java API to fetch disk related metrics and other utilization stuffs. Upto 3 Days before the code was working fine. But Now I am unable to fetch disk related metrics. I have attached the sour

  • How to export Business process and application area from Backend.

    Hi , I am new to SAP. I want to export Business process, sub business process, and application area from backend SAP system to my desktop in the excel or flat file format. How can I do this ?? what are the transactions to do this ?. Thanks in advance