06-08-2007 5:43 AM
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
06-13-2007 6: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
06-13-2007 7: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 ***