‎2006 May 08 7:13 PM
Hi ABAP Gurus,
I am new to ABAP. I am trying to execute the following piece of code and return the output to either a structure or a table. The call to Function 'LIST_FROM_MEMORY' is returning an error. Not sure what I am missing. I would really appreciate if someone could help.
Thanks.
Regards,
bw_newbie
REPORT ZTEST12 .
DATA: LISTOBJECT LIKE ABAPLIST OCCURS 0.
SUBMIT RPUAUD00
USING SELECTION-SET 'ZVAR1'
AND RETURN
EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTOBJECT
EXCEPTIONS
NOT_FOUND = 1.
CALL FUNCTION 'DISPLAY_LIST'
exporting fullscreen = 'X'
tables listobject = LISTOBJECT.
WRITE 'DONE'.
‎2006 May 08 8:32 PM
I see in your code, you have your selection variant commented out in the submit call. Does it really run without any parameter being given? Check that.
‎2006 May 08 7:18 PM
hi Newbie,
I have executed 'LIST_FROM_MEMORY' it is working fine hope there exists some problem with <b>RPUAUD00</b>
CALL FUNCTION <b>'LIST_FROM_MEMORY'</b>
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1 .
IF sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'LIST_FROM_MEMORY'.
ENDIF.
Regards,
Santosh
Note: Reward Points if helpful
‎2006 May 08 7:21 PM
I was trying you report changing SUMIT to another report, and works fine for me. May be is a problem in RPUAUD00.
Regards.
‎2006 May 08 7:56 PM
Hi newbie,
Include "and return" while calling other program.(as shown in bold)
=========================================================
REPORT ZTEST12 .
DATA: LISTOBJECT LIKE ABAPLIST OCCURS 0.
SUBMIT RPUAUD00
USING SELECTION-SET 'ZVAR1'
AND RETURN
EXPORTING LIST TO MEMORY
<b>and return</b>.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTOBJECT
EXCEPTIONS
NOT_FOUND = 1.
CALL FUNCTION 'DISPLAY_LIST'
exporting fullscreen = 'X'
tables listobject = LISTOBJECT.
WRITE 'DONE'.
=========================================================
Also, you need to maintain the structure of internal tables in calling and called by program should be same.
Hope this will be of help to you.
Regards,
vicky
PS: Award points if helpful.
‎2006 May 08 8:00 PM
Hi newbie,
you can do this way either.
========================================================
REPORT ZTEST12 .
DATA: LISTOBJECT LIKE ABAPLIST OCCURS 0.
SUBMIT RPUAUD00
USING SELECTION-SET 'ZVAR1'
AND RETURN
EXPORTING LIST TO MEMORY
<b>and return</b>.
<b>Import LISTOBJECT From memory ID 'memory_id_name'</b>.
CALL FUNCTION 'DISPLAY_LIST'
exporting fullscreen = 'X'
tables listobject = LISTOBJECT.
WRITE 'DONE'.
=======================================================
Here, memory_id_name is the same name as you are using in the "RPUAUD00" pgm.
Hope this will help you.
Regards,
Vicky
PS:Award points if helpful.
‎2006 May 08 8:32 PM
I see in your code, you have your selection variant commented out in the submit call. Does it really run without any parameter being given? Check that.
‎2006 May 08 9:36 PM
Hi,
I hae posted the solution in the thread posted in HR.
Regards
Vick
‎2006 May 08 10:27 PM
Thanks a lot everybody. I have assinged points. Quick Question: I have a variant created for the report program. Is it possible to assign/change values for the variant at runtime?
Thanks.
Regards,
bw_newbie
‎2006 May 09 12:12 AM
Hi bw_newbie,
You can always change the values of parameters and select-options in your program at runtime, regardless what's in the variant, is that what you mean? Of course this might be a little confusing to the end user.
Good luck,
Regards,
Den
‎2006 May 09 5:25 AM
Hi,
You can change the value of variants
Changing a Report Variant
Important
You need to change your report variant if the report fields have changed.
1. Display the variant on the report entry screen. If you need to find your variant first, see Finding a Report Variant.
2. Type over the values in the fields you selected for the variant.
3. Click the Save as variant button .
Result: The "Save as Variant" screen appears.
4. Click the Save button .
Result: A dialogue box appears, asking if you want to overwrite your variant.
5. Click Yes.
Result: The report entry screen reappears with the values you changed in the fields. A message notifies you that the variant has been saved.
Check the below link.
http://web.mit.edu/sapr3/docs/webdocs/reports/rpRFvariant.html#top
Regards,
Susmitha