2007 Oct 15 2:00 AM
Hi,
I cant get my IF to Write out what i select.
I am a beginner in coding and when doing the debugging it only skips past the Write statement in the IF.
Thanks y'all
FORM write_data USING u_sflight_tab TYPE t_sflight_tab.
FIELD-SYMBOLS <fs_sflight> LIKE LINE OF u_sflight_tab.
LOOP AT u_sflight_tab ASSIGNING <fs_sflight>.
t_sAvail = <fs_sflight>-SeatsMax - <fs_sflight>-SeatsOcc.
t_PercOcc = t_sAvail / <fs_sflight>-SeatsMax.
IF <fs_sflight>-fldate+4(4) BETWEEN '0301' and '0330'.
Write: 'Spring Break'.
ENDIF.
IF <fs_sflight>-fldate+4(4) BETWEEN '0401' and '0410'.
Write : 'Easter'.
ENDIF.
WRITE: / 'CarrId', <fs_sflight>-carrid,
'ConnID', <fs_sflight>-connid,
'FlDate', <fs_sflight>-fldate,
'SeatsOcc', <fs_sflight>-SeatsOcc,
'sAvail', t_sAvail,
'PercOCC', t_PercOcc,
'SeatsMax', <fs_sflight>-SeatsMax.
2007 Oct 15 3:03 AM
Do you mean that the IF statement codition is not satisfied, and the WRITE statement is never executed? If so, check the values in the condition in debug mode.
REgards,
RIch Heilman
2007 Oct 15 3:03 AM
2007 Oct 18 5:30 AM
sorry my mistake it I didn't have any data that was matching embarrassing
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |