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

Sort Structure

Former Member
0 Likes
1,117

LOOP AT CETT.

IF SCHED_QUAN GE QUANTITY.

CHAR_FOUND = 'X'.

EXIT.

ELSEIF CETT-EINDT = FIFTEEN_DAYS.

CHAR_FOUND ='X'.

EXIT.

ELSE.

SCHED_QUAN = CETT-MENGE + SCHED_QUAN.

ENDIF.

ENDLOOP.

I am tryin to read records in this structure.... I want the sort the structure date wise before I loop CETT... How to do it???

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
658
sort cett ascending by eindt.

LOOP AT CETT.
IF SCHED_QUAN GE QUANTITY.
CHAR_FOUND = 'X'.
EXIT.
ELSEIF CETT-EINDT = FIFTEEN_DAYS.
CHAR_FOUND ='X'.
EXIT.
ELSE.
SCHED_QUAN = CETT-MENGE + SCHED_QUAN.
ENDIF.
ENDLOOP.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
658

Hi Alex,

Give a sort before the loop .

sort cett by eindt.

Pls reward points if found useful.

Thanks

Shyam

Read only

abdul_hakim
Active Contributor
0 Likes
658

hi

use SORT cett BY eindt.

Cheers,

Hakim

Read only

Former Member
0 Likes
658

befor loop use

sort cett by eindt.

loop at cett.

endloop.

regards

shiba dutta

Read only

Former Member
0 Likes
658

Alexander,

*****If you want to get the recent date first use

SORT CETT ASCENDING BY eindt .

****Otherwise

SORT CETT BY eindt .

**************

LOOP AT CETT.

IF SCHED_QUAN GE QUANTITY.

CHAR_FOUND = 'X'.

EXIT.

ELSEIF CETT-EINDT = FIFTEEN_DAYS.

CHAR_FOUND ='X'.

EXIT.

ELSE.

SCHED_QUAN = CETT-MENGE + SCHED_QUAN.

ENDIF.

ENDLOOP.

Pls. reward if useful.