‎2008 Nov 20 4:22 PM
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
‎2008 Nov 20 4:26 PM
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
‎2008 Nov 20 4:26 PM
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
‎2008 Nov 20 7:28 PM
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
‎2008 Nov 20 4:34 PM
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
‎2008 Nov 20 7:44 PM
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
‎2008 Nov 21 7:59 AM
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
‎2008 Nov 21 2:15 PM
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
‎2008 Nov 20 7:57 PM
‎2008 Nov 22 10:45 AM
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.