2007 Sep 14 7:17 PM
Hi,
I am calling custom report B from my report A..
I can not edit report B
I dont want to display output of report B.
I have written code as below:-
SUBMIT B
EXPORTING LIST TO MEMORY
WITH s_rdate EQ p_wmdate
WITH p_gapno EQ s_lidd-low
AND RETURN.
1) I tried to write 'EXPORTING LIST TO MEMORY' in all positions in above code but still report B is displaying it's output which I don't want.
so please guide me.
2) Another question is I want to access final output Internal table of report B in my report A. I have to write code on that Itab in my report A.
Plese tell me code.
Title was edited by:
Alvaro Tejada Galindo
2007 Sep 14 8:25 PM
1) You can use the SUBMIT.. to SAP-SPOOOL option to avoid list display
2). Could get tricky, if you can't edit Report B & don't wnat to EXPORT to memory.
You've to read the SPOOL back to report A & parse thru' the list to meet your reqt.
Arya
2007 Sep 14 8:31 PM
2007 Sep 14 8:34 PM
This works:
REPORT ztest MESSAGE-ID 00.
DATA: BEGIN OF listobject OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA: END OF listobject.
SUBMIT ztest1
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = listobject
EXCEPTIONS
empty_list = 1
OTHERS = 2.
CALL FUNCTION 'LIST_FREE_MEMORY'
TABLES
listobject = listobject.
and
REPORT ztest1 NO STANDARD PAGE HEADING MESSAGE-ID 00.
WRITE: /001 'Hello world'.
Rob
2007 Sep 14 10:15 PM
I have written code as below to call custom report B from report A.
Report A
SUBMIT B
EXPORTING LIST TO MEMORY
WITH s_rdate EQ p_wmdate
WITH p_gapno EQ s_lidd-low
AND RETURN.
But still report B displays ALV report.
Please advise me that how to avoid dispay of report B output.
2007 Sep 14 10:19 PM
Ahh - ALV - you should have said so earlier; it behaves differently. Is the ALV report custom or SAP?
Rob
2007 Sep 14 10:27 PM
ALV report (Report B)is custom.
But I can not edit that report B.
I am working on report A.
2007 Sep 14 10:31 PM
Is the ALV report ALV list, ALV grid or OOPS?
If it's ALV grid, as a test only, try copying it to another Z program and change the call TO FM REUSE_ALV_GRID_DISPLAY to REUSE_ALV_LIST_DISPLAY and try calling that instead.
Rob
2007 Sep 14 10:57 PM
Hi,
I have changes
REUSE_ALV_GRID_DISPLAY to REUSE_ALV_LIST_DISPLAY .
Now I am able to hide output of called report.
But is there any solution because I don't want to edit my called report program.
2007 Sep 14 11:23 PM
If there is another solution, I don't know it. Try bumping this thread on Monday morning. Maybe some new eyes will look at it.
However, if al else fails, and the people who don't want the program changed agree, you can:
Put a hidden parameter on the ALV program, say X_SUB. this will normally be blank and the users won't see it.
In the calling program call the alv program as you have done, but add
WITH X_SUB = 'X'
In the ALV program, check the value of X_SUB. If it is blank, call the grid. otherwise, call the list.
Hope this helps.
Rob
2007 Sep 15 1:05 AM
how to pass hidden parameter to second report?
I mean to say how delare parameter in second report B which won't appear on screen.
2007 Sep 18 2:46 PM
Like this:
REPORT ztest MESSAGE-ID 00.
DATA: BEGIN OF listobject OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA: END OF listobject.
SUBMIT zrobsdn3
WITH x_hid = 'X' <==============
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = listobject
EXCEPTIONS
empty_list = 1
OTHERS = 2.
CALL FUNCTION 'LIST_FREE_MEMORY'
TABLES
listobject = listobject.
and
REPORT ztest1 NO STANDARD PAGE HEADING MESSAGE-ID 00.
PARAMETERS: x_hid(1) NO-DISPLAY.
IF x_hid IS INITIAL.
WRITE: /001 'Hello world'.. "submitted normally
ELSE.
WRITE: /001 'Goodbye world'.. "submitted via program
ENDIF.
Rob