Skip to Content
author's profile photo Former Member
Former Member

Automatic Code Generation and Screen Elements Creation and Modification

Hello Experts.......

I am having very urgent requirement...... what we have to do is..

1. Providing Interface where user define parameter which is use to define formula.

2. Providing Interface where user define its own Formulas based on above parameters which is used for area and weight Calculation......

3. on the basis of these formula my code changes and perform as per the give formula of user...

4. Now on the basis of formula we have to create screen dynamically.... where in the feilds is of type of parameters as per the formula...

Plzz help me....

its Urgent

Reagrds Vaibhav

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jun 13, 2007 at 05:51 AM

    Hi Vaibhav,

    Check out this code -

    DATA:
      gt_source        TYPE TABLE OF string,
      gv_repid         TYPE sy-repid VALUE 'ZMAN_DYNAMIC_PROGRAM_TMP'.
    
    APPEND 'REPORT ZMAN_DYNAMIC_PROGRAM_TMP.' TO gt_source.
    APPEND 'SELECTION-SCREEN BEGIN OF BLOCK FRM_DYN' TO gt_source.
    APPEND 'WITH FRAME TITLE TTL_DYN NO INTERVALS.' TO gt_source.
    APPEND 'PARAMETERS P_TEST      TYPE CHAR30.' TO gt_source.
    APPEND 'SELECTION-SCREEN END OF BLOCK FRM_DYN.' TO gt_source.
    APPEND 'WRITE ''Capturing parameter P_TEST : ''.' TO gt_source.
    APPEND 'WRITE P_TEST.' TO gt_source.
    
    INSERT REPORT gv_repid FROM gt_source
                           PROGRAM TYPE '1'.
    
    SUBMIT (gv_repid) VIA SELECTION-SCREEN AND RETURN.
    

    Regards,

    Manish Joshi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 13, 2007 at 06:09 AM

    Or else you can call ABAP editor instead.

    Like this -

    DATA:
      gv_repid         TYPE sy-repid VALUE 'ZMAN_DYNAMIC_PROGRAM_TMP'.
    
    * Call ABAP Editor instead
    EDITOR-CALL FOR REPORT gv_repid.
    

    If you want this to be a control on your screen use class <b>CL_GUI_ABAPEDIT</b>.

    If you don't want to use ABAP editor create a normal text editor <b>CL_GUI_TEXTEDIT</b>. Read the text in the editor using method <b>GET_TEXT_AS_R3TABLE</b> and use previous code to generate program.

    Regards,

    Manish Joshi.

    • I hope you know how to award points ***

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.