Archive for ‘ August, 2012 ’

inventory posting

*&———————————————————————*
*& Report  ZMMR505
*&
*&———————————————————————*
*&
*&
*&———————————————————————*

REPORT  ZMMR505.

TABLES: MARA,  ”General Material Data
T023T, ”Material Group Descriptions
MSEG,  ”Document Segment: Material
MBEW,  ”Material Valuation
skat,  ”G/L Account Master Record
T025T, ”Valuation Class Descriptions
T030.  ”Standard Accounts Table

TYPE-POOLS: slis.

selection-screen begin of block nanat with frame title text-003.
*parameters S_BUKRS TYPE MSEG-BUKRS OBLIGATORY. ” company
parameters S_LFGJA TYPE MBEW-LFGJA OBLIGATORY.  ” year
parameters S_LFMON TYPE MBEW-LFMON OBLIGATORY.  ” Period
selection-screen end of block nanat.
*&———————————————————————*
*& Scope of list
*&———————————————————————*

selection-screen begin of block ika_duha with frame title text-004.
PARAMETERS:  S_GLACC  AS CHECKBOX .              ” Per Account
selection-screen end of block ika_duha.

*&———————————————————————*
*& Per Material Group
*&———————————————————————*
“Primary Internal TABLE
TYPES: BEGIN OF tdata,
MATNR TYPE MBEW-MATNR,     ” MATRIAL id
LBKUM TYPE MSEG-LBKUM,     ” Quantity / Total Stock
VERPR TYPE MBEW-VERPR,     ” Moving Average Price/Periodic Unit Price
SALK3 TYPE MBEW-SALK3,     ” Total Value
LFGJA TYPE MBEW-LFGJA,     ” Year
LFMON TYPE MBEW-LFMON,     ” Period
END OF tdata.
“Secondary Internal Table
TYPES: BEGIN OF rdata,
MATNR TYPE MARA-MATNR,     ” MATRIAL id
MAKTX TYPE MAKT-MAKTX,     ” MATERIAL DESCRIPTION
MATKL TYPE MARA-MATKL,     ” MATERIAL GROUP OR CLASS
MEINS TYPE MARA-MEINS,     ” Units of Measurement of Various Types
WGBEZ TYPE T023T-WGBEZ,    ” Material Group Description
END OF rdata.

TYPES: BEGIN OF t_final,
MATKL TYPE MARA-MATKL,     ” MATERIAL GROUP OR CLASS ID
MATK1 TYPE MARA-MATKL,     ” ika-duha MATERIAL GROUP
WGBEZ TYPE T023T-WGBEZ,    ” Material Group Description
WGBE1 TYPE T023T-WGBEZ,    ” ika-duha Description
MATNR TYPE MBEW-MATNR,     ” MATERIAL id
MAKTX TYPE MAKT-MAKTX,     ” MATERIAL DESCRIPTION
MEINS TYPE MARA-MEINS,     ” Units of Measurement of Various Types
LFGJA TYPE MBEW-LFGJA,     ” Year
LFMON TYPE MBEW-LFMON,     ” Period
LBKUM TYPE MBEW-LBKUM,     ” Quantity
VERPR TYPE MBEW-VERPR,     ” Moving Average Price/Periodic Unit Price
SALK3 TYPE MBEW-SALK3,     ” Total Value
END OF t_final.

“get selection value
DATA: it_data  TYPE STANDARD TABLE OF tdata,
wa_data  TYPE tdata,
ir_data  TYPE STANDARD TABLE OF rdata,
wr_data  TYPE rdata,
it_final TYPE STANDARD TABLE OF t_final WITH HEADER LINE,
wa_final TYPE t_final.

“sorting og sum para bibo.
data: hs_sum TYPE HASHED TABLE OF t_final
WITH UNIQUE key MATNR MAKTX MATKL MATK1 WGBEZ WGBE1 MEINS LFGJA LFMON WITH HEADER LINE.

DATA : itab_sum TYPE STANDARD TABLE OF t_final WITH HEADER LINE .
*&———————————————————————*
*& Per material Group End
*&———————————————————————*

*&———————————————————————*
*& Per GL Account
*&———————————————————————*
TYPES: BEGIN OF GTAB,
BKLAS TYPE MBEW-BKLAS,    ” Valuation Class
MATNR TYPE MBEW-MATNR,    ” MATERIAL id
MAKTX TYPE MAKT-MAKTX,    ” MATERIAL DESCRIPTION
MEINS TYPE MARA-MEINS,    ” Units of Measurement of Various Types
LFGJA TYPE MBEW-LFGJA,    ” Year
LFMON TYPE MBEW-LFMON,    ” Period
LBKUM TYPE MBEW-LBKUM,    ” Quantity
VERPR TYPE MBEW-VERPR,    ” Moving Average Price/Periodic Unit Price
SALK3 TYPE MBEW-SALK3,    ” Total Value
END OF GTAB.

TYPES: BEGIN OF G_final,
SAKNR TYPE SKAT-SAKNR,    ” G/L Account
TXT20 TYPE SKAT-TXT20,    ” Short Text
MATNR TYPE MBEW-MATNR,    ” MATERIAL id
MAKTX TYPE MAKT-MAKTX,    ” Material Group Description
MEINS TYPE MARA-MEINS,    ” Units of Measurement of Various Types
LFGJA TYPE MBEW-LFGJA,    ” Year cur.period
LFMON TYPE MBEW-LFMON,    ” Current period (posting period)
LBKUM TYPE MBEW-LBKUM,    ” Total Stock
VERPR TYPE MBEW-VERPR,    ” Moving price
SALK3 TYPE MBEW-SALK3,    ” Total Value
END OF G_final.

DATA: it_gtab TYPE STANDARD TABLE OF GTAB,
wa_gtab TYPE GTAB,
ig_fina TYPE STANDARD TABLE OF G_final WITH HEADER LINE,
wa_ftab TYPE G_final.

DATA: Gs_sum TYPE HASHED TABLE OF G_final
WITH UNIQUE key SAKNR TXT20 MATNR MAKTX MEINS LFGJA LFMON WITH HEADER LINE.

DATA : G_sum TYPE STANDARD TABLE OF G_final WITH HEADER LINE.

*&———————————————————————*
*& Per GL Account end
*&———————————————————————*

DATA: i_events    TYPE slis_t_event,        ”Internal table for ALV Display events
totalIn     TYPE MBEW-VERPR.

DATA: sla         TYPE slis_layout_alv,
i_alv_top_of_page TYPE slis_t_listheader, ”Internal table for Top of Page info. in ALV Display
ivariant    LIKE disvariant,
i_repid     LIKE sy-repid,
i_excluding TYPE slis_t_extab.

DATA:  ls_fieldcat TYPE slis_fieldcat_alv,
gd_fieldcat TYPE slis_t_fieldcat_alv, ”Internal table for storing field catalog information
i_sort      TYPE slis_t_sortinfo_alv, ”Internal table for storing ALV sort information
wa_sort     TYPE slis_sortinfo_alv.
*&———————————————————————*
*& Constant declaration
*&———————————————————————*
CONSTANTS:
c_header   TYPE char1
VALUE ’H',                    ”Header in ALV
c_item     TYPE char1
VALUE ’S’.

************************************************************************
*Start-of-selection.

START-OF-SELECTION.

IF S_GLACC = ’X’.
PERFORM getPerGl.
ELSE.
PERFORM get_data.
ENDIF.

PERFORM fixData.
PERFORM build_header.

IF S_GLACC = ’X’.
PERFORM fieldcatikaduha.
ELSE.
PERFORM fieldcat_init.
ENDIF.

PERFORM sub_populate_layout.

END-OF-SELECTION.

*&———————————————————————*
*&      Form  get_data
*&———————————————————————*
* parameters S_LFGJA TYPE MBEW-LFGJA OBLIGATORY.  ” year
* parameters S_LFMON TYPE MBEW-LFMON OBLIGATORY.   ” Period      text
*———————————————————————-*
FORM get_data.

SELECT MATNR sum( LBKUM ) as LBKUM sum( VERPR ) as VERPR sum( SALK3 ) as SALK3 LFGJA LFMON
FROM MBEW
INTO TABLE it_data
WHERE  LBKUM <> 0 and salk3 <> 0
AND  LFGJA <= S_LFGJA
AND  LFMON <= S_LFMON

GROUP BY MATNR LFGJA LFMON.

IF it_data IS NOT INITIAL.

SORT it_data BY MATNR.

SELECT T1~MATNR T2~MAKTX T1~MATKL T1~MEINS T0~WGBEZ
FROM MARA AS T1
INNER JOIN T023T AS T0 ON T1~MATKL = T0~MATKL
INNER JOIN MAKT as t2 ON t2~MATNR = T1~MATNR
INTO TABLE ir_data FOR ALL ENTRIES IN it_data
WHERE T1~MATNR EQ it_data-MATNR.
ENDIF.

LOOP AT ir_data INTO wr_data.
READ TABLE it_data INTO wa_data with KEY MATNR = wr_data-MATNR BINARY SEARCH.

IF SY-SUBRC = 0.
SHIFT wa_data-MATNR LEFT DELETING LEADING ’0′. ”deleting 0 naa daghan
wa_final-MATKL = wr_data-MATKL.
wa_final-MATK1 = wr_data-MATKL.
wa_final-WGBEZ = wr_data-WGBEZ.
wa_final-WGBE1 = wr_data-WGBEZ.
wa_final-MATNR = wa_data-MATNR.
wa_final-MAKTX = wr_data-MAKTX.
wa_final-MEINS = wr_data-MEINS.
wa_final-LFGJA = wa_data-LFGJA.
wa_final-LFMON = wa_data-LFMON.
wa_final-LBKUM = wa_data-LBKUM.
wa_final-VERPR = wa_data-VERPR.
wa_final-SALK3 = wa_data-SALK3.

totalIn = wa_data-SALK3 / wa_data-LBKUM.

wa_final-VERPR = totalIn.

APPEND wa_final TO it_final.

CLEAR : wa_final.

ELSE.
MESSAGE ’Record not Found’ TYPE ’E’.

ENDIF.

CLEAR: wa_data, wr_data.

ENDLOOP.

ENDFORM.                    ”get_data

FORM getPerGl.

SELECT T0~BKLAS
T0~MATNR
T1~MAKTX
T2~MEINS
T0~LFGJA
T0~LFMON
sum( T0~LBKUM ) as LBKUM
sum( T0~VERPR ) as VERPR
sum( T0~SALK3 ) as SALK3
INTO CORRESPONDING FIELDS OF TABLE it_gtab
FROM MBEW AS T0
INNER JOIN MAKT AS T1 ON T0~MATNR = T1~MATNR
INNER JOIN MARA AS T2 ON T0~MATNR = T2~MATNR
WHERE  T0~LBKUM <> 0 and T0~salk3 <> 0
AND  T0~LFGJA <= S_LFGJA
AND  T0~LFMON <= S_LFMON
GROUP BY T0~BKLAS T0~MATNR T1~MAKTX T2~MEINS T0~LFGJA T0~LFMON.

IF it_gtab IS NOT INITIAL.
SORT it_gtab BY MATNR LFMON.
LOOP AT it_gtab INTO wa_GTAB.
CLEAR: T030, SKAT.
SELECT SINGLE * FROM T030 WHERE BKLAS = wa_GTAB-BKLAS.
SELECT SINGLE * FROM SKAT WHERE SAKNR = T030-KONTS AND SPRAS = ’EN’.

SHIFT wa_GTAB-MATNR LEFT DELETING LEADING ’0′. ”deleting 0 naa daghan
SHIFT SKAT-SAKNR LEFT DELETING LEADING ’0′. ”deleting 0 naa daghan
wa_ftab-SAKNR = SKAT-SAKNR.
wa_ftab-TXT20 = SKAT-TXT20.
wa_ftab-MATNR = wa_GTAB-MATNR.
wa_ftab-MAKTX = wa_GTAB-MAKTX.
wa_ftab-MEINS = wa_GTAB-MEINS.
wa_ftab-LFGJA = wa_GTAB-LFGJA.
wa_ftab-LFMON = wa_GTAB-LFMON.
wa_ftab-LBKUM = wa_GTAB-LBKUM.
wa_ftab-VERPR = wa_GTAB-VERPR.
wa_ftab-SALK3 = wa_GTAB-SALK3.

totalIn = wa_GTAB-SALK3 / wa_GTAB-LBKUM.

wa_ftab-VERPR = totalIn.

APPEND wa_ftab TO ig_fina.
ENDLOOP.
ENDIF.

ENDFORM.

“E han-ay ang data

*&———————————————————————*
*&      Form  build_header
*&———————————————————————*
*       text
*———————————————————————-*
FORM build_header.

*local data declaration
DATA: l_system     TYPE char10,           ”System id
l_line       TYPE slis_listheader,  ”Hold list Header
l_date       TYPE char10,           ”date
l_time       TYPE char10,           ”time
l_sus_re     TYPE i,
t_line       like l_line-info,
l_title(300) TYPE c,
ld_linesc(10) type c.

l_line-typ  = c_header.
CONCATENATE ’Inventory List Fy’ S_LFGJA ’-' S_LFMON INTO l_title SEPARATED BY space.
l_line-info = l_title.
APPEND l_line to i_alv_top_of_page.
CLEAR l_line.

l_line-typ = c_item.
WRITE: sy-datum  TO l_date MM/DD/YYYY.
l_line-key  = ’Todays Date :’(002).
l_line-info = l_date.
APPEND l_line TO i_alv_top_of_page.
CLEAR: l_line, l_date.

IF S_GLACC = ’X’.
describe table ig_fina lines l_sus_re.
ld_linesc = l_sus_re.
concatenate ’Total No. of Records Selected: ’ ld_linesc
into t_line separated by space.
l_line-typ  = ’A’.
l_line-info = t_line.
append l_line to i_alv_top_of_page.
clear: l_line, t_line.
else.

describe table it_final lines l_sus_re.
ld_linesc = l_sus_re.
concatenate ’Total No. of Records Selected: ’ ld_linesc
into t_line separated by space.
l_line-typ  = ’A’.
l_line-info = t_line.
append l_line to i_alv_top_of_page.
clear: l_line, t_line.

ENDIF.
ENDFORM.                    ”build_header

*&———————————————————————*
*&      Form  fixData
*&———————————————————————*
*       text
*———————————————————————-*
FORM fixData.
DATA: index LIKE sy-tabix.

IF S_GLACC = ’X’.
LOOP AT ig_fina.
Gs_sum = ig_fina.

COLLECT Gs_sum.

ENDLOOP.

SORT Gs_sum .

G_sum[] = Gs_sum[].

ELSE.

LOOP AT it_final.
hs_sum = it_final.

COLLECT hs_sum.

ENDLOOP.

SORT hs_sum.

itab_sum[] = hs_sum[].
ENDIF.

ENDFORM.

*&———————————————————————*
*&      Form  fieldcat_init
*&———————————————————————*
*       text
*———————————————————————-*

FORM fieldcat_init.

Define m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-row_pos      = ’1′.
ls_fieldcat-fieldname    = &1.
ls_fieldcat-tabname      = ’itab_sum’.
ls_fieldcat-seltext_l    = &2.
ls_fieldcat-key          = &3.
ls_fieldcat-do_sum       = &4.

APPEND ls_fieldcat TO gd_fieldcat.
END-OF-DEFINITION.

DEFINE m_sort.
add 1 TO wa_sort-spos.
wa_sort-fieldname = &1.
wa_sort-up        = ’X’.
wa_sort-subtot    = &2.
wa_sort-expa      = &3.
APPEND wa_sort TO i_sort.
END-OF-DEFINITION.

m_fieldcat ’MATKL’ ’Item Group ID’ ’X' ”.
m_fieldcat ’WGBEZ’ ’Item Group Description’ ’X' ”.
m_fieldcat ’MATNR’ ’MATERIAL#’ ’X' ”.
m_fieldcat ’MAKTX’ ’MAT Description’ ’X' ”.
m_fieldcat ’MEINS’ ’UOM’ ’X' ”.
m_fieldcat ’LFGJA’ ’Year’ ’X' ”.
m_fieldcat ’LFMON’ ’Period’ ’X' ”.
m_fieldcat ’LBKUM’ ’Quantity’ ” ’X’.
m_fieldcat ’VERPR’ ’Average Unit Code’ ” ’X’.
m_fieldcat ’SALK3′ ’Inventory Value’ ” ’X’.

m_sort ’WGBEZ’ ” ”.
m_sort ’MATKL’ ’X' ’X’.

sla-colwidth_optimize = ’X’.
sla-zebra             = ’X’.
i_repid = sy-repid.

CALL FUNCTION ’REUSE_ALV_GRID_DISPLAY’
EXPORTING
i_callback_program      = i_repid
i_callback_top_of_page  = ’SUB_ALV_TOP_OF_PAGE’
it_fieldcat             = gd_fieldcat[]
it_sort                 = i_sort
it_events               = i_events
i_save                  = ’A’
i_default               = ’X’

is_variant              = ivariant
is_layout               = sla
it_excluding            = i_excluding
TABLES
t_outtab                = itab_sum
EXCEPTIONS
program_error           = 1
OTHERS                  = 2.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.
ENDFORM.                    ”fieldcat_init

FORM fieldcatikaduha.

Define m_fieldcatika.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-row_pos      = ’1′.
ls_fieldcat-fieldname    = &1.
ls_fieldcat-tabname      = ’G_sum’.
ls_fieldcat-seltext_l    = &2.
ls_fieldcat-key          = &3.
ls_fieldcat-do_sum       = &4.

APPEND ls_fieldcat TO gd_fieldcat.
END-OF-DEFINITION.

DEFINE m_sortika.
add 1 TO wa_sort-spos.
wa_sort-fieldname = &1.
wa_sort-up        = ’X’.
wa_sort-subtot    = &2.
wa_sort-expa      = &3.
APPEND wa_sort TO i_sort.
END-OF-DEFINITION.

m_fieldcatika ’SAKNR’ ’G/L Account’ ’X' ”.
m_fieldcatika ’TXT20′ ’Short Text’ ’X' ”.
m_fieldcatika ’MATNR’ ’MATERIAL#’ ’X' ”.
m_fieldcatika ’MAKTX’ ’MAT Description’ ’X' ”.
m_fieldcatika ’MEINS’ ’UOM’ ’X' ”.
m_fieldcatika ’LFGJA’ ’Year’ ’X' ”.
m_fieldcatika ’LFMON’ ’Period’ ’X' ”.
m_fieldcatika ’LBKUM’ ’Quantity’ ” ’X’.
m_fieldcatika ’VERPR’ ’Average Unit Code’ ” ’X’.
m_fieldcatika ’SALK3′ ’Inventory Value’ ” ’X’.

m_sortika ’TXT20′ ” ”.
m_sortika ’SAKNR’ ’X' ’X’.

sla-colwidth_optimize = ’X’.
sla-zebra             = ’X’.
i_repid = sy-repid.

CALL FUNCTION ’REUSE_ALV_GRID_DISPLAY’
EXPORTING
i_callback_program      = i_repid
i_callback_top_of_page  = ’SUB_ALV_TOP_OF_PAGE’
it_fieldcat             = gd_fieldcat[]
it_sort                 = i_sort
it_events               = i_events
i_save                  = ’A’
i_default               = ’X’

is_variant              = ivariant
is_layout               = sla

it_excluding            = i_excluding
TABLES
t_outtab                = G_sum
EXCEPTIONS
program_error           = 1
OTHERS                  = 2.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

*&———————————————————————*
*&      Form  sub_populate_layout
*&———————————————————————*
*       Populate ALV layout
*———————————————————————-*
*       No Parameter
*———————————————————————-*
FORM sub_populate_layout .

CLEAR sla.
sla-colwidth_optimize = ’X’.” Optimization of Col width

ENDFORM.

*&———————————————————————*
*&      Form  sub_alv_top_of_page
*&———————————————————————*
*       text
*———————————————————————-*
FORM sub_alv_top_of_page.                                   ”#EC CALLED

* To write header for the ALV
CALL FUNCTION ’REUSE_ALV_COMMENTARY_WRITE’
EXPORTING
it_list_commentary = i_alv_top_of_page.

ENDFORM.                    ”alv_top_of_page

slis_layout_alv documentations

A layout is build for the report output list description USING the internal table declared above (I_LAYOUT).
Output list description structure.
The parameters are described under the following heads:
-          Display options
-          Exceptions
-          Totals
-          Interaction
-          Detail screen
-          Display variants (only for hierarchical-sequential lists)
-          Color
-          Other
The layout table is of type slis_layout_alv_spec and has the following fields

1. Colwidth_optimize (1) TYPE c: This parameter optimizes the length of the different columns in the output. The width of the different col. now depends on the max. Length of the data in the column.
Value set: SPACE, ‘X’
‘X’ = optimizes the column width so that all contents are displayed completely.

2. No_colhead (1) TYPE c: This parameter suppresses the column headings Value set: SPACE, ‘X’. ‘X’ = column headers are not output

3. No_hotspot*(1) TYPE c :  The headings of the report output are not output as hotspot.  Value set: SPACE, ‘X’. ‘X’ = column headers are not output as hotspot

4. Zebra*(1) TYPE c : The report is output in the striped pattern.   Value set: SPACE, ‘X’.  ’X’ = striped pattern (e.g. for wide lists)

5. No_vline (1) TYPE c: The report output contains columns only separated by space and no lines.  It is not relevant for: hierarchical-sequential lists and multiple-line lists. Value set: SPACE, ‘X’. ‘X’ = columns separated by SPACE

6, No_min_linesize(1) TYPE c : The report  line size is equal to the width of the list. It is not relevant for block lists.
Value set: SPACE, ‘X’. ‘X’ = line size depends on list width ’  ‘ = Line size is set to 80 or MIN_LINESIZE (if > 0) .

7. Min_linesize LIKE sy-linsz: The report output contains a minimum possible length of line. If initial min_linesize is set to 80 by default, then this parameter is used to customize it. The prerequisite for this is that the parameter no_min_linesize should be ‘ ‘.
Value set: 0, 10 – 250
If the list is wider, the format uses the list width (maximum 250 or MAX_LINESIZE (if > 0)).

8. Max_linesize LIKE sy-linsz: The default max. Linesize is 250. To change this default value, this parameter can interactively-define the maximum list width setting.
Value set: 0, 80 – 1020.

9. Window_titlebar LIKE rsmpe-tittext: To set the titlebar on the report output.

10. No_uline_hs(1) TYPE c.

Exceptions
11. Lights_fieldname TYPE slis_fieldname: Internal output table field containing the codes of exceptions to be output.
Output table field code: ’1′ = red traffic light
’2′ = yellow traffic light
’3′ = green traffic light Fieldname for exception
Value set: SPACE, internal output table field name.

12. Lights_tabname TYPE slis_tabname: Name of the internal output table that contains the field in the parameter LIGHTS_FIELDNAME. If LIGHTS_FIELDNAME is not empty, this field must also be filled for hierarchical-sequential lists. Only relevant for hierarchical-sequential lists.
Value set: SPACE, internal output table name.

13. Lights_rollname LIKE dfies-rollname: The documentation of this data element is displayed when you call F1 help for an exception column.
Value set: SPACE, data element name.

14. Lights_condense (1) TYPE c : If a list record is output with ‘red traffic light’, each  Subtotal that includes this record is also output with ‘red traffic light’.
Value set: SPACE, ‘X’
‘X’ = the ‘maximum’ exception of the items in the subtotal is output at subtotal level.
Sums

15*. No_sumchoice* (1) TYPE c: This parameter allows the choice for summing up Only by field catalog.
Value set: SPACE, ‘X’
‘X’ = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = ‘X’). The user should not be able to change this value interactively.

16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
Value set: SPACE, ‘X’
‘X’ = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = ‘X’ in the field list.

17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
Value set: SPACE, ‘X’
‘X’ = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.

18. No_subtotals(1) TYPE c : No subtotals possible
Value set: SPACE, ‘X’
‘X’ = no subtotals.

19*. Numc_sum*(1)  TYPE c : Totals only possible for NUMC-Fields.

20. No_unit_splitting TYPE c: No separate total lines by inh.units

21.totals_before_items TYPE c: Display totals before the items

22. Totals_only(1) TYPE c :  Show only totals Value set: SPACE, ‘X’ ’X’ = only total records are output.

23. Totals_text(60) TYPE c : Text for 1st col. in totals Value set: SPACE, string (max.60) ’ ‘ = The first column in the total record contains an appropriate number of ‘*’s to indicate the total by default. If the first column is wide enough, the string ‘Total’ is output after the asterisks.
‘String’ = The string passed is output after the total indicated by ‘*’, if the column is wide enough.

24. Subtotals_text(60) TYPE c : Texts for subtotals Value set: SPACE, string (max.60) ’ ‘ = In the first column of subtotal records, the subtotal is indicated by an appropriate number of ‘*’ by default. If the first column is not a subtotal criterion, the string ‘Total’ is output after the asterisks, if the column is wide enough.
‘String’ = the string passed is output after the subtotal indicated by ‘*’, if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
Interaction

25. Box_fieldname TYPE slis_fieldname: Fieldname for checkbox in the report output. If the list has checkboxes at the start of records (for selecting several records), this parameter contains the internal output table field name indicated by the checkbox selection column. The field is a checkbox at the start of list records without a list header.
Value set: SPACE, internal output table field name

26. Box_tabname TYPE slis_tabname: Name of the internal output table that contains the field in the parameter BOX_FIELDNAME. If BOX_FIELDNAME is not empty, this field must also be filled for hierarchical-sequential lists.
Value set: SPACE, internal output table name.

27. Box_rollname LIKE dd03p-rollname: rollname for checkbox

28. Expand_fieldname TYPE slis_fieldname: fieldname flag ‘expand’. The user can show or hide the items by clicking on the folder symbol (hotspot). If the items for a header entry are only to be read by the calling program and passed to ALV when a header has been expanded interactively, this can be controlled via the CALLBACK event        ‘ITEM_DATA_EXPAND’.
29. Hotspot_fieldname TYPE slis_fieldname: Used to make the fieldname flag hotspot.
30. No_input(1) TYPE c : The fields are only display fields. Value set: SPACE, ‘X’ ’X’ = all ready-for-input fields in a list are displayed as not ready-for-input. (Record selection checkboxes and fields which can be made ready-for-input via the field list parameter FIELDCAT-INPUT = ‘X’)

31. F2code LIKE sy-ucomm: To assign an ALV standard function code to double-click (F2), assign the function code to this parameter. Ex.: to assign the ALV standard function ‘Detail’ (‘&ETA’) to F2. => LAYOUT-F2CODE = ‘&ETA’. Value set: SPACE, function code

32. Confirmation_prompt: confirm. Prompt when leaving Value set: SPACE, ‘X’ ’X’ = if one of the functions ‘Back (F03)’, ‘Exit (F15)’ or ‘Cancel (F12)’ occurs, a confirmation prompt appears.

33. Key_hotspot(1) TYPE c : The key fields are displayed as hotspot. The columns defined in the field catalog as key fields (FIELDCAT-KEY = ‘X’) are output as hotspots, i.e. clicking on a key column (highlighted in color in the list) calls the function under F2. Value set: SPACE, ‘X’.

34. Reprep(1) TYPE c : report report interface active.

35. Group_buttons (1) TYPE c :  group-buttons for COL1 – COL5 . Group output fields via FIELDCAT-SP_GROUP in the field list, and pass the group name to the list module in the interface parameter IT_SPECIAL_GROUPS. Value set: SPACE, ‘X’.

36. No_keyfix(1) TYPE c : Used to make the key fields scrollable. Value set: SPACE, ‘X’. ’ ‘ = The key columns defined in the field catalog by FIELDCAT-KEY = ‘X’ are fixed in the list output. These columns do not scroll horizontally. The item table key columns are fixed in hierarchical-sequential lists. The header table key fields are not considered here. ’X’ = key columns not fixed

37. Get_selinfos(1) TYPE c : To read selection screen. Value set: SPACE, ‘X’. If the calling program is a report with an ABAP/4 selection screen, setting this parameter makes ALV read the selection screen again. If the selections are read successfully, a pushbutton, via which the user can call a popup which lists the report selections in a simple form, becomes active on the results list output by ALV.

38.   group_change_edit(1) TYPE c :  Settings by user for new group
Value set: SPACE, ‘X’
‘X’ = the user can enter a format option for each sort criterion in the sort/subtotal popup, for the list format when this value changes (e.g. new page or underline).

39.   No_scrolling(1) TYPE c : Does not allow scrolling of the list to the right. Value set: SPACE, ‘X’.

40. Expand_all(1) TYPE c : Expand all positions Detailed screen

40.   Detail_popup(1) TYPE c : show detail in popup. Value set: SPACE, ‘X’ ’  ‘  = List record detail display in full-screen mode, with top-of-page. ’X'  = list record detail display in popup (without top-of-page).

41. Detail_initial_lines(1) TYPE c : show also initial lines Value set: SPACE, ‘X’ ’ ‘ = Only fields whose contents are not initial are output in the detail view. ’X’ = initial field contents are also output in detail.

41.   detail_titlebar(30) type c : Titlebar for detail screen Value set: SPACE, string (max.30) ’ ‘ = ‘ Detail: Display’ is output as the title of the detail window. ’String’ = the string passed is output as the title of the detail window.

Display variants


42. Header_text (20) TYPE c: Text for header button. Only relevant for hierarchical-sequential lists. You can toggle between display field and field list views via pushbuttons in the display variant definition popup for hierarchical-sequential lists. The views refer to the hierarchy level of the fields. This is technically a toggle between the header table and item table fields.
Value set: SPACE, CHAR (20) ’ ‘ = The header table field pushbutton text is ‘Header’ by default. CHAR (20) = header table field pushbutton text.

43.item_text(20) TYPE c : Text for item button. Only relevant for hierarchical-sequential lists. You can toggle the view between the display fields and the field list via pushbuttons in the display variant definition popup for hierarchical-sequential lists. The views refer to the hierarchy level of the fields. This is technically a toggle between the header table and item table fields.
Value set: SPACE, CHAR (20) ’ ‘ = The pushbutton text for the item table fields is ‘Item’ by default. CHAR (20) = item table field pushbutton text.

44.default_ item(1) TYPE c : Items as default. Only relevant for hierarchical-sequential lists.
Value set: SPACE, ‘X’ ’ ‘ = The header table fields are displayed by default in the display variant definition popup. The user can switch to the item table fields interactively. ’X’ = the item table fields are displayed by default in the display variant Definition Popup.    The user can switch to the header table fields interactively.

Colour


45. Info_fieldname TYPE slis_fieldname: infofield for listoutput. A whole list record can be colored individually using a color code in a column of the internal output table for the record. Assign the name of the field containing the color code to this parameter.
Value set: SPACE, internal output table field name The internal output table field must be of type CHAR(3).
The code must have the following syntax:  ‘Cxy’: C = color (all codes must start with ‘C’) X = color number (’1′-’9′)
Y = bold (’0′ = off, ’1′ = on)

46. Coltab_fieldname TYPE slis_fieldname: Cells can be colored individually using a color code which is contained in a column of the internal output table for the record containing the cell. Assign the name of the field to this parameter.
Others


47. List_append(1) TYPE c :  no call screen. It is only useful to output block-lists without specifying the above modules if the number of list blocks exceeds, or may exceed, the maximum number specified in the block module documentation. These operations are not possible for user-defined block lists.

Original Source: http://wiki.sdn.sap.com/wiki/display/ABAP/ALV+TUTOTIAL+FOR+BEGINERS+WITH+EXAMPLES

INFORMATION