How to print column wise records

Hi,
I am very sorry.
Actually i have searched many pages but i didn't find my solution.
plez any body halp me out from this problem..
Actually my table structure is this..
Employe_payroll:-
Empid|Salary|Month|Year
So record stores in row wise in each month salary processing..
so i can easly get these each month records in row wise.
but i need to get these records like this.
Empid should be constant and it will print each month records in column wise..
plez kindely help me..

just a concept. You may need to fine tune the query as per your columns
SELECT          empid,
                SUM(jan) "jan", SUM(feb) "feb", SUM(mar) "mar"
FROM
(SELECT   empid,
        DECODE(month,'01',sal,0) jan,
        DECODE(month,'02',sal,0) feb,
        DECODE(month,'03',sal,0) mar
  FROM    emp
GROUP BY   empid;Edited by: hard_stone on Mar 1, 2010 12:13 PM

Similar Messages

  • How to print column wise istead of row wise

    Hi,
    please help on this..
    i want to print coloumn wise Employee data instead of row wise.
    Keeping Employee name constant i want to print month wise salary..
    Like this..
    Employee name|Jan-2010-Wages paid|Feb-2010-Wages paid
    soon...
    Plez help me..
    Edited by: user651567 on Feb 28, 2010 5:30 AM

    Please post CREATE TABLE and a few INSERT statements as well as your desired output and your database version.
    Always put the tag before and after your examples to keep it formatted.
    See the FAQ regarding tags: http://forums.oracle.com/forums/help.jspa (scroll a bit down).
    You might want to search this forum first (search box is on right side of screen), since your question has been asked and explained before.
    Also, regarding string aggregation. see this link explaining various techniques (depending on database version):
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to print Column Labels on each print page of an ALV report

    Hi,
    I have an ALV report which is of 10 print pages.
    I need to print Column Labels on each print page.
    How it is possible.
    Plz write the solution
    Narendra

    Hi Narendra
    try this code.
    reward pts if help.
    Deepanker.
    *& Report  ZDEMO_ALVGRID_EDIT                                          *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic ALV grid, Enhanced to display specific fields as          *
    *& editable depending on field value                                   *
    REPORT  ZDEMO_ALVGRID_EDIT                 .
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat,     "slis_t_fieldcat_alv WITH HEADER LINE,
          wa_fieldcat TYPE lvc_s_fcat,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM set_specific_field_attributes.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      wa_fieldcat-fieldname   = 'EBELN'.
      wa_fieldcat-scrtext_m   = 'Purchase Order'.
      wa_fieldcat-col_pos     = 0.
      wa_fieldcat-outputlen   = 10.
      wa_fieldcat-emphasize   = 'X'.
      wa_fieldcat-key         = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'EBELP'.
      wa_fieldcat-scrtext_m   = 'PO Item'.
      wa_fieldcat-col_pos     = 1.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'STATU'.
      wa_fieldcat-scrtext_m   = 'Status'.
      wa_fieldcat-col_pos     = 2.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'AEDAT'.
      wa_fieldcat-scrtext_m   = 'Item change date'.
      wa_fieldcat-col_pos     = 3.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-scrtext_m   = 'Material Number'.
      wa_fieldcat-col_pos     = 4.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MENGE'.
      wa_fieldcat-scrtext_m   = 'PO quantity'.
      wa_fieldcat-col_pos     = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MEINS'.
      wa_fieldcat-scrtext_m   = 'Order Unit'.
      wa_fieldcat-col_pos     = 6.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'NETPR'.
      wa_fieldcat-scrtext_m   = 'Net Price'.
      wa_fieldcat-edit        = 'X'. "sets whole column to be editable
      wa_fieldcat-col_pos     = 7.
      wa_fieldcat-outputlen   = 15.
      wa_fieldcat-datatype     = 'CURR'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'PEINH'.
      wa_fieldcat-scrtext_m   = 'Price Unit'.
      wa_fieldcat-col_pos     = 8.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_user_command = 'USER_COMMAND'
                is_layout_lvc               = gd_layout
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  set_specific_field_attributes
          populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    The following code sets it to be disabled(display only) if 'NETPR'
    is gt than 10.
      LOOP AT it_ekko INTO wa_ekko.
        IF wa_ekko-netpr GT 10.
          ls_stylerow-fieldname = 'NETPR' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa_ekko-field_style.
          MODIFY it_ekko FROM wa_ekko.
        ENDIF.
      ENDLOOP.
    endform.                    " set_specific_field_attributes
    pls reward pts is help,

  • How to print the error records and success records in bdc

    how to print the number of error records and success records in bdc

    hai,
    plz refer this program,
    Z_130399130271_A
    REPORT Z_130399130271_A
           NO STANDARD PAGE HEADING LINE-SIZE 325.
    *INCLUDE YVALIDATE.
    *include bdcrecx1.
    INCLUDE YINCLUDE399.
    DATA ITAB LIKE TABLE OF FILE_TABLE WITH HEADER LINE.
    PARAMETERS: DATASET(132) LOWER CASE.
    DATA : RC TYPE I,
    ERR(40) TYPE C,
    SUCCESSCNT TYPE I VALUE 0,
    FAILCOUNT TYPE I VALUE 0.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    DATA: BEGIN OF RECORD OCCURS 0,
    data element: LIF16
            LIFNR_001(016),
    data element: KTOKK
            KTOKK_002(004),
    data element: ANRED
            ANRED_003(015),
    data element: NAME1_GP
            NAME1_004(035),
    data element: SORTL
            SORTL_005(010),
    data element: STRAS_GP
            STRAS_006(035),
    data element: PFACH
            PFACH_007(010),
    data element: ORT01_GP
            ORT01_008(035),
    data element: ORT02_GP
            ORT02_009(035),
    data element: LAND1_GP
            LAND1_010(003),
    data element: REGIO
            REGIO_011(003),
    data element: SPRAS
            SPRAS_012(002),
    data element: TELF1
            TELF1_013(016),
    data element: TELF2
            TELF2_014(016),
    data element: BANKS
            BANKS_01_015(003),
    data element: BANKK
            BANKL_01_016(015),
    data element: BANKN
            BANKN_01_017(018),
          END OF RECORD.
    DATA:   BEGIN OF ERRORITAB OCCURS 0,
            LIFNR_001 LIKE LFA1-LIFNR,
            KTOKK_002 LIKE LFA1-KTOKK,
            ANRED_003 LIKE LFA1-ANRED,
            NAME1_004 LIKE LFA1-NAME1,
            SORTL_005 LIKE LFA1-SORTL,
            STRAS_006 LIKE LFA1-STRAS,
            PFACH_007 LIKE LFA1-PFACH,
            ORT01_008 LIKE LFA1-ORT01,
            ORT02_009 LIKE LFA1-ORT02,
            LAND1_010 LIKE LFA1-LAND1,
            REGIO_011 LIKE LFA1-REGIO,
            SPRAS_012 LIKE LFA1-SPRAS,
            TELF1_013 LIKE LFA1-TELF1,
            TELF2_014 LIKE LFA1-TELF2,
            BANKS_01_015 LIKE LFBK-BANKS,
            BANKL_01_016 LIKE LFBK-BANKL,
            BANKN_01_017 LIKE LFBK-BANKN,
            ERRORMSG(60) TYPE C,
            SERIAL TYPE I VALUE '1',
        END OF ERRORITAB.
    End generated data section ***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR DATASET.
      CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
    EXPORTING
        WINDOW_TITLE            = 'select a file '
        DEFAULT_EXTENSION       = 'TXT'
        DEFAULT_FILENAME        = 'ASSIGN5.TXT'
      FILE_FILTER             =
      INIT_DIRECTORY          =
      MULTISELECTION          =
    IMPORTING
      RC                      =
        TABLES
          FILE_TABLE              = ITAB
    EXCEPTIONS
       CNTL_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.
      READ TABLE ITAB INDEX 1.
      DATASET = ITAB-FILENAME.
      WRITE DATASET.
    START-OF-SELECTION.
    *perform open_dataset using dataset.
    *perform open_group.
      DATA T TYPE STRING.
      T = DATASET.
      IF T EQ ' '.
        MESSAGE E110(ZX).
      ENDIF.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = T
      FILETYPE                      = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = RECORD
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT RECORD.
        CLEAR RC.
        CLEAR ERR.
    *read dataset dataset into record.
        IF SY-SUBRC <> 0. EXIT. ENDIF.
        RECORD-KTOKK_002 = '0001'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0100'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RF02K-KTOKK'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'RF02K-LIFNR'
                                      RECORD-LIFNR_001.
        PERFORM BDC_FIELD       USING 'RF02K-KTOKK'
                                      RECORD-KTOKK_002.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0110'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFA1-TELX1'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM BDC_FIELD       USING 'LFA1-ANRED'
                                      RECORD-ANRED_003.
        PERFORM BDC_FIELD       USING 'LFA1-NAME1'
                                      RECORD-NAME1_004.
        PERFORM BDC_FIELD       USING 'LFA1-SORTL'
                                      RECORD-SORTL_005.
        PERFORM BDC_FIELD       USING 'LFA1-STRAS'
                                      RECORD-STRAS_006.
        PERFORM BDC_FIELD       USING 'LFA1-PFACH'
                                      RECORD-PFACH_007.
        PERFORM BDC_FIELD       USING 'LFA1-ORT01'
                                      RECORD-ORT01_008.
        PERFORM BDC_FIELD       USING 'LFA1-ORT02'
                                      RECORD-ORT02_009.
        PERFORM BDC_FIELD       USING 'LFA1-LAND1'
                                      RECORD-LAND1_010.
        PERFORM BDC_FIELD       USING 'LFA1-REGIO'
                                      RECORD-REGIO_011.
        PERFORM BDC_FIELD       USING 'LFA1-SPRAS'
                                      RECORD-SPRAS_012.
        PERFORM BDC_FIELD       USING 'LFA1-TELF1'
                                      RECORD-TELF1_013.
        PERFORM BDC_FIELD       USING 'LFA1-TELF2'
                                      RECORD-TELF2_014.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0120'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFA1-KUNNR'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=VW'.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0130'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFBK-BANKN(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM BDC_FIELD       USING 'LFBK-BANKS(01)'
                                      RECORD-BANKS_01_015.
        PERFORM BDC_FIELD       USING 'LFBK-BANKL(01)'
                                      RECORD-BANKL_01_016.
        PERFORM BDC_FIELD       USING 'LFBK-BANKN(01)'
                                      RECORD-BANKN_01_017.
        PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0130'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'LFBK-BANKS(01)'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=UPDA'.
        PERFORM BDC_TRANSACTION USING 'XK01' CHANGING ERR RC.
        DATA: SERIAL TYPE I VALUE 1.
        IF RC <> 0.
          FAILCOUNT = FAILCOUNT + 1.
          CLEAR ERRORITAB.
          ERRORITAB-SERIAL = SERIAL.
          ERRORITAB-LIFNR_001 = RECORD-LIFNR_001.
          ERRORITAB-KTOKK_002 = RECORD-KTOKK_002.
          ERRORITAB-ANRED_003 = RECORD-ANRED_003.
          ERRORITAB-NAME1_004 = RECORD-NAME1_004.
          ERRORITAB-SORTL_005 = RECORD-SORTL_005.
          ERRORITAB-STRAS_006 = RECORD-STRAS_006.
          ERRORITAB-PFACH_007 = RECORD-PFACH_007.
          ERRORITAB-ORT01_008 = RECORD-ORT01_008.
          ERRORITAB-ORT02_009 = RECORD-ORT02_009.
          ERRORITAB-LAND1_010 = RECORD-LAND1_010.
          ERRORITAB-REGIO_011 = RECORD-REGIO_011.
          ERRORITAB-SPRAS_012 = RECORD-SPRAS_012.
          ERRORITAB-TELF1_013 = RECORD-TELF1_013.
          ERRORITAB-TELF2_014 = RECORD-TELF2_014.
          ERRORITAB-BANKS_01_015 = RECORD-BANKS_01_015.
          ERRORITAB-BANKL_01_016 = RECORD-BANKL_01_016.
          ERRORITAB-BANKN_01_017 = RECORD-BANKN_01_017.
          ERRORITAB-ERRORMSG = ERR.
          SERIAL = SERIAL + 1.
          APPEND ERRORITAB.
          MODIFY RECORD TRANSPORTING KTOKK_002.
          DELETE RECORD WHERE KTOKK_002 = '0001'.
        ELSE.
          SUCCESSCNT = SUCCESSCNT + 1.
        ENDIF.
      ENDLOOP.
    display output********************************************************
      SKIP.
      FORMAT COLOR 5 INTENSIFIED OFF.
      WRITE:/ 'No. of records successfully uploaded: '.
      FORMAT COLOR 4 INTENSIFIED OFF.
      WRITE: SUCCESSCNT.
    Displaying the success table******************************************
      IF SUCCESSCNT <> 0.
        SKIP.
        FORMAT COLOR 4 INTENSIFIED OFF.
        WRITE:/ 'Successful Records'.
        FORMAT COLOR 7 INTENSIFIED ON.
        WRITE:/(261) SY-ULINE,
              / SY-VLINE,
                'S.NO',                               007 SY-VLINE,
                'VENDOR ACC.NUM',                     023 SY-VLINE,
                'VENDOR ACC GROUP',                   041 SY-VLINE,
                'TITLE',                              048 SY-VLINE,
                'VENDOR NAME',                        064 SY-VLINE,
                'SORT FIELD',                         076 SY-VLINE,
                'HOUSE NO.& STREET',                  101 SY-VLINE,
                'PO.BOX NO',                          116 SY-VLINE,
                'CITY',                               129 SY-VLINE,
                'DISTRICT',                           141 SY-VLINE,
                'COUNTRY KEY',                        156 SY-VLINE,
                'REGION',                             166 SY-VLINE,
                'LANGUAGE KEY',                       180 SY-VLINE,
                'TELEPHONE NO 1',                     196 SY-VLINE,
                'TELEPHONE NO 2',                     213 SY-VLINE,
                'BANK COUNTRY KEY',                   231 SY-VLINE,
                'BANK KEY',                           241 SY-VLINE,
                'BANK ACC.NO',                        261 SY-VLINE,
                /1(261) SY-ULINE.
        FORMAT COLOR 4 INTENSIFIED ON.
        SERIAL = 1.
       SORT RECORD BY LIFNR_001.
        LOOP AT RECORD.
          WRITE:/ SY-VLINE,
          SERIAL LEFT-JUSTIFIED,          007 SY-VLINE,
          RECORD-LIFNR_001(016),          023 SY-VLINE,
          RECORD-KTOKK_002(004),          041 SY-VLINE,
          RECORD-ANRED_003(015),          048 SY-VLINE,
          RECORD-NAME1_004(035),          064 SY-VLINE,
          RECORD-SORTL_005(010),          076 SY-VLINE,
          RECORD-STRAS_006(035),          101 SY-VLINE,
          RECORD-PFACH_007(010),          116 SY-VLINE,
          RECORD-ORT01_008(035),          129 SY-VLINE,
          RECORD-ORT02_009(035),          141 SY-VLINE,
          RECORD-LAND1_010(003),          156 SY-VLINE,
          RECORD-REGIO_011(003),          166 SY-VLINE,
          RECORD-SPRAS_012(002),          180 SY-VLINE,
          RECORD-TELF1_013(016),          196 SY-VLINE,
          RECORD-TELF2_014(016),          213 SY-VLINE,
          RECORD-BANKS_01_015(003),       231 SY-VLINE,
          RECORD-BANKL_01_016(015),       241 SY-VLINE,
          RECORD-BANKN_01_017(018),       261 SY-VLINE.
          WRITE:/(261) SY-ULINE.
          SERIAL = SERIAL + 1.
        ENDLOOP.
        WRITE:/1(261) SY-ULINE.
      ENDIF.
      SKIP.
      FORMAT COLOR 5 INTENSIFIED OFF.
      WRITE:/ 'No. of records not uploaded: '.
      FORMAT COLOR 4 INTENSIFIED OFF.
      WRITE: FAILCOUNT.
    *Displaying the error table
      IF FAILCOUNT <> 0.
        SKIP.
        FORMAT COLOR 4 INTENSIFIED OFF.
        WRITE:/(320) SY-ULINE,
                'Error Records'.
        FORMAT COLOR 7 INTENSIFIED ON.
        WRITE:/ SY-ULINE, SY-VLINE,
                'S.NO',                               007 SY-VLINE,
                'VENDOR ACC.NUM',                     023 SY-VLINE,
                'VENDOR ACC GROUP',                   041 SY-VLINE,
                'TITLE',                              048 SY-VLINE,
                'VENDOR NAME',                        064 SY-VLINE,
                'SORT FIELD',                         076 SY-VLINE,
                'HOUSE NO.& STREET',                  101 SY-VLINE,
                'PO.BOX NO',                          116 SY-VLINE,
                'CITY',                               129 SY-VLINE,
                'DISTRICT',                           141 SY-VLINE,
                'COUNTRY KEY',                        156 SY-VLINE,
                'REGION',                             166 SY-VLINE,
                'LANGUAGE KEY',                       180 SY-VLINE,
                'TELEPHONE NO 1',                     196 SY-VLINE,
                'TELEPHONE NO 2',                     213 SY-VLINE,
                'BANK COUNTRY KEY',                   231 SY-VLINE,
                'BANK KEY',                           241 SY-VLINE,
                'BANK ACC.NO',                        261 SY-VLINE,
                'ERROR MESSAGE',                      320 SY-VLINE.
        WRITE:/(320) SY-ULINE.
        FORMAT COLOR 4 INTENSIFIED ON.
       SORT ERRORITAB BY LIFNR_001.
        LOOP AT ERRORITAB.
          WRITE:/ SY-VLINE,
                ERRORITAB-SERIAL LEFT-JUSTIFIED,          007 SY-VLINE,
                ERRORITAB-LIFNR_001 ,       023 SY-VLINE,
                ERRORITAB-KTOKK_002,       041 SY-VLINE,
                ERRORITAB-ANRED_003,       048 SY-VLINE,
                ERRORITAB-NAME1_004,       064 SY-VLINE,
                ERRORITAB-SORTL_005,       076 SY-VLINE,
                ERRORITAB-STRAS_006,       101 SY-VLINE,
                ERRORITAB-PFACH_007,       116 SY-VLINE,
                ERRORITAB-ORT01_008,       129 SY-VLINE,
                ERRORITAB-ORT02_009,       141 SY-VLINE,
                ERRORITAB-LAND1_010,       156 SY-VLINE,
                ERRORITAB-REGIO_011,       166 SY-VLINE,
                ERRORITAB-SPRAS_012,       180 SY-VLINE,
                ERRORITAB-TELF1_013,       196 SY-VLINE,
                ERRORITAB-TELF2_014,       213 SY-VLINE,
                ERRORITAB-BANKS_01_015,    231 SY-VLINE,
                ERRORITAB-BANKL_01_016,    241 SY-VLINE,
                ERRORITAB-BANKN_01_017,    261 SY-VLINE,
                ERRORITAB-ERRORMSG,        320 SY-VLINE.
          WRITE:/(320) SY-ULINE.
        ENDLOOP.
        WRITE:/ SY-ULINE.
      ENDIF.
    hope this ll help you..
    regards,
    prema.A

  • How to print column's value on each page as a header in XML Publisher

    Hi,
    I have requirements like, there are some fields that I need to print on header level in RTF file. Output file should looks like below.
    LN-1) Company_Name     Tax ID-1     Tax ID-2     Report_Type     Page No: Year/001
    LN-2) Company_Address
    LN-3) MONTH-YEAR
    LN-4) Invoice ID     Invoice Date     Tax Code     Supplier Name     Amount
    Example:
    LN-1) Global Infra.     123     321     General Purchase     Page No: 2012/001
    LN-2) NewYork, USA
    LN-3) JANUARY-2012
    LN-4) Invoice ID     Invoice Date     Tax Code     Supplier Name     Amount
    3454 03-JAN-12 Tax-1 ABCD Corp. 100
    5678 14-JAN-12 Tax-2 Kant Brothers 200
    LN (Line Number)-1,2,3 should be at header level and needs to print on each page. LN-4 are fields of table which will return data. When year changes on Page No. field - page no. should restart from 1 and all records for a particular MONTH-YEAR should be grouped on month-year basis.                
    I have done page no. thing as if year change, page no. reset to 1 by using "Section Break" on first FOR loop. Later I applied second FOR loop to group data on MONTH-YEAR basis. Here I am getting all records for that particular month (e.g - JANUARY-2012) and MONTH-YEAR is printing on FIRST page. If records are more and lines are going into next page, then I am not getting MONTH-YEAR on second page. I am getting only first 2 lines (means LN-1 & LN-2) on second page at header level and records of that MONTH-YEAR but missing MONTH-YEAR value (JANUARY-2012) on second page. My requirement is to print first 3 lines on each page.
    Here Company_Name, Report_Type and MONTH-YEAR are dynamic columns which are holding run time values.
    I tried number of ways but didn't get success. Kindly help me to fix this issue and please let me know if you need more details to understand this issue.
    Kind Regards,
    Umakant

    Hi Umakant,
    Can you please forward me your template and sample XML data so that i can look into it and will try to fix it. My email id is [email protected]
    Thanks,
    Omkar Deshpande.

  • How to print 2 pernr records on two pages

    hi all
    the senario is i have designed form in smartforms in which i have header  in header window.  i have declare table in main window. in wihich i have header main area nad footer.
    i have records like that in  itab
    eno month           1          2               3             4              5          6             7   totalp           totala   "Hard Coded in Table header"
      54       NOV           P           a               p            a               p           a             p     4                3
       54      DEC             a           a               a            a               a           a             a      0               7
    the same record for eno 55 is also in itab.
    the problem is that all the records of 54 and 55 are printer in one main area and one header on that page .
    i want  that the record of eno55 is print on the saparate format on next page .
    help me out plz
    Regards
    ammad

    Itacas
    Welcome to the HP Community Forum.
    There are various Utilities available to divide a photo for printing -- as far as I am aware, you have to split the photo / image before you print it.
    For example, the following might be of use, or at least give you some ideas:
    How to Divide a Big Picture & Print It on Several Pages
    Gimp 2.8.1.4 for Windows
    Click the Kudos Thumbs-Up to show you appreciate the help.
    Click Accept as Solution when the Answer is a good Fix or Workaround!
    Although I strive to reflect HP's best practices, I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • How to split column wise into separate flat files in ssis

    IN SSIS...
    1.---->I have a sales table country wise regions  like (india, usa, srilanka) ....
    india usa
    srilanka
    a b
    c
    d e
    f
    so i want output like in
    flat file1.txt has india               flat file2.txt has usa             flat file3.txt has srilanka
         a b
    c
         d e
    f
    2.----->i dont know how many regions in my table....dynamically split into separate flat files ....
     pls help me.....thank u

    I think what you can do is this
    1. Do a query based on UNPIVOT to get the data as rows instead of columns
    For that you can use a query like this
    IF OBJECT_ID('temp') IS NOT NULL DROP TABLE temp
    CREATE TABLE temp
    Country varchar(100),
    Val decimal(25,5)
    DECLARE @CountryList varchar(3000),@SQL varchar(max)
    SELECT @CountryList = STUFF((SELECT ',[' + Column_Name + ']' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '<SalesTableNameHere>' FOR XML PATH('')),1,1,'')
    SET @SQL= 'SELECT * FROM <SalesTableNameHere> t UNPIVOT (Val FOR Country IN (' + @CountryList + '))p'
    INSERT temp
    EXEC (@SQL)
    Once this is done you'll get data unpivoted to table
    Then you can use a execute sql task with query like above
    SELECT DISTINCT Country FROM Temp
    Use resultset option as full resultset and store the result to an object variable
    Then add a ForEach loop container with ADO enumerator and map to the object variable created above. Have variables inside loop to get inidvidual country values out.
    Inside loop place a data flow task. Use a variable to store source query , make EvaluateAsExpression true for it and set Expression as below
    "SELECT Val FROM Temp WHERE Country = " + @[User::LoopVariable]
    Where LoopVariable is variable created inside loop for getting iterated values
    Inside data flow task place a oledb source, choose option as  SQL command from variable and map to the above query variable.
    Link this to flat file destination create a flat file connection manager. Set a dynamic flat file connection using expression builder. Make it based on a variable and set variable to increment based on loop iteration
    The core logic looks similar to this
    http://visakhm.blogspot.ae/2013/09/exporting-sqlserver-data-to-multiple.html
    dynamic file naming can be seen here
    http://jahaines.blogspot.ae/2009/07/ssis-dynamically-naming-destination.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to print database table records in graphical format?

    In ABAP Editor,I put select query on one database table and fetch few records .Now I want to show these records in BAR Graph / pie chart.Kindly let me know is it possible and how?
    Thanks in advance.
    Edited by: rushah on May 21, 2009 5:30 AM

    Hi Hadiman,
    Can you please elaborate more on it.
    Like my code is......
    SELECT * FROM trfcqout
      INTO CORRESPONDING FIELDS OF itab
      WHERE ( qstate = 'SYSFAIL' OR qstate = 'CPICERR' OR errmess <> '' )
    and ( QRFCDATUM >= date-low and QRFCDATUM <= date-high ).
        count = 0.
        if itab is not initial.
          SELECT * FROM trfcqout
          INTO CORRESPONDING FIELDS OF itab1
          WHERE qname = itab-qname AND errmess = ''.
            count = count + 1.
          ENDSELECT.
          itab-retrydate = sysdate.
          itab-retrytime = systime.
          itab-qtype = 'OUTBOUND'.
          itab-nentries = count - 1.
          append itab.
          MODIFY zqueue FROM itab.
        endif.
      ENDSELECT.
    Print details on Report
      write: / sy-vline no-gap,(7) 'QTYPE' COLOR 1, sy-vline no-gap,(23)
    'QNAME' COLOR 1,sy-vline no-gap,(14) 'QSTATE' COLOR 1, sy-vline no-gap,
    (54) 'Error' COLOR 1,sy-vline no-gap,(10) 'Number' COLOR 1.
      uline.
      LOOP AT itab.
        write: /   sy-vline no-gap,  (8)  itab-qtype no-gap,
                   sy-vline no-gap,  (24) itab-qname no-gap,
                   sy-vline no-gap,  (15) itab-qstate no-gap,
                   sy-vline no-gap,  (55) itab-errmess no-gap,
                   sy-vline no-gap,  (10) itab-nentries no-gap.
      ENDLOOP.
      uline.
      refresh itab.
    endform.                    "queuedata
    Now I want to print data in graphical form. how to do that?

  • How to convert columns of record into multiple rows

    Hi,
    I have the following data:
    Col1 Col2 Col3
    Dat1 Dat2 Dat3
    I would like to convert the above data into:
    Col1
    Dat1
    Dat2
    Dat3
    How can I achieve this beside using UNION?
    Appreciate advise urgently.
    Thanks and Regards,
    Shiau Chin

    Sorry, I misread your reqs. Is this what you are looking for:
    with t as (
               select 'Row1Dat1' col1,'Row1Dat2' col2,'Row1Dat3' col3,'Row1Dat4' col4 from dual union all
               select 'Row2Dat1' col1,'Row2Dat2' col2,'Row2Dat3' col3,'Row2Dat4' col4 from dual
    select  col4 col1,
            case lvl
              when 1 then col1
              when 2 then col2
              when 3 then col3
              else col4
            end col2
      from  t,
            (select level lvl from dual connect by level <= 3)
    COL1     COL2
    Row1Dat4 Row1Dat1
    Row2Dat4 Row2Dat1
    Row1Dat4 Row1Dat2
    Row2Dat4 Row2Dat2
    Row1Dat4 Row1Dat3
    Row2Dat4 Row2Dat3
    6 rows selected.
    SQL> SY.

  • How to print data in h:dataTable by column wise

    I've Arraylist holding of Item objects, in that again one more Arraylist containing Item parameters
    My problem is i want to display ItemParams side by side(column wise) not row by row(normal procedure)
    Table looks like
    ItemNo          ItemName     ItemDesc     Change
    234          Colgate     toothpaste     checkbox
    123          Pepsodent     toothpaste     checkbox
    In above table ItemName having different params
    colgate have 3params
    peopsodent have 2 params
    ItemParameters class(bean) containing fields of parameterValue(textBox in UI) and parameterDescription(textArea in UI)
    So the total ItemName column looks like
              ItemName
              Colgate                         
    parameterValue parameterDescription,parameterValue parameterDescription,parameterValue parameterDescription
              Pepsodent
    parameterValue parameterDescription,parameterValue parameterDescription
              Cibaca
    parameterValue parameterDescription,parameterValue parameterDescription,parameterValue parameterDescription,parameterValue parameterDescription
    Please help me
    Thanks in advance

    Hi,
    Try with this piece of code
    Declaration of local constants
      CONSTANTS :  lc_paart LIKE sy-paart VALUE 'X_65_132',  " Paper Format
                   lc_locl  TYPE sypdest VALUE 'LOCL'.       " Destination
        MOVE 'X' TO v_print.
    Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          immediately            = v_print
          new_list_id            = c_x
          no_dialog              = c_x
          user                   = sy-uname
        IMPORTING
          out_parameters         = v_print_parms
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc NE 0.
        CLEAR : v_print_parms.
      ENDIF.
    The printer destination has to be  set up
      IF v_print_parms-pdest = space.
        v_print_parms-pdest = lc_locl.
      ENDIF.
    Explicitly set line width, and output format so that
    the PDF conversion comes out OK
      v_print_parms-linsz = c_linsz.
      v_print_parms-paart = lc_paart.
    Regards,
    nagaraj

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • How to print the text in points wise in sap script

    hi friends,
    how to print the text in points wise in sap script.
    ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
    1. hai how ru.
    2. what r  u doing.
    3.where r u.
    like this i want numbering.. waiting for ur replys.
    thanks,
    kiran

    declare a counter
    data : cnt type char 4.
    print :
    cnt = cnt + 1.
    &cnt& &text&
    cnt = cnt + 1. and so on.
    or.
    if the data is in an internal table
    loop at internal_table.
    cnt = cnt + 1.
    write form.
    in script -&cnt& &text&
    endloop.
    Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM

  • How to print table items in column in smartform in 4.6c version.

    Hi Experts,
    I want to print the items i have in columns (like name invoice number) in smartforms but when i create table in main window there no options for header footer and main area, i have created the template for header and footer but how i print the items in columns. Pls reply ASAP.
    Thanks in advance,
    Abhishek Pandey.

    Hi
    create a table under main window
    Under the Header create a Row or Line
    Under the Row create a Cell and Under that Cell create a text field
    In that text you can write what ever field name u want to write
    Reward if it is helpful to you
    Thanks
    Krushna

  • How to print the row  ,column,and particular cell in separate color

    how to print the row  ,column,and particular cell in separate color IN ALV GRID

    HI,
    Here you go good program links
    <a href="http://www.sapfans.com/forums/viewtopic.php?t=52107">How to Set Color to a Cell in AVL</a>
    <a href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm">ALV Grid Coloring</a>
    Thanks
    Mahesh

  • How 2 Change of column wise o/p  to row wise output in ABAP?

    Hi all,
    I am getting the output in column wise as normally but how can I get the ouput in row wise.in ABAP.
    its urgent. can any one help me how to change the output layout?
    thanks in advance,
    Sakthi.C

    if it is normal report  .then
    go through the write  statents  . one of that is below 
    Loop at itab .
    write  : itab  .
    endloop.
    if it is  ALV  then you have to  define an internal table which are the fieldds  you  want palce in the  Row .
    so  that  
    data  c type  i value    '1'.
    loop at  itab .
    fieldcatalog-fieldname   = itab-field.
    fieldcatalog-col_pos     = c.
    append fieldcatalog to fieldcatalog.
    clear  fieldcatalog
    c = c + 1.
    endloop.
    so that  the Col_pos  will be increased  and the  Column data will be moved into Row .
    reward  points if it is usefull...
    Girish

Maybe you are looking for

  • Updated itunes wont download. error message

    digiatl signature? trying to download latest version of itunes but wont finish. Get error message about digital signature. huh?

  • How to get rid of messages in idx5 idoc adapter

    We are having a lot of messages in idx5 (327828 for a particular date). When I go to sxmb_moni "Monitor for processed xml Messages" I do not find these messages there. We are running the archiving/deletion reports and I expected theese to take care o

  • Slideshow on 7 of my 8 pages not working

    I recently added 2 new pages to my iWeb site. I had some difficulty publishing at first and got a message that I had lost internet connection. I tried to publish a few times and finally got the pages published. When I tested the site everything looke

  • Starter Pack now includes 60 day Eval product key for SLES

    Q1: What is the Starter Pack? The Novell Open Workgroup Suite - Small Business Edition Starter Pack is a product that provides a Customer with a no-cost, one-time, 5-user license for Novell Open Workgroup Suite - Small Business Edition. This is not a

  • Live stream won't play on Windows

    We're using QTSS and QTBroadcaster to stream a live event. Everything works fine on Mac clients, but Windows clients simply can't get the stream unless it's opened directly in QuickTime Player. We have a website with an embedded link for the stream,