Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Increasing or Decreasing Order between field values

Former Member
0 Likes
656

Hi Folks.

  I want to find the positive or negative difference between consecutive values or increasing or decreasing order.

for eg:      field A     fieldB      fieldC      FieldD

               0             10          20           40               ----------------->   Increasing Order

               100          70         50           0                ------------------->   Decreasing Order

                0            30         0             50               -------------------> finding the blank value between values

how can i find the above increasing or decreasing order in ABAP.

Thanks,

Smriti

Hi Folks.

  I want to find the positive or negative difference between consecutive values or increasing or decreasing order.

for eg:      field A     fieldB      fieldC      FieldD

               0             10          20           40               ----------------->   Increasing Order

               100          70         50           0                ------------------->   Decreasing Order

                0            30         0             50               -------------------> finding the blank value between values

how can i find the above increasing or decreasing order in ABAP.

Thanks,

Smriti

3 REPLIES 3
Read only

vishal_sharda2
Participant
0 Likes
597

Hi,

Not sure why you want to identify the order. You can have the data in ascending or descending order using simple SORT statement. Thanks!

Read only

sivaganesh_krishnan
Contributor
0 Likes
597

based upon which field you want to arrange ..???

Read only

former_member187748
Active Contributor
0 Likes
597

Hi Smriti,

your question is not clear,

if you wants to take any range in any order, you can use .

SORT itab  ASCENDING field name.

SORT itab  DESCENDING field name.

and after that you can loop with your internal table to know the difference between them.