Sort according to another field order

say there are 2 input and 2 output fields
The first input field is mapped to the first output field , after grouping similar values together
e.g:
input field1          output field1
a                            a
d                            a
e                            d
c                            d
d                            c
e                            e
a                            e
Now the 2 nd input field has to be mapped to 2nd output field according to the order in which the 1st field has been mapped.
We can not use sortByKey here as the first field is not mapped in lexographical nor numerical order.
How then can we map the 2nd field according to order of first?
Thanks in advance
Pratichi

Hi Pratichi,
The UDF that you are writting to group similar values together for the input field1.
try chaging that  UDF with two arguments
1. inputField1
2. inputField2
use the concept of Edit Java section(Declaring Global variable .To Know more about it refer
http://wiki.sdn.sap.com/wiki/display/stage/UsingEditJavaSectioninMessageMapping)
Declare a Global variable in the Global Variable section as
String[] format = new String[30];
while you are gouping inputField1 ,group inputField2 also and store in the global variable format.
Write one more UDF to read values from the global variable and map it to OutputFiled2.
(you can use same java code as you normally use to store and read values from the string array).
Thanks and Regards,
Kubra fatima.

Similar Messages

  • Sumbit a form according to another field

    Hi all,
    I have a form with a drop list ("Combo Box") of continents, a few check boxes and a submit button.
    I want to submit the form to different e-mail recipients according to the selected continent.
    i.e.
    If I select Europe, I want to submit by e-mail to [email protected]
    and if I select Asia, I want to submit by e-mail to [email protected]
    any ideas how can I do that?
    Thanks in advance

    Use this as the mouse up script for your submit button:
    if (getField("Continent").value == "Europe"){
         this.mailDoc({
         cTo: "[email protected]",
         else {
         this.mailDoc({
         cTo: "[email protected]",
    Replace "Continent" with the name of the combo box in your form.

  • How would you order an internal table e.g. itab according a specific field

    Hello
    How would you order an internal table e.g. itab according a specific field?
    Would you be so kind and let me see an mini example
    Thank you in advance

    Hi Tina,
    You can sort the table as already mentioned, or if you want it always kept in a key sequence you could define it as a sorted table something like this:
    types:
    begin of itabline,
    field1  type c,
    field2  type n,
    field3  ....
    end of itabline.
    DATA itab TYPE sorted table of itabline WITH UNIQUE key field1.
    You can then insert and read entries by the key fields.
    Hope that helps as an option!
    Robin

  • Can you sort a multi value field in descending order on a BC?

    Hi
    We have a date field which is a multivalue field on our Enrolment BC. The field comes from our Attendance BC. The Enrolment BC has a one to many relationship with an Attendance BC.
    We would like to sort this date in descending order for use on the Enrolment BC. We tried this on the link using the associated list sort spec. However this did not work.
    The only way we could get the multi value field to sort by descending order on the Enrolment BC was to add a sort spec on the Attendance BC. That is Date (DESC).
    Is there any other to do this using configuration? We don't want to add a sort spec on the Attendance BC to do this. At the moment it looks we will need to use script on the Enrolment BC.
    Thanks for you help,
    Tim

    That is a good suggestion. It looks like we already have a couple of cloned "Attendance" BC's used by workflow / interfaces so maybe I can use one of these. Thanks!

  • Sort one field base on another field

    Hi:
    I think this maybe a simple question but I can't find the way to do that. For example in a bar chart, measure vs. month_name, where month_name is Jan., Feb., Mar., etc. By default, the bars are sort in alphabet order, but actually we usually want to sort by month_number like 1, 2, 3...
    I know there is a "Custom Sort" option to adjust the order manually. However, it's unacceptable when dealing with multiple years. So how can I sort month_name base on month_number?
    Thanks

    Larry,
    If the months are "stand alone", e.g. not part of a date field, then I've run into this problem as well.  The only solution I've found is to pre-pend the month name with a number that represents its position in the list of months, so Jan becomes "01-Jan", Feb becomes "02-Feb", etc, etc.  This is all accomplished via local variable and "if" function....
    Thanks,
    John

  • Sort table according to input field.

    hii,
      i have a strange requirement in it there is a input fiefld and below it is table . wat i have to do is when user enter a albhabet in the
      input field then the grid should sort according to his entry for eg (if he enters a all records in table should sort by a and after a if he enters b then record should sort with ab  an similsrily.) Only by writing alphabet without any user action.
    is it possible .
    Regards,
    Gaurav.

    Hello Gaurav,
    In webdynpro for ABAP, it is not possible.
    In Web Dynpro for ABAP, you have to use button i.e. event triggering
    But you can achive this thing into Web Dynpro for JAVA or in BSP's.
    Regards,
    Narendra

  • 10.1.3--Disable a field according to values of another field.

    Hi,
    I am trying to set a filed on the JSP to be disalbed according to values of another field.
    eg. When the value in "ID" field is NOT 10 or 20, the "Bill" field should be disabled.
    I have tried using only one condition which is when "ID" != 10 or "ID" != 20. They work fine. But when I try to combine two conditions together using "&&" sign, I got a syntax error. The JSP does not display at all. I asked an expert about it, the answer is:
    #{(bindings.Deptno.inputValue.value !=10) &&(bindings.Comm.inputValue.value > 1000)}. I tried this on my application and got the same syntax error.
    Has anybody had a similar situation? Any idea what could be wrong? Thanks in advance.
    Annie

    Hi bsalvador,
    I've had a simular situation once where I needed to make items disabled or required depending on a workflow step and on depending on other page items. Basically the disabling of items is done by javscript, keep in mind that readonly is not the same as disabled. When you use readonly, the item can still be manipulated with javascript. When you disable an item, the item is not even submitted to the database, so you have to make sure that your submit process can hadle that.
    There are two different situations:
    First you have the page load / page submit, there you can use PL/SQL to check which items should be submitted, hand them a javascript class or make them readonly/disabled straight away.
    Second you have a situation where you want to disable certain items depending on the value of other items. This is done 'on the fly' and should be handled with a javascript function.
    Keep in mind however that javascript runs client side and isn't a secure way to handle data integrity, so you would need a database process to validate which items need to be submitted as well.
    Regards,
    Vincent Deelen

  • Change of field order obtained from getFields()

    I use getFields() method of 'Class' to obtain the fields of a class. Fields returned from method are in order they are declared but according to documentation this order is not guaranteed.
    The elements in the array returned are not sorted and are not in any particular order.When may this order change? At each time the class is loaded or according to version of virtual machine or compiler?..

    Fields returned from method are in order they are declared but according to documentation this order is not guaranteed.So they are not in any particular order.
    When may this order change?Any time at all.
    At each time the class is loaded or according to version of virtual machine or compiler?.It's not specified. So don't rely on any ordering.
    That's what the Javadoc is telling you. Listen and learn.

  • Sorting Crosstab By Summaerized Fields

    Hi,
    I have a fairly strightforward crosstab. The data is has RptGroup for rows and has 4 summarized fields
    Avg of @ComplianceYN
    Count of Command.MRN
    StdDev of Command.Persistence
    Avg of Command.Persistence
    The crosstabs default order is by RptGroup. The user would like to see it sorted by Avg of Command.Persistence.
    I can't find any way in the crosstabe object to to this.
    Can you help?
    Thanks,
    Dick Rosenberg

    Hi Sastry,
    Now I am more confused than ever.
    I made another report that was essentially the same as the first report. When I got to the crosstab I thought I would do the same thing you suggested for the first report, create a formula, Average of Persistence, that was average({Command.Persistence}), put that in my crosstab as a column, then go into Group Sort Expert and sort on my formula.
    Well it doesn't work and the symptoms are very confusing.
    In my first report, after I put the formula Average of Persistence as a column in my crosstab, as you predicted, there were a lot of extra columns in my crosstab. As I recall (this happened a couple of days ago), I deleted one of the new labels from my crosstab and all of the new columns disappeared.
    Yet I was able to find the Average of Persistence formula in the Group Sort Expert and when I previewed the report, the crosstab sorted in the same order my chart. So I was happy.
    Today I copied the report to a different name (same command) and went about changing the Chart and the crosstab to represent the new grouping (it is the same data but charted and crosstabbed by a field in the command called Team as opposed to the first report which was charted and crostabbed by a field in the command called Reporting group).
    I was able to sort the chart easily enough, but I can't sort the crosstab in the order of Average Persistence. So I went back to look at the first report to see what I had done. I discovered that the formula Average of Persistence was not in the columns in the crosstab on the first report (which probably happened when I deleted  all of the fields in the crosstab that appeared when I put in the column ).
    Yet the crosstab in the first report still sorts in the correct order, by Average of Persistence.
    And, no matter what I do, I can't get the second report to sort that way.
    So I feel like I'm back to square 1 - I don't know what I did in the first report to get it to work and I can't get it to work in the second report no matter what I do.
    Help!
    Thanks,
    Dick

  • Create another purchase order for a material ordered in full

    Hello friends,
    I have a little MM question for you.
    I've created a purchase requisition with a material A and quantity 100 UN
    I've then created a purchase order in reference to this PR.
    This PO has been released.
    Is it possible, in standard SAP, to create another purchase order in reference to the same purchase requisition for the same material and the same quantitiy ?
    How does SAP control that ? (customizing path ??)
    Regards,
    Bahia.

    Dear,
    Is it possible, in standard SAP, to create another purchase order in reference to the same purchase requisition for the same material and the same quantitiy ?  Yes it is possible in SAP
    How does SAP control that ? (customizing path ??): SAP controls in that way, when ever you create purchase requisition with a material A and quantity 100 UN...Now PO created and released...
    Now again if you try to create PO wrt PR, you can observe this time you will get all deatils in PO without quantity...reason behind that is, you have already released an order for full qty w.r.t. that PR...So this time qty field will be empty..You have to manually enter this field.
    Now the same you can see in the the PR status in ME53N Tcode.
    Regards
    Utsav

  • How can I see my classical music sorted according to composers - individual works - performers ?

    How can I see my classical music sorted according to composers - individual works - performers ? This is much more useful than sorting according albums.
    I have tried using the Grouping tag, writing Composer - Work - conductor there. But if I make a smart playlist, showing only Genre: "classical" and sorting according to Grouping, I see a line for each part in every work: one line for each movement of Mahler's 4th Symphony performed by George Solti, for instance.
    What I am looking for is a way so that there is ONE line for each PERFORMANCE, ie, one line for Mahler's 4th Symphony performed by George Solti, below that one line for Mahler's 4th Symphony performed by William Mackerras, and so on.
    Anyone found the golden solution? :-)
    Peter P.

    How can it be possible because the resoution of my video source is the same before and after conversion process ... thanks to my ADSL Box and my PS3 the video is ok ... not with ATV ...
    Could you please give me the resolution I should have for my video in SD or HD720 ?
    All my video have converted in 768x576 ...
    Is there another way to convert my video for iTunes instead AVS Video Converter ?
    Thanks all

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

  • Sales order with reference to another Sales order

    Hi SAP Gurus,
    Good day.
    I would like to seek an advice from u regarding this scenario:
    First if all, is this scenario possible-create sales order w/ reference to another sales order?
    We have a scenario wherein the original sales order has a material w/ free goods. And then when we create another sales order w/ ref to that iriginal sales order, the free goods appeared twice.
    Original SO:
    Item.  Material.    Qty.  item cat
    10.      123.          5.       ZOR
    20.       123.         1.       ZORR
    SO w/ ref to above orig SO:
    Item.  Material.    Qty.  item cat
    10.      123.          5.       ZOR
    20.       123.         1.       ZORR
    30.        123.         1.      TANN
    Item 30 should not appear since our goal is to copy exactly what was on the original sales order.
    I have checked the item cat and copy control & seems it is correct.
    Please advice
    Thanks,
    Erza

    dear friend,
    your 'key' transaction is VTAA
    the copy control has two parts - header and item levels - check them both
    1.
    find out your record (source to target) , goto Deatails and check out two checkboxes - "Copy item number" and "Complete reference" . also check out the copying requirements - look at routine number and make sure it is correct
    2. at item level check out all relevant 'copying' fields
    good luck

  • BAPI to create sales order with reference to another sales order

    hi all,
    is there a bapi that allows you to create a sales order with reference to another sales order?
    thanks,
    V

    Hi Valencia,
    I think the normal BAPI (BAPI_SALESORDER_CREATEFROMDAT1)will do. You will have to fill the fields REF_DOC, REF_DOC_IT, REF_DOC_CA of the table ORDER_ITEMS_IN (and make sure that Customizing settings allow you to copy from order to order).
    Regards,
    John.

  • FM to create Sales order with reference to another Sales order

    Hi,
    Is there any inbound IDOC FM which can create a Sales Order with reference to another Sales order.
    PLease reply
    Santhana M.

    Hi,
    try FM BAPI_SALESORDER_CREATEFROMDAT2
    with ORDER_HEADER_IN fields
    REFOBJTYPE
    REFOBJKEY
    REFDOCTYPE
    Regards,
    Clemens

Maybe you are looking for