08-22-2007 9:52 AM
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.
08-23-2007 2:46 PM
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
08-23-2007 8:20 AM
hi Archana,
for syntax check you can use statement SYNTAX-CHECK, on the other topics I can!t help much
ec
08-23-2007 10:18 AM
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 ??
08-23-2007 12:35 PM
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...?
08-23-2007 2:09 PM
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.
08-23-2007 2:46 PM
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
08-23-2007 2:50 PM
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
08-23-2007 2:51 PM
08-23-2007 3:04 PM
It's OK, I know Andrew well.
Try Tcode OB28.. there's a guide to this on SDN at:
which looks quite reasonable.. the "Formula Builder" section is probably of most interest to you.
Jonathan
08-23-2007 3:32 PM
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 !!
08-24-2007 12:22 AM
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!