Application Development 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: 

Free typing area in screen & syntax check

Former Member
0 Kudos

Hi All,

How is it possible to define a free area on a screen, where the user can type and also I can display some code depending on conditions.

Also is it possible to do a syntax check on this entered text. Please let me know in case any FM can be used for the same.

All this has to be done on a customised screen.

Thanks in advance,

Archana.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Sounds like you want something like the editor used for FI Validations / Substitutions. This allows building IF / ELSE constructs with AND / OR / etc., and then generates ABAP code after the formula is checked as valid.

Take a look at how it is implemented - it is used in a number of places in FI and comes up with different allowed inputs in different areas - so perhaps it is FM or Class based and could be used for your purposes with a custom call to this code.

Andrew

10 REPLIES 10

JozsefSzikszai
Active Contributor
0 Kudos

hi Archana,

for syntax check you can use statement SYNTAX-CHECK, on the other topics I can!t help much

ec

0 Kudos

Hi,

Thanks for your reply, but the problem is that we need to give program attributes for this syntax check and since the program is not generated yet I cannot use it in a correct way.

Eventually if this code is correct in syntax I have to create an FM dynamically with this code, which is why i want a synatx check before creaation.

Any suggestions ??

0 Kudos

I'd suggest you have a look at the SAP help for "INSERT REPORT" and the various options there, and also "SYNTAX-CHECK FOR itab" (marked as internal use only)... these might help... but I'm very curious why you want users to be able to create FM code "on the fly"... what prevents them coding "delete bkpf where budat ne space. commit work." or something equally dangerous...?

0 Kudos

Hi Jonathan,

We are developing a user interface where the user is allowed to define conditions himself. Conditions which would generate some code which can be called by other interfaces.

This would require developing a user inetrface where he has the provision to select functions like 'IF' 'AND' and other logical operations for some predefined fields.

For that we plan to have an editor kind of thing in a screen, which would genrate an if-else-endif structure if he clicks on 'IF' and so on for other functions and all this on the screen. (somewhat like excel functions)

For him to be able to enter a fixed literal we want that area to be open for input. Once he saves a condition FM should be created with the ABAP code for that condition. Before an FM is created with the code it should be checked for syntax which explains this post.

This is for a user to have power to generate some conditions without knowing ABAP.

I have already tried the syntax-check but it isn't applicable for function modules.

The concept is somewhat like pricing/condition routines in SD.

Former Member
0 Kudos

Sounds like you want something like the editor used for FI Validations / Substitutions. This allows building IF / ELSE constructs with AND / OR / etc., and then generates ABAP code after the formula is checked as valid.

Take a look at how it is implemented - it is used in a number of places in FI and comes up with different allowed inputs in different areas - so perhaps it is FM or Class based and could be used for your purposes with a custom call to this code.

Andrew

0 Kudos

Hi Jonathan,

Do you have any transaction where i can have a look at functionalities you mentioned.

please let me know, it will be very helpful.

Thanks,

Archana

0 Kudos

Sorry I meant Andrew !!

sorry for the mistake

0 Kudos

It's OK, I know Andrew well.

Try Tcode OB28.. there's a guide to this on SDN at:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0bc693c-76d8-2910-fd81-e891248a...

which looks quite reasonable.. the "Formula Builder" section is probably of most interest to you.

Jonathan

0 Kudos

Thanks a lot...this is the kind of design we were looking for.

It really is very helpful.

Unfortunately we don't have the FICO module here and also do not have access to it.But I will get a lot of inputs from this.

Please let me know in case you have any more information to support this design.

Thanks a lot !!

0 Kudos

Hi,

Even if you do not have FI running, then you should have the code installed in an R/3 system... have a look for the following function groups:

Function group             Function group short text                                                                                
GBL1                       Boolean rule runtime utilities          
GBL3                       Rule usage                              
GBL4                       Validat.: Auth. Checks + Set/Get Param. 
GBL5                       Validation                              
GBL6                       Validation: syntax/generate routines    
GBL7                       Function Modules for GL Set Usage in VSR
GBL8                       Formula Builder                         
GBLF                       Special FI(RW) Stuff                    
GBLO                       GL Boolean logic: validation/substitutn 
GBLS                       Val./Subst./Rules Trace & Simulation    
GBLT                       Validation/Subst./Rule -(Transport)    

GBL8 is probably a good place to start. Good luck!