Skip to Content
1
Jun 17, 2016 at 09:27 AM

ALV report Subtotal and Total not working

1039 Views

Dear Gurus,

I am carrying out alv report development.

Even after following various documents for applying the logic to get subtotal and total, Its is not working.

Under Field catalog DO_SUM is also set for relevant (unit,curr) field.

ALSO Sort table is also populated.

Kindly suggest what is wrong in below code snippet;

REPORT ZREPORT

TYPE-POOLS: SLIS.
TABLES : BKPF.
*   Local structure
TYPES: BEGIN OF TY_FINAL,
       SRNO         TYPE BBP_BAPI_NUMZEILE," LAUFDNR,           "Serial No
       BLDAT        TYPE BKPF-BLDAT,        "Date
       BELNR        TYPE BKPF-BELNR,         "Document No.
       XBLNR        TYPE BKPF-XBLNR,        "Tax Invoice Number
       NAME1        TYPE KNA1-NAME1,        " Descprtion
       HWBAS        TYPE HWAERBAS,          " Base Amount
       HWVOSTE      TYPE EKBE-DMBTR,           " Input Tax
       HWGROSS      TYPE EKBE-DMBTR,           " Gross Amount
       STCD3        TYPE KNA1-STCD3,        " Tax Number 3
       HEAD_OFC     TYPE ZHEAD_OFC,         " Head Office Number
       BRANCH_OFC   TYPE ZBRANCH_OFC,       "Branch Office Number
       END OF TY_FINAL,

       TTY_FINAL TYPE STANDARD TABLE OF TY_FINAL. " Table Type

*   Data Variables
DATA: LT_T001 TYPE STANDARD TABLE OF T001-BUKRS,
      LT_J_1BBRANCH TYPE STANDARD TABLE OF J_1BBRANCH-BRANCH,
      LT_T007A TYPE STANDARD TABLE OF T007A-MWSKZ,
      LT_LFA1 TYPE STANDARD TABLE OF LFA1-LIFNR,
      LT_FINAL TYPE TTY_FINAL,
      LT_BSEG  TYPE STANDARD TABLE OF BSEG,
      LT_BKPF TYPE STANDARD TABLE OF BKPF,

      WA_FINAL TYPE TY_FINAL,
      WA_BSEG  TYPE BSEG,
      WA_BKPF TYPE BKPF.

DATA: LV_VARIANT TYPE DISVARIANT,
      LV_REPID   TYPE SY-REPID.

DATA: DATE(12) TYPE C,
      HEADER(30) TYPE C,
      L_VARIANT TYPE DISVARIANT,              "Display variant
      WA_J_1BBRANCH TYPE J_1BBRANCH,
      LV_INDEX TYPE I,
      L_INX TYPE I.

DATA: WA_FCAT TYPE SLIS_FIELDCAT_ALV,
      WA_SORT TYPE SLIS_SORTINFO_ALV,
      WA_EVENT TYPE SLIS_ALV_EVENT,
      WA_HEADER TYPE SLIS_LISTHEADER,
      WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
      LT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
      LT_SORT TYPE SLIS_T_SORTINFO_ALV,
      LT_EVENT TYPE SLIS_T_EVENT,
      LT_HEADER TYPE SLIS_T_LISTHEADER.

DATA: LV_BUKRS    TYPE T001-BUKRS, " COMP.CODE
      LV_BUPLA    TYPE BSEG-BUPLA, " BUSINESS PLACE
      LV_MWSKZ    TYPE BSEG-MWSKZ, " TAX CODE
      LV_LIFNR    TYPE LFA1-LIFNR, " Vendor Code
      LV_BLDAT    TYPE BKPF-BLDAT, " DOC.DATE
      LV_BUDAT    TYPE BKPF-BUDAT, " POSTING DATE
*      LV_LAYO     TYPE RFUMS_ALV-VARIANTE,  " LAYOUT
      LV_LAYO     TYPE DISVARIANT-VARIANT,  " LAYOUT
      LV_GJAHR    TYPE BKPF-GJAHR. " FISCAL YEAR

*   Selection Screen
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-101.
SELECT-OPTIONS: S_BUKRS  FOR LV_BUKRS OBLIGATORY DEFAULT 'TECC',
                S_BUPLA  FOR LV_BUPLA,
                S_MWSKZ  FOR LV_MWSKZ,
                S_LIFNR  FOR LV_LIFNR,

                S_BLDAT  FOR LV_BLDAT NO-EXTENSION,
                S_BUDAT  FOR LV_BUDAT NO-EXTENSION,
                S_GJAHR  FOR LV_GJAHR NO INTERVALS.
SELECTION-SCREEN: END OF BLOCK B1.
*SKIP 1.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-102.
SELECT-OPTIONS: S_LAYO  FOR LV_LAYO NO-EXTENSION NO INTERVALS.
SELECTION-SCREEN: END OF BLOCK B2.

SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-103.
PARAMETERS: RB1 RADIOBUTTON GROUP R1 DEFAULT 'X',
            RB2 RADIOBUTTON GROUP R1.
SELECTION-SCREEN: END OF BLOCK B3.
*SKIP 1.
PARAMETERS MAX_HITS   TYPE I DEFAULT 10.

*&---------------------------------------------------------------------*
*& I N I T I A L I Z A T I O N                                         *
*&---------------------------------------------------------------------*
INITIALIZATION.
  CLEAR: LV_INDEX,S_LAYO.
  LV_REPID = SY-REPID.
  PERFORM REPORT_LAYOUT.

*&---------------------------------------------------------------------*
*& A T   S E L E C T I O N - S C R E E N                               *
*&---------------------------------------------------------------------*

AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_LAYO-LOW.
  PERFORM ALV_VARIANTE_F4." USING C_VOSTE_EP.

AT SELECTION-SCREEN ON S_LAYO.
  PERFORM ALV_VARIANTE_EXIST." USING 'HAN3' S_LAYO-LOW.

AT SELECTION-SCREEN.

  PERFORM CHECKING_INPUTS.

*&---------------------------------------------------------------------*
*& S T A R T - O F - S E L E C T I O N                                 *
*&---------------------------------------------------------------------*
START-OF-SELECTION.
* To populate internal tables
  PERFORM GET_DATA.
* To prepare final internal table ready for display
  PERFORM COMBINE_DATA.
* To prepare field catalog
  PERFORM BUILD_FIELD_CATALOG.
* To prepare apply sort
  PERFORM SORT.
* To prepare layout
  PERFORM LAYOUT.

*END-OF-SELECTION.
* To display report
  PERFORM DISPLAY_DATA.

*&---------------------------------------------------------------------*
*&      Form  CHECKING_INPUTS
*&---------------------------------------------------------------------*
*       CHECK INPUTS ENTERED AT SCREEN
*----------------------------------------------------------------------*
FORM CHECKING_INPUTS .
  IF S_BUKRS IS NOT INITIAL.
    SELECT BUKRS FROM T001 INTO TABLE LT_T001    " comp.code
          WHERE BUKRS IN S_BUKRS.

    IF SY-SUBRC NE 0.
      MESSAGE 'Enter valid Company Code' TYPE 'E' DISPLAY LIKE 'S'.
    ENDIF.
  ENDIF.

  IF S_BUPLA IS NOT INITIAL.
    SELECT BRANCH FROM J_1BBRANCH INTO TABLE LT_J_1BBRANCH  "Business PLace
            WHERE BRANCH IN S_BUPLA.

    IF SY-SUBRC NE 0.
      MESSAGE 'Enter valid Business Place' TYPE 'E' DISPLAY LIKE 'S'.
    ELSEIF S_BUKRS IS NOT INITIAL.
      SELECT SINGLE * FROM J_1BBRANCH INTO WA_J_1BBRANCH WHERE BUKRS  IN S_BUKRS AND BRANCH = S_BUPLA.
      IF SY-SUBRC <> 0.                            "OP-01
        MESSAGE E562(ICC-KR) WITH S_BUPLA-LOW S_BUKRS-LOW.  "OP-01
      ENDIF.
    ENDIF.
  ENDIF.

  IF S_MWSKZ IS NOT INITIAL.
    SELECT MWSKZ FROM T007A INTO TABLE LT_T007A  " Tax Code
            WHERE MWSKZ IN S_MWSKZ.

    IF SY-SUBRC NE 0.
      MESSAGE 'Enter valid Tax Code' TYPE 'E' DISPLAY LIKE 'S'.
    ENDIF.
  ENDIF.

  IF S_LIFNR IS NOT INITIAL.
    SELECT LIFNR FROM LFA1 INTO TABLE LT_LFA1  " Vendor Code
            WHERE LIFNR IN S_LIFNR.

    IF SY-SUBRC NE 0.
      MESSAGE 'Enter valid Vendor Code' TYPE 'E' DISPLAY LIKE 'S'.
    ENDIF.
  ENDIF.

ENDFORM.                    " CHECKING_INPUTS
*&---------------------------------------------------------------------*
*&      Form  GET_DATA
*&---------------------------------------------------------------------*
*       DATA EXTRACTION LOGIC
*----------------------------------------------------------------------*
FORM GET_DATA .

  SELECT * FROM BKPF INTO TABLE LT_BKPF
      WHERE BLDAT BETWEEN S_BLDAT-LOW AND S_BLDAT-HIGH
            AND   BUKRS IN S_BUKRS
            AND   GJAHR IN S_GJAHR
            AND   BUDAT IN S_BUDAT
            AND   BLDAT IN S_BLDAT
            AND ( BLART EQ 'RE'      "// commented as per mail confirmatino on 17.06.2016
            OR    BLART EQ 'KR'
            OR    BLART EQ 'AB'
            OR    BLART EQ 'JV'
            OR    BLART EQ 'SK'
            OR    BLART EQ 'SA' ).

  IF LT_BKPF IS NOT INITIAL.
    SELECT * FROM BSEG     "BUKRS BELNR GJAHR MWSKZ SHKZG DMBTR WRBTR HKONT
        INTO TABLE LT_BSEG UP TO MAX_HITS ROWS
        FOR ALL ENTRIES IN LT_BKPF
        WHERE BUKRS = LT_BKPF-BUKRS
          AND BELNR = LT_BKPF-BELNR
          AND GJAHR = LT_BKPF-GJAHR
          AND LIFNR IN S_LIFNR
          AND MWSKZ IN S_MWSKZ.

  ENDIF.
ENDFORM.                    " GET_DATA
*&---------------------------------------------------------------------*
*&      Form  COMBINE_DATA
*&---------------------------------------------------------------------*
*       Combining Data
*----------------------------------------------------------------------*
FORM COMBINE_DATA .
  CLEAR: LV_INDEX. " CLEAR VARIABLES

DATA: TEMP TYPE TY_FINAL-HWVOSTE.
*  LT_BSEG1 = LT_BSEG.
*  SORT LT_BSEG1 DESCENDING.
*  DELETE ADJACENT DUPLICATES FROM LT_BSEG1 COMPARING BELNR.
  LOOP AT LT_BSEG INTO WA_BSEG.
    LOOP AT LT_BKPF INTO WA_BKPF
            WHERE BELNR EQ WA_BSEG-BELNR
            AND   BUKRS EQ WA_BSEG-BUKRS.

*      WA_FINAL-SRNO        = LV_INDEX + 1.  " Sr. no
      WA_FINAL-BLDAT       = WA_BKPF-BLDAT. " Document Date
*      ON CHANGE OF WA_BKPF-BELNR.
      WA_FINAL-BELNR       = WA_BKPF-BELNR. " Document No.

      WA_FINAL-XBLNR       = WA_BKPF-XBLNR. " Tax Invoice Number
      WA_FINAL-NAME1       = WA_BSEG-SGTXT. " Name & address

      IF WA_BSEG-MWART EQ 'V'. " V  = INPUT VAT     "WA_BSEG-BUZID EQ 'T' AND
      WA_FINAL-HWVOSTE      = WA_BSEG-DMBTR.
      TEMP = WA_BSEG-HWBAS + TEMP.
      WA_FINAL-HWBAS = WA_BSEG-HWBAS.
      ENDIF.


      IF WA_BSEG-SHKZG EQ 'S' AND WA_BSEG-MWART NE 'V'.  " ( WA_FINAL-HWGROSS IS NOT INITIAL OR WA_FINAL-HWVOSTE IS NOT INITIAL ) AND
      WA_FINAL-HWBAS      = WA_FINAL-HWGROSS - WA_FINAL-HWVOSTE. "
      ENDIF.


      IF WA_BSEG-SHKZG EQ 'H'. " H EQ CREDIT INDICATOR
      WA_FINAL-HWGROSS      = WA_BSEG-DMBTR + TEMP.
      ENDIF.

*      WA_FINAL-BLDAT       = WA_BKPF-BLDAT. "
*       BELNR        TYPE BKPF-BELNR,         "Document No.
*       XBLNR        TYPE BKPF-XBLNR,        "Tax Invoice Number
*       NAME1        TYPE KNA1-NAME1,        " Descprtion
*       HWBAS        TYPE HWAERBAS,          " Base Amount
*       HWVOSTE      TYPE HWVOSTE,           " Input Tax
*       HWGROSS      TYPE HWGROSS,           " Gross Amount
*       STCD3        TYPE KNA1-STCD3,        " Tax Number 3
*       HEAD_OFC     TYPE ZHEAD_OFC,         " Head Office Number
*       BRANCH_OFC   TYPE ZBRANCH_OFC,       "Branch Office Number
*      WA_FINAL-BLDAT       = WA_BKPF-BLDAT. "
*      WA_FINAL-BLDAT       = WA_BKPF-BLDAT. "
      APPEND WA_FINAL TO LT_FINAL.
      LV_INDEX = LV_INDEX + 1.
      CLEAR: WA_FINAL,WA_BKPF.
    ENDLOOP.

    CLEAR: WA_BSEG.",TEMP.
  ENDLOOP.
ENDFORM.                    " COMBINE_DATA
*&---------------------------------------------------------------------*
*&      Form  SORT
*&---------------------------------------------------------------------*
*       Maintaining SORT Parameters
*----------------------------------------------------------------------*
FORM SORT .
  CLEAR WA_SORT.
  WA_SORT-FIELDNAME = 'BELNR'.
  WA_SORT-TABNAME = 'LT_FINAL'.
  WA_SORT-UP = 'X'.
  WA_SORT-SUBTOT = 'X'.
  WA_SORT-SPOS = '1'.
  WA_SORT-EXPA = 'X'.

  APPEND WA_SORT TO LT_SORT.
ENDFORM.                    " SORT
*&---------------------------------------------------------------------*
*&      Form  LAYOUT
*&---------------------------------------------------------------------*
*       Maintaining Layout of ALV Report
*----------------------------------------------------------------------*
FORM LAYOUT .
  WA_LAYOUT-ZEBRA             = 'X'.
  WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.

ENDFORM.                    " LAYOUT
*&---------------------------------------------------------------------*
*&      Form  FILL_EVENT
*&---------------------------------------------------------------------*
*       Maintaining Event of REPORT
*----------------------------------------------------------------------*
FORM FILL_EVENT .
  WA_EVENT-FORM = 'TOP-OF-PAGE'.
  WA_EVENT-NAME = 'TOP_OF_PAGE'.
  APPEND WA_EVENT TO LT_EVENT.
ENDFORM.                    " FILL_EVENT
*&---------------------------------------------------------------------*
*&      Form  TOP-OF-PAGE
*&---------------------------------------------------------------------*
*       TOP-OF-PAGE Subroutine Code
*----------------------------------------------------------------------*
FORM TOP-OF-PAGE.
  REFRESH:LT_HEADER[].
*  * Title
  WA_HEADER-TYP = 'H'.
  WA_HEADER-INFO = 'Purchase Order Input Tax Report'.
  APPEND WA_HEADER TO LT_HEADER.
  CLEAR WA_HEADER.
*  * Date
  WRITE SY-DATUM TO DATE DD/MM/YYYY NO-GAP.
  CONCATENATE 'As on' DATE INTO HEADER SEPARATED BY ' : '.
  WA_HEADER-TYP = 'S'.
  WA_HEADER-INFO = HEADER.
  APPEND WA_HEADER TO LT_HEADER.
  CLEAR: WA_HEADER,HEADER.

  CONCATENATE 'User ' sy-uname INTO HEADER SEPARATED BY ' : '.
  WA_HEADER-TYP = 'S'.
  WA_HEADER-INFO = HEADER.
  APPEND WA_HEADER TO LT_HEADER.
  CLEAR WA_HEADER.

  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = LT_HEADER.
ENDFORM.                    "TOP-OF-PAGE

*&      Form  DISPLAY_DATA
*&---------------------------------------------------------------------*
*       Displaying Data
*----------------------------------------------------------------------*
FORM DISPLAY_DATA .
  sort LT_FINAL by belnr.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM     = LV_REPID
     I_CALLBACK_TOP_OF_PAGE  = 'TOP-OF-PAGE'
*     I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
      IS_LAYOUT              = WA_LAYOUT
      IT_FIELDCAT            = LT_FCAT[]
      IT_SORT                = LT_SORT[]
*      I_DEFAULT              = 'X'
      I_SAVE                 = 'A'
      IS_VARIANT             = LV_VARIANT
*      IT_EVENTS              = LT_EVENT
    TABLES
      T_OUTTAB               = LT_FINAL.

ENDFORM.                    " DISPLAY_DATA

*FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
*                                   RS_SELFIELD TYPE SLIS_SELFIELD.
*
* IF R_UCOMM EQ '&F03'.
*RS_SELFIELD-REFRESH = 'X'.
*ENDIF.
* ENDFORM.
*&---------------------------------------------------------------------*
*&      Form  ALV_VARIANTE_F4
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM ALV_VARIANTE_F4 .
  L_VARIANT-REPORT = LV_REPID."'RFUMSV00'.

  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    EXPORTING
      IS_VARIANT = L_VARIANT
      I_SAVE     = 'A'
    IMPORTING
*     E_EXIT     = L_EXIT
      ES_VARIANT = L_VARIANT.

  CLEAR S_LAYO.
  REFRESH S_LAYO.
  S_LAYO-LOW = L_VARIANT-VARIANT.
  S_LAYO-SIGN = 'I' .
  S_LAYO-OPTION = 'EQ'.
  APPEND S_LAYO.

ENDFORM.                    " ALV_VARIANTE_F4
*&---------------------------------------------------------------------*
*&      Form  BUILD_FIELD_CATALOG
*&---------------------------------------------------------------------*
*       Building Field Catalogue (Column Headers)
*----------------------------------------------------------------------*
FORM BUILD_FIELD_CATALOG .
  CLEAR L_INX.
*SRNO BLDAT BELNR XBLNR  NAME1 HWBAS   HWVOSTE   HWGROSS STCD3  HEAD_OFC BRANCH_OFC
    L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'SRNO'       'LT_FINAL' 'No'             ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'BLDAT'      'LT_FINAL' 'Date'           ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'BELNR'      'LT_FINAL' 'Doc. No'        ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'XBLNR'      'LT_FINAL' 'Tax Invoice No' ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'NAME1'      'LT_FINAL' 'Name & Address' ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'HWBAS'      'LT_FINAL' 'Base Amount'    ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'HWVOSTE'    'LT_FINAL' 'Input Tax'      'X'   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'HWGROSS'    'LT_FINAL' 'Gross Amount'   'X'   '' '' '' '' ''.   L_INX = L_INX + 1. "'WAERS' 'T001' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'STCD3'      'LT_FINAL' 'Tax No. 3'      ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'HEAD_OFC'   'LT_FINAL' 'Head Office'    ''   '' '' '' '' ''.  L_INX = L_INX + 1.
  PERFORM SET_FCAT USING L_INX 'BRANCH_OFC' 'LT_FINAL' 'Brach'          ''   '' '' '' '' ''.  L_INX = L_INX + 1.
ENDFORM.                    " BUILD_FIELD_CATALOG
*&---------------------------------------------------------------------*
*&      Form  BUILD_FIELD_CATALOG
*&---------------------------------------------------------------------*
*       Field Catalog building with manual
*----------------------------------------------------------------------*
FORM SET_FCAT  USING        VALUE(P_SPOS)
                            VALUE(P_FNAME)
                            VALUE(P_ITAB)
                            VALUE(P_STXT)
                            VALUE(P_SUM)
                            VALUE(P_CNAME)
                            VALUE(P_CITAB)
                            VALUE(P_RNAME)
                            VALUE(P_RITAB)
                            VALUE(P_OUTLEN).


*  CLEAR: WA_FCAT.
  WA_FCAT-COL_POS       = P_SPOS.
  WA_FCAT-FIELDNAME     = P_FNAME.
  WA_FCAT-TABNAME       = P_ITAB.
  WA_FCAT-SELTEXT_L     = P_STXT.
  WA_FCAT-DO_SUM        = P_SUM.
*  WA_FCAT-REF_TABNAME   = P_CITAB.
*  WA_FCAT-REF_FIELDNAME  = P_CNAME.

*  WA_FCAT-OUTPUTLEN  = P_OUTLEN.
IF P_FNAME EQ 'HWVOSTE'.
*  WA_FCAT-REF_FIELDNAME  = 'DMBTR'.
*   WA_FCAT-hotspot   = 'X'.
ENDIF.
*SHOWING NOT DISPLAY SIGN
*  WA_FCAT-NO_SIGN = 'X'.

  APPEND WA_FCAT TO LT_FCAT.
  CLEAR :WA_FCAT.

ENDFORM.                  "     SET_FCAT
*&---------------------------------------------------------------------*
*&      Form  ALV_VARIANTE_EXIST
*---------------------------------------------------------------------*
*       Check, if the choosen variant does exist                      *
*---------------------------------------------------------------------*
FORM ALV_VARIANTE_EXIST.
  IF S_LAYO-LOW <> SPACE.
    LV_VARIANT-VARIANT = S_LAYO-LOW.
    LV_VARIANT-REPORT = LV_REPID.
    CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
      EXPORTING
        I_SAVE     = 'A'
      CHANGING
        CS_VARIANT = LV_VARIANT.
  ENDIF.

ENDFORM.                    " ALV_VARIANTE_EXIST
*&---------------------------------------------------------------------*
*&      Form  REPORT_LAYOUT
*&---------------------------------------------------------------------*
*       Getting the Default Variant to run report
*----------------------------------------------------------------------*
FORM REPORT_LAYOUT .

  CLEAR LV_VARIANT.
  LV_VARIANT-REPORT = LV_REPID.
  CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
    EXPORTING
      I_SAVE     = 'X'
    CHANGING
      CS_VARIANT = LV_VARIANT
    EXCEPTIONS
      NOT_FOUND  = 2.

  CLEAR S_LAYO.
  REFRESH S_LAYO.

  S_LAYO-LOW = LV_VARIANT-VARIANT.
  S_LAYO-SIGN = 'I' .
  S_LAYO-OPTION = 'EQ'.
  APPEND S_LAYO.
ENDFORM.                    " REPORT_LAYOUT

Thanks in tons.

Regards,

Pavan Golesar

Attachments

rp output.PNG (38.2 kB)