2015 Jun 05 11:49 PM
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.
2015 Jun 08 5:47 AM
Hi Mary,
please check, that all comments are starting at position 1 (* at position 1).
Please check all fields to be known:
Doubleclick them. If they can be found, they are okay.
Regards,
Klaus.
2015 Jun 08 5:47 AM
Hi Mary,
please check, that all comments are starting at position 1 (* at position 1).
Please check all fields to be known:
Doubleclick them. If they can be found, they are okay.
Regards,
Klaus.
2015 Jun 08 3:13 PM
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.