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

unspecified syntax error

Former Member
0 Likes
2,005

I'm getting an unspecified syntax error in my field routine.  I know this is baby code, but my attempts at case style statements wasn't working.  I used the standard auto setup for the routine.  This is the added method code.    DATA:       tmp_flag(1).     clear tmp_flag. * set flag for Lessee report.     if /BIC/OIZN_CNTRTY eq 'ZLSE'.       tmp_flag = 'L'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZLSL' and /BIC/OIZN_CLASS = 70.       tmp_flag = 'L'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZLSL' and /BIC/OIZN_CLASS = 75.       tmp_flag = 'L'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZLSL' and /BIC/OIZN_EQUIP = 70.       tmp_flag = 'L'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZLSL' and /BIC/OIZN_EQUIP = 75.       tmp_flag = 'L'.     endif. * set flag for Lessor Salestype report.     if /BIC/OIZN_CNTRTY eq 'ZSFL' and /BIC/OIZN_CLASS = 65.       tmp_flag = 'S'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZSFL' and /BIC/OIZN_CLASS = 57.       tmp_flag = 'S'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZSFL' and /BIC/OIZN_EQUIP = 65.       tmp_flag = 'S'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZSFL' and /BIC/OIZN_EQUIP = 57.       tmp_flag = 'S'.     endif. * set flag for Lessor OL report.     if /BIC/OIZN_CNTRTY eq 'ZSFL' and /BIC/OIZN_CLASS = 60.       tmp_flag = 'O'.     endif.     if /BIC/OIZN_CNTRTY eq 'ZSFL' and /BIC/OIZN_EQUIP = 60.       tmp_flag = 'O'.     endif. RESULT = tmp_flag.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,424

Hi Mary,

please check, that all comments are starting at position 1 (* at position 1).

Please check all fields to be known:

  • /BIC/OIZN_CLASS
  • /BIC/OIZN_EQUIP
  • /BIC/OIZN_CNTRTY
  • RESULT

Doubleclick them. If they can be found, they are okay.

Regards,

Klaus.

2 REPLIES 2
Read only

Former Member
0 Likes
1,425

Hi Mary,

please check, that all comments are starting at position 1 (* at position 1).

Please check all fields to be known:

  • /BIC/OIZN_CLASS
  • /BIC/OIZN_EQUIP
  • /BIC/OIZN_CNTRTY
  • RESULT

Doubleclick them. If they can be found, they are okay.

Regards,

Klaus.

Read only

0 Likes
1,424

Thank you Klaus.  This was helpful.

I ended up needing to use SOURCE_FIELDS-/BIC/ZN_CLASS, ditto for the others.  To find this I made a copy of the code, then cut all of it, and pasted back one line at a time until I solved the issue.

I wish SAP would let me save code that is not working!  I can understand not activating, but at least save the dang thing.