on 06-21-2013 8:05 PM
Hi All
We needed code editor functionality in WebDynpro in which user should be able to write code and basic syntax check can be provided .
Let me know if there is any work around on this .
Regards
Sunanda
Hi Sunanda,
There are a few options you can choose, depending on your specific requirement.
1) Use Data Service Manager/Business Rule Framework (BRF+).
One of the main goals of BRF+ is to address constant change in business requirement & logic implementation, without modifications in code. For this, BRF+ provides a user interface, were modifications can be made to business logic, and the logic gets converted to ABAP code during run time. BRF+ also provides interfaces/features to embed its UI/Editor in your own applications.
More about BRF+ here : http://scn.sap.com/community/brm
2) Use Dynamic ABAP Code generation
Another option, though not as elegant as option #1, would be to use dynamic ABAP code generation. You can provide the user with a text area, where ABAP code will be written. When committing, or performing syntax check, the code entered can be used to create a report program, which can then be executed during run time. Here is an overview of how you can generate ABAP code during run time:
Report ZGN_GENERATEABAP.
data: begin of itab_code occurs 0,
line(150),
end of itab_code.
data: lv_name like sy-repid. "Report Name
concatenate 'Report ' lv_name '.' into itab_code-line.
append itab_code. clear itab_code.
itab_code-line = <ABAP CODE LINE1>.
append itab_code. clear itab_code.
itab_code-line = <ABAP CODE LINE2>.
append itab_code. clear itab_code.
.
.
.
etc
.
.
.
itab_code-line = <ABAP CODE LINEN>.
append itab_code. clear itab_code.
generate subroutine pool itab_cide name lv_name.
Best Regards,
Gopal Nair.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.