Skip to Content
0
Former Member
Apr 21, 2007 at 11:25 AM

Submitting table to a custom program from a BADI

78 Views

I have successfully submit and return table from a program to another program. Ex : just as the below two program. It is working fine.

But i am getting problem for submitting from BADI in the same way. it is displaying error for the following line :

EXPORT itab1 TO MEMORY id '001'.

syntax error : this statement does not supported by oops. And they are suggesting something like :

EXPORT param p1 from var v1 ...... param p2 from var v2... TO MEMORY . Something like this. now i am not able to understand this.....

can anyone give me some light??????

REPORT Z_82235_TEST1 .

types: begin of tab1,

a(1),

b(1),

end of tab1.

types: begin of tab2,

c(1),

d(1),

end of tab2.

data: itab1 type table of tab1,

wa1 like line of itab1,

itab2 type table of tab2,

wa2 like line of itab2.

wa1-a = '1'.

wa1-b = '2'.

append wa1 to itab1.

clear wa1.

wa1-a = '3'.

wa1-b = '4'.

append wa1 to itab1.

clear wa1.

EXPORT itab1 TO MEMORY id '001'.

EXPORT itab2 TO MEMORY id '002'.

SUBMIT Z_82235_TEST2 and return EXPORTING list TO MEMORY .

loop at itab2 into wa2.

write : wa2-c.

endloop.

*********************************************************************************************

REPORT Z_82235_TEST2 .

types: begin of tab1,

a(1),

b(1),

end of tab1.

types: begin of tab2,

c(1),

d(1),

end of tab2.

data: itab1 type table of tab1,

wa1 like line of itab1,

itab2 type table of tab2,

wa2 like line of itab2.

IMPORT itab1 FROM MEMORY id '001'.

IMPORT itab2 FROM MEMORY id '001'.

itab1[] = itab2[].