2012 Feb 07 12:31 PM
Hi,
I want to fetch the data of internal Table from SAP-Standard Reports. After than I can use in different report of these data. So Please guide me how to do this. How to fetch the data for use in different programs at run time of new object.
Thanks !
Ram Shanker
Edited by: Ram Shanker on Feb 7, 2012 6:02 PM
Hi,
I want to fetch the data of internal Table from SAP-Standard Reports. After than I can use in different report of these data. So Please guide me how to do this. How to fetch the data for use in different programs at run time of new object.
Thanks !
Ram Shanker
Edited by: Ram Shanker on Feb 7, 2012 6:02 PM
2012 Feb 07 1:03 PM
Hi Ram,
take a look to this blog [http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/24944%3Futm_source%3Dfeedburner%26utm_medium%3Demail%26utm_campaign%3DFeed%253ASDNWeblogs_Abap%2528SAPNetworkWeblogs%253A+ABAP%2529]
maybe it could help you.
Regards.
Andrea
2012 Feb 07 1:06 PM
Hi Ram,
It depends on which standard report you are trying to access the data from.
One approach is to look for user exits in the report.
If the identified user exit gives access to the internal table then either pass the data in the internal table to a file in application server or to a custom Z table.
If not then the other way is to copy the program in question and modify it to reflect your requirement.
Kind Regards
Guru
2012 Feb 13 9:26 AM
Sir,
I want to fetch the Final Internal data into my ownprogram ( Means Zprogram) at the runtime.
Report Name : S_ALR_87013127.
In this Report have 2 sections, One is Main,other is details of main Section. I have to fetch the main internal table data.
Please give suggestion with the example.
Thanks in Advance.
Ram
Edited by: Ram Shanker on Feb 13, 2012 3:00 PM
2012 Feb 13 11:03 AM
HI,
I am not sure how far it is possible, jus give a try.
1.copy the standard program into a Z-program,
2.whatever the values or internal tables you want from that program, EXPORT those data from that.
3.SUBMIT that copied std program into your program
4. after submit, EXPORT all the INPORTed data into your variables or structures in ur report.
Good Luck
2012 Feb 13 11:06 AM
YOU WANT LIKE THIS
SELECT VBELN FKART FKDAT KUNAG FROM VBRK CLIENT SPECIFIED INTO TABLE IT_VBRK
WHERE MANDT = SY-MANDT AND FKDAT IN SO_YEAR
AND FKART IN SO_TYPE
AND BUKRS IN SO_BUKRS
AND KUNAG IN SO_KUNAG.
*********Selection from Billing Document: Item Data ******
IF IT_VBRK[] IS NOT INITIAL.
SELECT VBELN POSNR FKIMG AUBEL AUPOS MATNR INTO TABLE IT_VBRP
FROM VBRP CLIENT SPECIFIED FOR ALL ENTRIES IN IT_VBRK
WHERE MANDT = SY-MANDT AND VBELN = IT_VBRK-VBELN
AND MATNR IN SO_MATNR.
********Selection from Material Descriptio*****
IF IT_VBRP[] IS NOT INITIAL.
SELECT MATNR MAKTX INTO TABLE IT_MAKT
FROM MAKT CLIENT SPECIFIED FOR ALL ENTRIES IN IT_VBRP
WHERE MANDT = SY-MANDT AND MATNR = IT_VBRP-MATNR.
ELSE.
MESSAGE TEXT-005 TYPE TEXT-001.
STOP.
ENDIF.
ELSE.
MESSAGE TEXT-005 TYPE TEXT-001.
STOP.
ENDIF.
IF IT_VBRP[] IS NOT INITIAL.
*********Selection from Sales Document: Business Data ******
SELECT VBELN POSNR KDKG1 INTO TABLE IT_VBKD
FROM VBKD CLIENT SPECIFIED FOR ALL ENTRIES IN IT_VBRP
WHERE MANDT = SY-MANDT AND VBELN = IT_VBRP-AUBEL
AND POSNR = IT_VBRP-POSNR
AND KDKG1 IN SO_VTEXT.
IF SY-SUBRC <> 0.
IF SO_VTEXT IS NOT INITIAL.
MESSAGE TEXT-028 TYPE TEXT-001.
STOP.
ENDIF.
ENDIF.
ENDIF.
IF SO_VTEXT IS NOT INITIAL.
SORT IT_VBKD BY VBELN POSNR.
SORT IT_VBRP BY AUBEL POSNR.
LOOP AT IT_VBKD INTO WA_VBKD.
***Selection to get warranty period
SELECT SINGLE VTEXT FROM TVKGGT INTO WA_FINAL-VTEXT
WHERE KDKGR = WA_VBKD-KDKG1
AND SPRAS = 'EN'.
READ TABLE IT_VBRP INTO WA_VBRP WITH KEY AUBEL = WA_VBKD-VBELN POSNR = WA_VBKD-POSNR.
IF SY-SUBRC = 0.
WA_FINAL-VBELN = WA_VBRP-VBELN.
WA_FINAL-POSNR = WA_VBRP-POSNR.
WA_FINAL-FKIMG = WA_VBRP-FKIMG.
WA_FINAL-AUBEL = WA_VBRP-AUBEL.
WA_FINAL-AUPOS = WA_VBRP-AUPOS.
WA_FINAL-MATNR = WA_VBRP-MATNR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = WA_FINAL-MATNR
IMPORTING
OUTPUT = WA_FINAL-MATNR.
ENDIF.
READ TABLE IT_VBRK INTO WA_VBRK WITH KEY VBELN = WA_VBRP-VBELN.
IF SY-SUBRC = 0.
WA_FINAL-FKART = WA_VBRK-FKART.
WA_FINAL-FKDAT = WA_VBRK-FKDAT.
ENDIF.
READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = WA_VBRP-MATNR.
IF SY-SUBRC EQ 0.
WA_FINAL-MAKTX = WA_MAKT-MAKTX.
ENDIF.
***Selection to get sold to party
SELECT SINGLE NAME1 FROM KNA1 INTO WA_FINAL-NAME1
WHERE KUNNR = WA_VBRK-KUNAG.
APPEND WA_FINAL TO IT_FINAL.
ENDLOOP.
2012 Feb 13 11:53 AM
you can use Submit and EXPORTING LIST TO MEMORY option and then use LIST_FROM_MEMORY to get back the data returned from report.
Nabheet
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |