2005 Jun 23 3:06 PM
Hi,
I want to get data out from report "RSPARAM" which list all system profile parameters my requirement is that i need to write output of this report to table so can anyone please tell me how should achieve this?
is there any FM which read report as parameters and write into table?
thanks in advance.
john.
2005 Jun 24 1:56 PM
thanks rich , poornanad.
rich your code help me...
but when i pass rsparam report with submit it doesn't return any thing, more specific on my requirement
i want those three column data which we get when we run rsparam report into a table?
so please tell me how do i get this?
thanks,
john
Hi John,
You haven't marked your post as a question. I have done that now, and you'll be able to assign points to the answers that have helped you.
Regards,
Anand Mandalika.
2005 Jun 23 3:16 PM
Hi John,
You can take a look at the F1-documentation for the SUBMIT statement. There's an option called EXPORTING LIST TO MEMORY. That should help you realize your requirement.
Regards,
Anand Mandalika.
2005 Jun 23 3:29 PM
Here is a sample program.
report zrich_0003 .
data: begin of listout occurs 0,
line(1024) type c,
end of listout.
* Submit the report and export list to memory
submit z_your_report exporting list to memory
and return.
* Get list from memory and convert to ascii
perform retrieve_list_from_memory tables listout.
loop at listout.
write:/ listout.
endloop.
************************************************************************
* RETRIEVE_LIST_FROM_MEMORY
************************************************************************
form retrieve_list_from_memory tables reportlines.
data: list like abaplist occurs 0 with header line.
data: txtlines(1024) type c occurs 0 with header line.
clear list. refresh list.
clear reportlines. refresh reportlines.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
check sy-subrc = 0.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = txtlines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
check sy-subrc = 0.
reportlines[] = txtlines[].
call function 'LIST_FREE_MEMORY'.
endform.
Regards,
Rich Heilman
2005 Jun 24 1:56 PM
thanks rich , poornanad.
rich your code help me...
but when i pass rsparam report with submit it doesn't return any thing, more specific on my requirement
i want those three column data which we get when we run rsparam report into a table?
so please tell me how do i get this?
thanks,
john
2005 Jun 24 2:09 PM
Looks like the program you are calling(rsparam) is just calling another report, RSPFPAR. Let's just call that one directly. Here is an updated version of the program.
This will also put the first 3 columns in a internal table. This should show you what you need to do.
report zrich_0003 .
data: begin of listout occurs 0,
line(1024) type c,
end of listout.
data: begin of itab occurs 0,
column1(100) type c,
column2(100) type c,
column3(100) type c,
therest(100) type c,
end of itab.
* Submit the report and export list to memory
submit rspfpar exporting list to memory
and return.
* Get list from memory and convert to ascii
perform retrieve_list_from_memory tables listout.
loop at listout.
if sy-tabix => 7.
clear itab.
split listout+1(500) at '|' into itab-column1 itab-column2
itab-column3 itab-therest.
append itab.
endif.
endloop.
loop at itab.
write:/ itab-column1, itab-column2, itab-column3.
endloop.
************************************************************************
* RETRIEVE_LIST_FROM_MEMORY
************************************************************************
form retrieve_list_from_memory tables reportlines.
data: list like abaplist occurs 0 with header line.
data: txtlines(1024) type c occurs 0 with header line.
clear list. refresh list.
clear reportlines. refresh reportlines.
call function 'LIST_FROM_MEMORY'
tables
listobject = list
exceptions
not_found = 1
others = 2.
check sy-subrc = 0.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = txtlines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
check sy-subrc = 0.
reportlines[] = txtlines[].
call function 'LIST_FREE_MEMORY'.
endform.
Regards,
Rich Heilman
2005 Jun 24 2:20 PM
2005 Jun 27 12:29 PM
Hi Rich,
i want reward your answer.How do i reward to your answer?
Thanks for your help.
john
2005 Jun 27 12:45 PM
Hi John,
You haven't marked your post as a question. I have done that now, and you'll be able to assign points to the answers that have helped you.
Regards,
Anand Mandalika.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |