Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Get internaltable data of called program into calling program

Former Member
0 Likes
1,528

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

1 ACCEPTED SOLUTION
Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
1,480

Hi,

u can use IMPORT/EXPORT to pass an internal table from one report to another report.

Keerthi

15 REPLIES 15
Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
1,481

Hi,

u can use IMPORT/EXPORT to pass an internal table from one report to another report.

Keerthi

Read only

Former Member
0 Likes
1,480

1) You can use ABAP Memory (IMPORT / EXPORT parameters)

2) You can use DATASETS (TRANSFER/READ - to work with application server).

Regards,

~Satya

Read only

Former Member
0 Likes
1,480

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!

Read only

0 Likes
1,480

Hi,

called program is standard program i can't chage the code.

Regards,

suresh

Read only

0 Likes
1,480

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.

Read only

Former Member
0 Likes
1,480
*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

Read only

0 Likes
1,480

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

Read only

0 Likes
1,480

Hi,

what is type of global_field_name.

Regards,

Suresh

Read only

0 Likes
1,480

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к

Read only

0 Likes
1,480

>

> Hi,

>

> what is type of global_field_name.

>

> Regards,

> Suresh

data: global_field_name(100).

sorry forgot to copy that one.

kind regards

arthur

Read only

0 Likes
1,480

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

Read only

0 Likes
1,480

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

Read only

Former Member
0 Likes
1,480

Hi Suresh

try using the function module 'FREE_SELECTIONS_RANGE_2_EX'

Regards

hareesh menon

Read only

Former Member
0 Likes
1,480

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к

Read only

Former Member
0 Likes
1,480

Hi,

Thanks.....