‎2009 Feb 09 11:27 AM
hai friends ,
any body tell me can we activate our program in the runtime. because i make some changes in our program in runtime will it affect before the output.actually it reflecting when i exicute 2 nd time.
‎2009 Feb 09 12:33 PM
Hi,
Check this FM, it activates the Report/ Program dynamic
REPS_OBJECT_ACTIVATE
thanks\
Mahesh
‎2009 Feb 09 11:32 AM
This logic rebuilds an INCLUDE MODULE then generates it and then runs it.
I used this logic to build IMPORT and EXPORT functions that allowed me to dynamically unload and then load a DB Table from one instance to another. It would recompile based on table structure.
*&---------------------------------------------------------------------*
*& Form build_include_ZYDIMPORTIN
*&---------------------------------------------------------------------*
FORM build_include_zydimportin.
SELECT SINGLE * FROM dd02l WHERE tabname = p_tabnam.
* Determine the table/structure visible length
SELECT * FROM dd03l WHERE tabname = p_tabnam.
IF dd03l-leng GT 0.
rec_len = rec_len + dd03l-leng.
ENDIF.
ENDSELECT.
CHECK rec_len GT 0.
DELETE REPORT 'ZYDIMPORTIN'.
IF dd02l-tabclass NE 'INTTAB' AND
dd02l-tabclass NE 'APPEND'.
CONCATENATE 'tables' p_tabnam '.' INTO i_report-line
SEPARATED BY space.
APPEND i_report.
CLEAR i_report-line.
APPEND i_report.
ENDIF.
if p_tabnam = 'ZSPSUMM'.
rec_len = rec_len + 2.
endif.
SHIFT rec_len LEFT DELETING LEADING '0'.
CONCATENATE 'data data_str(' rec_len ').' INTO i_report-line.
APPEND i_report.
INSERT REPORT 'ZYDIMPORTIN' FROM i_report.
GENERATE REPORT 'ZYDIMPORTIN'.
ENDFORM. " build_include_ZYDIMPORTIN
‎2009 Feb 09 11:46 AM
hi iam inserting some text elements in the runtime it is reflecting when i exicute the report at 2 nd time.
for reflecting same changes in runtime what can we do.
‎2009 Feb 09 11:51 AM
Hi
It will definately affect when you run the program second time .But make sure the program finishes the execution the first time completely and correctly .
Hint : There are some RFC function module that attach dynamically and be a part of other program by getting activated to it.
‎2009 Feb 09 12:00 PM
‎2009 Feb 09 12:05 PM
Hi,
As far as i have understood your question.
Do an screen navigation and come back to the original screen where the text element was activate .
Let me know if it served your purpose ?
‎2009 Feb 09 12:13 PM
no not like that ,i am chnging the value of taxt elemements of an standard program.we have a statement in standard one.so before that i want to change the value .then it will display my value.i think its vary clear ,
now tell me how can we do?
‎2009 Feb 09 12:23 PM
No .THis is not possible.
SAP follows a technic called 'FLUSHING' concept wherien the changes in ( PBO or PAI ) of a screen happens only on some occasion..
My suggestion is to traverse a screen and get back to the screen .
(screen field transportation happens at this time from repository )
Updating the screen element(text element is ofcourse a screen elemet) seems to be not possible being on the same screen.
Moreover the text element updated should be activate every time.
eg:
Activate text-elemt .
Make changes to it.
Activate. (At this step it wont reflect the changes immediately )
Navigate
See the changes
‎2009 Feb 09 12:33 PM
Hi,
Check this FM, it activates the Report/ Program dynamic
REPS_OBJECT_ACTIVATE
thanks\
Mahesh
‎2009 Feb 09 12:46 PM
‎2009 Feb 10 12:04 PM
hi thanku but it is not reflecting to changed text elements.
‎2009 Feb 10 1:44 PM
Hi sudheer,
As i told previously changes wont me happening immediately .
‎2009 Feb 11 3:47 AM
‎2009 Feb 11 5:28 AM
Hi Friend,
you can use BDC to activate the program at runtime....
use the code given below to activate the program at runtime....
data: bdcdata like bdcdata occurs 0 with header line.
start-of-selection.
perform bdc_dynpro using 'SAPLWBABAP' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RS38M-PROGRAMM'.
perform bdc_field using 'BDC_OKCODE'
'=AKTI'.
perform bdc_field using 'RS38M-PROGRAMM'
'YH1307_RAD'.
perform bdc_field using 'RS38M-FUNC_EDIT'
'X'.
perform bdc_dynpro using 'SAPLSEWORKINGAREA' '0200'.
perform bdc_field using 'BDC_OKCODE'
'=WEIT'.
call transaction 'SE38' using bdcdata mode 'N' update 'S'.
*----------------------------------------------------------------------*
* Start new screen *
*----------------------------------------------------------------------*
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform.
*----------------------------------------------------------------------*
* Insert field *
*----------------------------------------------------------------------*
form bdc_field using fnam fval.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endform.regards,
Siddarth