Removing Zeros from Packed with decimals value

Declaration is as follows:  var1(3) type p decimals 1
i am passing value from database var1 value is 10.0
In the above case i want to remove decimal value 0 in 10.0 if var1 value is 10.50 then my required value is 10.5 only.
var1 is not used in clasical reports.
I would like to export the variable var1 into smartforms and print.

try this code and adopt it according to your needs:
DATA:
  gv_p_init         TYPE p DECIMALS 2 VALUE '10.1',
  gv_dec_separator  TYPE char1,
  gv_tmp1           TYPE char1024,
  gv_len_dec        TYPE i,
  gv_tmp2           TYPE char1024,
  gr_dref           TYPE REF TO data,
  gr_datadescr      TYPE REF TO cl_abap_datadescr.
FIELD-SYMBOLS:
  <gv_new_p>        TYPE p.
* determine user specific decimal separator
PERFORM get_dec_separator
  CHANGING gv_dec_separator.
WRITE gv_p_init TO gv_tmp1.
SEARCH gv_tmp1 FOR gv_dec_separator.
* create new anonymous data object -> GR_DREF of type P with same length
* as GV_P_INIT and decimals depending on relevant decimals of GV_P_INIT
IF sy-subrc EQ 0.
  MOVE gv_tmp1+sy-fdpos TO gv_tmp2.
  SHIFT gv_tmp2 LEFT DELETING LEADING gv_dec_separator.
  SHIFT gv_tmp2 RIGHT DELETING TRAILING space.
  SHIFT gv_tmp2 RIGHT DELETING TRAILING '0'.
  SHIFT gv_tmp2 LEFT DELETING LEADING space.
  gv_len_dec = STRLEN( gv_tmp2 ).
  gr_datadescr ?= cl_abap_datadescr=>describe_by_data( gv_p_init ).
  gr_datadescr ?= cl_abap_elemdescr=>get_p(
                                    p_decimals = gv_len_dec
                                    p_length   = gr_datadescr->length ).
  CREATE DATA gr_dref TYPE HANDLE gr_datadescr.
  ASSIGN gr_dref->* TO <gv_new_p>.
  MOVE gv_p_init TO <gv_new_p>.
  WRITE: / gv_p_init,
         / <gv_new_p>.
ENDIF.
FORM get_dec_separator
  CHANGING cv_sep TYPE char1.
  DATA:
    lv_one_thousand TYPE i VALUE 1000,
    lv_tmp          TYPE char20.
  WRITE lv_one_thousand TO lv_tmp.
  IF lv_tmp CA '.'.
    MOVE ',' TO cv_sep.
  ELSE. "IF lv_tmp CA '.'
    MOVE '.' TO cv_sep.
  ENDIF. "IF lv_tmp CA '.'
ENDFORM. "FORM get_dec_separator
reward points if helpful

Similar Messages

  • Remove zeros from right side

    Hi all,
    I want to remove zeros from right side.
    like : if value is '0.055500000000E+04'.
    then the output should be '0.0555'.
    How can i get such output.
    Plz help me....

    Hi,
    the problem here is u are dealing with a datatype of format F (i.e floating point ) and the output u desire is in packed format .
    You cannot delete the zeros of such data typesas type F instead u can move them to the packed datatype and get the result.
    do one thing declare a variable of type p and move the value of type f which u have right now to the variable u have declared as type p.
    data : v_val type p decimals 4.
    v_val  =  "               <------ assign the type f to type p over here .
    hope this helps .
    regards,
    vijay.

  • Removing zeros from data stream

    Hi
    I have incoming data (plz see attached diagram which shows the 2 states of the for loop '0' and default) which is a 1-D array of 64 bit real data .....it goes through the loop which removes zeros from the array.
    As I have 3 elements in the 1-D array (call them x,y,z ), the loop works very well for all values of 'y' and 'z' .
    However when x gets towards 1 and below say 10e-3 (it never is a negative number), the loop is rounding everything to 1 and then when the value gets between 1 and 0 (10e-3 for example) the loop leaves it out altogether and I just get y,z  values saved.
    Plz help me sort this out .
    Cheers
    Baz
    Attachments:
    zeros.PNG ‏25 KB
    zeros.PNG ‏25 KB

    If you want a tolerance comparison, try the attached VI.  I rewrote it from one in vi.lib after an earlier post.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    CheckForEquality(DBL).vi ‏23 KB

  • How to eliminate or remove zeros from 1D array

    How to eliminate or remove zeros from 1D array. Let say I have 1D array having foolowing elements
    "0 0 0 0 0 4 0 0 9 0 0 1 4 0 0 0 0 0 0 0 0 10 9 0 0"
    So after removing or eliminating zeros it will become as follow
    "4 9 1 4 10 9"
    So can any body guide me how can I do that? See attached Image for details.
    Thanks 
    JK

    altenbach a écrit :
    hchiam wrote:
    Here are 2 example .vi's I made based on altenbach's removeZeroes.png in this discussion thread: 
    It seems pretty pointless to post those because no new useful information is given.
    Currently, only the input is defined in the connector pane, making them useless as subVIs.
    unlike my example using integers, an "=0", like any "equal" comparison, is potentially dangerous with DBLs.
    Reshaping a 2D array to 1D before removing zeroes is pretty pointless because a 2D output cannot be recovered. A more interesting scenario would be to remove some columns or rows (e.g. that are all zeroes) from a 2D array.
    You should also clean up the front panel, e.g. properly zero the upper left corner, make the controls/indicators nicely labeled, sized and arranged, and maybe even add scrollbars to the arrays.
    Thank you for those comments.
    Now the input and output are defined (in the updated attachments) for use as example subVI's.  I also cleaned up a few visual details, but I leave the rest for others to cater to their specific uses if they don't want to use this as a subVI (or at least as-is), such as changing the icons or changing to integers instead of doubles.
    I'm not sure about what you mean exactly with "=0" being "potentially dangerous with DBLs".  I'm guessing you had a certain case scenario in mind.  Although the subVI's seem to work fine within my larger program and situation, my situation may not generalize with regards to this point.
    I reshaped from 2D to 1D, with a 1D output, because it could be helpful for things like when later processing just needs a 1D array.  For example, in my situation I had to remove a huge spike of unnecessary "0"'s from a previous subVI that were affecting the output display of a certain histogram.  So it turned out a 1D array output was helpful, and you never know what problems come up, so I included the 2nd example.
    Hopefully if someone is looking for this, they can just use or play with an example subVI (granted that they know how to plug things in for their context).  I was hoping to post a subVI people could put to direct use.

  • How to remove trailing zeros from a decimal (type) value?

    Hi Everyone,
    I would like to 'drop' some trailing zeros from a decimal value, e.g.: 50.000000, and I am wondering how to go about this?
    The value is definitely of decimal type, and in this instance I know that I want to eliminate exactly six (6) zeros.
    Any help here will be greatly appreciated.
    Kind Regards,
    David

    Try the below:
    This is sort of a display issue, you may do it at Application side, which would be efficient.
    Declare @s Decimal(10,6)='50.0000000'
    Select Cast(@s as decimal(10,0))

  • Remove Applications from "Open With..." List

    Ever since I installed Adobe Creative Suite, there have been countless applications available in the Open With... list for image file types (JPEGs, PNGs, etc.).
    How do I remove applications from that list for a given file type?
    Thanks!

    There are a whole bunch of mostly useless little droplets that are installed by Photoshop and ImageReady. You can either toss them all, toss all but the one or two you might use, or just zip them and then if you ever want one unzip, take what you want and rezip the others (I kept Make Sepia Tone.exe and zipped all the others, and put a text file with a list of them all in the parent folder). Here's the location:
    "/Applications/Adobe Photoshop CS/Samples/Droplets"
    There is one folder full of ImageReady ones, and another folder of the Photoshop ones. If you trash them you can also get them back from the install disk. After you zip or trash them restart the computer and your Open with list will be back to normal.
    Francine
    Francine
    Schwieder

  • Problem removing bundles from group with ZLMAN

    I am having trouble removing a bundle from a bundlegroup with the zlman utility. The syntax I am using seems correct and the groups and bundle name are also.
    Here is the command and it's output from the command with the debug option: (if I use a bogus name for the package the output will tell me that the bundle was removed successfully :-)
    This ZLM72IR2 with Hot-Patch 3
    Any ideas?
    Thanks
    command:
    zlman bgr -U administrator -P xxxxxx -V -d Patches/Servers/sles10-sp1/Pre-Prod-security patch-slesp1-yast2-core-4623_SLES10-SP1-Updates
    output:
    com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFault={_Message=An error occurred while trying to remove the grouping data.,_Type=5}
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFaultMarshaler.deserialize(CoreAPIFaultMarsh aler.java:35)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:433)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:410)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:372)
    at com.sssw.jbroker.web.core.InputStreamImpl.readObje ct(InputStreamImpl.java:278)
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2682)
    at com.novell.zenworks.zlman.commands.Commands.groupR emove(Commands.java:598)
    at com.novell.zenworks.zlman.commands.BundleCommands. execute(BundleCommands.java:1286)
    at com.novell.zenworks.zlman.ZLMan.main(ZLMan.java:28 0)
    Caused by: com.sssw.jbroker.web.portable.ApplicationException
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2689)
    ... 3 more
    [5] Fatal Error: An error occurred while trying to remove the grouping data.

    brunold,
    I created a bundlegroup called Testbundle directly under the /Bundles container and tried to remove a couple of different patches. The results were the same. My server is SLES10SP2 64-bit by the way.
    Thanks,
    Frank
    zlman bgr -U administrator -P dnctl2RA -V -d Testbundle patch-slesp1-915resolution-4728_SLES10-SP1-Updates
    com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFault={_Message=An error occurred while trying to remove the grouping data.,_Type=5}
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFaultMarshaler.deserialize(CoreAPIFaultMarsh aler.java:35)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:433)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:410)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:372)
    at com.sssw.jbroker.web.core.InputStreamImpl.readObje ct(InputStreamImpl.java:278)
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2682)
    at com.novell.zenworks.zlman.commands.Commands.groupR emove(Commands.java:598)
    at com.novell.zenworks.zlman.commands.BundleCommands. execute(BundleCommands.java:1286)
    at com.novell.zenworks.zlman.ZLMan.main(ZLMan.java:28 0)
    Caused by: com.sssw.jbroker.web.portable.ApplicationException
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2689)
    ... 3 more
    [5] Fatal Error: An error occurred while trying to remove the grouping data.
    zlmprd1:/var/opt/novell/zenworks/scripts/movepatches # zlman bgr -U administrator -P dnctl2RA -V -d Testbundle patch-slesp1-915resolution-4728_SLES10-SP1-Updates
    com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFault={_Message=An error occurred while trying to remove the grouping data.,_Type=5}
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIFaultMarshaler.deserialize(CoreAPIFaultMarsh aler.java:35)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:433)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:410)
    at com.sssw.jbroker.web.soap.LiteralEncodingStyle.rea dObject(LiteralEncodingStyle.java:372)
    at com.sssw.jbroker.web.core.InputStreamImpl.readObje ct(InputStreamImpl.java:278)
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2682)
    at com.novell.zenworks.zlman.commands.Commands.groupR emove(Commands.java:598)
    at com.novell.zenworks.zlman.commands.BundleCommands. execute(BundleCommands.java:1286)
    at com.novell.zenworks.zlman.ZLMan.main(ZLMan.java:28 0)
    Caused by: com.sssw.jbroker.web.portable.ApplicationException
    at com.novell.zenworks.zlman.services.coreapi.admin.C oreAPIBinding_Stub.removeMembers(CoreAPIBinding_St ub.java:2689)
    ... 3 more
    [5] Fatal Error: An error occurred while trying to remove the grouping data.

  • Error removing object from cache with write behind

    We have a cache with a DB for a backing store. The cache has a write-behind delay of about 10 seconds.
    We see an error when we:
    - Write new object to the cache
    - Remove object from cache before it gets written to cachestore (because we're still within the 10 secs and the object has not made it to the db yet).
    At first i was thinking "coherence should know if the object is in the db or not, and do the right thing", but i guess that's not the case?

    Hi Ron,
    The configuration for <local-scheme> allows you to add a cache store but you cannot use write-behind, only write-through.
    Presumably you do not want the data to be shared by the different WLS nodes, i.e. if one node puts data in the cache and that is eventually written to a RAC node, that data cannot be seen in the cache by other WLS nodes. Or do you want all the WLS nodes to share the data but just write it to different RAC nodes?
    If you use a local-scheme then the data will only be local to that WLS node and not shared.
    I can think of a possible way to do what you want but it depends on the answer to the above question.
    JK

  • Remove user from group with MaxL

    hello,is it possible to remove a user from all groups he belongs to without knowing these groups?I want to execute a command such as "alter user my_user remove from ALL_GROUPS;"thanks for your help/

    Not sure if it's feesible, but you could use the 'drop user' command to remove the user from the system, which would of course remove them from all groups, then use the 'create user' command to recreate the user and reassign them to the proper groups.Good luck

  • Get width/height or layer bounds with decimals values

    is it possible to retrieve size or bounds of objects with decimal values?
    Thank you

    A shape layer or any other layer with a vector mask could have decimal pixel values if you only want the area defined by the mask.
    But if the paths are curved it might be difficult to determine the extreme values.
    The points’ coordinates are easy enough to determine but determining the most high, left etc. expansion of a curve seems difficult to me.
    The only work-around that I know is calculating a number of points along the path and evaluating those.

  • Removing Zeros from a quantity field in ALV

    HI ,
    i have req of removing the zeros after decimal point in while displaying in ALV.
    e.g 3.000 --> '3' .
    I do not need the decimal values.
    Is there any FM or field catalogue parameter to control this.
    I am using CL_GUI_ALV_GRID for ALV display.
    Thaks.

    Hi,
      Whay you can do is...
    Copy the Quantity with out zeros into Char field and display.
    Thanks & Regards,
    Vamsi.

  • Best Practice for Removing Zeroes from Database

    Does anyone have some clever bits of code or best practices for evaluating a database and instances of zeroes? I'm working on cleaning up our rules file and am thinking the best way to start would be to write some code to look for zeroes and write them to a log file. This would at least indicate if there was even a problem with zeroes (which there may or may not be).
    Any suggestions out there / utilities / code samples?
    Thanks.

    We accomplished this using data extracts from a subset of scenarios/years/entities/accounts to ensure that all of our potential rules could be checked to ensure they were not writting zero's. This worked pretty well for our purposes, a text editor called EmEditor allows for VB macros in it pretty easily and we could write a quick macro to check for strings ending in "; 0." You may also want to review your check box of calculated in your extract and see if the zeros are a result of calculations. A rule output could work pretty well, although it would take some defining as you would have to write it out in a sub and make sure that you capture the data of all subroutines if your zero's are rule driven or actual inputs. May want to review some if you have very small insignificant values getting written, seen items that have one value 13 places to the right of the decimal that were not really signficant.
    JTF

  • SQL*Loader sqlldr removes zeros from character field

    Hello,
    I am using SQL*Loader to load an Oracle table, and am having a problem. One of the fields is defined as VARCHAR2 and contains comments entered by a user. There may be numbers or dollar amounts included in this text. When I execute the sqlldr script below, the result is that all of the zeros on the text field disappear. There is a translate function invoked for this field (bolded statement) in an attempt to remove imbedded newlines from the text. Wherever there was a zero in the original text, it ends up being removed after I run this script. Can anyone suggest why this is occurring, and how to prevent it? Can it be related to the translate function?
    Thanks for your help!
    OPTIONS (READSIZE=20971520, BINDSIZE=20971520, ROWS=20000)
    LOAD DATA
    INFILE 'R24.REGION.ERL.N1E104' "str X'5E5E220A'"
    BADFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_BADDATA.TXT'
    DISCARDFILE 'LOGS/N1E104_BUT_RS_ASSGN_TXT_DISCARDDATA.TXT'
    REPLACE
    INTO TABLE TESTM8.CONV_BUT_RS_ASSGN_TXT
    FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    RST_RS_EXT_TXT_OID DECIMAL EXTERNAL,
    RST_RS_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_RS_ASSGN_OID = 'NULL',
    RST_TXT_SEQ_NBR INTEGER EXTERNAL,
    RST_RS_COMM_OID DECIMAL EXTERNAL,
    RST_DIF_ASSGN_OID DECIMAL EXTERNAL NULLIF RST_DIF_ASSGN_OID = 'NULL',
    RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#0x0A', '#'), 1, 248)"
    --------------------------------------------

    Never mind, found my mistake. In the TRANSLATE function, I had assumed that the 0x0A would be interpreted as a single hex value. Instead, it is interpreted literally as the character '0', the character 'x', the character 'A', etc. The result is that the transformed text had no '0', 'x', or 'A' characters, which is exactly what I inadvertently told it to do. I changed it to the following, which works better ;-)
    RST_EXTENDED_TXT "SUBSTR(TRANSLATE(:RST_EXTENDED_TXT, '#'||CHR(10), '#'), 1, 250)"

  • Remove zeros from a channel

    Hi Diadem experts!
    I am trying to concote a script that basically does exactly what the ChnNovHandle function does. ChnNovHandle removes NoValue numbers from a channel, optionally with multiple channels. I want to use this function, except that I have zeros instead of NaNs.  Any suggestions? Much appreciated!
    Aart-Jan
    Message Edited by aartjan on 01-15-2008 05:41 PM

    Hello Art-Jan!
    The solution is to convert your zeros to NOVALUEs. Therefore you can use the DIAdem behavior that the result of an undefined mathematical operation NOVALUE is. If you use this line of code the zeors will be converted to NOVALUE:
    Call FormulaCalc("Ch('Output') := 1 / (1 / Ch('Input'))")
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Remove SCSM Management Pack with dependencies

    I's trying to delete a couple of MP's from Service Manager 2012 R2 that I no longer need.  They all show that the MP "Service Manager Configuration Management Configuration Library" is dependent on them.
    The MP is unsealed but is an MPB.  How do I remove the dependency from an MPB?
    Thanks,
    Allen

    You've stumbled into a tricky situation. (Sorry, Thomas, I'm stepping on your toes yet again! ;) )
    MPBs are basically "zip files" that contain an XML management pack and any resources (dlls, images, etc) that are needed for that management pack.
    You can export the XML MP, but you don't get the resources. You can export the MPB, but it's not easy to extract the resources and XML.
    But it can be done (I had to do it last week and it was annoying..if there's a better way to do it, I sure would love to know what it is.)
    There's a second option that I'll describe in a bit, but it's still pretty annoying. There's also a third option that, if you need resources (images) from an SCSM MP, is even easier.
    Edit: Go with option 3 if you're modifying an out-of-the-box MP and you have the authoring tool installed. I had to do option 1 for another MP and didn't have its resources anywhere else. Since you're modifying an SCSM MP, I don't think you'll
    have to worry about all the option 1 stuff at all..but I'm leaving it here in case anyone's interested.
    Option 1) Extract the MP and resources from the MPB. Modify the MP. Re-bundled the MP with its resources. Import that new MPB.
    http://technet.microsoft.com/en-us/library/hh519649.aspx
    That's only half the story, though. The last sentence of that article describes using the GetStreams() method of the ManagementPacks property. Once you use that, all you have is a big list of Streams. You need to write some powershell to actually convert
    those streams into files. I don't even want to show you the powershell I used because it only worked for a very specific set of resources that I knew existed in the management pack I was trying to modify. It would not work for any other management pack
    or any other resource. But, Google can show you plenty of examples on how to convert a stream to a file using powershell (I found an example on StackOverflow that I adapted
    http://stackoverflow.com/questions/15299544/how-can-i-write-a-binary-stream-object-to-a-file-in-powershell I don't know if there's a better or more elegant way of doing it, I just know I was able to adapt it to work for me)
    After all that, you'll have your resources. Now you can export the MP from Service Manager as just an XML file. Make your changes to it. Use New-MPBBundle.ps1
    http://blogs.technet.com/b/servicemanager/archive/2009/09/04/introducing-management-pack-bundles.aspx to bundle your xml file with the resources you just extracted. Import your new MPB.
    Option 2) Remove unnecessary references using C# (Maybe powershell?)
    Using the SDK, retrieve your MP. Remove the reference. "AcceptChanges()". Done.
    ManagementPack mp = emg.ManagementPacks.GetManagementPack(new Guid("<My Management Pack Guid>"));
    mp.References.Remove("<The alias for the reference I want to remove>");
    mp.AcceptChanges();
    Option 3) If the MP you want to modify is an out-of-the-box SCSM MP bundle, get the resources from your authoring tool installation..they're all in there. (the png images, not the DLLs)
    Then you can just export the MP XML, modify it, then re-bundle it with new-mpbfile.ps1 and re-import it into service manager.
    All of these options of course require that _nothing_ in the management pack actually uses that alias/reference you want to remove. So if you still have a view that references that MP, you won't be able to remove the reference. Option 2 would be more
    annoying if the reference you want to remove is still being used..you'd have to use the console to remove the views, or templates, or whatever else might be referencing it.
    Option 2 gives me an idea for a quick little utility I could write.. "remove unused references from all unsealed MPs"..maybe I'll do that this weekend :)

Maybe you are looking for