‎2010 Dec 13 10:33 AM
Dear Experts,
I have a problem in my program. One of my perform statment calling another program. In that program my internal table getting 28 rows of values( i checked durring debuging ), at the end of the form again its coming back to my main program. Durring that time its getting refreshed with out refresh statment. But i required the values.
Can anyone suggest that.
The source code will be,
PERFORM fill_ck11n_screen(saplzplmbom) USING wa_mast2-werks.
MOVE 'E' TO h_mode.
REFRESH msg_tab.
CALL TRANSACTION 'CK11N' USING zbdcdata
MODE h_mode
"OPTIONS FROM g_s_options
MESSAGES INTO msg_tab.
Here Zbdcdata getting values in the perform, but after this perform the value getting cleared.
Suggest me pls.
Mohana
‎2010 Dec 13 10:39 AM
‎2010 Dec 13 10:41 AM
Where are you capturing the returing internal table entries? I guess you will have to add the tables option in the perform statement.
Vikranth
‎2010 Dec 13 10:42 AM
Hi,
If you want the internal tables values to be reflect in the calling program, the called subroutine must have the internal table's name passed in TABLES parameter in the subroutine or should be a part of the global definitions common to both the called subroutine and the calling program.
Please Make sure atleast one of these happens.
‎2010 Dec 13 11:27 AM
You are not passing the zbdcdata tab from your main program to your routine. Probably, you are making changes to an internal table named zbdcdata in the routine just like your zbdcdata table in your main program.
Try this code:
Perform fill_ck11n_screen(saplzplmbom) using wa_mast2-werks changing zbbcdata.
Form ck11n_screen(saplzplmbom) Using uv_werks type werks
Changing ct_zbcdata type bdcdata_tab.
Now change all references in this routine for the zbdcdata table to ct_zbdcdata.
It should work now.
Good luck!
Edited by: Guus Jansen on Dec 13, 2010 1:12 PM
‎2010 Dec 13 5:02 PM
Mohana,
Set the watchpoint on that internal table before call transaction statement during debugging, you'll find the point where this internal table values are getting are changed.
USING option does not protect the variables from being changed inside the called control block unless the variable is passed by value.
You can make a copy of internal table before passing it further to the call transaction statement .