Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ajson in BTP/Cloud ABAP #184

Open
G3GDan opened this issue Jul 12, 2024 · 5 comments
Open

Using ajson in BTP/Cloud ABAP #184

G3GDan opened this issue Jul 12, 2024 · 5 comments

Comments

@G3GDan
Copy link

G3GDan commented Jul 12, 2024

A query at this stage - but it may become an issue.

Has anyone attempted to use ajson in the context of BTP? We're planning a shift to Public Cloud so no lift and shift of code. I suppose it all starts with getting BTP to talk to github - possibly via an Eclipse plug-in.

Any advice or experiences which can be shared, please?

@sbcgua
Copy link
Owner

sbcgua commented Jul 13, 2024

I didn't use it in BTP. @larshp does abaplint have a possibility to check it? (P.S. I tried to configure double platform check last year but didn't manage to do it)

@larshp
Copy link
Collaborator

larshp commented Jul 13, 2024

easiest is to install https://github.com/marketplace/abaplint and then there is an example in https://github.com/abap2xlsx/abap2xlsx

also note that the marketplace abaplint works better with pull requests from forks

@G3GDan
Copy link
Author

G3GDan commented Oct 8, 2024

I'm back with some generally positive news.

We have a Public Cloud system and I've been able to pull the current ajson via the Eclipse plug-in. At some stage I will try to do the same in a BTP instance.

Three things were flagged:

  • the performance test program can't be created - no PROG allowed
  • preference for lr_stack_top = ref #( ) rather than GET REFERENCE OF INTO lr_stack_top
  • deprecated POSIX for regex processing

Problem is what (not) to do to maintain compatibility. Probably I'll convert to using ref# as it's "easy" and create a Class equivalent of ZAJSON_PERF_TEST. Less enthusiastic about tinkering with the regex code - at least not until I've read up and have some data I can use to test.

Happy to contribute these back but are we potentially in a situation where there will need to be traditional vs cloud branches?

My main mission now is reworking the interface which uses the ajson Classes.

@mbtools
Copy link
Contributor

mbtools commented Oct 8, 2024

ref #( ) and the newer regex are not compatible with 7.02. SAP made it impossible to have code that seamlessly works in every environment. 🤷

IMHO, the best approach is a "latest" version that works with the most recent ABAP release (and BTP if that's a target) while trying to support as many older releases as possible (something like 740 SP 8 or higher). To support older releases, create a separate repo that clones "latest" and automatically downport using abaplint. You could do this with branches but the CI setup becomes more complex.

@sbcgua
Copy link
Owner

sbcgua commented Oct 21, 2024

I agree with Marc regarding the compatibility. get reference and POSIX regexs are still valid and, my guess, will stay there for a while ...
The perf_test deployment (which is the most annoying here imho) can be skipped by Exclude path feature - the package separation was quite intentional ;0
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants