Grouping by Code

I have created a Table within SQL Server Report Builder, and the first field is a calculated field with the following code:
=Code.ChangeWord(Fields!NAME.Value)
Where the function is
Public Function ChangeWord(ByVal s As String) As String   Dim strBuilder As New System.Text.StringBuilder(s) If s.Contains("ESI  ") Then      strBuilder.Replace(s,"ESI")      Return strBuilder.ToString()      Else : Return s   End IfEnd Function
Now, when I execute this, it works beautifully ... except that the Grouping mechanism doesn't group all instances of "ESI" together, like I want it to.
How do I change this behavior so that it groups all instances of "ESI" together, like it should?

Hi DonFord81,
Per my understanding that you have add the custom code to convert the values in the fields which contails "ESI " to "ESI" and then add group on this fields, but the group not work, right?
I have tested on my local environment and can't reproduce the issue, as Prasad  mentioned that please make sure you are using below expression on the group like below:
=Code.ChangeWord(Fields!NAME.Value)
You can not use the custom code but just create an calculated field using the expression like below and then use the Calculated field to create the group as Prasad mentioned:
=IIF(Left(Fields!Name.Value,4)="ESI ","ESI",Fields!Name.Value)
Preview:
If your problem still exists, please try to provide more details information.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support

Similar Messages

  • Deletion of Release Group and Code in PO

    Dear Consultant,
    In Purchase order, we have created some release group and code, Unfortunately we deleted some groups Without deleting in Order wise.
    In table level the Release Group is there but in SPRO Release Strategy settings its not there..My consultant advised again you have to create same release group in Release strategy...
    If I create same Release Group which are lying in my T16FC Table..But system throwing this err "An entry already exists with the same key"
    Could you suggest me.
    Regards,
    PRIYA.

    Hi,
    Please go with below mention path: -
    SPRO >> Materials Management >> Purchase Order >> Release Procedure for Purchase Orders >> Define Release Procedure for Purchase Orders >> Release Groups.
    Here check release group is existing, if yes then remove them and click on save button.
    Then try to create new service group.
    Some times we delete release group and create new release group with same description without saving changes.Due to this this type of error is occur.
    Regards,

  • Catalogs, code groups and codes not available in service order in Web UI

    Hi,
    I have created and maintained a subject profile for the service orders that i am using for my business scenarios. The same is visible under the objects tab in transaction data of the service order business transaction in the SAP GUI.
    However the same are not visible anywhere in the Web UI (they are not available in the list of available fields as well in BSP_WD_CMPWB for BT116H_SRVO).
    Can some1 pls advice me with the steps so as to make the catalogs, code groups and codes in my service orders available in the Web UI screen as well.
    Will really appreciate if detailed steps are provided since I am new to Web UI technology.
    Warm regards,
    DP

    Deepak,
    I'm 99% sure (although dont quote me as I dont have a developer key so I cant finish my testing) that you're missing the context Nodes - so although you have the assignment block yuo have no link between the code set and the service order header.  You havent referenced them in your comments on this post in any case. 
    Try this:
    Go into BSP_WD_CMPWB
    In the Browser component Structure open folder Component > Views
    Double-click BT116H_SRVO/DetailsOV and in the structure expand to BT116H_SRVO/DetailsOV > BT116H_SRVO/DetailsOV > View Controller  > DetailsOV.do > Context
    Right-click on folder Context Node and click Create
    Follow through the wizard defining a Z context Node (e.g. ZBTSubject) and a Model Node of BOL Entity BTSubject
    Define any Dependencies etc you may wish to have and so on (most of the wizard is optional)
    Repeat the same for the BOL Entity BTSubjectSet
    Now go back in and see if your values are populating.  I'm not a developer (and never have been), so I cant guarantee this will work as I dont have a developer key to test this, but I am quite sure that this needs to be done for you to get your values populating.
    Good luck, Merry Christmas and a Happy New Year (& please award points if useful!)
    Andrew Griffin.

  • Quality Module Question: Grouping Defect Codes by Work Center

    Is it possible to group Defect Codes by Work Center?

    Welcome to the forum.
    Please post this question in the below forum
    [Forum: ERP Operations - Quality Management (QM)|SAP ERP Operations - Quality Management (SAP QM);
    thanks
    G. Lakshmipathi

  • How to create a site and add security groups through code: scripts, csom, ... ?

    Hi,
    I'm new to CSOM and are looking for a way to create sites in SharePoint Office365 and especially add user to it with a specific role eg. 'visitor' or 'owner'.
    I use this code to add sites from a csv file, so far so good.
    But now I want to add security groups based on the csv file and assign a role. The security groups allready exists.
    and also how to add a user with a 'owner' role for some sites.
    That would make my life easier :-)
    so thank you in advance!
    # load assemblies
    #[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
    #[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
    Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
    Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
    # site collection
    $siteUrl = “https://mysharepoint.com”
    # admin
    $username = "[email protected]"
    $password = Read-Host -Prompt "Enter password" -AsSecureString
    # get clientcontext as object
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
    # assign credentials to clientcontext object
    $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $ctx.Credentials = $credentials
    # create site from template 'teamsite' => STS#0
    $data = Import-Csv "c:\tools\CSOM\vakwerking_test.csv"
    foreach ($row in $data) {
    $webCreationInformation = New-Object Microsoft.SharePoint.Client.WebCreationInformation
    $webCreationInformation.Url = $row.vakwerkingurl
    $webCreationInformation.Title = $row.vakwerkingnaam
    $webCreationInformation.WebTemplate = "STS#0"
    $webCreationInformation.UseSamePermissionsAsParentSite = $false
    $newWeb = $ctx.Web.Webs.Add($webCreationInformation)
    Write-Host "Title" $newWeb.Title
    #send to sharepoint
    $ctx.Load($newWeb)
    $ctx.ExecuteQuery()

    Hi,
    The command above about creating a group only works for the root site of the site collection, because the scope of the user group is site collection level, these groups
    can be used in all the sites in this site collection.
    With the existing groups in the root site, we can add users into them and grant specific permissions of a specific sub site to these groups.
    Here is a demo about how to assign permission to a group using Client Object Model(though in C#) for your reference:
    http://www.c-sharpcorner.com/UploadFile/54db21/set-permission-to-group-in-sharepoint-2010-programmatically/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • FI-AP (vendor master group, Zip code required field)

    Hello SAP Guru's,
    I am working on Vendor master data groups and my client asked me to make the zip code field mandatory. When i go to "define account groups with screen layout- vendor name-general data- address, i don't see a tab for Zip code to make it a required field. However, i checked Postal code, city field and make it into a required field. Is zip code = Postal code, city? or do i have to contact other programmers so they can design this functionality in SAP?

    Dear,
    yes, I also confirm You that the Zip code is the Postal code.
    So please go to IMG --> Define Account Groups with Screen Layout (Vendors)
    and for Your Account Group do the following setting:
    double click on General data --> double click on Address
    and define as Required entry the field Postal code, city technical names:
    City                         LFA1-ORT01
    Postal Code            LFA1-PSTLZ
    I hope this helps You.
    Mauri

  • Corporate group match code

    Hi,
    Can anyone guide me on how to create a Match code for Corporate group field in the Vendor Master? and create a list of possible values?.
    Thanks,
    Cecilia

    I know it has to be done by ABAP group but I got confused with the help on this field.. ABAP group says it is going to be a core code change since there is no user exit available for that field.

  • Class and release group and code in release strategy??

    hi experts ,
    Can some body explain me..
    I have created Characteristics and Class for for release strategy.
    But while creating release group , i should assign my class with release group , after doing this when i save , its giving error as check the release classes????
    I m using the same class what i have created for my company..
    So how to over come this issue
    Thanks

    Release Prerequisites
    Definition
    The release prerequisites indicate the sequence in which a purchase requisition or an external purchasing document must be approved via the release codes. The release prerequisites are defined in the Purchasing Customizing facility (in the release strategy).
    The approval procedure for purchase requisitions in an enterprise may be set up in such a way that a department manager must approve a requisition item before the next level of authority (e.g. the cost center manager). In this case, approval by the department manager is a prerequisite for approval by the cost center manager.
    Release Indicator
    Definition
    When a requisition or an external purchasing document has been processed via a release code, a release indicator is assigned to it.
    When the system sets which release indicator is defined in the Customizing facility for Purchasing (in the release strategy via the release statuses).
    What does the release indicator determine?
    Requisitions...
    External purchasing documents....
    Whether the item may be changed by Purchasing or Materials Planning and Control after the start of the release procedure
    Whether a new strategy is determined and whether existing releases must be cancelled in the event of changes
    Whether an RFQ or a PO may be created with reference to the item
    Whether the document may be changed by Purchasing after the start of the release procedure
    Whether a new strategy is determined and whether existing releases must be cancelled in the event of changes
    Whether the purchasing document is released for transmission
    Alternative Release
    Definition
    Within the release sequence, you can define alternatives. This means that several employees can effect release (signify approval) at a certain point in the sequence. If just one of these employees has effected release, the next release status is reached. The other employees thus need take no action.
    Five release codes are defined for purchase requisitions in an ascending hierarchy. The requisition item can be converted into either an RFQ or a PO if release has been effected either with the release codes 01, 02, 03 and 04 or - alternatively - with release code 05.
    The box with the information on the release strategy also offers you the possible alternatives for selection (see Displaying Release Information).
    An alternative release cannot be a prerequisite for the next release code. In the above example, the releases with codes 01, 02, 03 and 04 could not be prerequisites for release with 05.
    Release w. Classification (PReqs./Ext. Pur. Docs.)
    Use
    The aim of this procedure is to replace manual written authorization procedures using signatures by an electronic one, while maintaining the dual control principle.
    The person responsible processes the requisition or other purchasing document in the system, thereby marking it with an "electronic signature" which can give the document legal force.
    This release procedure can be used to approve requisitions and the external purchasing documents RFQ, PO, contract, scheduling agreement, and service entry sheet.
    Purchase requisitions are released either at item level or in total. There is no provision for item-wise release (i.e. partial approval) in the case of the external purchasing documents. The latter can only be released in their entirety.
    If you set up the release procedure with classification for purchase requisitions, the procedure without classification is deactivated.
    Prerequisites
    The release procedure with classification must have been set up in Customizing for Purchasing. In addition, a class with characteristics must have been created for each document (requisition, purchase order, etc.).
    If you wish to set up both the overall release procedure and the item-wise procedure for requisitions, you must create one class for each procedure.
    How to do this is outlined in the Implementation Guide (IMG) for Purchasing in Define Release Procedure for the relevant documents and in Set Up Release Procedure with Classification for purchase requisitions. You will find detailed information on classification in the R/3 Library in the documentation CA Characteristics and CA The Classification System.
    This procedure offers a wide range of possible combinations of release criteria. Should you nevertheless have other requirements, use the enhancement provided by SAP.
    Operation of Release Procedure w. Classification
    The characteristic values from a requisition or external purchasing document are passed on to the classification system.
    The system checks whether the values correspond with release conditions. If so, it assigns a release strategy.
    The persons responsible for the release codes process the document in the sequence defined in the release strategy.

  • How to handle second request for addition to same AD group at code level?

    I am using custom java code for adding group memberships to users based on multiple multi-valued attributes.
    Example: Location Code is a comma separated multi-valued field in OIM User Form and I need to kick off my code each time the attribute is updated.
    If only 1 value in the LocationCode changes, I want to only add users to the group for this value not the older values that have not changed.
    How do I handle this scenario where the code adds the user to the same group twice in OIM. In AD the user is only added once. Do I need to write additional code to read all existing groups of the user, compare them with the new requests and then add new groups?

    Not a big deal.
    Create a trigger in Xellerate users process defn. There u'l get option for old and new value. take both values and compare both values using stringtokenizer and update the child form or group membership.

  • How to copy existing catelog,code group and code...

    Hi All,
    My requirement is how to copy all the existing catalog, code group and its codes from existing SAP system to excel? Because I need to upload all these from R/3 4.7 to ECC 6.0 or what is the best way to do that?
    Regards,
    Anish Ahya

    Hi Kapil,
    Thanks for your help. But I don't know how to use T code OIDW (Download catalog profile). It would be very helpful if you throw some light on this.
    Hi Ashish,
    Thanks.I guess this is the last option. Lets check whether any other standard solution is available or not.
    [Useful Info|Catalogs & selected sets;
    Regards,
    Anish Ahya

  • Release Groups and code - PR and PO??

    Hii
    Some body explain me about the significance of release code and groups in PR and PO release strategy.??
    Thanks

    HI,
    1.Release Groups
    Release group 01 is used for Purchase requisitions and 02 for Purchase orders.
    Here assign class "PR_Release_proc" against release code "01"
    check "OvRelPReq" indicator for over all release (All line items )of document in one shot else it will be released line item wise.
    2.Release codes
    Release codes are assigned to Release groups, in Workflow these release codes are tagged to users' SAP IDs through which they will be able to approve or reject a PR in SBWP(Inbox in SAP Business workplace.
    PRs are released by users in transaction code ME54N.
    Eg
    Type of user            - Level -             Release code                    
    PR creator - clerk or Business user -  
    Approver    -  Supervisor                 -   R1
    Approver  -   Project Lead              -   R2
    Approver   -  Asst. Manager             -  R3
    Approver   -  HOD/General Manager  - R4
    Release codes R1 to R5 are assigned to corresponding users
    Check the link for more details
    http://wiki.sdn.sap.com/wiki/display/ERPLO/ReleaseprocedureforPurchaseRequisitioninMM
    Regards
    KK

  • List of customer report based on account group - T.Code

    Dear Guru's
               I need list of customer report based on account group in standard SAP if it there please update th T.Code as earl as possible.
    regards,
    bhanu

    Hello,
    I don't think there is a standard report for this. SE16 select table KNA1 and check for the entries with respect to account group.
    Prase

  • General help with material groups, UNSPC codes etc?

    Please could you guys help me explore the following or point me to where I may get more info on:
    Understanding concepts of Material Group and Product Category and exploring the option of having different material groups based on different purchasing organisations and plants
    Effective usage of UNSPC codes especially for determining the correct Material Group
    Setting up more than 1 company code and purchase organisations in the SRM system
    Setting up the business partner and establishing connectivity to R/3 in order to successfully create a PO in R/3.

    Hi
    <b>Please go through these links -></b>
    Re: differece between product categories in SRM and Material Group in MM
    Re: SRM5.0 Not possible to list replicated product categories in SRM
    Re: material group replication from R/3 to EBP
    Re: Material/Product replication - table & field names
    Regards
    - Atul

  • Group Tax Code

    Hello there,
    I have a situation here.
    Example.
    Company 1
    Company 2
    Company 3
    Reporting tax company for above 3 company is company 1.
    I am creating a report for IF and I need to group FI document by tax company code.
    Please help.

    Can you not create report painter report to display all this data in a single report?

  • Query to group dept codes in a row

    Hi Gurus,
    I am trying to write a sql to list all the employees and their dept codes in duration of 5 years.
    I have a table like
    Emp Dept_codes
    1 10,20,40
    1 30,50
    2 10,40
    2 30
    3 70
    EMp and Dept_codes are character types.
    Is it possible to have a solution like
    Emp Dept_codes
    1 10,20,30,40,50
    2 10,30,40
    3 70
    Please let me know if this is possible using a SQL stmt.
    Thanks in advance.

    The question is not about the data modelIt's all about the data model, you wouldn't have such difficulties if the data model would be normalized.
    Anyway, try this, it is a combination of algorithms described here and here
    SQL> SELECT emp,
      2         LTRIM(MAX(SYS_CONNECT_BY_PATH(dept_code,','))
      3         KEEP (DENSE_RANK LAST ORDER BY curr),',') AS dept_codes
      4  FROM   (SELECT emp,
      5                 dept_code,
      6                 ROW_NUMBER() OVER (PARTITION BY emp ORDER BY dept_code) AS curr,
      7                 ROW_NUMBER() OVER (PARTITION BY emp ORDER BY dept_code) -1 AS prev
      8          FROM   (SELECT emp,
      9                         EXTRACTVALUE(xt.column_value,'e') dept_code
    10                  FROM   t,
    11                         TABLE(XMLSEQUENCE
    12                               ( EXTRACT
    13                                 ( XMLTYPE('<coll><e>' || REPLACE(dept_codes,',','</e><e>') || '</e></coll>')
    14                                 , '/coll/*')
    15                              )) xt
    16                 )
    17         )
    18  GROUP BY emp
    19  CONNECT BY prev = PRIOR curr AND emp = PRIOR emp
    20  START WITH curr = 1;
           EMP DEPT_CODES
             1 10,20,30,40,50
             2 10,30,40
             3 70
    SQL>

Maybe you are looking for