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

retreive data

Former Member
0 Likes
559

hi,

How can retreive data from program A into program B.

For example:

in progA i have:

data lv_test(2).

lv_test = 'AA'.

submit progB.

how can I retrieve in ProgB lv_test?

joseph

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
517

Hello,

In ProgA, put this code:

Data lv_test(2).

lv_test = 'AA'.

EXPORT lv_test to memory id 'TEST'.

In ProgB declare the data object and retrieve the data:

Data lv_test(2).

IMPORT lv_test from memory id 'TEST'.

check this link:

http://help.sap.com/saphelp_erp2004/helpdata/en/fc/eb3bb7358411d1829f0000e829fbfe/content.htm

Hope this helps.

Regards, Murugesh AS

Message was edited by: Murugesh Arcot

3 REPLIES 3
Read only

Former Member
0 Likes
518

Hello,

In ProgA, put this code:

Data lv_test(2).

lv_test = 'AA'.

EXPORT lv_test to memory id 'TEST'.

In ProgB declare the data object and retrieve the data:

Data lv_test(2).

IMPORT lv_test from memory id 'TEST'.

check this link:

http://help.sap.com/saphelp_erp2004/helpdata/en/fc/eb3bb7358411d1829f0000e829fbfe/content.htm

Hope this helps.

Regards, Murugesh AS

Message was edited by: Murugesh Arcot

Read only

0 Likes
517

Sorry, i didn't mention that i don't want to do it with export/import to memory (or database).

I want a solution like it's describe in weblog

/people/brad.williams/blog/2005/04/25/userexits--how-do-i-access-inaccessible-data

Read only

0 Likes
517

Hi Joseph,

try that:

1) in Program ZREP_A :

FORM test.
  lv_test = 'AA'.
ENDFORM.

2) in Program ZREP_B :

PERFORM test(ZREP_A).
ASSIGN ('(ZREP_A )LV_TEST') TO <f>.

Andreas