2007 Sep 18 3:00 PM
Hi everyone,
I m getting a runtime error messgae_type_x in program SAPLSLVC in include LSLVCF36 in the module FILL_DATA_TABLE when running a alv report.
Can anyone help me in solving this problem?
Thanks in advacne
2007 Sep 18 3:29 PM
Hi,
While filling the fieldcatalog make sure that all the fields are in upper case.
Thanks,
Sri.
Hi everyone,
I m getting a runtime error messgae_type_x in program SAPLSLVC in include LSLVCF36 in the module FILL_DATA_TABLE when running a alv report.
Can anyone help me in solving this problem?
Thanks in advacne
2007 Sep 18 3:04 PM
can you give some more detais? at which line does it happen, what is the dump exactly, etc..
2007 Sep 18 3:27 PM
Hi Eric,
These are the detials.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Information on where terminated?
Termination occurred in the ABAP program "SAPLSLVC" - in "FILL_DATA_TABLE"
The main program was "ZRPP1353 ".
In the source code you have the termination point in line 2735
of the (Include) program "LSLVCF36".
Source code where the error occured?
Column per Fieldcat Entry
ls_lvc_data-value = space.
clear ls_lvc_data-style.
loop at it_fcat_local assigning <ls_fcat>
where tech ne 'X' and no_out ne 'X'.
if l_invisible eq 'X'.
clear l_invisible.
if <ls_fcat>-do_sum is initial.
continue.
else.
clear ls_lvc_data-col_pos.
endif.
endif.
add 1 to ls_lvc_data-col_pos.
assign component <ls_fcat>-fieldname
of structure <ls_data> to <l_field_value>.
if sy-subrc ne 0.
message x000(0k).
endif.
2007 Sep 18 3:25 PM
Hi,
Compare the internal table structure and the field catalog structure whether both are same or not.
Regards
kannaiah
2007 Sep 18 3:27 PM
Yes, compare the names of the fields in your internal table to the fields given in the field catalog and make sure that any that are in the field cat are also in the internal table and are spelled correctly, and also make sure that you are giving the name in the field catalog in UPPER CASE.
Regards,
RIch HEilman
2007 Sep 18 3:29 PM
Hi,
While filling the fieldcatalog make sure that all the fields are in upper case.
Thanks,
Sri.
2007 Sep 18 3:54 PM
Hi all,
I checked the fields in the internal table and the field catalogue.I have given the fieldnames in UPPERCASE as well in the field catalogue.I m pasting my final output internal table and my field catalogue.
Can anyone please check the field catalogue.
DATA:BEGIN OF GT_OUTPUT,
MATNR LIKE RESB-MATNR,
MAKTX1 LIKE MAKT-MAKTX,
DISPO1 LIKE MARC-DISPO,
WERKS LIKE RESB-WERKS,
LGORT LIKE RESB-LGORT,
BDMNG LIKE RESB-BDMNG,
MEINS LIKE RESB-MEINS,
VERPR LIKE MBEW-VERPR,
STPRS LIKE MBEW-STPRS,
WAERS LIKE T001-WAERS,
PEINH LIKE MBEW-PEINH,
QTPRC LIKE MBEW-VERPR,
ENTRY TYPE NUM8,
BAUGR LIKE RESB-BAUGR,
MAKTX2 LIKE MAKT-MAKTX,
DISPO2 LIKE MARC-DISPO,
VERID LIKE MKAL-VERID,
MDV01 LIKE MKAL-MDV01,
AUFNR LIKE RESB-AUFNR,
END OF GT_OUTPUT.
DATA: GI_OUTPUT LIKE GT_OUTPUT OCCURS 0.
FORM FIELD_CATALOG.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
WA_FIELDCAT-HOTSPOT = 'X'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'MAKTX'.
WA_FIELDCAT-REF_TABLE = 'MAKT'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'DISPO'.
WA_FIELDCAT-REF_TABLE = 'MARC'.
WA_FIELDCAT-SELTEXT = TEXT-108.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'WERKS'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'LGORT'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'BDMNG'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
WA_FIELDCAT-QFIELDNAME = 'MEINS'.
WA_FIELDCAT-DO_SUM = 'X'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
WA_FIELDCAT-DO_SUM = 'X'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
IF PR_MOV IS NOT INITIAL.
WA_FIELDCAT-FIELDNAME = 'VERPR'.
ELSE.
WA_FIELDCAT-FIELDNAME = 'STPRS'.
ENDIF.
WA_FIELDCAT-REF_TABLE = 'MBEW'.
WA_FIELDCAT-CFIELDNAME = 'WAERS'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'STPRS'.
WA_FIELDCAT-REF_TABLE = 'MBEW'.
WA_FIELDCAT-CFIELDNAME = 'WAERS'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'WAERS'.
WA_FIELDCAT-REF_TABLE = 'T001'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'PEINH'.
WA_FIELDCAT-REF_TABLE = 'MBEW'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'QTPRC'.
WA_FIELDCAT-CFIELDNAME = 'WAERS'.
WA_FIELDCAT-QFIELDNAME = 'ERFME'.
WA_FIELDCAT-DO_SUM = 'X'.
WA_FIELDCAT-SCRTEXT_L = TEXT-101.
WA_FIELDCAT-SCRTEXT_M = TEXT-101.
WA_FIELDCAT-SCRTEXT_S = TEXT-101.
WA_FIELDCAT-REPTEXT = TEXT-101.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'ENTRY'.
wa_fieldcat-outputlen = 3.
wa_fieldcat-coltext = 'No. Entries'.
WA_FIELDCAT-DO_SUM = 'X'.
WA_FIELDCAT-SCRTEXT_L = TEXT-102.
WA_FIELDCAT-SCRTEXT_M = TEXT-102.
WA_FIELDCAT-SCRTEXT_S = TEXT-102.
WA_FIELDCAT-REPTEXT = TEXT-102.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'BAUGR'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
WA_FIELDCAT-SCRTEXT_L = TEXT-107.
WA_FIELDCAT-HOTSPOT = 'X'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'MAKTX'.
WA_FIELDCAT-REF_TABLE = 'MAKT'.
WA_FIELDCAT-SCRTEXT_L = TEXT-106.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'DISPO'.
WA_FIELDCAT-REF_TABLE = 'MARC'.
WA_FIELDCAT-SCRTEXT_L = TEXT-105.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'VERID'.
WA_FIELDCAT-REF_TABLE = 'MKAL'.
WA_FIELDCAT-SCRTEXT_L = TEXT-104.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'MDV01'.
WA_FIELDCAT-REF_TABLE = 'MKAL'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'AUFNR'.
WA_FIELDCAT-REF_TABLE = 'RESB'.
WA_FIELDCAT-SCRTEXT_L = TEXT-103.
APPEND WA_FIELDCAT TO I_FIELDCAT.
ENDFORM.
2007 Sep 18 3:57 PM
2007 Sep 18 3:58 PM
Also, check both DISPO field catalog entries, they should be DISPO1 and DISPO2.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = POS_FREE.
WA_FIELDCAT-FIELDNAME = 'DISPO'. "<-- Should be DISPO1 or DISPO2
WA_FIELDCAT-REF_TABLE = 'MARC'.
WA_FIELDCAT-SELTEXT = TEXT-108.
APPEND WA_FIELDCAT TO I_FIELDCAT.
Regards,
RIch Heilman
2007 Sep 18 3:58 PM
the entry in field catalog for the fields MAKTX1, MAKTX2, DISPO is different to that in the internal table declaration,
2007 Sep 18 4:00 PM
Hi Rich
Thanks for finding that error.If i keep the field name as MAKTX1.can i still give the REF_TABLE = MAKT.
Thanks.
2007 Sep 18 4:01 PM
Hi,
While filling ur fieldcatalog use the below code :
WA_fieldcat-fieldname = 'MATNR'.
WA_fieldcat-no_zero = 'X'.
WA_fieldcat-outputlen = '10'.
WA_fieldcat-tabname = 'GT_OUTPUT'
APPEND WA_FIELDCAT TO I_FIELDCAT.
<b>Pass WA_FIELDCAT-TABNAME = 'GT_OUTPUT'</b>.
Thanks,
Sriram Ponna.
2007 Sep 18 4:07 PM
> Hi Rich
>
If i keep the field
> name as MAKTX1.can i still give the REF_TABLE =
> MAKT.
in such a case populate the value of REF_FIELD also
REF_TABLE = 'MAKT'
REF_FIELD = 'MAKTX'
http://help.sap.com/saphelp_47x200/helpdata/en/ff/4649aef17411d2b486006094192fe3/content.htm
2007 Sep 18 4:08 PM
Hi Sriram
Thanks for replying.
As u said previously to Pass WA_FIELDCAT-TABNAME = 'GT_OUTPUT'.But in my code GT_OUTPUT is a structure not a table.
2007 Sep 18 4:10 PM
The FIELDNAME should reference the actual field name in your internal table, the REF_TABLE and REF_FIELD can point to the field and table in the ABAP dictionary, so yes, what you have there is fine.
REF_TABLE = 'MAKT'
REF_FIELD = 'MAKTX'
Just make sure that the FIELDNAME field reflects the name of the field in the internal table.
Regards,
RIch Heilman
2007 Sep 18 4:30 PM
Hi everyone,
I got the output as i changed according to u.Thanks for everyone in helping.I have one more query.In the grand total line i need to display again the material no,material description and all the other colums which are not summed.
The pf-status which i set is displaying but none of the keys are working.what could be the problem.
Thanks,
Dinesh.
2007 Sep 18 4:39 PM
Hi,
You can do subtotal by Material number and description and in fieldcatalog as NO_OUT = 'X' for these two fields Material number and description.
Thanks,
Sriram Ponna.
2007 Sep 18 4:56 PM
Hi Sriram
U got my question wrong.
My output in the alv is displaying like this at the moment.
Component Material Desc Comp.MRP Qunatity Unit Price Currency Entries
009/19222 ABC c11 1 EA 100 usd 1
009/19222 ABC c11 1 EA 100 usd 1
2 EA usd 2
So in the total line as well i need to display all other column values which r not summed.so now my output should like this.What can i do?
Component Material Desc Comp.MRP Qunatity Unit Price Currency Entries
009/19222 ABC c11 1 EA 100 usd 1
009/19222 ABC c11 1 EA 100 usd 1
009/19222 ABC c11 2 EA 100 usd 2