cancel
Showing results for 
Search instead for 
Did you mean: 

Code Editor functionality in WebDynpro

Former Member
0 Kudos

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 

Accepted Solutions (0)

Answers (1)

Answers (1)

GopalNair
Participant
0 Kudos

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.