BIP Requirement - Sorting

Hi Gurus,
I have this code that is working:
<?for-each@inlines: HS1PrimaryAllocatedWorker?><?FamilyName?> <?FirstName?><?if@inlines:position()!=last()?>, <?end if?><?end for-each?>
Output is: Ashfield Transferred To, Siebel Administrator, Basu Arka
XML:
- <HS1PrimaryAllocatedWorker>
<FamilyName>Ashfield</FamilyName>
<FirstName>Transferred To</FirstName>
<Primary>N</Primary>
</HS1PrimaryAllocatedWorker>
- <HS1PrimaryAllocatedWorker>
<FamilyName>Siebel</FamilyName>
<FirstName>Administrator</FirstName>
<Primary>Y</Primary>
</HS1PrimaryAllocatedWorker>
- <HS1PrimaryAllocatedWorker>
<FamilyName>Basu</FamilyName>
<FirstName>Arka</FirstName>
<Primary>N</Primary>
</HS1PrimaryAllocatedWorker>
But I need to appear Siebel Administrator to come first because it is the Primary value.
like this: Siebel Administrator, Ashfield Transferred To, Basu Arka
Please help
Thank you,
jP

Can you try this?
<?for-each@inlines: HS1PrimaryAllocatedWorker?><?sort: Primary;'descending';data-type='text'?><?FamilyName?> <?FirstName?><?if@inlines:position()!=last()?>, <?end if?><?end for-each?>

Similar Messages

  • BIP Requirement - Sorting inside the for-each

    Hi Gurus,
    I need to sort the PlanDateOpened to capture the Test B Business Unit because this is the oldest date but this is inside the For-each of Contact.
    Please help me how to code this in BIP.
    Thanksa lot.
    jP
    Edited by: BIPnewbie on Sep 8, 2011 1:29 AM
    Edited by: BIPnewbie on Sep 8, 2011 8:26 PM

    thanks kavipriya..this is correct. :)
    <?for-each: Opportunity[PlanDateOpened!=’’]?><?sort: PlanDateOpened ;'descending';data-type='text'?> <?if:position()=1?><? BusinessUnit ?>:<? PlanDateOpened?><?end if?><?end for-each?>
    Thanks,
    jP

  • BIP Requirement - How to get subtotals of each combination val of 2 columns

    Hi Gurus, Experts and All,
    Help me please with my reporting requirement, on how to code this in BIP. Thank you.
    Requirement: I need to get the subtotals of each combination value of two columns.
    Example Columns: Group Team AMOUNT
    Column Sample Values: GroupA Team1 100
    GroupB... Team2... 200
    GroupA - Team1 Subtotals = 500(sample value only)
    GroupA - Team2 Subtotals = 400(sample value only)
    GroupB - Team1 Subtotals = 600(sample value only)
    GroupB - Team2 Subtotals = 200 (sample value only)
    GrandTotal= 1700
    Thank you.
    John Paul
    BIP newbie
    Edited by: user10955574 on Oct 28, 2010 5:40 AM

    Hi Kavipriya
    Please see updated XML Structure.
    <?xml version="1.0" encoding="utf-8" ?>
    - <ROWSET>
    - <ROW>
    <SALES_GROUP>GROUPA</SALES_GROUP>
    <SALES_TEAM>TEAM1</SALES_TEAM>
    <CUSTOMER_NAME>Diego</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>200</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPB</SALES_GROUP>
    <SALES_TEAM>TEAM1</SALES_TEAM>
    <CUSTOMER_NAME>Alex</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>300</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPC</SALES_GROUP>
    <SALES_TEAM>TEAM2</SALES_TEAM>
    <CUSTOMER_NAME>Michael</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>400</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPD</SALES_GROUP>
    <SALES_TEAM>TEAM2</SALES_TEAM>
    <CUSTOMER_NAME>Robert</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>500</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPA</SALES_GROUP>
    <SALES_TEAM>TEAM3</SALES_TEAM>
    <CUSTOMER_NAME>Bryan</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>600</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPB</SALES_GROUP>
    <SALES_TEAM>TEAM3</SALES_TEAM>
    <CUSTOMER_NAME>Paul</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>700</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPC</SALES_GROUP>
    <SALES_TEAM>TEAM4</SALES_TEAM>
    <CUSTOMER_NAME>John</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>800</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPD</SALES_GROUP>
    <SALES_TEAM>TEAM4</SALES_TEAM>
    <CUSTOMER_NAME>Peter</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>900</ADJUSTMENT_AMOUNT>
    </ROW>
    - <ROW>
    <SALES_GROUP>GROUPA</SALES_GROUP>
    <SALES_TEAM>TEAM5</SALES_TEAM>
    <CUSTOMER_NAME>Zoe</CUSTOMER_NAME>
    <CURRENCY>USD</CURRENCY>
    <ADJUSTMENT_AMOUNT>1000</ADJUSTMENT_AMOUNT>
    </ROW>
    </ROWSET>
    Regards,
    John Paul
    Edited by: user10955574 on Oct 29, 2010 3:05 AM

  • Help required sorting out an iTunes Library...

    Hi,
    I desperately need help sorting out my current iTunes configuration. Since 2008 when I purchased my current iMac my partner and I have had one main library for iTunes stored in the 'Shared' folder. Both iTunes were authorised with each others accounts which worked perfectly well. Since then we have both purchased iPhones, both have iTunes accounts/Apple IDs and I now have an iPad and MacBook Pro. I also have an iTunes Match. It's become apparent that due to the complexity of how iTunes works this is no longer a good set up, as when my partner tries to download previous purchases he gets the 'This computer is already associated with an Apple ID'. Does anyone have any suggestions of how to sort this out???
    Basically we both want to have iTunes Match accounts but want the ability to share our music. Is there any way to do this? Would it be better splitting the library into two?
    Please, please help - this is really doing my head in!
    Ben

    What you are asking for is not directly possible in Aperture for several reasons - you will have to accept a work-around.
    Aperture is a Single User Application - the Library must not be accessed by more than one user at a time.
    Aperture is not a network Application - the Library ought to be installed on a local volume, not a remote drive.
    Using the referenced masters to access the edits to your images will not work, since the masters always stay in their original pristine state. All edited versions are included in your Aperture Library. You will not see any edits when you inspect the masters. And any change to the master image files by external programs is extremely risky and may result in broken references.
    All these arguments together don't leave you much leeway for an easy solution. One workflow - the one I adopted - is the following: keep a small Aperture library on an external drive; that drive can be small and easy to carry. This Library contains only the last recent projects that still need editing with all master image files as managed masters, and for older projects only good previews to allow to browse and to grade and tag those images.
    All other  masters are stored on an external drive connected to my desktop computer.
    The small drive is easy to carry and does not bother me much.
    All other solutions - sharing the Library over the network are not save and have caused trouble.
    To back up your master image files you can create a disk image of the volume the are on from time, and also back them up right on import - their is a setting in the import panel.
    Regards
    Léonie

  • BIP Requirement - for-each with single output value

    Hi Gurus,
    I have this requirement that <Is this also a Critical Event> = Yes when there are many records and one of them has Type = Critical Event Report
    and <Is this also a Critical Event> = blank when there are many records and no record has Type = Critical Event Report.
    xml 1
    <Action>
    <HS1AllocatedWorker>Administrator Siebel</HS1AllocatedWorker>
    <HS1AdditionalResponseType>Critical Event Report</HS1AdditionalResponseType>
    </Action>
    <Action>
    <HS1AllocatedWorker>Administrator Siebel</HS1AllocatedWorker>
    <HS1AdditionalResponseType>Allegation Against CS Employee Report</HS1AdditionalResponseType>
    </Action>
    Expected Output is Yes
    xml 2
    <Action>
    <HS1AllocatedWorker>Administrator Siebel</HS1AllocatedWorker>
    <HS1AdditionalResponseType>Allegation Against CS Employee Report</HS1AdditionalResponseType>
    </Action>
    <Action>
    <HS1AllocatedWorker>Administrator Siebel</HS1AllocatedWorker>
    <HS1AdditionalResponseType>Allegation Against CS Employee Report</HS1AdditionalResponseType>
    </Action>
    Expected Output is blank
    Thanks,
    jp
    Edited by: BIPnewbie on Sep 26, 2011 2:38 AM

    You can use <?if:(count(Action[HS1AdditionalResponseType='Critical Event Report']))>0?>Yes<?end if?>

  • BIP Requirement - Arrangement

    Hi Gurus,
    I have this code that is working:
    <?for-each@inlines:PUBLead?>”Household <?HS1HouseholdNumber?>: <?SDMScreeningOutcome?>” <?if@inlines:position()!=last()?> <?end if?><?end for-each?>
    Output is:
    "Household 1: Screened In" "Household 2: Screened Out" "Household 3: Screened In" "Household 4:
    Screened Out" "Household 5: Screened In"
    I want to appear in the report output like this.
    "Household 1: Screened In"
    "Household 2: Screened Out"
    "Household 3: Screened In"
    "Household 4: Screened Out"
    "Household 5: Screened In"
    Please help, how to arrange this in that manner above.
    Thanks a lot,
    JP
    Edited by: BIPnewbie on Sep 2, 2011 5:11 AM

    Remove the "@inlines" command from your for-each code..
    Use: <?for-each:PUBLead?>
    ”Household <?HS1HouseholdNumber?>: <?SDMScreeningOutcome?>”
    <?end for-each?>
    Thanks,
    Bipuser

  • Sorting in ALV Report.

    Dear Experts,
    I mfacing a strange problem.
    I hv an internal table containing the required data in required sorted order.
    But when i call CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' function module,
    the sort order gets changed. I m not sorting internal table.
    The internal table is very much ok till i write statement  "CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'  ".
    I hv checked in dbugging mode, (if sy-subrc = 0 in the  above function module) the sort order getting changed only in the call of function module.
    Any suggestion.
    Regards,
    Maverick

    Hi,
    Define:IT_SORT TYPE SLIS_T_SORTINFO_ALV
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                 = w_repid
         I_CALLBACK_USER_COMMAND            = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE             = 'TOP-OF-PAGE'
         IT_FIELDCAT                        = i_fcat[]
         I_SAVE                             = 'X'
          IT_SORT                           = it_sort
        TABLES
          T_OUTTAB                          = i_faglflexa_all
    *  EXCEPTIONS
    *    PROGRAM_ERROR                     = 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.
    Now in debugging if the sy-subrc = 0 then only the further process will take place.
    If sy-subrc is not zero then what is the point of sorting data as Th Function module have some error.
    So what  you are getting in debugging that is correct. Nothing is wrong.
    regards,
    Pravin
    Edited by: pravin s. on Mar 15, 2010 12:22 PM
    Edited by: pravin s. on Mar 15, 2010 12:25 PM

  • AFS User Exit for Allocation Run Sorting

    Hi Gurus,
    can you please help us in order to identify which BAPI or User Exit needs to be used to perform a custom sorting on AFS Allocation Run?
    My aim is to perform a specific calculation on a single field of the requirement sorting table (/AFS/SOFN_V-SOFNA) during ARun processing..
    Given a specific value of this field (that will be EDATU - confirmed delivery date) I want to assign a dynamic value based on a comparison with an external table, in order to determine whether EDATU belongs to range A, B or C
    Any idea?
    Thanks in advance for your help
    Regards, Alessio

    solved with the help of SAP note.

  • How to specifically sort the data in a database using c#?

    H!,
    I have a problem in c# that require sorting of names of students in a sql database and i want it to be specific, i used data grid view to view the data of the students as shown below:
    Students First Name:
    Ann
    Antoinette
    Brenda
    Judith
    Lester
    Santos
    Suzie
    Tim
    if i type in a letter or abbreviation @ a textbox1 for example "s", all Names that starts with letter s will be sorted first so the output now of the query will become:
    Students First Name:
    Santos
    Suzie
    Ann
    Antoinette
    Brenda
    Judith
    Lester
    Tim
    So if i type j, all that starts with j will be first, and so on.
    I need help for this problem coz it is so hard for me to output the students with this kind of sorting and is there a code or query string related to this problem?
    thanks in advance.
    Hardz

    Hi,
    One way is to write a query as shown below:
    declare @char nvarchar(1)
    select @char = 'S'
    Declare @t table(name nvarchar(max))
    insert into @t
    values
    ('Santos'),
    ('Suzie'),
    ('Ann'),
    ('Antoinette'),
    ('Brenda'),
    ('Judith'),
    ('Lester'),
    ('Tim')
    select name
    from @t
    where RIGHT(name,1) like @char
    union all
    select name
    from
    (select top 100 percent name
    from @t
    where RIGHT(name,1) not like @char
    order by name) a
    Hope this helps. 
    -Chintak

  • How to Handle sorting stage in datastage on ODI level?

    Hi,
    How to handle sorting stage in datastage on ODI level ?
    Need to do KM customization..
    if yes how?
    else what to do?
    Thanks.

    Hi,
    In Datastage, there is sorting stage specially sort the data after applying the transormations and filters seperately.
    My requirement is we need to apply sorting on Target Database after applying some transformations,Aggregations and filters on source database *(Before Loading into Target data should be in the sorted Order)*
    In odi,there is no sorting stage separtely for those requirement sorting the data either Ascending / Descending order *(how can i approach sorting stage in ODI)*
    Thanks in Advance
    Edited by: anu on Oct 11, 2011 6:10 AM

  • SORT ITAB BY VARIABLE_NAME

    hi,
    i want to sort the int table with variable parameters, like VKBUR, BUDAT, VKORG, MATNR, etc.
    for that ive created a char variable of 5 length (say CRIT) and assigned value based on selection criteria by the user.
    Then, im using SORT ITAB BY CRIT. Its not getting sorted properly.
    Any suggestions,
    Regards,
    Naveen

    You can easily achieve it by using filed symbols.
    Assign the field (upon which you require sorting) to field symbol<Fs> and then sort the table with (<Fs>)reference.
    Sample code is given below for your help.
    DATA: BEGIN OF x1 OCCURS 0,
            t1 TYPE string,
            t2 TYPE string,
            t3 TYPE string,
           END OF x1.
    FIELD-SYMBOLS: <fs> TYPE ANY.
    x1-t1 = 'B'.
    x1-t2 = 'D'.
    x1-t3 = '9'.
    APPEND x1.
    x1-t1 = 'C'.
    x1-t2 = 'X'.
    x1-t3 = '4'.
    APPEND x1.
    x1-t1 = 'F'.
    x1-t2 = 'Y'.
    x1-t3 = '6'.
    APPEND x1.
    LOOP AT x1.
      WRITE: / x1-t1, '    ', x1-t2, '    ', x1-t3.
    ENDLOOP.
    SKIP 2.
    * Sort by field T1
    ASSIGN 't1' TO <fs>.
    SORT x1 BY (<fs>).
    LOOP AT x1.
      WRITE: / x1-t1, '    ', x1-t2, '    ', x1-t3.
    ENDLOOP.
    skip 2.
    * Sort by field T3
    ASSIGN 't3' TO <fs>.
    SORT x1 BY (<fs>).
    LOOP AT x1.
      WRITE: / x1-t1, '    ', x1-t2, '    ', x1-t3.
    ENDLOOP.

  • How do I retain the default 3 column sort order in a standard report

    I have a standard (not interactive) report of about 12 columns in which I set column 1 as the primary sort, column 2 as the second sort within that and column 3 as another sort within 1&2. I have also made other columns sortable by the user. However, once a sort is done by the user on one of the other columns, the default sort order never seems to come back, even if the application is closed. Is there something I need to set?

    Standard report sort columns are stored persistently as user preferences. The <tt>apex_util.remove_sort_preferences</tt> method can be used to remove them, resetting reports to the default sort order. However this is not a precision instrument: it removes the user's sort preferences for all reports...
    It is possible to remove the sort preference for individual reports using the <tt>apex_util.remove_preference</tt> method by reverse engineering the required sort preference name from the admin user preference report, but I wouldn't recommend it. I recently worked on an application where this had been done for one report, but we removed this "feature" as: (1) no one could remember why it had been done in the first place; (2) it was completely inconsistent with the behaviour of the other app reports; (3) the implementation was Byzantine (get non-obvious pref value and have page re-request itself with additional parameters) and lead to (4) poor page performance.
    Unless users are jumping up and down demanding this I'd stick to the status quo...
    (Please update your forum profile with a better handle than "user719232".)

  • Sorting files for distributed systems for Documaker

    Hello,
    I've been asked to research tools that will assist with fast sorting of files for the distributed systems for Documaker. Unfortunately, I have not had any exposure to Documaker so I'm starting from scratch. Anyone have any experience with this?
    Thanks in advance,
    Ron

    Easy enough!
    BCH files can be sorted by any number of means depending on what you would like to do and when you want to do it, and the complexity of your sorting requirements. Documaker includes some rudimentary sorting capabilities, but since there are so many other options available this is not something we have focused on as a desired feature. You can browse the system doc for more details on that. Otherwise... if you're running in multistep mode then you have access to the BCH file, in which case you can sort it using whatever is appropriate to your OS: MVS folks have syncsort, Linux folks have just about anything from perl to sort, Windows folks have a sort command as well. It so happens that those items I've mentioned are all solutions I've used for customers. If you're running single-step, then you won't likely have the BCH file available to use, and will have to write a custom rule in your CUSLIB for Documaker to sort. In this case, you would have to have access to a sorting application that provides an API. I've used Opt-Tech Sort for customers in the past, and it's definitely both affordable and powerful (and multiplatform).
    NA and POL files generally do not require sorting and I would highly recommend that you steer clear of messing with those files unless you have a darn good reason to do so. Primarily you don't need to sort them because the print output is controlled by the BCH file so if you reorder the BCH, the print reflects that order. The NA file contains the variable data, and the POL file contains the forms and sections and recipients for the transactions.
    Printstream sorting is an entirely different animal. I haven't been too involved with printstream sorting because it is both 3rd party and happens outside the Documaker realm, but I can tell you that most customers use facilities provided by their print controller (depending on the type of printer) or they use tools like StreamWeaver (in fact that's probably the best one IMO).
    Hope this helps!
    Andy
    Edited by: Andy Little on May 20, 2010 12:09 PM

  • Sorting in dataset vs sorting in the report

    Are the some guidelines on when to use sorting in dataset vs sorting in the report?

    Hi JoeSchmoe115,
    In Reporting Services, we can add ORDER BY clause to presort data that is retrieved for a report in the dataset queries. Or we can sorting groups or sorting by aggregate values in the report. When we add ORDER BY clause to sort the data in the order we want
    it sorted in the report. Presorted data improves report processing time because of the way it is stored in memory. And there are many report processing tasks do not require sorting data before processing it. For example, SUM is not order-dependent and Data
    within group instances is not automatically sorted.
    So sorting groups or sorting by aggregate values is much simpler in the report than in the query and is frequently more efficient also. If we do not need sorted data in the report, do not set sort expressions on the dataset. For more details, please see:
    Troubleshooting Reports: Report Performance
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Adding a Sort Button in SM30

    Hello Everyone,
            I have a Z table which I am maintaining it through SM30 which has got 5 fields (ZREFERENCE, Profit Center, GL Account, Posting date and amount), currently the data is getting sorted on the basis of ZREFERENCE field. The requirement is after clicking a sort button the data should get sorted on the basis of the field that I have selected. I have created a button on application tollbar.  Need further help in displaying the data in required sorted format...
    Thanks & Regards,
    Viraj

    You can try creating your own PAI module in which u can mention code something like below:
    DATA: fld(30),
          lin TYPE i,
          off TYPE i.
    GET CURSOR FIELD fld LINE lin OFFSET off.
    fld gives you the fild name on which u put the cursor. Based on that u can try sorting. Dunno if this works or not, but u can give it a try.

Maybe you are looking for

  • How can i access the jsp file in a asp file

    Hi every one.. we have two projects one is developed in ASP and one is developed in JSP both are running in two different locations. now i want to include a jsp file from one project to ASP file in the other project. please tell me how can i insert t

  • Possible to change the front and back speaker volume ?

    Hello, as it says in the topic, i was wondering if it is possible to change the volume of the front and the back speakers (the same way it is possible to change the volume of the center speaker). If anyone could tell me wether this is possible at all

  • Handoff not working between iPad Mini Retina and 2014 Macbook Air

    So, I've upgraded to Yosemite today on my 2014 Macbook Air and have updated to iOS 8.0.2 on my iPad Mini Retina. Both are on the same wifi network. Both have bluetooth enabled and are paired. Both have handoff enabled on them. With all that, I cannot

  • Can we install JDeveloper (Window NT/2000) on Windows 98..??

    Can we install JDeveloper (Window NT/2000) on Windows 98? If not, is there a version available for Windows 98? Thanks

  • 802.11n greenfield in a mixed environment

    we plan to have mixed 802.11n deployment coexistence with a/b/g clients. But we want to have some classrooms or labs to run greenfield only where people request 100Mbps bandwidth to transfer large images. What is the best practice to design some smal