How to "collect" uploaded data in a datastore object or infocube

Hello all,
We're uploading data records into a datastore object.  The records are like...
abc      1
abc      2
def       3
def       4
In the abap world I could use a "COLLECT" statement to reduce the above to...
abc     3
def      7
My question:  Is there some way to do this collection when uploading into a datastore object, or when transferring this data to an infocube?
Thanks in advance,
Den

Collect statement will collect the data records if they come from different internal tables.
Here in update rules, if the incoming records have the structure that you mentioned, they will be rejected as "duplicate records found".
The option you have to consolodate them before you bring them to  BW layer.
Ravi Thothadri

Similar Messages

  • How can I upload date data, like 2015/03/23 to Hyperion planning 11.1.2.3 ?

    Hi all,
    how can I upload date data, like 2015/03/23 to Hyperion planning 11.1.2.3 ?
    Not necessary do it by FDM, please let me know if there is a way to do it.
    Thanks a lot in advance.

    FDM is not the best tool for doing something like this as it loads direct to Essbase and doesn't have the same support for loading text and date values that you get when loading this type of data via the Planning layer. Take a look at using the Outline Load Utility, the sage John Goodwin has a detailed description on his blog - More to life than this...: Planning 11.1.2.2.300 Outline Load Utility Enhancements Part 2 - on how to do this from a relational source although the bulk of it holds true if you were loading from a flat file.

  • Error while activating data loaded into DataStore Object in BI 7.0

    Hi Guys,
    I am facing the following problem :
    When I load data into a Datastore Object, all the records get loaded but the job fails during activation of the data.
    Below is the job log :
    Activation is running: Data target 0RPM_DS07, from 77 to 77
    Overlapping check with archived data areas for InfoProvider 0RPM_DS07
    Check not necessary, as no data has been archived for 0RPM_DS07
    Data to be activated successfully checked against archiving objects
    SQL-END: 14.06.2007 12:33:25 00:00:00
    SQL Error: ORA-20000: Insufficient privileges
    Parallel processes (for Activation); 000003
    Timeout for parallel process (for Activation): 000300
    Package size (for Activation): 020000
    Task handling (for Activation): Backgr Process
    Server group (for Activation): No Server Group Configured
    All data fields updated in mode "overwrite"
    Resource error. No batch process available. Process terminated
    Time limit exceeded. No return of the split processes
    Resource error. No batch process available. Process terminated
    Request you to kindly help me resolve this issue.
    I am runnning the infopackage manually. Should I run it by a process chain??
    If I run by process chain, I get the following error in 1st step:
    You do not have authorization for InfoSource 0RPM_ITEM_FIN_PLANNING.
    Awaiting your replies,
    Thanks,
    punkuj...

    Hi,
    I think this problem remains unanswered.
    The issue behind this problem is, during parellel activation the child jobs acknowledge the parent job about status. If the child job takes long time to read data from active data table, then it times out and fails.
    Check the primary index on Active data table and it should be missing in your case. See the se11 index or db02 missing indexes. That is the reason that causes time out. Rebuild the primary index by asking your basis folks and repeat the activation. It should succeed.
    Thanks,
    Sri.

  • To display the Attendee name in LSO_PV15, how can a upload data in system

    Hi Gurus,
    I have a requirement, that is... in the LSO_PV15... generally data will be displayed of the learning solutions attendee data. but my client requirement is... he will give the text file with employee name, emplyee number, pass... the data to be uploaded and it will be displayed in LSO_PV15... how can I upload the data... and which tables will be updated while uploading the data... is there any BAPI or function module to upload the data... kindly help me... actually LSO_PV15 is a report program... but the data to be loaded in to the system and it will be displayed in the LSO_PV15... your suggestion is great help to me... thanks in advance...

    hi,
    is there any generic fix for this. if we want to display then we need to change the each page CO . is it a possible solution. or any generic solution. Please provide
    Thanks
    Smarak

  • How to collect my data from a disk that I suspect to contain a malware

    I have experience several crashes the last 72 hours and I have to buy a new hard drive that I am using as an external drive to work from as a startup disk.
    Once I install all my software back, how can I collect my data from a hard drive that I am suspecting to contain a malware. I previously use Bitdefender for mac and because I do not know which software is causing the problem, I just install Clamxav.
    Please advise.

    BitDefender was likely causing the problem.
    Just plug it in and transfer the data. You'd have to install the malware for it to affect your Mac, but XProtect blocks all known malware from installing.

  • How do I upload data alongside my image upload?

    How do I upload additional variables alongside an image upload? My code doesn't seem to be working.
                        temp.upload(new URLRequest(serverURL));
                        var variables:URLVariables = new URLVariables();
                                  variables.my_name = "Jackson" ;
                                  variables.my_state = "Missisippi" ;
                        var request:URLRequest = new URLRequest(serverURL);
                        request.method = URLRequestMethod.POST;
                        // Put parameters into request.data
                        request.data = variables;
                        // Perform the upload
                        temp.upload(request);
    Thanks!

    hi, i dont know if this can help you, i made the script to upload image and data. hiere is the files check if this help you.
    if no please explain more your question.
    FIles atached: http://www.faraday.mx/Adobe/uploadPicAndData.rar
    regards.

  • How to collect Continuos data?

    Dear all
    Here i have programmable power supply which i can set the output volatge and current of it and used to calucalte other parameters such as losses,power..etc and i have two pressure sensors which i can collect pressure data continuosly .  From my labview program i can collect and save data's for pressures continuosly but i couldn't able to  collect data from the power supply ( volatge and current more than 8 samples.)  How can i able to collect data for volatge and current countinously like the pressures . here i have attached sample data which i collected it .  that is the volatge , current and other paramentrs are collected only for 8 sample.
    thank u inadvance.
    Solved!
    Go to Solution.
    Attachments:
    power supply and pressure sensors.vi ‏310 KB
    aba.csv ‏6 KB

    Dear All
    I  have some problem. I have the programmable power supply (RS232) and DAQ to collect  Sensor datas. The DAQ sample rate is set to be 0.01Hz.
    But when i try to set ON,voltage and current of the power supply there is delay of 100sec.(the same with DAQ collect data).  I tried the power supply out and inside of the loop with DAQ.
    Any one can help me... to make ON and set current and volatge with out any time delay.
    Thxs.
    Attachments:
    new-.vi ‏271 KB

  • How can collect the data from laptop sound card and serial port at the same time?

    I'm working on a project, I need to collect the data from laptop sound card, and also from serial port at the same time.
    The attachments are my VIs for sound card and serial port communication, I'm wondering that can I combine these two VIs together? Or can I run these two VI at the same time?
    Thank you!
    Attachments:
    AC_Radar_Receive.vi ‏46 KB
    RadarAudioPlug.vi ‏774 KB

    A smarter way is just to put all your code in the same VI.
    Two parallel loops if rates are different.
    Attachments:
    RadarAudioPlug.vi ‏450 KB

  • How to debug to observe how query collect the data

    Hi,
    I have a query with serveral variables, which I restrict the values through master data read class on info object level.
    Our problem is that the query can not find data in infoprovider with the resticted values whild running.
    I want to know how query handle the selected values in background, is there any way to debug?
    thanks
    regards

    Hi Alex,
    I have tried RSRT and Aanlyzer to debug. My master data read class works good and the query can find values with the restricted values, but when I excute the query in Query designer, the query can not find the values any more.
    Do you have any idea where the problem is?
    thanks
    regards

  • How to store multiple data's in an object

    i am preparing a game, the game has four bet spots. i want to save the user bet details. i like to save the user bet details in an object, so i can access it whenever i need.
    I have done same thing in AS 2.0. my object will look like
    player[0].betSpot1.amount="100"
    player[0].betSpot2.amount="200"
    i am not sure to do this in AS 3.0. any help pls
    Thanks in advance

    What you show has errors even for AS2.  The most significant one being that your buttons are not being named to give you what your code is after.  Tr the following and rename your buttons to fit the intentions of the code...
    var gameDetails:Object = new Object();
    gameDetails.player = new Array(new Object());
    betSpot_0.mouseChildren = true;
    betSpot_0.addEventListener(MouseEvent.CLICK, onBtnClick);
    function onBtnClick(e:MouseEvent){
        var btn = e.currentTarget.name;
        var spot = String(btn).split("_")[0];
        var spotId =String(btn).split("_")[1];
        gameDetails.player[spotId].betSpot = spot;
        gameDetails.player[spotId].betSpotId = spotId;
    edit:  after rethinking what I offered, I believe it is also off the mark, but I also think there is likely a much simpler data structure you can use for whatever purpose this data is going to serve.  If you can explain what the data needs to provide, it might be possible to help you define a simpler structure.  A bit of what you showed originally, an array of objects, would seem much more suitable.

  • How to get master data for 0Customer Info object.

    Hey Frieds,
    I have infoobject 0customer and 0Comp code , I want to get the 'address' field of it .
    I checked in master data and found that address field is not populated ,so is there any standard data source to get it , or any other way to get it.
    Please respond
    Thanks

    Hi Anurag,
    you will get the address in the 0customer_attr datasrc.
    You can populate address as an attribute of 0customer object from here.
    hope it helps...

  • How can I hold data stored in an object?

    Hi everyone!
    I have a problem with a Java-Program that I am trying to write for university.
    The program is the following:
    import java.io.*;
    public class Ergasia4
    {     public static void main (String args[])throws IOException
         {     int i,epilogi;
              boolean first1=true, first2=true, first3=true, first4=true;
              Ptisi A3510,A3511,A3512,A3513;
              A3510 = new Ptisi();
              A3511 = new Ptisi();
              A3512 = new Ptisi();
              A3513 = new Ptisi();
              i=0;
              for(;;)
              {     do     
                   {     if (i==1) System.out.println ("Lathos epilogi");
                        System.out.println ("EPILOGI PTISIS");
                        System.out.println ("1. Ptisi A3510, ATH-SKG");
                        System.out.println ("2. Ptisi A3511, SKG-ATH");
                        System.out.println ("3. Ptisi A3512, ATH-SKG");
                        System.out.println ("4. Ptisi A3513, SKG-ATH");
                        System.out.println ("0. Exodos");
                        System.out.print ("Epilogi: ");
                        epilogi=my.readInt();
                        System.out.println ();
                        i=1;
                   while ((epilogi!=0)&&(epilogi!=1)&&(epilogi!=2)&&(epilogi!=3)&&(epilogi!=4));
                   if (epilogi==0) break;
                   else
                   {     switch (epilogi)
                        {     case 1: System.out.println("Ptisi A3510, ATH-SKG"); A3510.menu(first1); break;
                             case 2: System.out.println("Ptisi A3511, SKG-ATH"); A3511.menu(first2); break;
                             case 3: System.out.println("Ptisi A3512, ATH-SKG"); A3512.menu(first3); break;
                             case 4: System.out.println("Ptisi A3513, SKG-ATH"); A3513.menu(first4); break;
                             default : break;
    class Ptisi
    {     int epilogi,i;
         private boolean availiability[];
         private long telephones[];
         public void menu (boolean a) throws IOException     
         {     if (a==true) arxikopoiisi(availiability);
              a=false;
              for (;;)
              {     do
                   {     if (i==1) System.out.println ("Lathos epilogi");
                        System.out.println ("1. Kratisi thesewn");
                        System.out.println ("2. Akyrwsi kratisis");
                        System.out.println ("3. Emfanisi sygentrwtikwn stoixeiwn");
                        System.out.println ("0. Exodos");
                        System.out.print ("Epilogi: ");
                        epilogi=my.readInt();
                        System.out.println ();
                        i=1;
                   while ((epilogi!=0)&&(epilogi!=1)&&(epilogi!=2)&&(epilogi!=3));
                   if (epilogi==1)
                   {     kratisi(availiability,telephones);
                        i=0;
                   else if (epilogi==2)
                   {     akyrwsi(availiability,telephones);
                        i=0;
                   else if (epilogi==3)
                   {     emfanisi(availiability);
                        i=0;
                   else if (epilogi==0) break;
         public static void kratisi (boolean availiability[],long telephones[]) throws IOException
         {     int theseis;
              long tilefwno;
              int j,i=0,x=-1;
              boolean k=false;
              i=0;
              do
              {     if (i==1) System.out.println ("Arithmos ektos oriwn");
                   System.out.println ("Poses theseis theleis na kratiseis ?");
                   System.out.print ("Theseis: ");     
                   theseis=my.readInt ();
                   System.out.println ();
                   i=1;
              while ((theseis<0)||(theseis>36));
              for (i=0;i<availiability.length;i++)
              {     if (availiability==true)
                   {     for (j=i;j<=(i+theseis);j++)
                        {     if (availiability[j]==false)
                             {     break;
                             else if (j==(i+theseis))
                             {     x=i;
                                  break;
                   if (x>-1) break;
              if (x>-1);
              {     i=0;
                   do
                   {     if (i==1) System.out.println ("Lathos arithmos tilefwnou");
                        System.out.println ("Eisagete ton arithmo tilefwnou");
                        System.out.print ("Arithmos: ");     
                        tilefwno=my.readInt ();
                        System.out.println ();
                        i=1;
                   while (tilefwno<0);
              if (x>-1)
              {     for (i=x;i<(x+theseis);i++)
                   {     availiability[i]=false; telephones[i]=tilefwno;
                   System.out.println("I kratisi "+theseis+" thesewn egine epityxws");
                   System.out.println();
              else System.out.println("Den yparxoun "+theseis+" diathesimes synexomenes theseis");
         public static void akyrwsi (boolean availiability[],long telephones[]) throws IOException
         {     int i,thesi,plithos,x=-1;
              i=0;
              do
              {     if (i==1) System.out.println ("Arithmos ektos oriwn");
                   System.out.println ("Dwse tin prwti thesi tis akyrwsis");
                   System.out.print ("Prwti thesi: ");     
                   thesi=my.readInt ();
                   i=1;
              while ((thesi<0)||(thesi>36));
              i=0;
              do
              {     if (i==1) System.out.println ("Arithmos ektos oriwn");
                   System.out.println ("Poses theseis theleis na akyrwseis ?");
                   System.out.print ("Prwti thesi: "+thesi+" Theseis: ");     
                   plithos=my.readInt ();
                   System.out.println ();
                   i=1;
              while ((plithos<0)||(plithos>36-thesi));
              for (i=thesi;i<=(thesi+plithos-1);i++)
              {     if (availiability[i]==true)
                   {     break;
                   else if (i==(thesi+plithos-1))
                   {     x=i;
                        break;
              if (x>-1)
              {     for (i=thesi;i<(thesi+plithos);i++)
                   {     availiability[i]=true; telephones[i]=0;
                   System.out.println ("I akyrwsi egine epityxws");
                   System.out.println ();
              else
              {     System.out.println ("I epilegmenes theseis einai kenes");
         public static void emfanisi (boolean availiability []) throws IOException
         {     char seatmap[][]=new char [10][10];
              int k,i,j,plirotita=0;
              for (i=0;i<availiability.length;i++)
              {     if (availiability[i]==false) plirotita++;
              plirotita=plirotita*100/36;
              System.out.println("Plirotita :"+plirotita+"%");
              i=0;               
              for (j=0;j<4;j++)
              {     for (k=0;k<9;k++)
                   {     if (availiability[i]==false) seatmap[j][k]='X';
                        else seatmap[j][k]='_';
                        i++;
              for (j=0;j<4;j++)
              {     for (k=0;k<9;k++)
                   {     System.out.print (seatmap[j][k]+" ");
                        if ((k+1)%4==0) System.out.println();
         public void arxikopoiisi (boolean availiability[])
         {     int i;
              for (i=0;i<availiability.length;i++)
              {     availiability[i]=true;
    So, this program is supposed to simulate an airline's reservations system.
    There are four flights, numbered 510-513, each with an aircraft of 36 seats (9 rows of 4 seats each).
    On class "Ptisi" there are 5 classes, which do the following:
    a. class "menu" shows a menu, where the user can select if he wants to make a reservation, a cancellation or if he wants to view the seat map.
    b. class "kratisi" performs a reservation.
    c. class "akyrwsi" performs a cancellation.
    d. class "emfanisi" shows the seat map.
    e. class "arxikopoiisi" initializes the array "availability[36], making it all "true".
    Class "Ergasia4" is supposed to create four objects, A3510-A3513, for each of the 4 flights. Then there is a menu for the user to select between the four flights. Depending on the choice of the user, the program must show the menu for one of the four available flights, as programmed on class "Ptisi" and then perform the action(s) requested by the user. On both menus, "0" exits.
    So, what is my problem?
    Well, when I run the program, if I select a flight, then all actions are performed without a problem, I can make a reservation, cancel some seats or view the seat map. The problem comes when I exit a flight, then work on another flight and then return on the original one. All seat reservations are gone!
    Can anybody help me solve this problem?
    Thank you in advance,
    philimonas
    P.S. If you think it would be helpful, I can omit the code of the functions that work!

    Thanks for your help, doremifasollatido!!
    So, the code now looks as follows (I am posting a "smaller" version of it)
    import java.io.*;
    public class Ergasia4
    {     public static void main (String args[])throws IOException
         {     int epilogi;
              boolean secondTry;
              Ptisi A3510,A3511,A3512,A3513;
              A3510 = new Ptisi();
              A3511 = new Ptisi();
              A3512 = new Ptisi();
              A3513 = new Ptisi();
              secondTry=false;
              for(;;)
              {     do     
                   {     if (secondTry)
                        {     System.out.println ("Lathos epilogi");
                        System.out.println ("EPILOGI PTISIS");
                        System.out.println ("1. Ptisi A3510, ATH-SKG");
                        System.out.println ("2. Ptisi A3511, SKG-ATH");
                        System.out.println ("3. Ptisi A3512, ATH-SKG");
                        System.out.println ("4. Ptisi A3513, SKG-ATH");
                        System.out.println ("0. Exodos");
                        System.out.print ("Epilogi: ");
                        epilogi=my.readInt();
                        System.out.println ();
                        secondTry=true;
                   while ((epilogi<0) || (epilogi>4));
                   if (epilogi==0) break;
                   else
                   {     switch (epilogi)
                        {     case 1:
                             {     System.out.println("Ptisi A3510, ATH-SKG");
                                  A3510.menu();
                                  secondTry=false;
                                  break;
                             case 2:
                             {     System.out.println("Ptisi A3511, SKG-ATH");
                                  A3511.menu();
                                  secondTry=false;
                                  break;
                             case 3:
                             {     System.out.println("Ptisi A3512, ATH-SKG");
                                  A3512.menu();
                                  secondTry=false;
                                  break;
                             case 4:
                             {     System.out.println("Ptisi A3513, SKG-ATH");
                                  A3513.menu();
                                  secondTry=false;
                                  break;
                             default : break;
    class Ptisi
         private boolean availability[];
         private long telephones[];
         public Ptisi()
         {     availability = new boolean[36]; // Do you do this somewhere?
                 arxikopoiisi();
         //Displays the menu for action-selection     
         public void menu () throws IOException     
         {      //Variables
                 //Shows the menu
         //Method to reserve seats
         public void kratisi () throws IOException
         {     //Variables
              //Asks the number of seats to be booked and checks for input errors          
              //Finds, if available, the first seat of the booking
              //Asks for the telephone number to be used at the booking, if a booking is to be made
                    if (x>-1);
              {     i=0;
                   do
                   {     if (i==1) System.out.println ("Lathos arithmos tilefwnou");
                        System.out.println ("Eisagete ton arithmo tilefwnou");
                        System.out.print ("Arithmos: ");     
                        tilefwno=my.readInt ();
                        System.out.println ();
                        i=1;
                   while (tilefwno<0);
              //Performs the booking, or displays an error message
                    if (x>-1)
              {     for (i=x;i<(x+theseis);i++)
                   {     availability=false; telephones[i]=tilefwno;
                   System.out.println("I kratisi "+theseis+" thesewn egine epityxws");
                   System.out.println();
              else System.out.println("Den yparxoun "+theseis+" diathesimes synexomenes theseis");
         //Method to make a cancellation
         public void akyrwsi () throws IOException
         {     //Variables
              //Asks for the first seat of the cancellation and checks for input errors
              //Asks for the total seats to be canceled and checks for input errors
              //Checks if the seats to be canceled are really booked
              //Performs the cancellation, or displays an error message
         //Method to display the % of occupancy and the seatmap
         public void emfanisi () throws IOException
         {     //Variables
              //Calculates the % of occupancy          
              //Displays of the % of occupancy
              //Creation of the seatmap
              //Display of the seatmap
    //Method to initialize the array "arxikopoiisi", giving it "true" as a value
         public void arxikopoiisi ()
         {     for (int i=0;i<availability.length;i++)
              {     availability[i]=true;
    My problem now is an exception in thread "main" java.lang.NullPointerException at this line:
    {     availability=false; telephones[i]=tilefwno;
    Any more ideas?
    Regards,
    philimonas

  • How to upload data in excel file to an internal table

    hi,
    how can we upload data in excel file on presentation server to an internal table..?
    Any pointers on this would be helpful.
    Regards,
    Anil.

    hi
    use the fm ALSM_EXCEL_TO_INTERNAL_TABLE
    check this example
    TYPES: BEGIN OF ty_mara,
             matnr LIKE mara-matnr,
             mbrsh LIKE mara-mbrsh,
             mtart LIKE mara-mtart,
             maktx LIKE makt-maktx,
             meins LIKE mara-meins,
          END OF ty_mara.
    DATA: it_mara TYPE table of ty_mara WITH HEADER LINE.
    parameters : p_file like RLGRAP-FILENAME.
    data : itab type table of ALSMEX_TABLINE WITH HEADER LINE.
    start-of-selection.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = p_file
        i_begin_col                   = 1
        i_begin_row                   = 1
        i_end_col                     = 5
        i_end_row                     = 4
      tables
        intern                        = itab.
    loop at itab.
      CASE ITAB-COL.
        WHEN '1'.
          it_mara-matnr = ITAB-VALUE.
        WHEN '2'.
         it_mara-mbrsh = ITAB-VALUE.
        WHEN '3'.
          it_mara-mbrsh = ITAB-VALUE.
        WHEN '4'.
         it_mara-maktx  = ITAB-VALUE.
        WHEN '5'.
          it_mara-meins = ITAB-VALUE.
      ENDCASE.
    AT END OF ROW.
      APPEND it_mara.
      CLEAR it_mara.
    ENDAT.
      endloop.
    regards
    prasanth

  • Ways to Upload data into Cube,

    1. What are the methods to upload data into cube, apart from flat file mode.(.csv)
    2. I  have some data in the Planning book in a  KF eg. Sales Order. , i need to upload this sales order data to another cube, say forecast cube. how can i do it???
    how to upload the data from Planning book to another cube.
    Thanks!.

    Please follow the steps:
    1.      If necessary, replicate the DataSource. To do so, you can use the following options in the Data Warehousing Workbench:
    ○     Select the source system in the source system overview and choose Replicate DataSources in the context menu. This replicates all data sources in the source system.
    ○     Select the data source in the DataSource overview and choose Replicate Metadata in the context menu. This replicates just the one DataSource.
      2.      Create an InfoSource and assign the data source to it. To do so, choose your application component on the InfoSource page of the Data Warehousing Workbench. In the context menu, choose Create InfoSource. On the next dialog box, select Transactional Data. Another dialog box appears. Enter a name and description for the new InfoSource and choose Enter. In the tree, select the new InfoSource. In the context menu, choose Assign DataSource. On the dialog box that appears, enter the source system. A list of DataSources appears. Select the required DataSource. Choose Enter.
    Alternatively you can remain in the DataSource overview. A  icon indicates that no InfoSource has been assigned yet. Either click the icon or choose Assign InfoSource in the context menu. On the dialog box that appears, enter a name for the InfoSource. Choose . On the next dialog box, enter a description and choose . Confirm the following dialog box. You can now maintain the InfoSource.
    You can assign a DataSource to one InfoSource only.
    3.      Create a DataStore object in the InfoProvider overview of the Data Warehousing Workbench.
    a.      Select the InfoArea and then choose Create DataStore Object in the context menu. The Edit DataStore Object dialog box appears.
      b.      Enter a name and a short description. If required, you can also specify a DataStore object to use as a template. Choose . The Edit DataStore Object dialog box appears.
       c.      On the left-hand side of the screen, you can select InfoObjects, for example, InfoCubes or InfoObjectCatalogs. You can copy characteristics or key figures from these InfoObjects to the DataStore object. We suggest that you select either the InfoCube to which you want to copy the data, or the InfoSource.
         d.      Copy the characteristics to the key fields in the right-hand tree in the DataStore object and copy the key figures to the data fields. In both cases, use drag and drop. You might have to transfer the 0RECORDMODE InfoObject from the Business Content.
         e.      In the Settings branch of the DataStore tree, set the following indicators:
    ■      Set quality status to 'OK' automatically
    ■      Activate DataStore object data automatically
    ■      Update data targets from DataStore object automatically
      f.      Activate the DataStore object.
    For more information, see DataStore Object.
           4.      Create update rules for the DataStore object.
    .a.      Select the DataStore object in the data targets page (Data Warehousing Workbench).
    b.      Choose Create update rules from the context menu. The Create Update Rules screen appears.
    c.      Enter the InfoSource that you created in step 2. Choose . Edit the update rules as necessary.
    d.      Activate the update rules by choosing .
           5.      Create update rules for the InfoCube as above, but with the DataStore object as the data source.
           6.      Create an InfoPackage for the InfoSource. In contrast to the normal procedure, on the Processing tab page, set the Only PSA and Update subsequently in data targetsindicators. Start or schedule the data load

  • Upload data in excel sheet through BDC

    Dear all,
    How do we upload data in excel sheet through BDC?
    Thanks in advance.
    Regards,
    Sandra.

    Hi,
         The sample code is as given below:
    REPORT  upload_supply_area.
    *include for dispaying icons in error log
    INCLUDE <icon>.
    *Declaration of structure.
    TYPES:BEGIN OF x_struct,
          werks TYPE v_pvbe-werks,          "Plant
          prvbe TYPE v_pvbe-prvbe,          "Supply Area
          pvbtx TYPE v_pvbe-pvbtx,          "Production supply area description
          lgort TYPE v_pvbe-lgort,          "Storage Location
          rgver TYPE v_pvbe-rgver,          "Person responsible for one or more supply areas
          END OF x_struct.
    TYPES:BEGIN OF x_messages,
           msgtyp(1) type c,
           werks TYPE v_pvbe-werks,          "Plant
           prvbe TYPE v_pvbe-prvbe,          "Supply Area
           message(120) type c,
           END OF x_messages.
    DATA: it_messages  TYPE STANDARD TABLE OF x_messages .
    DATA: wa_messages TYPE x_messages.
    DATA:it_msgtab TYPE STANDARD TABLE OF bdcmsgcoll,
         wa_msgtab TYPE bdcmsgcoll.
    *internal table for BDC
    DATA: it_bdcdata TYPE STANDARD TABLE OF bdcdata.
    DATA: wa_bdcdata TYPE bdcdata.
    DATA:it_file TYPE STANDARD TABLE OF x_struct.        "internal table which has same structure as file
    DATA:wa_file TYPE x_struct.                          "work area which has same structure as file
    DATA: it_excel TYPE STANDARD TABLE OF alsmex_tabline,
          wa_excel TYPE alsmex_tabline.
    DATA: x_ctuprms TYPE ctu_params.
    DATA:nodata TYPE c VALUE '/'.
    data:con(50) type c.
    data:con1(50) type c.
    *selection screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    *Enter file name on presentation server
    PARAMETERS:  p_file TYPE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *Function which enables the user to browse the files on hard disk
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          program_name  = syst-repid
          static        = 'X'
        CHANGING
          file_name     = p_file
        EXCEPTIONS
          mask_too_long = 1
          OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    START-OF-SELECTION.
    *Subroutine to upload excel file and read it
      PERFORM upload.
    *Subroutine to upload supply area data
      PERFORM fill.
    *&      Form  bdc_dynpro
          Fill the BDC table
    FORM bdc_dynpro USING program dynpro.                       "#EC *
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = program.
      wa_bdcdata-dynpro   = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
    ENDFORM.                    "BDC_DYNPRO
    *&      Form  bdc_field
           Fill the BDC table
    FORM bdc_field USING fnam fval.                             "#EC *
      IF fval <> nodata.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam = fnam.
        wa_bdcdata-fval = fval.
        APPEND wa_bdcdata TO it_bdcdata.                        "#EC
      ENDIF.
    ENDFORM.                    "BDC_FIELD
    *&      Form  collect_messages
          Collect the messages from transaction
    FORM collect_messages .                                     "#EC *
      DATA: w_msg(100).
      LOOP AT it_msgtab INTO wa_msgtab.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = wa_msgtab-msgid
            lang      = wa_msgtab-msgspra
            no        = wa_msgtab-msgnr
            v1        = wa_msgtab-msgv1
            v2        = wa_msgtab-msgv2
          IMPORTING
            msg       = w_msg
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CONDENSE w_msg.
        CLEAR wa_messages.
        wa_messages-msgtyp = wa_msgtab-msgtyp.
        wa_messages-message = w_msg.
        wa_messages-werks = wa_file-werks.
        wa_messages-prvbe = wa_file-prvbe.
    if wa_messages-message eq 'Formatting error in the field V_PVBE-RGVER; see next message'.
    wa_messages-message = 'Invalid name of the person responsible'.
    endif.
    if wa_messages-message eq 'Formatting error in the field V_PVBE-LGORT; see next message'.
    wa_messages-message = 'Enter the storage location'.
    endif.
        APPEND wa_messages TO it_messages .
      ENDLOOP.
      REFRESH it_msgtab.
    ENDFORM.                    "collect_messages
    *&      Form  write_messages
          Display the messages
    FORM write_messages .
      DELETE ADJACENT DUPLICATES FROM it_messages COMPARING werks prvbe.
      LOOP AT it_messages INTO wa_messages .
        WRITE:/1 sy-vline.
        IF wa_messages-msgtyp = 'S'.
          WRITE: 10 icon_green_light.
        ELSEIF wa_messages-msgtyp = 'E'.
          WRITE: 10 icon_red_light.
        ELSEIF wa_messages-msgtyp = 'W'.
          WRITE: 10 icon_yellow_light.
        ENDIF.
        WRITE: 20 sy-vline.
        WRITE : 30 'Plant-', wa_messages-werks .                "#EC NOTEXT
        WRITE: 48 sy-vline.
        WRITE : 49 'Supply Area-', wa_messages-prvbe .          "#EC NOTEXT
        WRITE: 79 sy-vline.
        WRITE : 80 wa_messages-message .
        WRITE: 180 sy-vline.
        WRITE:/1 sy-vline.
        ULINE 1(180).
      ENDLOOP.
    ENDFORM.                    " write_m
    *&      Form  fill_params
          Processing mode for the transaction
    FORM fill_params .
      x_ctuprms-dismode = 'N'.
      x_ctuprms-updmode = 'A'.
      x_ctuprms-defsize = 'X'.
    ENDFORM.                    "fill_params
    *&      Form  upload
          Upload the excel file and read the data
    FORM upload .
    *Function to upload excel file
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_file
          i_begin_col             = 1
          i_begin_row             = 2
          i_end_col               = 5
          i_end_row               = 9999
        TABLES
          intern                  = it_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR wa_file.
    *Read the file row-wise
      LOOP AT it_excel INTO wa_excel.
        CASE wa_excel-col .
    *Read plant
          WHEN '1'.
            wa_file-werks = wa_excel-value.
    *Read supply area
          WHEN '2'.
            wa_file-prvbe = wa_excel-value.
    *Read decription
          WHEN '3'.
            wa_file-pvbtx = wa_excel-value.
    *Read storage location
          WHEN '4'.
            wa_file-lgort = wa_excel-value.
    *Read Person responsible
          WHEN '5'.
            IF STRLEN( wa_excel-value ) = 1.
              CONCATENATE '00' wa_excel-value INTO con.
              wa_file-rgver = con.
            ELSEIF STRLEN( wa_excel-value ) = 2.
              CONCATENATE '0' wa_excel-value INTO con1.
              wa_file-rgver = con1.
            ELSE.
              wa_file-rgver = wa_excel-value.
            ENDIF.
        ENDCASE.
        AT END OF row.
          CONDENSE:wa_file-werks,wa_file-prvbe,wa_file-pvbtx,wa_file-lgort,wa_file-rgver.
          APPEND wa_file TO it_file.
          CLEAR wa_file.
        ENDAT .
      ENDLOOP.
    ENDFORM.                    " upload
    *&      Form  fill
          Call the transaction 'PK05'
    FORM fill .
    *Upload the data through transaction 'PK05'
      PERFORM fill_params.
      LOOP AT it_file INTO wa_file.
        PERFORM bdc_dynpro      USING 'SAPLSVIX' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'D0100_FIELD_TAB-LOWER_LIMIT(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=OKAY'.
        PERFORM bdc_dynpro      USING 'SAPL0PK1' '0020'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V_PVBE-PVBTX(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=NEWL'.
        PERFORM bdc_dynpro      USING 'SAPL0PK1' '0021'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V_PVBE-RGVER'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'V_PVBE-WERKS'
                                      wa_file-werks.
        PERFORM bdc_field       USING 'V_PVBE-PRVBE'
                                      wa_file-prvbe.
        PERFORM bdc_field       USING 'V_PVBE-PVBTX'
                                      wa_file-pvbtx.
        PERFORM bdc_field       USING 'V_PVBE-LGORT'
                                      wa_file-lgort.
        PERFORM bdc_field       USING 'V_PVBE-RGVER'
                                      wa_file-rgver.
        PERFORM bdc_dynpro      USING 'SAPL0PK1' '0021'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'V_PVBE-WERKS'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'V_PVBE-WERKS'
                                      wa_file-werks.
        PERFORM bdc_field       USING 'V_PVBE-PRVBE'
                                      wa_file-prvbe.
        PERFORM bdc_field       USING 'V_PVBE-PVBTX'
                                      wa_file-pvbtx.
        PERFORM bdc_field       USING 'V_PVBE-LGORT'
                                      wa_file-lgort.
        PERFORM bdc_field       USING 'V_PVBE-RGVER'
                                      wa_file-rgver.
        CALL TRANSACTION 'PK05'
                           USING it_bdcdata
                           OPTIONS FROM x_ctuprms
                           MESSAGES INTO it_msgtab.
        REFRESH it_bdcdata.
        PERFORM collect_messages.
        CLEAR wa_file.
      ENDLOOP.
      PERFORM write_messages.
    ENDFORM.                    " fill

Maybe you are looking for

  • Create a validation for check double invoice

    Hi, I have read here on SDN for check double invoice on reference number. We want to create an warning message if same reference number is posted twice, not depending on invoice date. So if I, on 1st of October have posted an invoice with reference n

  • Client Copy v/s Transport

    Hi , I want to understand the difference between Client-Copy and Transport. After I have developed reports in Dev Box , which is the best option out of both ? Should one do a client copy from Dev to QA or Transport Objects ? What are typical Advantag

  • ALV - Buttons handling

    Hi gurus, My ALV(reuse_alv) report has 4 buttons(custom buttons, like category wise view, plant wise view etc) created by me and iam using my own GUI status. Now when i view my report and navigate between the four buttons the functionality is not wor

  • Comment migrer ODI 10.1.3 vers 12..

    Bonjour, nous devons migrer notre serveur ODI de 10.1.3 vers la version 12 quel est la meilleure Façon de procéder pour récupérer toutes les interfaces développées? Merci pour votre aide

  • Not able to optimize query

    Hello, I am working on one query but not able to optimize on that query after working for 2-3 days. Can anyone please help? SELECT x7_0.keypowermarketentity, x1_0.plantmonthlyasofyear, x1_0.plantmonthlyasofmonth, x0_0.plantownerperiodasof, x0_0.unitc