Copy one dimension to other in the same Application

Dear Experts,
I need to create a new dimension as a copy of one dimension inside App_set (yes, two dimensions with same data), I think about implement a BADI like this:
Time dimension & BAdI
But really I'm not sure what happens in this code.  I'm in a good way or I need to change my point of view?. Anyway, can somebody help me with my problem?
Many thanks.

Solved.
  lo_context = cl_uj_context=>get_cur_context( ).
  lo_model = cl_uj_model=>get_model( i_appset_id = lo_context->d_appset_id ).
  lo_dim_origin = lo_model->get_dim_data( 'Dimension7' ).
  lo_dim_post = lo_model->get_dim_data( 'Dimension8' ).
" Leémos los datos de la dimensión origen
  CALL METHOD lo_dim_origin->read_mbr_data
    EXPORTING
     " if_ret_hashtab = abap_true
      "if_sort        = abap_true
      "if_inc_txt     = abap_true
      if_only_base = abap_false
    IMPORTING
      er_data        = lr_data.
  ASSIGN lr_data->* TO <lt_dim_mbr>.
  if lines( <lt_dim_mbr> ) = 0.
    return.
  endif.
" Escribimos los datos de la dimensión destino
  CALL METHOD lo_dim_post->write_mbr_data
    EXPORTING
      i_key_date   = sy-datum
      it_md        = <lt_dim_mbr>
      if_overwrite = abap_true
    IMPORTING
      ef_success   = lf_success
      et_message   = lt_msg.
  IF lf_success = abap_false.
    RAISE EXCEPTION TYPE CX_UJ_CUSTOM_LOGIC.
  ENDIF.
Edited by: Roger Peruchet on Oct 25, 2010 6:31 PM

Similar Messages

  • Moving the object from one dimension to other in the cube in BI7.0

    Hi Gurus,
    I am new to BI7.0
    We have a requirement wherein we need to move the object from one dimension to other dimension within same Infocube.I tried doing 'cut' and 'insert' from the context menu of the dimensions, but it didnt work.
    Please let me know how do we do that..
    Thanks,
    Shalaka.

    Hi,
    Use Remodelling opttion avialable .For more info, earch the forum and go through SAP standard help.
    With rgds,
    Anil Kumar Sharma .P

  • Movement of material from one plant to other within the same country

    Hello,
    I would like to move material from one plant to other via tran MB1B.
    The system generates the following error while trying to save document :
    Account determination for entry BAS1 BSX 9000 ___ C100 not possible
    The system did not find an account for this transaction. This means that the account determination for key BAS1 BSX 9000 ___ C100 is not maintained in MM Customizing (Valuation). The key is made up of:
    Chart of account
    Transaction key (= Posting transaction)
    Valuation grouping code
    Account grouping code
    Valuation class
    System Response
    The system cannot update a G/L account for this transaction. You cannot post the transaction.
    Can you please tell me where the necessary setting should be made.
    Thanks

    Hi
    Please check the confirguration in OBYC for this combination and assign GL account for this combination of Valuation class, Valuation area.
    Regards,
    Lakshmanan Krishnan

  • ITunes refuses to group one video with others with the same album and artist

    This is absolutely ridiculous. They have the exact same album and artist name, yet my latest addition refuses to group with the others. I've tried so many things, yet it still won't group. Tried adding some random text to both the album and artist. Then tried removing the random text. Also tried completely removing all the text and manually typing them again. Still does the exact same thing. And believe me, there are no spaces or weird characters that differentiate them. They are exactly the same. The weird thing is, if I add the word "Nuke" before "Jizztage" in the title, it will then group. What the ****? I don't want the title of the video to be "Nuke Jizztage Volume 1." Just so frustrating for an app that has been around for donkey's years. And no, it's not a big deal. Just annoys me that I have to spend hours trying to figure out why this stupid piece of software won't do the simplest of things!

    A Little further clarification.....
    The computer will start..... makes noise - disk whirring.   But screen does not illuminate and operating system does not boot.

  • "No connectivity with the server" error for one document but not the other, in the same document library

    We have a number of users all of a sudden getting "No connectivity with the server.  The file 'xxx' can't be opened because the server couldn't be contacted." errors trying to open MS Office docs (Word, Excel, etc.) in SharePoint with IE,
    just by clicking the link and selecting the "Read Only" option.  If they select the "Check Out and Edit" option, they can open the document no problem.  One of my customers gets the error on one document but not the other, in
    the same document library!  The older document (a weekly report) was copied and renamed as per standard procedure.  She can read the older document, but not the new one.
    It is definitely a profile issue, as other people have logged onto the machines of the users with problems and do not get the error.  We have also renamed people's c:\user profile folders and the corresponding Profilelist registry entry and the newly
    created profile does not experience the error for these people.  Renaming the profile back restores all their personal settings but the error reappears.  When we copied the old profile's folder structure into the new profile, many of the user settings
    were restored (but not all, like Dreamweaver settings) but the error did not appear.  We think that the system folders files (like AppData) weren't totally copied over so we're going to run another test using xcopy.  We are rebooting between
    logons to make sure all files are unlocked.
    The laptops and computers are mainly 32bit, Win7 Enterprise running IE9 and Office 2010 Professional Plus, but there's a few 64bit machines as well. The SharePoint farm has 1 WFE, 1 App Server running search and CA, and a shared database server running SQL
    2005 SP4.  SharePoint is 64bit MOSS 2007 with the latest CU.
    We've checked the logs on the client as well as on the server and there aren't any helpful entries.  We've also run Process Monitor, also with no helpful entries.  We're planning to run something like Fiddler next.
    It's not everyone, because there are many people are accessing the SharePoint system and the same files.  It is also not a permission thing, as we've tested by giving the users elevated permissions with no changes.  One person experiencing
    the errors is a Site Collection Admin.  That same person ran a test where I coped a simple Excel file into a Document Library which contained a problem file.  They were able to open it Read Only no problems that day, but the next day, the same
    file gave them an error.   In their case, they usually get a "xxx is not checked out" error and only occasionally get the "No connectivity with the server" error.
    We've tried lots of things including:
    Deleting IE cache
    Deleting SharePoint Drafts and webcache folder contents
    Running IE without add-ons
    Upgrading and Downgrading IE
    Uninstalling and re-installing IE
    Reinstalling our SSL certs
    Repairing Office
    Removing and then adding back in the Microsoft Office "Microsoft SharePoint Foundation Support" Office Tool 
    Deleting all HKLM and HKLU Office registry settings
    Toggling IE Compatibility Settings
    Toggling the IE Automatic Logon option
    Toggling the location of checked out files
    Adding the site in the trusted sites list
    Adding the site to the WebClient\Parameters registry locations
    Making sure the WebClient service is started
    Rebooting the machine (lol :)
    This is becoming a serious issue, not just because of the inconvenience for the users having to check out every document they want to read, but we have some files with macros that open up other documents to run which are now failing.  There aren't
    "check out" workarounds for some of those macros.
    We're planning to open a ticket with Microsoft, but I'm throwing it out here first in case someone has run into this before, or may have some suggestions on what to try next.  Thanks!
    -Richard.
    PS  I think this needs to be in the "General" forum instead?

    It took three days of dedicated troubleshooting, but I have found the cause of the errors, and a couple of fixes.  It helped tremendously that my own machine was throwing the error.  I have scheduled a couple of users to work with me to test the
    various fixes, to see which one works best, so the story isn't over yet.
    I had backed up my c:\users profile folder and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry key so I could restore my profile after I was done.  I made a copy of the profile folder and was using that for awhile,
    but then made another copy where I had deleted a lot of content out of it so that the copies would go faster.  Since a newly created profile did not have errors, I was trying to copy back as much of the profile as possible to make it easier for our users
    to get back to work.  Instead of blowing away their profile and starting from scratch (which we know worked) I wanted to narrow down what was causing the error and just skip that from the restore.  The concept was to keep as much as the users profile
    in tact (application settings, etc.) not just restoring their desktop and My Documents folders.
    When we first tested a few weeks ago, simply copying the folder contents didn't reproduce the error.  I then tried xcopy, but got the "can't read file" error.  Then I tried robocopy, and ran into the "junction" problem. 
    I went back to xcopy, and found that placing the excludes.txt file in the windows/system32 folder eliminated the error.
    So the process went as follows: 
    Reboot and log into the machine as another user
    Delete the profile and associated registry key
    Reboot and log into the machine as the affected user, creating a new profile, and there is no error
    Reboot and log in as the other user
    xcopy the contents of the skinned-down backed-up profile to the newly created profile
    Reboot and log in as the affected user, and the error occurs
    Repeat the above, but add items in the excludes.txt file to see what, when eliminated, causes the error not to appear in the last step
    I eventually found that skipping the c:\users\<profile folder>\appdata\local\Microsoft\office\14.0 folder allowed the entire profile to be copied over without the error occurring.  That was strange, because we've cleaned out the cache folders
    before which didn't fix the issue. 
    So I went about it the opposite way, and tried to delete the 14.0 folder from the restored profile, and after reboot, the error still occurred.
    What eventually worked was deleting the 14.0 folder and copying over a 14.0 folder from a newly created profile!
    One way to do this was to:
    Reboot and log in as another user
    Rename the c:\users profile folder
    Rename the appropriate [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList] registry key
    Reboot and log in as the affected user, confirm that there is no error
    Reboot and log in as the other user
    Copy the C:\Users\<profile folder>\AppData\Local\microsoft\Office\14.0 folder to the other user's desktop
    Delete new profile folder, and rename the backup to be the production folder
    Delete the C:\Users\<profile folder>\AppData\Local\microsoft\Office\14.0 folder and then paste the 14.0 copy from the desktop
    Reboot and log in as the affected user, confirm that there is no error
    We've tried this on a couple machines and it works.  I had to run Windows Explorer as Administrator to access the other profile's folders.
    We've also successfully copied a 14.0 folder created by one profile on one affected computer over another profile's folder on another computer, eliminating the error, so we're trying that first, as that is fewer steps.
    We may attempt to script this, but the self-help instructions are only 5 lines long:
    Reboot and log into the affected computer with another account
    Go to <link to location of 14.0 folder on network> and copy the 14.0 folder
    Run Windows Explorer as Administrator
    Go to c:\users\<profile folder>\appdata\local\microsoft\office and delete the 14.0 folder, and paste the copied 14.0 folder (trying to overwrite it makes Win7 want to merge the folders)
    Reboot and log into your normal account, and confirm the error is gone
    I'll come back and report after we go into the field with this fix, but after the few tests, I am cautiously optimistic that this is it.

  • Copy data from one application to another in the same application set

    Hello everyone
    i hope you are all fit and fine
    i have a little question
    i have my source application with accounts
    and in my destination application, some accounts are like AppSource.Account1+AppSource.Account2 etc...
    when i write the logic
    i have to rename the dimensions both applications have in common
    use the instruction *skip_dim for the dimensions which are in the source application but not in the destination one
    and use instruction  *add_dim for the dimensions available in the destination app and not in the source app
    is that right?
    and can i write *add_dim dimension_name=all or do i have to precise a base level member
    and after that i wan simply use instructions like
    when AppSource.Account
    is Account 1, account 2
    rec (appDestination.Account)
    is my procedure correct please especially the syntax of *add_dim dimname=all?
    thanks a lot folks
    take care

    Hi Clarie,
    Your understanding is correct, except that you need to give precise baselevel member in *add_dim as you can not write data to parent member and regarding
    AppSource.Account1+AppSource.Account2
    This logic will work,
    *destination_app = appDestination
    //list add_dim,skip_dim,*rename_dim
    //assuming name of account dimension in source app is account
    *when account
    *is account1,account2
    rec(acct=account3)
    //acct is name of account dimension in destination application
    //where account3 is the member of destination application account dimension to which sum of account1 and account2 are to be written
    Hope this helps,
    Kranthi

  • HT204406 Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for

    Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for weeks. I have allowed my compter to run for days and the songs are still not accessible.  I have a Match subscription and Match is working.  If I click on the "Genre" link the greyed out songs show that they are ready for download from the cloud but I cannot download them.  I have downloaded over 1500 other songs, so I am trying to understand what is going on here. I would appreciate any help anyone can give me.
    Thanks

    I did think about that and if I have to I will do that, however there are about 50 songs. I have closed and reopened iTunes several times and I am sure that I have the latest version. It fails right away but I can click on the cloud download icon and download the song that it failed on ... therefore it is not that song "or any one song" causing the issue. Any ideas?

  • We have two iPad 2s and on one apps keep shutting down but on the other iPad the same app is fine. We have deleted the app, hard restarted and it still shuts down. How can we fix this?

    We have two iPad 2s and on one apps keep shutting down but on the other iPad the same app is fine. We have deleted the app, hard restarted and it still shuts down. How can we fix this?

    got the same problem. did the hard reset but to no avail. mine is ipad 2 16gb ios 7

  • When I enter an event in iCal, soon thereafter multiple other "New Event" notices (one to four) appear for the same day. If I delete these unwanted "New Event" notices, they later reappear -- sometimes multiplying like rabbits. Any suggestions?

    When I enter an event in iCal, soon thereafter multiple other "New Event" notices (one to four) appear for the same day. If I delete these unwanted "New Event" notices, they later reappear -- sometimes multiplying like rabbits. Any suggestions?

    Well, using iMovie to rearrange clips in a mini DV video edited by another program is extremely time consuming. I found a workaround. It still takes time, but it's much faster than rearranging the clips using iMovie.
    The workaround is as follows. Bring up Finder and go to the directory where your event's clips are stored (typically ~/Movies/iMovie Events/<name of event>). It helps to setup Finder to be in Cover Flow mode, so you can see the beginning of each clip. Then, sort the files in ascending order by the 'Date Modified' field. This makes Finder sort the files in the same order that they were imported from the mini DV tape. Clips with timecodes have the naming convention "clip-<year>-<month>-<day> hour;minute;second.dv". Clips without timecodes use another naming convention. With the files sorted by "Date Modified" in Finder, rename clips as needed so that the date/time in their file names are in ascending order. Note: when you rename a file, you need to restart iMovie. I suggest not running iMovie while renaming files.
    I believe the file date/timestamp is only accurate to the second. Occasionally, there may be a couple of clips that have the same date/timestamp. This may cause the ordering to not be correct. The best way to find these is through iMovie. To modify a file's date/time, right click on the clip in the event in iMovie, and then select "Adjust Clip Date and Time...".
    So, this workaround is a lot easier and faster than trying to rearrange things from scratch in iMovie. But it's still time consuming. Creating a project out of an already edited video should take less than 5 minutes (not counting import time), but that's not the case.
    I submitted an enhancement request to Apple asking if they can add an option to sort an event's clips in the order that they were imported by iMovie. Those who have the same issue as me, I suggest you submit an enhancement request as well.
    Anyone have any other suggestions?
    Thanks.

  • Is the maximum number of users for Airport Extreme per device, i.e. 2 AEBS = 100 users, one AEBS extending the other on the same wireless network?

    Is the maximum number of users for Airport Extreme per device, i.e. 2 AEBS = 100 users, one AEBS extending the other on the same wireless network?

    50 users per device, assuming that the "main" router is setup to deliver an adequate number of network IP addresses for all devices.
    2 AEBS = 100 users, but that is really more of a theoretical max. 
    If you really need 100 connections, it would be much better to use 3 AEBS to spread things out.

  • Moving Events and Projects from one location to another on the same hard drive.

    Hello.
    I've searched in the FCP X User Manual, on this forum and in Google, but have found no explanation of how to do this, so I'm posting this here in hopes that someone in our community will be able to help.
    I've previously stored my FCP X Events and Projects folders on an external 3TB hard drive, because there is more room on it than on the internal 1TB hard drive, but, since then, I've worked with other media apps, for video, photography and audio, the files for which are also stored on the external hard drive, and this has created a bit of clutter with no folder structure to keep it tidy.
    I like an organised file structure on my system, to keep it uncluttered, easy to navigate and efficient to use, so I put all the files for my photography, video and audio apps into their own folders, which are, in turn, stored in their appropriate folders for Audio, Photography and Video, and those three folders are stored in a folder called Media, and then I directed each app to its own files.
    The only app with which this has been a problem is FCP X. While there is a way of relocating projects and events from within FCP X, it allows the user to move them from one hard drive to another, and not, as I want, from one place to another on the same hard drive.
    I'm not sure if it matters, but perhaps it's relevant to mention before the next paragraph that the files that had previously been imported as events are, to save hard-drive space, stored in the events folder as shortcuts to the original files, which are stored elsewhere on the drive, rather than as duplicates of those files.
    In Finder, I copied the Events and Projects folders to their intended new locations and tried in the app to link the events and projects to their new Finder location. It seemed to have worked, until I moved the original folders to the Trash. On re-opening FCP X, it was clear that the linking hadn't worked. I returned the original folders from the Trash to their original location, but that didn't entirely reverse the problem. I noticed also that, in the original and duplicated Events folders, the shortcuts had lost their links to the original files stored elswehere on the drive.
    Fortunately I had run a backup before starting, so I restored the original folders and the app from the backup, and all was back to normal.
    I'd be grateful if anyone could advise me on whether or not it's possible to move FCP X events and projects from one place to another on the same hard drive with the app's compliance.
    Thank you.

    Ludio wrote:
    I'd be grateful if anyone could advise me on whether or not it's possible to move FCP X events and projects from one place to another on the same hard drive with the app's compliance.
    I
    Message was edited by: Russ H Apparently mis-read the questions.

  • Rename externally created dimension (FCM) and keep the same ID

    Hi,
    Urgent, need your help !
    I'm facing an issue regarding renaming externally managed dimensions (from FCM).
    Currently if i rename a dimension using third part tool, then FCM create a new entry into my "data/state/autogen_dimension.xml" file
    with a new ID and the previous one is kept. So i'm having data consistency issue.
    How can i update  dimensions and dimension values (externally managed) keeping previous ID please ?

    FCM and Externally Managed Dimensions are two separate features. 
    If your dimension is being created by FCM and you want to change the name of the dimension itself while keeping the same ID, I think you'd need to go into ./data/state/fcm.dvals.xml[.gz] and ./data/state/fcm.conflicts.xml[.gz] and rename there, as well as change it in your FCM data feed (where you pass in the dimension schema).  If you are actually talking about EMTs, I'm not sure - possibly the same approach.  Certainly just renaming them in the data feed/schema would assign a new ID as the logic would naturally assume this was a new dimension (usually there is a separate display label attribute to support business users changing the label while the name is used as a system ID).
    HTH
    Michael

  • HT204053 what if i change to new iphone can the apps & contacts been copied to my new devise use the same icloud/apple id?

    what if i change to new iphone can the apps & contacts been copied to my new devise use the same icloud/apple id?

    Yes, they can ... best way ist to backup your current device with iTunes and setting up the new iPhone from this backup ... iTunes will ask you this when you connect your new one for the first time ...

  • How do i create more than one account in Mail with the same isp?

    I am using suddenlink and have set up one account for Mail. It seems to work ok. I want to set up two others with the same provider but can't.
    Let's call the first account, account1
    It works.
    I set up another and call it account2.
    It is using the same provider which already has the account set up on their end, but how do I set it up to work on my end? Does it need to use the same username as account1 or can it use the user name for account2? I hope this makes sense.
    I just want to use three email addresses from the same provider with mail. I need some help. Please?

    Initially you need to configure via the provider's own web based control panel multiple e-mail accounts. If they don't have one, work it out with their customer support to have three distinct mail accounts. Then you can setup multiple logins by adding new accounts to mail. Since mail checks all accounts per Mac OS X user account simultaneously, it probably is best to use different usernames on the same internet provider. If you don't want mail to show all the information from all three mail accounts simultaneously, configure Apple menu -> System Preferences -> Accounts to have multiple users on your computer, and configure each of the internet service provider accounts for each separaet user on Mac OS X.
    Message was edited by: a brody

  • Can I move applications from one user to another on the same computer?

    If I have two users on one mac, can I move applications from one user to another on the same computer?
    Thanks

    By default, apps are installed for all the users in /Applications

Maybe you are looking for