Regarding Classical Reporting

Hi all,
I want to know how to write the code in calssical reporting to get field headngs.
In ALV means we use Field catalog merge FM, But in classical it is differnt.
I want one example program to get field catalog in classical Reporting out put,
My out put looks like XL sheet. I want to know how to get that grids in Classical reporting.
Regards,
sarath

Hi
Using Sy-Vline, and Sy-Uline we can design the Field catalog like Excel like output in the Classical reporting
see the sample code and the output
REPORT  zfi_customer_ageing
        NO STANDARD PAGE HEADING
        LINE-COUNT 58
       line-size 168
        MESSAGE-ID zh_msg.
       D A T A B A S E  T A B L E S   D E C L A R A T I O N
TABLES: kna1,           " Customer Master (General)
        t001,           " Company Codes
        rfpdo.
     I N T E R N A L  T A B L E S  D E C L A R A T I O N S           *
Internal Table for Customer Open Items Data
DATA: BEGIN OF int_bsid OCCURS 0,
        kunnr   LIKE bsid-kunnr,         " Customer Number
        name1   LIKE kna1-name1,         " Customer Name
        shkzg   LIKE bsid-shkzg,         " Dr/Cr Indicator
        belnr   LIKE bsid-belnr,         " Document Number
        xblnr   LIKE bsid-xblnr,         " Ref Doc No
        blart   LIKE bsid-blart,         " Document Type
        zfbdt   LIKE bsid-zfbdt,         " Base Line Date
        zbd1t   LIKE bsid-zbd1t,         " Due date1
        zbd2t   LIKE bsid-zbd2t,         " Due Date2
        zbd3t   LIKE bsid-zbd3t,         " Due Date3
        waers   LIKE bsid-waers,         " Currency
        dmbtr   LIKE bsid-dmbtr,         " Amount in Local Curr
      END OF int_bsid.
Internal Table for Amounts Sum Up Data
DATA: BEGIN OF int_final OCCURS 0,
        kunnr   LIKE bsid-kunnr,         " Customer Number
        name1   LIKE kna1-name1,         " Customer Name
        total1  LIKE bsid-dmbtr,         " Amount in Local Curr
        total2  LIKE bsid-dmbtr,         " Amount in Local Curr
        total3  LIKE bsid-dmbtr,         " Amount in Local Curr
        total4  LIKE bsid-dmbtr,         " Amount in Local Curr
        total5  LIKE bsid-dmbtr,         " Amount in Local Curr
        total6  LIKE bsid-dmbtr,         " Amount in Local Curr
        total   LIKE bsid-dmbtr,         " Amount in Local Curr
      END OF int_final.
           D A T A  D E C L A R A T I O N S
DATA : v_flag,                          " Flag
       v_gtotal1     LIKE bsid-dmbtr,   " Amount Totals
       v_gtotal2     LIKE bsid-dmbtr,   " Amount Totals
       v_gtotal3     LIKE bsid-dmbtr,   " Amount Totals
       v_gtotal4     LIKE bsid-dmbtr,   " Amount Totals
       v_gtotal5     LIKE bsid-dmbtr,   " Amount Totals
       v_gtotal6     LIKE bsid-dmbtr,   " Amount Totals
       v_gtotal      LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal1   LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal2   LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal3   LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal4   LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal5   LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal6   LIKE bsid-dmbtr,   " Amount Totals
       v_subtotal    LIKE bsid-dmbtr,   " Amount Totals
       v_date        LIKE bsid-zfbdt,   " Due Date
       v_tage1(4),                      " Age 30 days
       v_tage2(4),                      " Age 60 days
       v_tage3(4),                      " Age 90 days
       v_fir(15),                       " Column Text1
       v_sec(15),                       " Column Text2
       v_thir(15),                      " Column Text3
       v_four(17),                      " Column Text4
       v_fidd(4),                       " Days field1
       v_sedd(4),                       " Days field2
       v_thdd(4),                       " Days field3
       v_fodd(4),                       " Days field4
       v_str  TYPE  SY-LISEL,           " String
       v_str1(11),                      " String
       v_tage(3),                       " String
       v_date1(10).                     " Date field
     R A N G E   D E C L A R A T I O N S
RANGES: r_date1 FOR bsid-zfbdt,      " Date Range 1
        r_date2 FOR bsid-zfbdt,      " Date Range 2
        r_date3 FOR bsid-zfbdt,      " Date Range 3
        r_date4 FOR bsid-zfbdt.      " Date Range 4
         S E L E C T I O N  S C R E E N                      *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_kunnr FOR kna1-kunnr. "Customer account
PARAMETERS:     p_bukrs LIKE t001-bukrs. "Co. Code
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:   p_allgst LIKE rfpdo-allgstid OBLIGATORY DEFAULT sy-datum.
"Open items at key date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS: p_tage1 LIKE rfpdo1-allgfael DEFAULT '30',
            p_tage2 LIKE rfpdo1-allgfael DEFAULT '60',
            p_tage3 LIKE rfpdo1-allgfael DEFAULT '90',
            p_tage4 LIKE rfpdo1-allgfael DEFAULT '120'.
SELECTION-SCREEN END OF BLOCK b3.
              A T  S E L E C T I O N  S C R E E N                   *
AT SELECTION-SCREEN.
Validate the screen fields
  PERFORM validate_flds.
               S T A R T  O F  S E L E C T I O N                    *
START-OF-SELECTION.
Fetch main data
  PERFORM fetch_data.
                       T O P  O F  P A G E
Header
TOP-OF-PAGE.
  PERFORM header.
                       E N D  O F  P A G E
Footer
END-OF-PAGE.
  ULINE.
   T O P  O F  P A G E  D U R I N G  L I N E  S E L E C T I O N     *
Top of Page in Secondary List
TOP-OF-PAGE DURING LINE-SELECTION.
  PERFORM header1.
              A T  L I N E  S E L E C T I O N                    *
AT LINE-SELECTION.
Perform Line Selections
  PERFORM line_selection.
                 E N D  O F  S E L E C T I O N
END-OF-SELECTION.
List generation
  PERFORM basic_list.
*&      Form  validate_flds
Validation of Selection Screen fields
FORM validate_flds .
Validate Customer Code
  CLEAR kna1-kunnr.
  SELECT kunnr UP TO 1 ROWS
      INTO kna1-kunnr
      FROM kna1
      WHERE kunnr IN s_kunnr AND
            spras = sy-langu.
  ENDSELECT.
  IF sy-subrc <> 0.
    MESSAGE e000 WITH 'Invalid Customer Code range'(023).
  ENDIF.
Validate Company Code
  CLEAR t001-bukrs.
  SELECT bukrs  UP TO 1 ROWS
      INTO t001-bukrs
      FROM t001
      WHERE bukrs =  p_bukrs AND
            spras = sy-langu.
  ENDSELECT.
  IF sy-subrc <> 0.
    MESSAGE e021.      " Invalid Company Code range
  ENDIF.
  IF ( p_tage1 > p_tage2 ) OR ( p_tage1 > p_tage3 ) OR
      ( p_tage1 > p_tage4 ).
    MESSAGE e999 WITH 'Column 1 greater'(004)
                'than Column# 2 or 3 or 4'(005).
  ENDIF.
*column 2
  IF ( p_tage2 > p_tage3 ) OR ( p_tage1 > p_tage4 ).
    MESSAGE e999 WITH 'Column 2 greater'(006)
                'than Column# 3 or 4'(007).
  ENDIF.
*column3
  IF ( p_tage3 > p_tage4 ).
    MESSAGE e999 WITH 'Column 3 greater'(008)
                'than Column#4'(009).
  ENDIF.
ENDFORM.                    " validate_flds
*&      Form  fetch_data
Fetching Data from Database Tables
FORM fetch_data .
Date Range Population
  r_date1-sign   = 'I'.
  r_date1-option = 'BT'.
  r_date1-low    = p_allgst.
  r_date1-high    = r_date1-low + p_tage1.
  APPEND r_date1.
  r_date2-sign   = 'I'.
  r_date2-option = 'BT'.
  r_date2-low    =  r_date1-high + 1.
  r_date2-high    = r_date1-low + p_tage2.
  APPEND r_date2.
  r_date3-sign   = 'I'.
  r_date3-option = 'BT'.
  r_date3-low    = r_date2-high + 1.
  r_date3-high    = r_date1-low + p_tage3.
  APPEND r_date3.
  r_date4-sign   = 'I'.
  r_date4-option = 'BT'.
  r_date4-low    = r_date3-high + 1.
  r_date4-high    = r_date1-low + p_tage4.
  APPEND r_date4.
Select the Customer Open Items data from bsid
  SELECT l~kunnr
         l1~name1
         b~waers
         b~dmbtr
         b~zfbdt
         b~zbd1t
         b~zbd2t
         b~zbd3t
         b~belnr
         b~xblnr
         b~shkzg
         b~blart
   INTO CORRESPONDING FIELDS OF TABLE int_bsid
   FROM knb1 AS l INNER JOIN kna1 AS l1
                ON lkunnr  = l1kunnr
       INNER JOIN   bsid AS b
         ON lkunnr  = bkunnr AND
            lbukrs  = bbukrs
         WHERE l~kunnr  IN s_kunnr AND
               l~bukrs = p_bukrs and
               b~zfbdt le p_allgst.
  IF SY-SUBRC <> 0.
    MESSAGE i000 WITH 'No Data found'(027).
  ENDIF.
Removing the date limit to get the due items in the past
  DELETE int_bsid WHERE
              ( blart  NE 'RE' AND blart  NE 'KR' ) OR
                shkzg  NE 'H'.
  SORT int_bsid BY kunnr.
ENDFORM.                    " fetch_data
*&      Form  header
Display the Report Columns
FORM header .
  v_tage1 = p_tage1 + 1.
  v_tage2 = p_tage2 + 1.
  v_tage3 = p_tage3 + 1.
  v_fidd = p_tage1.
  v_sedd = p_tage2.
  v_thdd = p_tage3.
  v_fodd = p_tage4.
  MOVE v_fodd0(4) TO v_fodd1(3).
  v_fodd+0(1) = space.
  CONCATENATE '1 to'(010) v_fidd INTO v_fir.
  CONCATENATE v_tage1 ' to '(011) v_sedd INTO v_sec.
  CONCATENATE v_tage2 ' to '(011) v_thdd INTO v_thir.
  CONCATENATE v_tage3 ' to '(011) space v_fodd INTO v_four.
Standard header
  clear: v_date1, v_str, v_str1, v_tage.
  write p_allgst to v_date1.
  Move  p_tage4 to v_tage.
  concatenate '>' v_tage text-025 into v_str1.
  concatenate
  'Summary of Ageing Analysis for Customer Open Invoices as on'(013)
   v_date1 into v_str separated by space.
  CALL FUNCTION 'Z_STANDARD_HEADER'
    EXPORTING
     title1 = 'Saudi International Petrochemical Company'(012)
     title2 = v_str.
  FORMAT COLOR OFF.
  WRITE  : /1(168) sy-uline.
  FORMAT COLOR 1 INTENSIFIED.
  WRITE :/1 sy-vline, 13 sy-vline, 49 sy-vline,
        50(101) 'Invoices Due For(In Days)'(014) CENTERED,
       151 sy-vline, 168 sy-vline .
  WRITE :/1 sy-vline,  2(11)  'Customer#'(015) CENTERED,
         13 sy-vline ,14(35) 'Customer Name'(016) CENTERED,
         49 sy-vline,
         50(101) sy-uline,151 sy-vline,
        152(16) 'Total'(017) CENTERED,
        168 sy-vline.
  WRITE : /1 sy-vline,13 sy-vline,      49 sy-vline,
          50(16) v_fir CENTERED,        66 sy-vline,
          67(16) v_sec CENTERED,        83 sy-vline,
          84(16) v_thir CENTERED,      100 sy-vline,
         101(16) v_four CENTERED,      117 sy-vline,
         118(16) v_str1 centered,      134 sy-vline,
         135(16) 'Already Overdue'(018) CENTERED,151 sy-vline,
         168 sy-vline.
  FORMAT COLOR OFF.
  WRITE  : /1(168) sy-uline.
ENDFORM.                    " header
*&      Form  basic_list
Display the Basic List
FORM basic_list .
  NEW-PAGE LINE-SIZE 168.
  LOOP AT int_bsid.
    CLEAR v_date.
    IF int_bsid-zbd3t <> ' '.
      v_date = int_bsid-zfbdt + int_bsid-zbd3t.
    ELSE.
      IF int_bsid-zbd2t <> ' '.
        v_date = int_bsid-zfbdt + int_bsid-zbd2t.
      ELSE.
        v_date = int_bsid-zfbdt + int_bsid-zbd1t.
      ENDIF.
    ENDIF.
    IF int_bsid-zbd1t = ' '.
      v_date = int_bsid-zfbdt.
    ENDIF.
    IF v_date IN r_date1.
      int_final-total1 =   int_final-total1 +  int_bsid-dmbtr.
    ELSEIF v_date IN r_date2.
      int_final-total2 =   int_final-total2 +  int_bsid-dmbtr.
    ELSEIF v_date IN r_date3.
      int_final-total3 =   int_final-total3 +  int_bsid-dmbtr.
    ELSEIF v_date IN r_date4.
      int_final-total4 =   int_final-total4 +  int_bsid-dmbtr.
    ELSEif v_date > r_date4-high.
      int_final-total5 =   int_final-total5 +  int_bsid-dmbtr.
    ELSEif v_date < p_allgst.
      int_final-total6 =   int_final-total6 +  int_bsid-dmbtr.
    ENDIF.
    AT END OF kunnr.
      v_flag = 1.
    ENDAT.
    IF v_flag = 1.
      int_final-kunnr = int_bsid-kunnr.
      int_final-name1 = int_bsid-name1.
      int_final-total =   int_final-total1 + int_final-total2 +
       int_final-total3 + int_final-total4 + int_final-total5 +
       int_final-total6.
      APPEND int_final.
      v_gtotal1 = v_gtotal1 + int_final-total1.
      v_gtotal2 = v_gtotal2 + int_final-total2.
      v_gtotal3 = v_gtotal3 + int_final-total3.
      v_gtotal4 = v_gtotal4 + int_final-total4.
      v_gtotal5 = v_gtotal5 + int_final-total5.
      v_gtotal6 = v_gtotal6 + int_final-total6.
      v_gtotal = v_gtotal + int_final-total.
      WRITE: /1 sy-vline,
              2 int_final-kunnr COLOR 4 INTENSIFIED ON,
             13 sy-vline,
             14 int_final-name1 COLOR 4 INTENSIFIED ON,
             49 sy-vline.
      DATA : v_rem.
      v_rem = sy-tabix MOD 2.
      IF v_rem NE 0.
        FORMAT COLOR 2 INTENSIFIED.
        WRITE :    50 int_final-total1 CURRENCY int_bsid-waers,
                   66 sy-vline,
                   67 int_final-total2 CURRENCY int_bsid-waers,
                   83 sy-vline,
                   84 int_final-total3 CURRENCY int_bsid-waers,
                  100 sy-vline,
                  101 int_final-total4 CURRENCY int_bsid-waers,
                  117 sy-vline,
                  118 int_final-total5 CURRENCY int_bsid-waers,
                  134 sy-vline,
                  135 int_final-total6 CURRENCY int_bsid-waers,
                  151 sy-vline,
                  152 int_final-total CURRENCY int_bsid-waers,
                  168 sy-vline.
      ELSE.
        WRITE :    50 int_final-total1 CURRENCY int_bsid-waers,
                   66 sy-vline,
                   67 int_final-total2 CURRENCY int_bsid-waers,
                   83 sy-vline,
                   84 int_final-total3 CURRENCY int_bsid-waers,
                  100 sy-vline,
                  101 int_final-total4 CURRENCY int_bsid-waers,
                  117 sy-vline,
                  118 int_final-total5 CURRENCY int_bsid-waers,
                  134 sy-vline,
                  135 int_final-total6 CURRENCY int_bsid-waers,
                  151 sy-vline,
                  152 int_final-total CURRENCY int_bsid-waers,
                  168 sy-vline.
      ENDIF.
      FORMAT COLOR OFF.
      HIDE int_final.
      CLEAR int_final.
      v_flag = 0.
    ENDIF.
    AT LAST.
      WRITE  : /1(168) sy-uline.
      FORMAT COLOR 3 INTENSIFIED.
      WRITE : /1 sy-vline,  2(47) 'GRAND TOTAL'(022) CENTERED,
              49 sy-vline, 50 v_gtotal1 CURRENCY int_bsid-waers,
              66 sy-vline, 67 v_gtotal2 CURRENCY int_bsid-waers,
              83 sy-vline, 84 v_gtotal3 CURRENCY int_bsid-waers,
             100 sy-vline,101 v_gtotal4 CURRENCY int_bsid-waers,
             117 sy-vline,118 v_gtotal5 CURRENCY int_bsid-waers,
             134 sy-vline,135 v_gtotal6 CURRENCY int_bsid-waers,
             151 sy-vline,152 v_gtotal CURRENCY int_bsid-waers,
             168 sy-vline.
      HIDE :  v_gtotal1,
              v_gtotal2,
              v_gtotal3,
              v_gtotal4,
              v_gtotal5,
              v_gtotal6,
              v_gtotal.
    ENDAT.
    FORMAT COLOR OFF.
  ENDLOOP.
  WRITE  : /1(168) sy-uline.
ENDFORM.                    " basic_list
*&      Form  line_selection
When double clicked on the line display the seconday list
FORM line_selection .
  NEW-PAGE LINE-SIZE 206.
Sy-lsind = 1.
  DATA : v_rem,v_cnt LIKE sy-tabix.
  v_cnt = 0.
  SORT int_bsid BY belnr zfbdt.
  LOOP AT int_bsid WHERE kunnr EQ int_final-kunnr.
    v_rem = v_cnt MOD 2.
    CLEAR v_date.
    IF int_bsid-zbd3t <> ' '.
      v_date = int_bsid-zfbdt + int_bsid-zbd3t.
    ELSE.
      IF int_bsid-zbd2t <> ' '.
        v_date = int_bsid-zfbdt + int_bsid-zbd2t.
      ELSE.
        v_date = int_bsid-zfbdt + int_bsid-zbd1t.
      ENDIF.
    ENDIF.
    IF int_bsid-zbd1t = ' '.
      v_date = int_bsid-zfbdt.
    ENDIF.
    IF v_rem NE 0.
      format color 2 intensified.
      WRITE :/1 sy-vline, 2 int_bsid-belnr,
             12 sy-vline,13 int_bsid-kunnr,
             23 sy-vline,24 int_bsid-name1,
             59 sy-vline,60 int_bsid-xblnr,
             76 sy-vline,77 int_bsid-zfbdt,
             87 sy-vline.
      WRITE : 104 sy-vline,121 sy-vline,
              138 sy-vline,155 sy-vline,
              172 sy-vline, 189 sy-vline,
              190 int_bsid-dmbtr CURRENCY int_bsid-waers,
              206 sy-vline.
      IF v_date IN r_date1.
        v_subtotal1 =   v_subtotal1 +  int_bsid-dmbtr.
        WRITE : 88 int_bsid-dmbtr  CURRENCY int_bsid-waers.
      ELSEIF v_date IN r_date2.
        v_subtotal2 =   v_subtotal2 +  int_bsid-dmbtr.
        WRITE : 105 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEIF v_date IN r_date3.
        v_subtotal3 =   v_subtotal3 +  int_bsid-dmbtr.
        WRITE : 122 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEIF v_date IN r_date4.
        v_subtotal4 =   v_subtotal4 +  int_bsid-dmbtr.
        WRITE : 139 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEif v_date > r_date4-high.
        v_subtotal5 =   v_subtotal5 +  int_bsid-dmbtr.
        WRITE : 156 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEif v_date < p_allgst.
        v_subtotal6 =   v_subtotal6 +  int_bsid-dmbtr.
        WRITE : 173 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ENDIF.
      format color off.
    ELSE.
      WRITE :/1 sy-vline, 2 int_bsid-belnr,
             12 sy-vline,13 int_bsid-kunnr,
             23 sy-vline,24 int_bsid-name1,
             59 sy-vline,60 int_bsid-xblnr,
             76 sy-vline,77 int_bsid-zfbdt,
             87 sy-vline.
      WRITE : 104 sy-vline,121 sy-vline,
              138 sy-vline,155 sy-vline,
              172 sy-vline,189 sy-vline,
              190 int_bsid-dmbtr CURRENCY int_bsid-waers,
              206 sy-vline.
      IF v_date IN r_date1.
        v_subtotal1 =   v_subtotal1 +  int_bsid-dmbtr.
        WRITE : 88 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEIF v_date IN r_date2.
        v_subtotal2 =   v_subtotal2 +  int_bsid-dmbtr.
        WRITE : 105 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEIF v_date IN r_date3.
        v_subtotal3 =   v_subtotal3 +  int_bsid-dmbtr.
        WRITE : 122 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEIF v_date IN r_date4.
        v_subtotal4 =   v_subtotal4 +  int_bsid-dmbtr.
        WRITE : 139 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEif v_date > r_date4-high.
        v_subtotal5 =   v_subtotal5 +  int_bsid-dmbtr.
        WRITE : 156 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ELSEif v_date < p_allgst.
        v_subtotal6 =   v_subtotal6 +  int_bsid-dmbtr.
        WRITE : 173 int_bsid-dmbtr CURRENCY int_bsid-waers.
      ENDIF.
    ENDIF.
    FORMAT COLOR OFF.
    v_cnt = v_cnt + 1.
  ENDLOOP.
  WRITE : /1(206) sy-uline.
  v_subtotal = v_subtotal1 + v_subtotal2 + v_subtotal3
              + v_subtotal4 + v_subtotal5 + v_subtotal6.
  FORMAT COLOR 3 INTENSIFIED.
  WRITE : /1 sy-vline,
             2(85) 'Total'(017) CENTERED CURRENCY int_bsid-waers ,
             87 sy-vline,
             88 v_subtotal1 CURRENCY int_bsid-waers,
            104 sy-vline,
            105 v_subtotal2 CURRENCY int_bsid-waers,
            121 sy-vline,
            122 v_subtotal3 CURRENCY int_bsid-waers,
            138 sy-vline,
            139 v_subtotal4 CURRENCY int_bsid-waers,
            155 sy-vline,
            156 v_subtotal5 CURRENCY int_bsid-waers,
            172 sy-vline,
            173 v_subtotal6 CURRENCY int_bsid-waers,
            189 sy-vline,
            190 v_subtotal CURRENCY int_bsid-waers,
            206 sy-vline.
  FORMAT COLOR OFF.
  WRITE : /1(206) sy-uline.
  CLEAR : v_subtotal,v_subtotal1,v_subtotal2,v_subtotal3,
          v_subtotal4,v_subtotal5,v_gtotal1,v_gtotal2,v_gtotal3,
          v_gtotal4, v_gtotal5,v_gtotal,v_subtotal6,v_gtotal6.
ENDFORM.                    " line_selection
*&      Form  header1
Secondary List Header
FORM header1 .
Standard header
  clear: v_date1, v_str, v_str1, v_tage.
  write p_allgst to v_date1.
  Move  p_tage4 to v_tage.
  concatenate '>' v_tage text-025 into v_str1.
  concatenate
   'Details of Ageing Analysis for Customer Open Invoices as on'(024)
    v_date1 into v_str separated by space.
  CALL FUNCTION 'Z_STANDARD_HEADER'
    EXPORTING
     title1 = 'Saudi International Petrochemical Company'(012)
     title2 =  v_str.
  FORMAT COLOR 1 intensified.
  WRITE  :/1(206) sy-uline.
  WRITE  :/1 sy-vline,12 sy-vline ,
          23 sy-vline,59 sy-vline,76 sy-vline,87 sy-vline,
          88(101) 'Invoices Due For(In Days)'(014) CENTERED,
         189 sy-vline,206 sy-vline.
  WRITE  : /1 sy-vline,  2(10) 'Doc Number'(021) CENTERED,
           12 sy-vline, 13(10) 'Customer#'(015) CENTERED,
           23 sy-vline, 24(35) 'Customer Name'(016) CENTERED,
           59 sy-vline, 60(16) 'Ref invoice#'(019) CENTERED,
           76 sy-vline, 77(10) 'Inv dt'(020) CENTERED,
           87 sy-vline, 88(101) sy-uline,
          189 sy-vline,190(16) 'Total'(017) CENTERED,
          206 sy-vline.
  WRITE : /1 sy-vline, 12 sy-vline,
           23 sy-vline,59 sy-vline,
           76 sy-vline,87 sy-vline,
           88(16) v_fir CENTERED, 104 sy-vline,
          105(16) v_sec CENTERED, 121 sy-vline,
          122(16) v_thir CENTERED, 138 sy-vline,
          139(16) v_four CENTERED, 155 sy-vline,
          156(16) v_str1 CENTERED,
          172    sy-vline,
          173(16) 'Already Overdue'(018) CENTERED,
          189 sy-vline,
          206 sy-vline.
          format color off.
  WRITE  : /1(206) sy-uline.
ENDFORM.                                                    " header1
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Regarding classical report

    Hi Experts,
    I have made a classical report having delivery no, sales order no and shipment no and many other details. Now I want to make three hot keys in this i.e
    Delivery no (VBELN)
    Sales order no (VBELV)
    and Shipment no (TKNUM)
    I did coding like this
    at LINE-SELECTION.
      DATA: l_vbeln TYPE VBELN_VL,
            l_vbelv type VBELV,
            l_tknum type TKNUM.
      get CURSOR FIELD likp-vbeln VALUE l_vbeln.
      set PARAMETER ID 'VL' FIELD l_vbeln.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    get CURSOR FIELD lips-vbelv VALUE l_vbelv.
      set PARAMETER ID 'AUN' FIELD l_vbeln.
      CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    get CURSOR FIELD vttp-tknum VALUE l_tknum.
      set PARAMETER ID 'TNR' FIELD l_tknum.
      CALL TRANSACTION 'VT03N' AND SKIP FIRST SCREEN.
    But I am facing a probelm in this:
    Whichever hot key i am clicking,it's opening all the transaction with that key for exam say I am clicking vbeln with value 'A' it's first opening VL03N. After this when i am clicking back, It's opening VAL0 with same key A (It's shoing Invalid Sales order no) and after that it's opeing VT03N with the same key.
    Please tell me how I can open only the trancation for which user is clicking.
    Thanks a lot
    Regards
    Krishan

    Hi,
    Pl. check this sample code..may be it will help u.
    *& Report  Z_DEMO_JG
    *& Download graphics from BDS
    REPORT  z_demo_jg.
    data: i_mara type standard table of mara.
    data: w_mara type mara.
    data: i_vbak type standard table of vbak.
    data: w_vbak type vbak.
    start-of-selection.
    select * from mara
    into table i_mara
    up to 10 rows.
    select * from vbak
    into table i_vbak
    up to 10 rows.
    loop at i_mara into w_mara.
    write : / w_mara-matnr.
    hide w_mara-matnr.
    endloop.
    loop at i_vbak into w_vbak.
    write : / w_vbak-vbeln.
    hide w_vbak-vbeln.
    endloop.
    clear : w_vbak,
            w_mara.
    at LINE-SELECTION.
    if not w_vbak-vbeln is initial.
    set PARAMETER ID 'VL' FIELD w_vbak-vbeln.
    CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    clear w_vbak-vbeln.
    endif.
    if not w_mara-matnr is initial.
    set PARAMETER ID 'MAT' FIELD w_mara-matnr.
    CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    clear w_mara-matnr.
    endif.
    Regards,
    JOy.

  • Help regarding classical report

    i want help reltated to classical report..
    1 .  i want to bold text for some lines ..how can i do it...plz tell me..
    2 . when i m printing classical report then in the printed page it show date and description of program but i want to hide it. plz help  me .
    i m new in abap .  thanks in advance..

    Hi,
    Changing font size in reports refer program DD_STYLE_TABLE.
    use NO STANDARD PAGE HEADING to hide description of program.
    Regards,
    Anil

  • Regarding allignment in classical report, need it urgently

    Iam strucking in dispalying the data in classical report.
    Iam working with hr module. My output should be in such a way that all the countries which iam taking in one internal table shuld be displayed in row.
    with regarding these countries I was fetching groups(designations) i.e like manager, submanager.And iam taking a count if Designation repeats for that particular country.iam getting the output, but in dispalying the problem is.
      i wil show  how the output shuld be
                                           india    MAlaysia  japan
    manager                                            1           
    deputymanager                                  2            1
    hr                                       1              2
    but my output is coming like this
                                   india    MAlaysia  japan
    manager                  1          
    deputymanager        2            1
    hr                           1              2
    count is displaying under first country.
    can anyone tell me how to move forward.

    Hi,
    Use the code as follows:
    *************LIST OUTPUT*****************
        FORMAT COLOR 1.
        WRITE:SY-VLINE, TEXT-003 ,
              19 SY-VLINE,21 TEXT-004,
              27 SY-VLINE,29 TEXT-001,
              39 SY-VLINE,41 TEXT-002,
              52 SY-VLINE,54 TEXT-005,
              61 SY-VLINE,63 TEXT-006,
              77 SY-VLINE,79 TEXT-007,
              91 SY-VLINE,93 TEXT-008,
              105 SY-VLINE,107 TEXT-009,
              123 SY-VLINE.
        ULINE AT (123).
        LOOP AT ITAB ."WHERE MBLNR = IMBLNR OR BUDAT1 IN S_BUDAT.
           uline at (137).
          FORMAT COLOR OFF.
          WRITE:/ SY-VLINE,ITAB-MBLNR UNDER TEXT-003,
                19 SY-VLINE,ITAB-MJAHR UNDER TEXT-004,
                27 SY-VLINE,ITAB-BUDAT1 UNDER TEXT-001,
                39 SY-VLINE,ITAB-ETIME UNDER TEXT-002,
                52 SY-VLINE,ITAB-WERKS UNDER TEXT-005,
                61 SY-VLINE,ITAB-LGORT UNDER TEXT-006,
                77 SY-VLINE,ITAB-BUDAT UNDER TEXT-007,
                91 SY-VLINE,ITAB-OIB_BLTIME UNDER TEXT-008,
                105 SY-VLINE,ITAB-VARIANCE UNDER TEXT-009,
                 123 SY-VLINE.
          ULINE AT (123).
        ENDLOOP.
    I used it in my report.Make changes in fields according to your requirement.
    hope it helps.
    Reward if helpful.
    Regards,
    Sipra

  • Querry regarding the classical report

    Hi Experts,
    I am developing a classical report for G/L account statement.
    I hv kept Document No as a selection criteria.
    In one particular document, der r three entries.....
    one of G/L, Vendor and Customer.
    Format is as follows....
    Document No   Fiscal yr   Account No   Short Text   Debit amt   Credit Amt
    My query is I want to display the vendor code n customer code in the Account No. column wen evr the entry is 4 vendor n customer respectively.
    For the G/L account it is displaying the right value......
    but 4 vendor n customer it is displaying reconsilation acc. no.
    Instead of which i hv to display the vendor code n customer code.
    Plzzz help.....with the source code

    try this:
    use field hkont as "help-field":
    case bseg-koart.
    when 'K'.
      move bseg-lifnr to hkont.
    when 'D'.
      move bseg-kunnr to hkont.
    when 'S'.
    *do nothingg
    endcase.
    hope that helps
    Message was edited by:
            Andreas Mann

  • Regarding - Multiple PDF Attachment and Classical report o/p to PDF

    Hello all,
    1.I am having a requirement wherein i have to convert a classical report o/p to PDF and send as an attachment.
    2.Again another challenge what i am facing here is, I have already triggered a PDF attachment mail in my code,
    Now they want me to convert a classical report o/p to PDF and send as an attachment along with the previous PDF in
    the same mail.
    Waiting for your replies.

    Hi ,
    There are many SDN threads related to this.
    Search SDN with ' Multiple Attachement by Mail'.
    Check these
    Re: Can we create multiple Smartform attachments on one e-mail?
    Re: send mail with multiple excel attachments
    And this is for PDF
    Multiple PDF attachments using CL_BCS Class

  • How to Print a text in bold format in a classic report ??

    How to Print a text in bold format in a classic report ??

    hi
    u can use
    <b>FORMAT  INTENSIFIED ON.</b>
    regards
    ravish
    reward if useful

  • How to set the number of rows displayed in a classical report at runtime?

    Hi,
    Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
    I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
    Regards, Tamas

    The link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
    It sounds like you have been trying to enter&mdash;unsuccessfully&mdash;an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application.

  • Display image in classical report

    Experts,
    Please share how to display image stored in SO10 in to a  classical report??

    Hi
    check this
    In the transaction OAOR, you should be able to insert your company Logo.
    GOTO - OAOR (Business Document Navigator)
    Give Class Name - PICTURES Class Type - OT..... then Execute
    It will show you the list, then select ENJOYSAP_LOGO.
    On that list, you will find one control with a "create" tab.
    Click std. doc types.
    Select SCREEN and double-click.
    It will push FILE selection screen.
    Select your company logo (.gif) and press OK.
    It will ask for a description- for instance: "company logo".
    It will let you know your doc has been stored successfully.
    You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
    Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
    FORM TOP-OF-PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEADING[]
    I_LOGO = 'ENJOYSAP_LOGO'
    I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.
    ENDFORM. "TOP-OF-PAGE
    Here 'ENJOYSAP_LOGO' will replace by ur created logo.
    Refer this link
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
    http://www.sap-img.com/abap/alv-logo.htm
    http://www.sap-img.com/fu002.htm
    Re: Logo on Login screen
    Re: To change image into main menu of sap
    Regards
    Anji

  • How to get add/edit button in classic report

    Hi,
    Iam trying to built a classic report,but here i need to have add/edit button.How can i achieve this in classic reports?
    I know this add/edit button with a pencil on note will come through the interactive report.
    But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page.Here he created a classic report with alternating rows but has an add/edit button to it.How could that be achieved??
    Can Anyone help me in this regard to built the My orders page including the add/edit navigation getting to order for items.How can tat sample application of My orders built?
    TIA,
    Regards,
    Kranthi.
    Edited by: Kranthi.K on Sep 29, 2009 12:38 AM

    One more doubt is
    But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page and when we hit add/edit image it directs us to the My orders info and order items.
    How can we build that page of My orders info and order items.Can anyone guide me through the steps the sample is created.
    I tried many times with master detail,but dint achieve what the default Sample Application has been done.
    Thanks in Advance
    Edited by: Kranthi.K on Sep 29, 2009 4:54 AM

  • Print Logo in Classic Report (Write Method,Not ALV)

    Hi All,
    I'm currently doing conversion of the All the Classic Report with addition of Header with 'LOGO'.
    I'm willing to find out that Function (CALL FUNCTION 'WWW_GET_MIME_OBJECT') is only able for display but not show out during printing.
    Is that any method, I can do it(Print with Logo) without conversion to SAP Script or Smartform that was exhausted.
    *Please take note is Classic Report with Write Method (Line by Line), Not ALV.
    Thank you all in advance
    Regards,
    Trevor Wong.

    Hi,
    It is possible to include logo in classical report but its not possible to print logo in classical report. It can be done in ALV's.
    Write  the code in Top-of-page event in ALV.
    The following is the code for inserting the logo in ALV.
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
               I_LOGO             = 'ENJOYSAP_LOGO'
                IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.
    Regards
    Purnand

  • How to Link column header only in classic Report in APEX 4.1

    Hello Everybody,
    Probably there is a simpler way to do this, but I am not sure. I want a link on column header in Report on a specific column. The link will take me to new region or a page.
    How to achieve this in APEX 4.1
    Theme : Blue 2
    Database 11g
    I see there is a column link opiton, but that creates link for every row in that column on a specific icon, I just want link on a title of the column in Classic Report.
    For Example,
    if there are two columns Name and Client ID, which has 10 records to display on a classic report. I wan the link on Client ID on header only not on the records.
    Can anybody provide some simple solution for this.
    Thanks,
    --CP
    Edited by: cpora007 on Jun 22, 2012 10:38 AM

    Hello,
    I didn't understand, what do you mean by default it is going to sort popup. I have a classic report based on SQL, which generates a report with static header, there is no sort or any other link on that.
    I added a link in column header name with an anchor. It works and takes to the new page.
    But it is not a proper solution. A solution based on Jquery dynamic action is preferable. Also the preferred option is that the link opens a hidden region of the same page at the same location of the report and the report gets hidden. after the procession on the form region and submitting the update/ insert process. the report region shows up with the change data.
    Moving on to new page is 2nd option, if the first do not work.
    In the JavaScript, put: apex.submit("GO_TO_MY_OTHER_PAGE");
    On the page, create a Branch to the Second page. Set the condition to Request=Expression 1. Set the request to "GO_TO_MY_OTHER_PAGE"
    On which page I need to create a branch?, Is it on the report page or the form page.
    Thanks a lot for the response. I appreciate your kind efforts in this regard.
    --CP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Going back to same row after saving changes in classic report

    dear all,
    I have a long classic report .User is able to update different rows of this report using MR update process.Now user is asking for easier flow.What he wants is to be able to go back to same row after he saves the changes.How is it possible to do so
    Thank you so much,
    Zahra

    Hi,
    I have one sample
    https://apex.oracle.com/pls/apex/f?p=40323:40
    When you change Active column select list, page is submitted. After submit JavaScript scrolls report
    See this post about details
    HELP TABULAR FORM CURSOR FOCUS
    Regards,
    Jari

  • Highligh current row not working for classic report in 4.1

    Hello experts,
    One of our customers is migrating applications from APEX 3.0 to 4.1.
    All their applications use classic reports because interactive reports didn't exist in 3.0.
    The end users of the applications like the row color changing when they hover there mouse over the rows (highlight current row) and they insist on keeping this "functionality" in the applications.
    For some reason, this "functionality" doesn't work anymore after the migration to APEX 4.1.
    I thought it was something theme related so I created a new application with a classic report, tried some APEX built-in themes, and with none of them, I manage to get the highlight current row working.
    For interactive reports it is not an issue.
    Is this an undocumented no-longer-available feature of APEX 4.x or has there changed something which caused this functionality to stop working??
    Regards,
    Bart

    Hi,
    I created a service request for this issue, and the support analyst that helped me confirmed that this is a bug:
    "I have created the bug :
    Bug 13584762 - ROW HIGHLIGHTING NO MORE WORKS IN CLASSIC REPORT IN APEX 4.1
    While working on the problem , I have found the following solution in order to make the Row HighLightng work in APEX 4.1
    In the apex_4_1.min.js (file located in images\javascript ) , Search for :
    function setRowHighlight(a){apex.jQuery("#report_"+a+" .highlight-row").live("hover",function(b)
    and replace "hover" by "mouseover mouseout" :
    After the modification :
    function setRowHighlight(a){apex.jQuery("#report_"+a+" .highlight-row").live("mouseover mouseout",function(b)
    A refresh in the browser may be necessary in order to "reload" the file apex_4_1.min.js"
    I implemented the suggested workaround and this solved the problem!
    HTH,
    Matthias Hoys

  • Adding the Checkbox for each row in classic report

    Hello,
    I have created classic report with checkboxes in each row and added the On-Submit process, BUTTON CONDITIONAL, to determine the behavior of the checkboxes. The PL/SQL process is suppose to delete the selected row from database.
    I am getting the Success message, but When I check the database, the row still persist in the database.
    PLSQL CODE:
    FOR i IN 1..apex_application.g_f01.count LOOP
    DELETE 
    FROM
      registry 
    WHERE
      reg_id = apex_application.g_f01(i);END LOOP;
    ORACLE APEX: 4.2
    Thank you

    Hi ApexNewLearner,
    Try this
    DECLARE
    j number;
    BEGIN
    FOR i IN 1..apex_application.g_f01.count LOOP
      j := apex_application.g_f01(i);
      DELETE FROM  registry
      WHERE  reg_id = apex_application.g_f01(j);
    END LOOP;
    END;
    or better try to replicate your issue on apex.oracle.com , that is easy for users to investigate the issue and give you appropriate solution.
    Hope this helps you,
    Regards,
    Jitendra

Maybe you are looking for