Name of a function-module with mixed upper-/lower-case
Hey,
it looks like the ABAP Cleaner doesn't interfere when changing a part of the function-module-name
I expected that "_gis_korr" would be capitalize by ABAP Cleaner.
Regards, Vlad
CALL FUNCTION only works with upper-case names. Lower-case or mixed-case names will cause a runtime error, so your code actually doesn't work right now. If the ABAP Cleaner corrects the name, then this would change the outcome.
I could imagine this as a rule though. I find it highly unlikely that someone would use lower case letters on purpose, so I would be alright with having the ABAP Cleaner fix this. 😄
I expected this actually - that's why I didn't correct it myself due to the fact that I start ABAP Cleaner before activating (both in a macro).
Hi Vlad and ConjuringCoffee,
interesting finding! I think this could be a new option to the "Convert upper and lower case" rule (but maybe default off, because this would indeed change the functionality? On the other hand I agree, it is highly unlikely that this could be on purpose).
However, I wonder why PrettyPrinter doesn't do this: There doesn't seem to be a valid case for lower-case characters here, and my attempts to create a function module with a lower-case character in the name all failed – or do we overlook something?
CALL METHOD ('METHOD_NAME_literal'). seems to be the same: any lower-case letter provokes a dump, even if the specified literal is all lower-case and the method is defined in lower-case chars.
Kind regards, Jörg-Michael
Hi Vlad,
sorry, I entered a wrong issue number in the titles of the above commits – they belong to issue #197!
Kind regards, Jörg-Michael
Overlook something: Just maybe you can write a CPI-C compatible function outside the ABAP stack with a non all uppercase name and call it over RFC?
Hi Fabian,
in that case, just to be on the safe side,
- the RFC - CALL FUNCTION variants (… DESTINATION, … STARTING NEW TASK, … IN BACKGROUND UNIT) should better be excluded from this. Interestingly, the ABAP documentation does NOT seem to mention upper case here for the function name, while
- in the general CALL FUNCTION and CALL FUNCTION, IN UPDATE TASK, upper case is explicitly mentioned.
Kind regards, Jörg-Michael
I wonder if the pretty printer simply ignores strings just for the sake of convenience or performance.
If you check the implementation of the pretty printer, it is set up to simply ignore any string (both ' and `).