2005 Dec 28 6:28 AM
Dear SAP Gurus,
I do have requirement to get the output data of <i>H99CWTR0</i> in to my custom report , after that i do need to apply some logic on the output data. So, Here i am using Submit.. EXPORTING list TO MEMORY , after that i used LIST_FROM_MEMORY. It is getting the output of the H99CWTR0, but not the output data. Any ideas how to get the output data into my internal tables.
The follwoing FM's i have tried .
"LIST_FROM_MEMORY;LIST_TO_TXT;LIST_TO_ASCI;WWW_HTML_FROM_LISTOBJECT" .But with all these FM's i am able to get output of the report but not the outputdata .
Many Thanks in Advance,
Raghav
2005 Dec 28 6:37 AM
Hi Raghavendra,
1. Suppose we get the output in some internal table.
2. But that output would be just raw characters
which is displayed in ALV list.
it will also include Vertical line character |
, heading name, etc.
(ie all characters which are shown in the alv list)
3. With that output, u will have to apply
some parsing -logic to get MEANING FUL
field values.
But that would be absolutely cumbersome
and even UNRELIABLE.
4. For your requirement, its better to
copy the program to Y/Z
and utilised the FINAL ITAB
for futher calculation !!!
Regards,
Amit M.
Dear SAP Gurus,
I do have requirement to get the output data of <i>H99CWTR0</i> in to my custom report , after that i do need to apply some logic on the output data. So, Here i am using Submit.. EXPORTING list TO MEMORY , after that i used LIST_FROM_MEMORY. It is getting the output of the H99CWTR0, but not the output data. Any ideas how to get the output data into my internal tables.
The follwoing FM's i have tried .
"LIST_FROM_MEMORY;LIST_TO_TXT;LIST_TO_ASCI;WWW_HTML_FROM_LISTOBJECT" .But with all these FM's i am able to get output of the report but not the outputdata .
Many Thanks in Advance,
Raghav
2005 Dec 28 6:37 AM
Hi Raghavendra,
1. Suppose we get the output in some internal table.
2. But that output would be just raw characters
which is displayed in ALV list.
it will also include Vertical line character |
, heading name, etc.
(ie all characters which are shown in the alv list)
3. With that output, u will have to apply
some parsing -logic to get MEANING FUL
field values.
But that would be absolutely cumbersome
and even UNRELIABLE.
4. For your requirement, its better to
copy the program to Y/Z
and utilised the FINAL ITAB
for futher calculation !!!
Regards,
Amit M.
2005 Dec 28 7:13 AM
Hi Amith,
Already I tried the way what you explained , but it is very hard process , as it is getting the lines and everything how the output displays , with the help of LIST_TO_ASCI , I read the output and read all the fillers and fileds , then i separated by counting charatcters and spaces , .... .Apart from that is there any function module which we can directly extract the Output data of the report.
Regards,
Raghav
2005 Dec 28 7:16 AM
Hi again,
1. im afraid there is no such FM
which can extract the data
in the way we require.
2. If we want, we have to use our
own logic , using number of characters
of SPLIT etc.
But thats very cumbersome
and also UNRELIABLE.
3. The final option left out is to
copy the program to Z/Y
and use the FINAL Internal TAble (in the program)
for further calculation .
regards,
amit m.
Message was edited by: Amit Mittal
2005 Dec 28 7:17 AM
Hi Ragavendra,
This is the only way you can get the data into itab using LIST_TO_ASCI .
or else you can export the itab(in submitted program)
and capture that itab in the calling program.
regards
vijay
2005 Dec 28 6:40 AM
SUBMIT ztest
WITH s_vbeln = p_vbeln
WITH s_posnr = p_posnr
WITH p_create = 'X'
EXPORTING LIST TO MEMORY
AND RETURN.
after that
DATA:it_list LIKE abaplist OCCURS 0.
DATA:BEGIN OF it_asc OCCURS 0,
txt(100),
END OF it_asc.
*-Get the report output from memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = it_list
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
*-Get the report output from memory in ascii format
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = it_asc
listobject = it_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
LOOP AT it_asc.
IF sy-tabix > 2.
WRITE:/ it_asc-txt.
ENDIF.
ENDLOOP.
ELSE.
WRITE:/ p_vbeln, p_posnr, 'No data found for selection'.
ENDIF.it_list will have data, so you can split and populate itab.
Thanks
vjay
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |