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

SY-SUBRC = 4 While SORT.

Former Member
0 Likes
1,515

Hi All,

While SORT the internal table, it sorts but the return code is 4.

I am using only CHAR type fields only and its a STANDARD type table.

In 20 fields of the internal table, the 2nd, 3rd & 4th fields are used to sort.

Even these three fields have values or not, it returns 4.

When a SORT statement with STANDARD internal table will return 4? Provided all fields are CHAR type.

Regards,

R.Nagarajan.

-


We can -


1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,005

I don't think the SORT sets the sy-subrc at all. Can you check if it is set by another statement before the SORT?

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,006

I don't think the SORT sets the sy-subrc at all. Can you check if it is set by another statement before the SORT?

Read only

0 Likes
1,005

Hi Nag..

What Eric said is obiously correct.

Can you please check this issue in debugging mode once.

Otherwise try to paste the sample code here.

Thanks,

Naveen.I

Read only

0 Likes
1,005

Hi All,

Yes... SORT statement is not setting value for SY-SUBRC.

Regards,

R.Nagarajan.

-


We can -


Read only

Former Member
0 Likes
1,005

Hi,

I am not sure whether the SORT statement will have any effect on you sy-subrc. I think this sy-subrc = 4 is because of some other statement before your sort.

Regards,

Pramod

Read only

Former Member
0 Likes
1,005

Thanks all.