2009 Mar 11 7:04 AM
Hi,
iam calling one program through another program. i want to get internaltable data of called program into calling program( I don't want to display data on screen). how can i get this.
Regards,
Suresh
2009 Mar 11 7:08 AM
Hi,
u can use IMPORT/EXPORT to pass an internal table from one report to another report.
Keerthi
2009 Mar 11 7:08 AM
Hi,
u can use IMPORT/EXPORT to pass an internal table from one report to another report.
Keerthi
2009 Mar 11 7:10 AM
1) You can use ABAP Memory (IMPORT / EXPORT parameters)
2) You can use DATASETS (TRANSFER/READ - to work with application server).
Regards,
~Satya
2009 Mar 11 7:11 AM
Hi Suresh,
Do below
Called program
export wty_rule_i_ic-itmno to memory id 'IT'.Calling program
import ITAB = ITAB from memory id 'IT'hope it helps you.
Thanks!
2009 Mar 11 7:13 AM
Hi,
called program is standard program i can't chage the code.
Regards,
suresh
2009 Mar 11 7:33 AM
Hi,
If its not possible modify the called program then how can you IMPORT internal table. Can you explain me the real requirement of moving the internal data from one program to another.
2009 Mar 11 7:23 AM
*IN CALLED PROGRAM WRITE AS*
export itab = itab_of_thisprogram[] to memory id 'ZTABLE' .
*IN CALLING PROGRAM WRITE AS*
import itab = itab_of_thisprogram[] from memory id 'ZTABLE' .Edited by: tahir naqqash on Mar 11, 2009 12:24 PM
2009 Mar 11 7:30 AM
here is an example that I use to retrieve data from other programs. this example reads the data of table gt_comp from programm SAPLCOWB which I use to verify if users have entered new data in iw42 which is not allowed in our procedure of working.
ofcourse this only works if the called programm is not closed
DATA: BEGIN OF gt_comp OCCURS 0.
INCLUDE STRUCTURE cowb_comp.
DATA: END OF gt_comp.
field-symbols : <fs> type any table,
<wa> type any.
clear global_field_name.
move '(SAPLCOWB)GT_COMP[]' to global_field_name.
assign (global_field_name) to <fs>.
loop at <fs> assigning <wa>.
move <wa> to gt_comp.
if gt_comp-rsnum eq '0'.
message ID 'ZCS' type 'E' number '001'.
endif.
endloop.kind regards
arthur
Edited by: A. de Smidt on Mar 11, 2009 8:31 AM
2009 Mar 11 7:40 AM
2009 Mar 11 7:44 AM
Well A. de Smidt has already given the similar code so sorry for repetetion, the type would be char to store the name of standard program as well as internal table,
кu03B1ятu03B9к
2009 Mar 11 7:49 AM
>
> Hi,
>
> what is type of global_field_name.
>
> Regards,
> Suresh
data: global_field_name(100).
sorry forgot to copy that one.
kind regards
arthur
2009 Mar 11 8:10 AM
Hi,
Still iam not getting the data.
iam getting error like field-symbol is not assigned.
any extra code is required other than your code.
Please provide me complete code if possible
Regards,
Suresh
2009 Mar 11 8:13 AM
is youre external programm still running in the background or is it closed down ?
if it's closed down then it is not assigned. further on is the data in the external programm a table or a structure ??
if its a structure then use leave out the [].
move '(SAPLCOWB)GT_COMP' to global_field_name.
can you put the code here of you're programm with my code in it and the code of the programm you call ??
kind regards
arthur
2009 Mar 11 7:37 AM
Hi Suresh
try using the function module 'FREE_SELECTIONS_RANGE_2_EX'
Regards
hareesh menon
2009 Mar 11 7:41 AM
use like this:
data: v_tabname type char20.
field-symbols: <fs> type any table.
v_tabname = '(<ur standard program>)<ur internal table>' " like '(RFKORD10)DOPOS[]'
assign (v_tabname) to <fs>
now use <fs> according to ur requirement
кu03B1ятu03B9к
2009 Mar 12 6:45 AM