Skip to Content

List View Increment with Button Action

I'm trying to develop a screen that allows the user to move the orders up or down with corresponding buttons. Eventually I'll concatenate the current sort key into the sort key using the mid formula to change the appearance on the main page. I'm having 3 issues:

1) When attempting to SUM(Global Variable{1} with Current property) it concatenates them. So SUM(1 and 0) becomes 10 not 1. So image below shows 1110, which was 3 up clicks.

2) Selecting the row and clicking a button event doesn't adjust the selected row where the action targeted the current screen's list view's current object. I clicked up with the first row selected and it affected the fifth row's value. Currently using this link to see how to adjust:

https://archive.sap.com/discussions/thread/3548428.

3) Is there an easy way to get the index position value using Agentry to establish the current sort order field value?

Thank you,

Brad

sort-orders.png (44.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Disregard number 2 above. I found the solution for that by changing my target objects in the transaction by pointing to the target object and selecting none for the target property.

  • Get RSS Feed

1 Answer

  • Jul 10, 2017 at 02:13 PM

    1) I would guess that your values are strings. When SUM works with strings it is equivalent to CONCATENATE. If you want mathematical SUM you will need to make sure your parameters are a numeric type. You can use FROM_INTEGRAL_NUMBER to set the context of the parameters to numbers so SUM should then return the result you expect.

    3) No there isn't a way to get a position value from Agentry since it is dynamic based on the sorting applied to the list.

    Add comment
    10|10000 characters needed characters exceeded

    • I'm mainly seeing if Agentry can take a previously sorted Order collection based on sortkey on the Main Screen and using the position of those items and pulling that data into the Sort Screen. So when I increment the count, as I iterate through each order in the collection, it'll match the position of that order found on the Main Screen. When the user is on the Sort Screen and clicks up, it'll change the count/CurrentSortPosition value on the screen directly allowing for a dynamic sort. I have the logic set up except the underlying Order collection object is being pulled in rather than the index position of that Order object listed on the Main Screen.

      Main Screeen list sorted on ascending Sortkey: Sortkey -123 (underlying position 2), Sortkey - 456 (underlying position 1), Sortkey - 789 (underlying position 3)

      Current Sort Screen view sorted on Count: Sortkey - 456 Count 1, Sortkey - 123 Count 2, Sortkey - 789 Count 3

      Ideal Sort Screen view sorted on Count: Sortkey - 123 Count 1, Sortkey - 456 Count 2, Sortkey - 789 Count 3

      Thanks,

      Brad