2006 Jul 20 7:40 AM
Hi Experts
I m using this zreport to compare multiple tables between two SAP systems by using RFC.
I am calling a standard program <b>RSCMPADJ</b> to get the inconsistency in the table in different tables.
SUBMIT RSCMPADJ WITH VIEW = TBL_DD02L-TABNAME
WITH RFC_DEST = RFC_DEST
WITH SEL = SPACE
EXPORTING LIST TO MEMORY
AND RETURN .
My problem is : If I try to compare tables which has less data then this program works successfully . eg <b>sflight ,sbook, bseg.</b>
we can also fetch from the memory by using <b>'LIST_FROM_MEMORY'</b> and converts into Ascii by using <b>'LIST_TO_ASCI'</b>.
Problem when I Use table which has large data . eg <b>HRP1000</b> . Program shows all the records on the screen before the execution of the report and does not passes into the memory by <b>EXPORTING LIST TO MEMORY</b> .
So we can not use <b>'LIST_FROM_MEMORY'</b> and <b>'LIST_TO_ASCI'</b> because it is not passing data to the memory .
At that it is raising one exception
<b>Error analysis </b>
A RAISE statement in the program "SAPLSLST " raised the exception
condition "NOT_FOUND".
Since the exception was not intercepted by a superior program
in the hierarchy, processing was terminated.
<b>Short description of exception condition</b>:
<b>No list found in memory </b>
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
<b>How to correct the error </b>
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"RAISE_EXCEPTION"
"SAPLSLST " or "LSLSTU02 "
"LIST_FROM_MEMORY"
or
"SAPLSLST " "NOT_FOUND"
Right now I don't have authorization for OSS notes.
<b>Suggest me how can we increase memory size of abap memory or SAP memory, Is it possible to increase the size of memory ?</b>
<b>For your information I am giving the code which u can make use.</b>
<b>Code :</b>
TABLES: DD02L,TSP01,RFCDES, ZBAPISPOOL.
*Declaration of internal table
DATA : RECNAM(25) TYPE C.
DATA: BEGIN OF TBL_DD02L OCCURS 0,
TABNAME LIKE DD02L-TABNAME,
END OF TBL_DD02L.
DATA: TBL_MEMORY LIKE ABAPLIST OCCURS 0 WITH HEADER LINE,
TBL_ASCII(255) TYPE C OCCURS 0 WITH HEADER LINE.
DATA : TBL_DIFF LIKE TBL_ASCII OCCURS 0 WITH HEADER LINE.
Select option for Multiple Tables.
SELECT-OPTIONS: S_VIEW FOR DD02L-TABNAME
NO INTERVALS DEFAULT 'SFLIGHT' OBLIGATORY.
Parameter for RFC.
PARAMETER : RFC_DEST LIKE RFCDES-RFCDEST DEFAULT 'AS_AC1306'
OBLIGATORY.
SELECTION-SCREEN SKIP 1.
Parameter for Recipient.
PARAMETER P_RECNAM LIKE ZBAPISPOOL-ZUSER DEFAULT SY-UNAME OBLIGATORY.
SELECT TABNAME FROM DD02L INTO TABLE TBL_DD02L
WHERE TABNAME IN S_VIEW.
IF NOT SY-SUBRC IS INITIAL.
MESSAGE E000(1) WITH 'Table does not exists '.
ENDIF.
LOOP AT TBL_DD02L.
SUBMIT RSCMPADJ WITH VIEW = TBL_DD02L-TABNAME
WITH RFC_DEST = RFC_DEST
WITH SEL = SPACE
EXPORTING LIST TO MEMORY
AND RETURN .
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = TBL_MEMORY.
CLEAR TBL_ASCII.
REFRESH TBL_ASCII.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
LISTASCI = TBL_ASCII
LISTOBJECT = TBL_MEMORY.
endloop.
loop at TBL_ASCII.
Write : / TBL_ASCII.
endloop.
Naval
2006 Jul 20 7:46 AM
Sorry guys
<b>The right code is</b>
ABLES: DD02L,TSP01,RFCDES .
*Declaration of internal table
DATA : RECNAM(25) TYPE C.
DATA: BEGIN OF TBL_DD02L OCCURS 0,
TABNAME LIKE DD02L-TABNAME,
END OF TBL_DD02L.
DATA: TBL_MEMORY LIKE ABAPLIST OCCURS 0 WITH HEADER LINE,
TBL_ASCII(255) TYPE C OCCURS 0 WITH HEADER LINE.
DATA : TBL_DIFF LIKE TBL_ASCII OCCURS 0 WITH HEADER LINE.
Select option for Multiple Tables.
SELECT-OPTIONS: S_VIEW FOR DD02L-TABNAME
NO INTERVALS DEFAULT 'SFLIGHT' OBLIGATORY.
Parameter for RFC.
PARAMETER : RFC_DEST LIKE RFCDES-RFCDEST DEFAULT 'AS_AC1306'
OBLIGATORY.
SELECTION-SCREEN SKIP 1.
Parameter for Recipient.
PARAMETER P_RECNAM LIKE recnam DEFAULT SY-UNAME OBLIGATORY.
SELECT TABNAME FROM DD02L INTO TABLE TBL_DD02L
WHERE TABNAME IN S_VIEW.
IF NOT SY-SUBRC IS INITIAL.
MESSAGE E000(1) WITH 'Table does not exists '.
ENDIF.
LOOP AT TBL_DD02L.
SUBMIT RSCMPADJ WITH VIEW = TBL_DD02L-TABNAME
WITH RFC_DEST = RFC_DEST
WITH SEL = SPACE
EXPORTING LIST TO MEMORY
AND RETURN .
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = TBL_MEMORY.
CLEAR TBL_ASCII.
REFRESH TBL_ASCII.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
LISTASCI = TBL_ASCII
LISTOBJECT = TBL_MEMORY.
endloop.
loop at TBL_ASCII.
Write : / TBL_ASCII.
endloop.
2006 Jul 20 8:15 AM
Hi,
I tried excecuting ur program with table HRP1000. I could see the list.
Please chk whether the table HRP1000 is present in the
remote system.
Regards
Message was edited by: Kanthimathi Krishnan
2006 Jul 20 10:29 AM
Hi Kanthimathi
It is displaying the the table as output before going into the memory. after executing the program when u get HRP1000 as output just click back or put a break point before the function module 'LIST_FROM_MEMORY' then u will see it does not fetch table from the memory becoz memory size is low and it displays output straight on the screen.
Waiting for your suggestion
Naval
09871012494
navalgupta2000@yahoo.com
2006 Jul 20 12:10 PM
2006 Jul 20 12:13 PM
Hai Gupta
Go through the following Document & example
SUBMIT rep.
Additions
1. ... LINE-SIZE col
2. ... LINE-COUNT lin
3. ... TO SAP-SPOOL
4. ... VIA SELECTION-SCREEN
5. ... AND RETURN
6. ... EXPORTING LIST TO MEMORY
7. ... USER user VIA JOB job NUMBER n
8. ... Various additions for parameter transfer to rep
9. ... USING SELECTION-SETS OF PROGRAM prog
Effect
Calls the report rep . Leaves the active program and starts the new report rep .
Addition 1
... LINE-SIZE col
Effect
Prints the report with the line width col .
Addition 2
... LINE-COUNT lin
Effect
Prints the report with lin lines (per page).
Addition 4
... VIA SELECTION-SCREEN
Effect
Displays the selection screen for the user. In this case, the selection screen is redisplayed after return from the report list display - the user's entries are retained.
Addition 5
... AND RETURN
Effect
Returns to the calling transaction or program after the called program has been executed. SUBMIT ... AND RETURN creates a new internal mode .
Addition 6
... EXPORTING LIST TO MEMORY
Effect
Does not display the output list of the called report, but saves it in SAP memory and leaves the called report immediately. Since the calling program can read the list from memory and process it further, you need to use the addition ... AND RETURN . Also, since the called report cannot be requested for printing, the addition ... TO SAP-SPOOL is not allowed here. You can read the saved list from SAP memory with the function module 'LIST_FROM_MEMORY' and then (for example) store it in the database with EXPORT . You can process this list further with the function modules 'WRITE_LIST' , 'DISPLAY_LIST' ... of the function group "SLST" .
Addition 7
... USER user VIA JOB job NUMBER n
Effect
Schedules the specified report in the job specified by the job name job and the job number n . The job runs under the user name user and you can omit the addition USER user . The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT . This addition can only be used with the addition ...AND RETURN .
Note
When scheduling a report with the SUBMIT ... VIA JOB job NUMBER n statement, you should always use the addition ...TO SAP-SPOOL to pass print and/or archive parameters. Otherwise, default values are used to generate the list and this disturbs operations in a production environment.
Addition 9
... USING SELECTION-SETS OF PROGRAM prog
Effect
Uses variants of the program prog when executing the program rep .
Note
Important
The programs prog and rep must have the same SELECT-OPTIONS and PARAMETER s. Otherwise, variants of the program prog may be destroyed.
Note
When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari . On the other hand, all variant-related actions on the selection screen of rep (Get , Save as variant , Display , Delete ) refer to the variants of prog .
Example
SUBMIT REPORT01
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
Effect
Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00 .
Note
Runtime errors
LOAD_PROGRAM_NOT_FOUND : The specified program was not found.
SUBMIT_WRONG_TYPE : The specified program is not a report.
SUBMIT_IMPORT_ONLY_PARAMETER : Only one value passed to a report parameter.
SUBMIT_WRONG_SIGN : Invalid value passed to a selection with the addition SIGN .
SUBMIT_IN_ITAB_ILL_STRUCTURE : Table passed to a selection with WITH sel IN itab had an unexpected structure.
Try with this Example
Data: listobject like abaplist occurs 1 with header line.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1 .
IF sy-subrc <> 0.
message ID '61' TYPE 'E' NUMBER '731'
with 'LIST_FROM_MEMORY'.
ENDIF.
Regards
Sreeni