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

What is wrong with the REDUCE expression?

Former Member
0 Likes
1,266

Hi all
I have the following code snippet, that does not get compiled:

    rt_ibp_ccal = REDUCE #( 
                            INIt lt_ibp_ccal type tt_ibp_ccal
                            FOR ls_holiday_cal IN lt_holiday_cal
                            let lt_new_dates = me->calculate_date( iv_calid = ls_holiday_cal-calid
                                                                     iv_from_year = ls_holiday_cal-yearfrom
                                                                     iv_until_year = ls_holiday_cal-yearuntil
                                                                     it_public_hol = FILTER #( lt_public_hol WHERE calid = ls_holiday_cal-calid )
                            IN
                            NEXT lt_ibp_ccal = me->append_lines_of( it_new_ccal = lt_new_dates it_old_ccal = lt_ibp_ccal )
                            ) ).

What am I doing wrong?

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,178

what you're doing wrong : read the syntax error message, that would help you! (and us too)

Read only

Former Member
0 Likes
1,178

But I do not know, how to solve.

Read only

Sandra_Rossi
Active Contributor
1,178

again, if the code can't compile, then you should tell us what the syntax error is ! (we don't have a crystal ball)

Read only

DoanManhQuynh
Active Contributor
1,178

you miss 1 close parentheses after last parameter with FILTER statement also have 1 unuse close parentheses at the end of your code. thats your problem.