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

Read memory in another programm

Former Member
0 Likes
3,939

Hi,

i create a pushbutton in VA02 via GUIXT. This button calls another programm (ZTEST)

via a tcode (ZTST).

Is it possible to read the memory of VA02 (SAPMV45A) in Report ZTEST. Or is there another

possibility to read the actual data from VA02 (not dadabase, because VA02 is not saved).

Thanks.

Regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,231

Hello,

Try to check if the values from the calling transaction (VA02) are available in your called Transaction program.

You can check the same with syntax: (PROGRAM NAME)VARIABLE/INTERNAL TABLE NAME.

Program Name: Program name of calling t code.

Variable/Internal Table name: Variable/Internal table of calling T Code.

If values are available in your current session then you can use the same.

Hope it helps.

Thanks,

Jayant

8 REPLIES 8
Read only

Former Member
0 Likes
2,232

Hello,

Try to check if the values from the calling transaction (VA02) are available in your called Transaction program.

You can check the same with syntax: (PROGRAM NAME)VARIABLE/INTERNAL TABLE NAME.

Program Name: Program name of calling t code.

Variable/Internal Table name: Variable/Internal table of calling T Code.

If values are available in your current session then you can use the same.

Hope it helps.

Thanks,

Jayant

Read only

0 Likes
2,231

Hi Jayant,

thanks for your answer. I have tried it but get allways syntax errors.

I will use internal table: XVBAP of program SAPMV45A like this:

LOOP AT XVBAP INTO WA0_XVBAP.

...

...

ENDLOOP.

Do you have an idea, how i have to write it.

Thanks.

Regards, Dieter

Read only

Former Member
0 Likes
2,231

I'm not sure if this works, but try statements EXPORT and IMPORT.

With EXPORT you can "save" a given variable in a given memory id of your choice,

then with IMPORT you can "fetch" it from this very memory id.

Ex:

EXPORT my_variable TO MEMORY ID '1234'.

Now I don't remember but I think the IMPORT will work like IMPORT destination_variable FROM MEMORY ID '1234'.

Play a little with it and see if it helps.

Hope it does.

Avraham

Read only

naimesh_patel
Active Contributor
0 Likes
2,231

Try like this, in your report ZTEST.


  DATA: T_XVBAP TYPE STANDARD TABLE OF VBAPVB WITH HEADER LINE.
  ASSIGN ('(SAPMV45A)XVBAP') TO T_XVBAP.

This will only work if your REPORT shares the same internal memory, means the report is running in the same session.

Regards,

Naimesh Patel

Read only

0 Likes
2,231

Hi Naimesh,

thansk for your answer. I get the right syntax from you, but the problem still exits,

because i don't get the data.

I think that's because i use GUIXT. I debugged in VA02 (/H and /HS) but when

press the button (defined in GUIXT), the debugger does'n trigger.

Regards, Dieter

Read only

0 Likes
2,231

If you use GUIXT button than it will trigger the Debugger becuase GUIXT makes a layer on the actual screen.

If possible, you can create a button in the Additional Data in the Header and call the report.

Regards,

Naimesh Patel

Read only

former_member194669
Active Contributor
Read only

Former Member
0 Likes
2,231

see this example:-

*----


begin of change of code

data : t_list like standard table of abaplist with header line.

DATA: BEGIN OF o_list OCCURS 0,

output(1500) TYPE c,

END OF o_list.

  • t_ascii like standard table of

SUBMIT rm07docs VIA SELECTION-SCREEN AND RETURN exporting list to

memory.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = t_list

EXCEPTIONS

not_found = 1.

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

listasci = o_list " list converted to ASCII

listobject = t_list

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.