2007 Jul 24 6:15 AM
Hi Friends
I know that we can create 1 basic list and upto 20 secondary lists.
But my concern here is : Is it possible to create 24,25 secondary lists by any of tricky programming?
Is it possible or not?
If so how ? Can you please on some lights on this?
Regards,
Sree
2007 Jul 24 6:18 AM
Hi
No , SAP 's limit is 1 Basic List and 20 secondary lists
But why we need so many in real time
that's not enough? why You fo gor 24 or 25 secondary lists?Not possible.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 24 6:16 AM
hi sree ram
refer to this code
*&---------------------------------------------------------------------*
*& Report ZTESTDEMO_INTERACTIVE_LIST_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZTESTDEMO_INTERACTIVE_LIST_2.
TABLES: MARA,MARC,MARD.
* internal table itab_mara 3 fields matnr, ernam,mtart
DATA: BEGIN OF ITAB_MARA OCCURS 0,
MATNR LIKE MARA-MATNR, " material number
ERNAM LIKE MARA-ERNAM, " name of person who create
MTART LIKE MARA-MTART, " Material Type
END OF ITAB_MARA.
* internal table itab_marc 3 fields matnr, werks,lvorm
DATA: BEGIN OF ITAB_MARC OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS, " Plant
LVORM LIKE MARC-LVORM, " Flag Material for Deletion at Plant Level
END OF ITAB_MARC.
* internal table itab_mard 2 fields
DATA: BEGIN OF ITAB_MARD OCCURS 0,
MATNR LIKE MARD-MATNR,
LGORT LIKE MARD-LGORT, " Storage Location
END OF ITAB_MARD.
SELECT-OPTIONS: S_MTART FOR MARA-MTART.
INITIALIZATION.
S_MTART-LOW = 'HALB'.
S_MTART-HIGH = 'HAWA'.
S_MTART-OPTION = 'BT'.
APPEND S_MTART.
START-OF-SELECTION.
SELECT MATNR ERNAM MTART FROM MARA INTO TABLE ITAB_MARA WHERE MTART IN
S_MTART.
PERFORM DISPLAY.
TOP-OF-PAGE.
WRITE:/2(15) 'MATERIAL NO',20(20) 'CREATED BY',45(15) 'MATERIAL TYPE'.
FORM DISPLAY.
LOOP AT ITAB_MARA.
WRITE:/ ITAB_MARA-MATNR UNDER 'MATERIAL NO' HOTSPOT ON,ITAB_MARA-ERNAM
UNDER 'CREATED BY',ITAB_MARA-MTART UNDER 'MATERIAL TYPE'.
HIDE: ITAB_MARA-MATNR.
ENDLOOP.
ENDFORM.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN 1.
SELECT MATNR WERKS LVORM FROM MARC INTO TABLE ITAB_MARC WHERE MATNR =
ITAB_MARA-MATNR.
PERFORM DISPLAY1.
WHEN 2.
SELECT MATNR LGORT FROM MARD INTO TABLE ITAB_MARD WHERE MATNR =
ITAB_MARC-MATNR.
PERFORM DISPLAY2.
when 3.
sy-lsind = 0.
ENDCASE.
FORM DISPLAY1.
LOOP AT ITAB_MARC.
WRITE:/ ITAB_MARC-MATNR HOTSPOT ON, ITAB_MARC-WERKS,ITAB_MARC-LVORM.
HIDE: ITAB_MARC-MATNR.
ENDLOOP.
WRITE:/ SY-LSIND.
ENDFORM.
FORM DISPLAY2.
LOOP AT ITAB_MARD.
WRITE:/ ITAB_MARD-MATNR, ITAB_MARD-LGORT.
ENDLOOP.
WRITE:/ SY-LSIND.
ENDFORM.
regards
ravish
<b>plz dont forget to reward points if helpful</b>
2007 Jul 24 6:17 AM
hi,
I don't think we can create beyond 20 secondary lists ..
Regards,
Santosh
2007 Jul 24 6:18 AM
Hi
No , SAP 's limit is 1 Basic List and 20 secondary lists
But why we need so many in real time
that's not enough? why You fo gor 24 or 25 secondary lists?Not possible.
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 24 6:19 AM
hi
'tricky way' - it's not possible to have more than 20 secondary lists, but u could always reset the sy-lsind to 1 when it reaches 20
if sy-lsind = 20.
sy-lsind = 1.
endif.
if helpful, reward
Sathish R
2007 Jul 24 6:21 AM
Hi Sree Ram,
You can create more than 20 secondary list.
Just keep a count of SY-LSIND and when it reaches 19, you can reset the count to 0. Now SY-LSIND would start again from 1 which means you can create 19 + 20, which makes it 39 secondary list.
In a way we are fooling the software ) .
Reward points if you find the answer useful.
Best Regards,
Ram.
2007 Jul 24 6:24 AM
this can be possible we can create N number of secondary lists.
basically we are supposed to do 20 secondary list, to increase this no. re-initialize the value sy-lsind, programatically and handle it.
2007 Jul 24 8:17 AM
hi
we can create n number of secondary lists...
please see below code...
if sy-lsind eq 21.
sy-lasind = 0.
endif.
then count will start from 1 then u will get 21 sec list. before doing that please check how much memory alloted to that program some time it may gives dump like max memory alloocated is exceeded. in genereal sap allows 20 sec lists only. if u want u can use above code.
thanks,
maheedhar.t