Spool Error in ALV output

Dear Friends,
I have report  which has 46 output columns. When I try to print to spool the values get shuffled. Specially the field VENDOR NAME....I have observed if i comment the vendor name field in the field catalog...the reports in spool shows accurately.
1. I have changed the line-size = 1023
2. The output format is set for coloumn 1023
3.In SPAD the output Controller is also marked for  Number of columns for List Display from Format .
Please advice what is wrong with the Vendor Name.
Thanks.
Simraan.

Hai Manas,
Recently I tried replacing VENDOR NAME by VENDOR NUMBER.
And in spool exactly at Vendor Number fields its getting shuffled with  nearby SO number  and customer number fields  data..
In the spool in the heading its shows VENDOR NAME/VENDOR NUMBER but data is of sales order number and customer number..
please let me know what exactly you mean by other fields getting overridden..
Thanks,
Simraan..

Similar Messages

  • Error in ALV output

    Hi All,
    I am getting a runtime error in output while i try to do sum in ALV output.
    In my ouput table i want to do sum for below feilds those are defined in output table :
    CURR TYPE P DECIMALS 2,         
    B30 TYPE  P DECIMALS 2,        
    B60 TYPE P DECIMALS 2,         
    B90 TYPE P DECIMALS 2,       
    B120 TYPE P DECIMALS 2,        
    BG121 TYPE P DECIMALS 2,
    i defined feildcatalog as below:
    WA_FIELDCAT-FIELDNAME = 'B60'.
    WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
    WA_FIELDCAT-SELTEXT_L = TEXT-033.
    WA_FIELDCAT-DO_SUM = 'X' .
      WA_FIELDCAT-OUTPUTLEN = 17.
      WA_FIELDCAT-DATATYPE = 'DEC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR  WA_FIELDCAT.
    even if i try to download the ouput feilds in file,then also i am getting a run time error as field symbols are not assign,
    Please help.
    Thanks and Regards,
    Mohit

    Hi,
    I am getting a dump that cause of  by a message type (X).Same i get if i try to download the file.
    My ouput internal table is as below:
    data:BEGIN OF IT_FINAL occurs 0,
          BUKRS TYPE BUKRS,               "Company code
          KUNNR TYPE KUNNR,               "Customer number
          NAME1 TYPE NAME1,               "Name
          BILL_TO TYPE KUNNR,              "Bill To
          BILL_NAME TYPE NAME1,           "Bill To Name
          BRANCH TYPE FILKD,              "Branch
          BRANCH_NAME TYPE NAME1,         "Branch Name
          BRANCH_REGION TYPE REGIO,      "Region
          BRANCH_CITY TYPE ORT01,        "City
          BELNR TYPE BELNR,              "Accounting Document Number
          ACC_CLK_SOLD  TYPE BUSAB,       "A/C Clerk Sold To
          ACC_CLK_SOLD_NAME TYPE SNAME,  "A/C Name
          ACC_CLK_PAYER TYPE BUSAB,      "A/C Payer
          ACC_CLK_PAYER_NAME TYPE BUSAB,  "A/C Payer Name
          ASM_PART  TYPE  KUNN2,          "ASM Partner
          ASM_NAME TYPE   NAME1,          "ASM Name
          DUNNING TYPE BUSAB,             "Dunning Clerk
          KATR4 TYPE KATR4,               "Local /National Account
          ZUONR TYPE DZUONR,              "Assingment Number
          REFERENCE TYPE XBLNR,           "Reference
          XREF1  TYPE  XREF1,             "Ref Key1
          XREF2  TYPE  XREF2,             "Ref Key2
          XREF3  TYPE  XREF3,             "Ref Key3,
          SGTXT     TYPE SGTXT,           "Item Text
          DUE_DATE  TYPE SY-DATUM,        "Due Date
          DOC_DATE  TYPE BLDAT,           "Doc Date
          BILL_DOC_NO TYPE VBELN,         "Billing Doc Number
          ZTERM TYPE  DZTERM,              "Terms
          HKONT TYPE HKONT,               "Gl Account
          CURR TYPE P DECIMALS 2,         "Current Balance
          B30 TYPE  P DECIMALS 2,         "1-30
          B60 TYPE P DECIMALS 2,          "32-60
          B90 TYPE P DECIMALS 2,          "61-90
          B120 TYPE P DECIMALS 2,         "91-120
          BG121 TYPE P DECIMALS 2,        " >121
          BAL TYPE p DECIMALS 2,          "Balance
          P_CURR TYPE CHAR10,       "Current Percentage
          PB30 TYPE CHAR10,         "1-30 %
          PB60 TYPE CHAR10,         "32-60 Percentage
          PB90 TYPE CHAR10,         "61-90 Percentage
          PB120 TYPE CHAR10,        "91-120 Percentage
          PBG121 TYPE CHAR10,       ">121 %
          END OF it_final..
    My fieldcatalog is below:
    WA_FIELDCAT-FIELDNAME = 'BUKRS'.
        WA_FIELDCAT-TABNAME   =  'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =   TEXT-004.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'KUNNR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-005.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'NAME1'.
        WA_FIELDCAT-TABNAME   =  'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-006.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BILL_TO'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-007.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BILL_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-008.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-009.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH_NAME'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-043.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH_REGION'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-010.
        WA_FIELDCAT-OUTPUTLEN = 8.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BRANCH_CITY'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-011.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BELNR'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-012.
        WA_FIELDCAT-OUTPUTLEN = 11.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_SOLD'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-013.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_SOLD_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-014.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_PAYER' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-015.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ACC_CLK_PAYER_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L =  TEXT-016.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ASM_PART'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-017.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ASM_NAME'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-018.
        WA_FIELDCAT-OUTPUTLEN = 30.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'DUNNING' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-019.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'KATR4'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-020.
        WA_FIELDCAT-OUTPUTLEN = 2.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ZUONR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-044.
        WA_FIELDCAT-OUTPUTLEN = 18.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'REFERENCE'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-021.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'XREF1'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-022.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'XREF2'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-023.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'XREF3'  .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-024.
        WA_FIELDCAT-OUTPUTLEN = 12.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'SGTXT'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-025.
        WA_FIELDCAT-OUTPUTLEN = 50.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'DUE_DATE'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-026.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'DOC_DATE'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-027.
        WA_FIELDCAT-OUTPUTLEN = 10.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BILL_DOC_NO'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-028.
        WA_FIELDCAT-OUTPUTLEN = 15.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'ZTERM'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-029.
        WA_FIELDCAT-OUTPUTLEN = 5.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'HKONT'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-030.
        WA_FIELDCAT-OUTPUTLEN = 11.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'CURR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-031.
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DO_SUM = 'X' .
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B30'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-032.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B60'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-033.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B90'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-034.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'B120'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-035.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BG121'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-036.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'BAL'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-045.
        WA_FIELDCAT-DO_SUM = 'X' .
       WA_FIELDCAT-OUTPUTLEN = 17.
        WA_FIELDCAT-DATATYPE = 'DEC'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'P_CURR'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-037.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB30'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-038.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB60'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-039.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB90'.
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-040.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PB120' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-041.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'PBG120' .
        WA_FIELDCAT-TABNAME   = 'IT_FINAL'.
        WA_FIELDCAT-SELTEXT_L = TEXT-042.
        WA_FIELDCAT-OUTPUTLEN = 17.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        CLEAR  WA_FIELDCAT.
         Please help.
    Thanks
    Mohit

  • Runtime Error while summing a column in ALV output

    Dear All,
    I have developed an ALV Report and the report is giving output without any flaws.
    I have defined proper field catalog and displaying the results using REUSE_ALV_GRID function module.
    Now the report is generating Runtime Error while the user selects a column and click the SUM icon.
    The fields like Qty, or amounts are also theowing runtime error while summing up their column in the ALV output.
    What might be the reason and how to resolve this issu?
    Regards
    Pavan

    Hi ,
    I don't know how you have write  down the code but follow the below coding example:
    FOR TOTAL:
    there is a property of fieldcatalog, that is do_sum.
    USE COED LIKE:
    PERFORM fieldcat USING:
    '1' 'MATNR' 'I_MARD' 'MATERIAL NO' 'MARD' 'MATNR ' ' ',
    '2' 'NETWR' 'I_MARD' 'PLANT' 'MARD' 'WERKS' ' ',
    FORM fieldcat USING value(p_0029)
    value(p_0030)
    value(p_0031)
    value(p_0032)
    wa_fieldcat-col_pos = p_0029.
    wa_fieldcat-fieldname = p_0030.
    wa_fieldcat-tabname = p_0031.
    wa_fieldcat-reptext = p_0032.
    wa_fieldcat-do_sum = 'X'.
    APPEND wa_fieldcat TO i_fieldcat.
    ENDFORM. " FIELDCAT
    in final output you will get the total of currency field.
    FOR SUB TOTAL:
    decleare: i_sort type standard table of slis_sortinfo_alv,
              wa_sort type slis_t_sortinfo_alv.
    wa_sort-spos = '1'.
    wa_sort-fieldname = 'field1'.
    wa_sort-subtot = 'X'.
    append wa_tab to i_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    it_fieldcat = it_fieldcat
    it_sort = i_sort
    Hope this can solve your pbs.
    If you need more inputs let me know.
    Regards,
    Tutun

  • Error in ALV : Field Does not exists in Output table .

    Hi All,
    In my ALV report, program get dumped and showing error when i tried to put a col named Distribution channel ion the alv.
    I have put the Distribution cannel field in the IT_FInal table , but still getting folwong errors :
    Error : Field Symbol is not been assigned.
    As Instructed i have passed            I_INTERFACE_CHECK              = 'X'.
    By this i am getting detail error that :
    Field Distribution channel does not exists in Output table & Heading for List is missing .
    But i have maintained the distribition channel in IT_Final table
    Please suggest wheather we have to define dis channel in any other place.
    Thanks in advance.
    Can any one help me regrarding this.
    Thanks in advance.

    Hello,
    You have to populate the same in the fieldcatalog as well, i think you have not maintained this field there.
    BR,
    Suhas
    PS: Also make it a point to follow-up on your previous post: [Error in ALV : Field Symbol not been assigned.|Error in ALV : Field Symbol not been assigned.]

  • How to put the alv output into the spool request?

    Hi guys,
    How to put the alv output into the spool request?
    Thanks!

    Hi
    Sending an ALV List screen output to SPOOL
    Convert ALV list to PDF and send mails to respective persons
    Regards
    Pavan

  • Getting ERROR when downloading alv output to Excel

    Hello All,
    I get a error message when I try to use the standard funtionality to download the alv output to excel.
    The current statement only supports character-type data objects.
    What happened?
    The current ABAP/4 program "SAPLKKBL " had to be terminated because
    one of the statements could not be executed.
    This is probably due to an error in the ABAP/4 program.
    Error analysis
    In statement
       "STRLEN( obj )..."
    the argument "obj" can only take a character-type data object.
    Source code extract
    038620   *   ansonsten entspricht sich min. Ausgabelänge und Ausprägungslänge
    038630       else.
    038640         if gs_fc-tech_form ne 99.
         >           gs_out-hlplen = strlen(  ).
    038660         endif.
    038670       endif.
    In this case, the operand "obj" has the non-character type "I".
    Please can anyone put some light on this. It is veru difficult to go through the whole std functionality to download.
    Thanks for all support guys!
    Sri.

    Hi srikanth,
    This error comes because the values present in any one of the displayed coloums containing special character like * present before or after the number....  i.e  instead of 4 ...**4.
    While displaying in the screen it is of no problem. since both *4 are converted into char format (internally) and gets displayed.
    But while you download the same throu the EXCEL functionality SAP will intenally convert the same into NUMERIC format. Since 4 is number.
    So in that case *4 will cause dump.
    *So find out the place in which the value appearing like this *4 and try to correct it.
    *Surely it is of Field LENGTH problem. Try to increase the length of the field 4.
    It Should WORK.!!!..  else post ur query here.
    REWARD POINTS IF USEFUL
    ~Lakshmiraj~

  • ALV output to spool

    hi,
    i am having a issue when running ALV output to background. If user gives his email address i am able to send output as attachment to email.but incase he doesnt give then i have to send it to SPOOL.
    I am able to send the output to spool but when i execute the report in background i get a POPUP where i have to input device and then a other dialog box which gives formatting information I.E. X_65_132' and when i click OK then spool is getting generated.
    i tried ways to suppress this popup but couldnt find the way..can anyone suggest me a way to suppress this popup?
    i used get_print_parameters function module but the program doesn't go till that place and immediately before executing start-of-selection i am getting this popup.
    regards

    REPORT  ytest.
    INCLUDE yest_top.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM selectionscreen_modify.
      PERFORM validate_selscreen .
    START-OF-SELECTION.
    PERFORM fetch_data.
        PERFORM build_dyntable.
    Inside the build_dyntable perform i am calling alv_list_display to dislay output.
    when i debug the code after executing report from seleciton screen in background execution immediately after AT SLECTION SCREEN OUTPUT i get the popup.
    let me know incase anything to be done to suppress the popup.
    thanks

  • Create new spool list for new ALV output

    Hi,
    I created a report that calls an several ALV Grids, when it is processed in background.
    Unfortunately, only the last ALV is shown in the spool.
    Could you tell me, how to store every ALV output in a new spool?
    Best regards,
    Fabian

    hi kegel..
       check this piece of code ....
       call function 'GET_PRINT_PARAMETERS'
           exporting
                destination    =  loc_dest
                copies         =  l_copies
                list_name      =  l_listname
                list_text      =  l_listtext
                immediately    =  ' '
                release        =  'X'
                new_list_id    =  'X'
                expiration     =  l_days
                line_size      =  200
                line_count     =  65
                layout         =  'X_65_200'
                sap_cover_page =  'X'
                receiver       =  'SAP*'
                department     =  ''
                no_dialog      =  'X'
           importing
                out_parameters = l_params
                valid          = l_valid.
      IF l_VALID <> SPACE.
       NEW-PAGE PRINT ON PARAMETERS l_PARAMS NO DIALOG.
       NEW-PAGE PRINT OFF.
       NEW-PAGE PRINT ON PARAMETERS l_PARAMS NO DIALOG.
          PERFORM output_top.
          PERFORM output_data.
          PERFORM output_end.
       NEW-PAGE PRINT OFF.
    NEW PAGE PRINT ON/OFF gives spool request...
    u can call it again as above to print ur contents in another spool...
    For my reqmt i had to internal table to be displayed in diff spools, so i used this code...
    hope this helps.......
    thanx....

  • Grid ALV Output to Screen  as well as to Spool.

    Hi Masters,
    I have one requirement in which I have to Send the Grid ALV Output to Screen as well as to Spool.
    Can Anybody suggest any solution?
    and most Important 
    Helpful answers will get definitely awarded.
    Thanks in advance

    ALV Grid Output cannot be sent to Sppol.
    REUSE_ALV_GRID_DISPLAY function module will not work when the program runs in background mode.
    You should use the LIST Display function module when you run the program in Background.
    code like:
    if sy-batch = 'X'.
    call function 'REUSE_ALV_LIST_DISPLAY'...
    endif.
    Regards,
    Ravi Kanth Talagana

  • Error while dowloading ALV output

    Hi All,
      When am trying to download the ALV output to a spreadsheet it is giving an information message 'Filter criteria, sorting, totals and subtotals are not taken into account' and the followed by the message 'Export of a list object was terminated (internal error)'.This is occuring when the ALV does not contain any data otherwise it donload fine.In other standard report even if the ALV doesnt have data it downloads empty data to excel.what could be wrong?
    THanks,
    Rakesh.

    Hi rakesh,
      You can put one condition to check the final internal table consists any data or not. If that table is not initial then display the output otherwise just display a message 'Data not found'.
    I think this is the solution .
    IF NOT T_FINAL[] IS INITIAL.
    * Fill field catalog table
        PERFORM FILL_FIELDCATALOG.
    * Fill Layout options
        PERFORM FILL_LAYOUT.
        CALL SCREEN 0100.
    ELSE
      MESSAGE ' No data found' Type 'E'.
      ENDIF.
    Check  whether you filled  fieldcatalog correctly or not.
    Regards,
    Rajitha.

  • How to convert spool no into ALV GRID ?

    HI EXPERTS,
                          I am scheduling SAP REPORTS IN BACKGROUND through F9.
            The report output generated in sap spool "sp02" . Then output appears as list but my client wants in ALV grid.
    so i go through the following  link
    http://wiki.sdn.sap.com/wiki/display/Snippets/ConvertSpoolListtoALV+Grid
    when i am creating function module of that coding this come out with error  
    the type "MATCH_RESULT_TAB "  is unknown.
    i am using 4.7 version of sap.
    or
    if there is any other alternative solution.
    thanks <promise removed by moderator>.
    vikas
    Edited by: Thomas Zloch on Feb 11, 2011 11:26 AM

    Hi Bikas,
    That  MATCH_RESULT_TAB means Table with Search Results.I copied the sam progrm it is working.Tryto copy all.
    That import Parameters and all. What is your sap version.
    Regards,
    Madhu.

  • ALV output converted into PDF format and send that PDF to user through mail

    Hi Experts,
    I have report earlier its output was in alv grid.
    Now i want that ALV output converted into PDF format.And that PDF output send to user through mail.
    Can u please tell how to do?
    My code is here(output is displaying in ALV grid).
    INCLUDE <icon>.
    TYPE-POOLS: slis, kkblo.
    TABLES : zmsd_freight_hdr, zmsd_freight_det, zmsd_blinfo, zmsd_diheader.
    TABLES : lfa1.
    DATA : t_hdr   LIKE   zmsd_freight_hdr   OCCURS 0 WITH HEADER LINE,
           T_DET   LIKE   ZMSD_FREIGHT_DET   OCCURS 0 WITH HEADER LINE,
           t_bl    LIKE   zmsd_blinfo        OCCURS 0 WITH HEADER LINE,
           t_di    LIKE   zmsd_diheader      OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_det OCCURS 0.
            INCLUDE STRUCTURE zmsd_freight_det.
    DATA    type(30).
    DATA: END OF t_det.
    DATA: v_target2(30),
          v_zsammg LIKE t_det-zsammg,
          v_gsttotal LIKE t_det-zamount.
    DATA : BEGIN OF t_data OCCURS 0,
             zsammg       LIKE  zmsd_freight_hdr-zsammg,
             zdidbl       LIKE  zmsd_freight_hdr-zdidbl,
             zvkorg       LIKE  zmsd_freight_hdr-zvkorg,
             zinvno       LIKE  zmsd_freight_hdr-zinvno,
             zttlamt      LIKE  zmsd_freight_hdr-zttlamt,
             zstatus      LIKE  zmsd_freight_hdr-zstatus,
             ztype        LIKE  zmsd_freight_hdr-ztype,
             zconfirm     LIKE  zmsd_freight_hdr-zconfirm,
             zconfirmdate LIKE  zmsd_freight_hdr-zconfirmdate,
             erdat        LIKE  zmsd_freight_hdr-erdat,
             ernam        LIKE  zmsd_freight_hdr-ernam,
             erzet        LIKE  zmsd_freight_hdr-erzet,
             aedat(10),
             aenam        LIKE  zmsd_freight_hdr-aenam,
             aezet        LIKE  zmsd_freight_hdr-aezet,
             zline        LIKE  zmsd_freight_det-zline,
             zfptype      LIKE  zmsd_freight_det-zfptype,
             zchrcode     LIKE  zmsd_freight_det-zchrcode,
             zcurcode     LIKE  zmsd_freight_det-zcurcode,
             zqty         LIKE  zmsd_freight_det-zqty,
             zuom         LIKE  zmsd_freight_det-zuom,
             zrate        LIKE  zmsd_freight_det-zrate,
             zamount      LIKE  zmsd_freight_det-zamount,
             zexrate      LIKE  zmsd_freight_det-zexrate,
           zccode       LIKE  zmsd_blinfo-zccode,      "MADK991565
             zccode       like  ZMSD_FREIGHT_HDR-zfcode, "MADK991565
             zbldate(10),
             zbl          LIKE  zmsd_blinfo-zbl,
             type(3),
             waerk        LIKE  zmsd_freight_det-zcurcode,
             zamountl     LIKE  zmsd_freight_det-zamount,
           END OF t_data.
    DATA : w_layout      TYPE   slis_layout_alv,
           w_catalog     TYPE   slis_fieldcat_alv,
           t_catalog     TYPE   slis_t_fieldcat_alv,
           w_sort        TYPE   slis_sortinfo_alv,
           t_sort        TYPE   slis_t_sortinfo_alv.
    DATA   V_ZINVNO    like   T_HDR-ZINVNO.                   "MADK991565
    DATA : v_count  TYPE  i.
    SELECTION-SCREEN BEGIN OF BLOCK a0 WITH FRAME TITLE text-001.
    PARAMETERS     :  p_zvkorg LIKE zmsd_freight_hdr-zvkorg  OBLIGATORY .
    SELECT-OPTIONS :  s_zdidbl FOR  zmsd_freight_hdr-zdidbl             ,
                      s_zccode FOR  lfa1-lifnr                          ,
                      s_status FOR  zmsd_freight_hdr-zstatus            ,
                      s_ztype  FOR  zmsd_freight_hdr-ztype              ,
                      s_erdat  FOR  zmsd_freight_hdr-erdat              ,
                      s_ernam  FOR  zmsd_freight_hdr-ernam              ,
                      s_zconfd FOR  zmsd_freight_hdr-zconfirmdate       .
    PARAMETERS     :  p_zconf  AS   CHECKBOX                            .
    SELECTION-SCREEN END OF BLOCK a0.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-002.
    PARAMETERS     :  p_hdr    RADIOBUTTON GROUP rad DEFAULT 'X'        ,
                      p_det    RADIOBUTTON GROUP rad                    .
    SELECTION-SCREEN END OF BLOCK a1.
    INITIALIZATION.
    AT SELECTION-SCREEN.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM process.
      PERFORM display.
    END-OF-SELECTION.
      PERFORM fm_get_num_pages.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    TOP-OF-PAGE.
      PERFORM fm_top_of_page USING '7010' sy-title space.
    FORM get_data.
      SELECT   *
        FROM   zmsd_freight_hdr
        INTO   TABLE t_hdr
       WHERE   zvkorg        EQ  p_zvkorg
         AND   zdidbl        IN  s_zdidbl
         AND   zstatus       IN  s_status
         AND   ztype         IN  s_ztype
         AND   erdat         IN  s_erdat
         AND   ernam         IN  s_ernam
         AND   zconfirmdate  IN  s_zconfd
         AND   ZFCODE        IN  S_ZCCODE.                      "MADK991565
      IF p_zconf = 'X'.
        DELETE t_hdr WHERE zconfirm NE 'C'.
      ENDIF.
      CHECK NOT t_hdr[] IS INITIAL.
      SELECT   *
        FROM   zmsd_blinfo
        INTO   TABLE t_bl
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg = t_hdr-zsammg.
      SORT t_bl BY zsammg.
      SELECT   *
        FROM   zmsd_diheader
        INTO   TABLE t_di
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg = t_hdr-zsammg.
      SORT t_di BY zsammg.
    IF P_DET = 'X'. "MADK933361
      SELECT   *
        FROM   zmsd_freight_det
        INTO   TABLE t_det
         FOR   ALL ENTRIES IN t_hdr
       WHERE   zsammg  =  t_hdr-zsammg
       AND ZINVNO =  T_HDR-ZINVNO .                           "MADK991565
    SORT t_det BY zsammg zline.                            "MADK991565
       SORT T_DET BY ZSAMMG ZINVNO ZLINE.                     "MADK991565
    ENDIF. "MADK933361
    ENDFORM.
    FORM process.
      REFRESH t_data.
      CLEAR v_gsttotal.                                         "MADK933361
      LOOP AT t_hdr.
    Start of MADK933361
        CLEAR: v_target2.
        v_zsammg = t_hdr-zsammg.
        V_ZINVNO = T_HDR-ZINVNO.                                "MADK991565
       AT NEW zsammg.                                         "MADK991565
         AT NEW ZINVNO.                                         "MADK991565
          PERFORM get_gst_value.
        ENDAT.
    End of MADK933361
        PERFORM move_header.
        CHECK t_data-zccode IN s_zccode.
        IF p_det = 'X'.
    CSF Project Changes Starts   DEV34    MADK985782
        LOOP AT T_DET WHERE ZSAMMG = T_HDR-ZSAMMG..
          LOOP AT t_det WHERE zsammg = t_hdr-zsammg AND
                              zinvno = t_hdr-zinvno.
    CSF Project Changes Ends     DEV34    MADK985782
            PERFORM move_header.
            CHECK t_data-zccode IN s_zccode.
            MOVE-CORRESPONDING t_det TO t_data.
            t_data-zamountl = t_data-zamount * t_data-zexrate.
            APPEND t_data.
            CLEAR t_data.
          ENDLOOP.
        ELSE.
          APPEND t_data.
          CLEAR t_data.
        ENDIF.
        AT END OF zsammg.
          CLEAR v_gsttotal.
        ENDAT.
    *Start of changes for  IS090901289-PIA MADK991565
        AT END OF ZINVNO.
          CLEAR V_GSTTOTAL.
        ENDAT.
    *End of changes for  IS090901289-PIA MADK991565
      ENDLOOP.
    ENDFORM.
    FORM move_header.
      MOVE-CORRESPONDING t_hdr TO t_data.
      t_data-zttlamt = t_data-zttlamt + v_gsttotal.             "MADK933361
      t_data-waerk = 'SGD'.
      IF NOT t_hdr-aedat IS INITIAL.
        WRITE: t_hdr-aedat TO t_data-aedat.
      ELSE.
        CLEAR : t_data-aedat.
      ENDIF.
      READ TABLE t_bl WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
      IF sy-subrc EQ 0.
      t_data-zccode  = t_bl-zccode.   "MADK991565
        T_DATA-ZCCODE = T_HDR-ZFCODE.   "MADK991565     
        IF NOT t_bl-zbldate IS INITIAL.
          WRITE: t_bl-zbldate TO t_data-zbldate.
        ENDIF.
        t_data-zbl     = t_bl-zbl.
        t_data-type    = 'DBL'.
      ELSE.
        READ TABLE t_di WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
        IF sy-subrc EQ 0.
        t_data-zccode  = t_di-zdiforcode.     "MADK991565
          T_DATA-ZCCODE = T_HDR-ZFCODE.         "MADK991565
          t_data-type    = 'DI'.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM display.
      IF t_data[] IS INITIAL.
        MESSAGE s398(00) WITH 'No Data Selected'.
        EXIT.
      ENDIF.
      DATA : l_repid LIKE sy-repid.
      l_repid = sy-repid.
      REFRESH t_catalog.
      CLEAR   t_catalog.
      w_layout-cell_merge = 'X'.
      PERFORM map_fields.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = l_repid
                i_callback_user_command = 'ALV_USER_COMMAND'
                is_layout               = w_layout
                it_fieldcat             = t_catalog[]
                i_grid_title            = sy-title
                i_save                  = 'A'
                it_sort                 = t_sort[]
           TABLES
                t_outtab                = t_data
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.
    FORM map_fields.
    Sort Order
      CLEAR v_count.
      PERFORM sf USING 'ZDIDBL'   'X'  'X'.
    Fields to be displayed
      CLEAR v_count.
      IF p_hdr = 'X'.
        PERFORM af USING :
       DESCRIPTION       FIELD        LEN   RTABLE             RFIELD
        'DI/DBL         ' 'ZDIDBL'     '14' '                ' '        ',
        'Type           ' 'TYPE'       '04' '                ' '        ',
        'Forwarder Code ' 'ZCCODE'     '14' '                ' '        ',
        'BL Number      ' 'ZBL'        '14' '                ' '        ',
        'BL Date        ' 'ZBLDATE'    '10' '                ' '        ',
        'Invoice Number ' 'ZINVNO'     '15' '                ' '        ',
        'Extraction     ' 'ZSTATUS'    '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
        'Freight Type   ' 'ZTYPE'      '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE   ',
        'Confirmation   ' 'ZCONFIRM'   '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
        'Confirm Date   ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
    'ZCONFIRMDATE',
        'Total Amount   ' 'ZTTLAMT'    '18' '                ' '        ',
        'Created On     ' 'ERDAT'      '10' '                ' '        ',
        'Created By     ' 'ERNAM'      '10' '                ' '        ',
        'Changed On     ' 'AEDAT'      '10' '                ' '        ',
        'Changed By     ' 'AENAM'      '10' '                ' '        '.
      ELSE.
        PERFORM af USING :
       DESCRIPTION         FIELD     LEN   RTABLE             RFIELD
        'DI/DBL           ' 'ZDIDBL'   '14' '                ' '        ',
        'Type             ' 'TYPE'     '04' '                ' '        ',
        'Forwarder Code   ' 'ZCCODE'   '14' '                ' '        ',
        'BL Number        ' 'ZBL'      '14' '                ' '        ',
        'BL Date          ' 'ZBLDATE'  '10' '                ' '        ',
        'Invoice Number   ' 'ZINVNO'   '15' '                ' '        ',
        'Extraction       ' 'ZSTATUS'  '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
        'Freight Type     ' 'ZTYPE'    '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE   ',
        'Confirmation     ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
        'Confirm Date     ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
    'ZCONFIRMDATE',
        'Total Amount     ' 'ZTTLAMT'  '18' '                ' '        ',
        'Freight Payment  ' 'ZFPTYPE'  '14' '                ' '        ',
        'Charge Code      ' 'ZCHRCODE' '10' '                ' '        ',
        'Currency         ' 'ZCURCODE' '08' '                ' '        ',
        'Quantity         ' 'ZQTY'     '13' '                ' '        ',
        'UoM              ' 'ZUOM'     '04' '                ' '        ',
        'Rate             ' 'ZRATE'    '15' '                ' '        ',
        'Amt(Foreign Curr)' 'ZAMOUNT'  '16' '                ' '        ',
        'Exchange Rate    ' 'ZEXRATE'  '13' '                ' '        ',
        'Amt(Local Curr)  ' 'ZAMOUNTL' '16' '                ' '        ',
        'Created On       ' 'ERDAT'    '10' '                ' '        ',
        'Created By       ' 'ERNAM'    '10' '                ' '        ',
        'Changed On       ' 'AEDAT'    '10' '                ' '        ',
        'Changed By       ' 'AENAM'    '10' '                ' '        '.
      ENDIF.
    ENDFORM.
    FORM af USING text
                  field
                  len
                  table
                  reffield.
      v_count = v_count + 1.
      w_catalog-col_pos       = v_count.
      w_catalog-fieldname     = field.
      w_catalog-ref_tabname   = table.
      w_catalog-ref_fieldname = reffield.
      w_catalog-seltext_s     = text.
      w_catalog-seltext_m     = text.
      w_catalog-seltext_l     = text.
      w_catalog-outputlen     = len.
      IF field = 'ZTTLAMT' OR field = 'ZAMOUNTL'.
        w_catalog-no_zero     = 'X'.
        w_catalog-cfieldname  = 'WAERK'.
        w_catalog-datatype    = 'CURR'.
      ENDIF.
    IF FIELD = 'ZRATE' OR FIELD = 'ZAMOUNT'.
      IF field = 'ZAMOUNT'.
        w_catalog-no_zero     = 'X'.
        w_catalog-cfieldname  = 'ZCURCODE'.
        w_catalog-datatype    = 'CURR'.
      ENDIF.
      IF field = 'ZQTY' OR field = 'ZRATE'.
        w_catalog-no_zero     = 'X'.
        w_catalog-datatype  =  'DEC'.
      ENDIF.
      APPEND w_catalog TO t_catalog.
      CLEAR  w_catalog.
    ENDFORM.
    FORM sf    USING   fieldname  sortup  group.
      v_count = v_count + 1.
      CLEAR w_sort.
      w_sort-fieldname = fieldname.
      w_sort-spos      = v_count.
      w_sort-up        = sortup.
      w_sort-group     = group.
      APPEND w_sort TO t_sort.
    ENDFORM.
    FORM alv_user_command USING  in_ucomm    LIKE sy-ucomm
                                 in_selfield TYPE slis_selfield.
      DATA: lfs_data LIKE t_data.
      IF in_ucomm = '&IC1'.
        READ TABLE t_data INDEX in_selfield-tabindex INTO lfs_data.
        CHECK NOT lfs_data-zdidbl IS INITIAL.
        IF lfs_data-type = 'DBL'.
          DATA: l_zdbl LIKE zmsd_diheader-zdinum.
          l_zdbl = in_selfield-value.
          EXPORT l_zdbl TO MEMORY ID 'VBL'.
          CALL TRANSACTION 'ZMSD_BL01'.
        ENDIF.
        IF lfs_data-type = 'DI'.
          DATA: v_dinum LIKE zmsd_diheader-zdinum.
          v_dinum = in_selfield-value.
          EXPORT v_dinum TO MEMORY ID 'VDI'.
          CALL TRANSACTION 'ZMSD_DI01'.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM get_gst_value.
      LOOP AT t_det WHERE zsammg = v_zsammg
         AND ZINVNO = V_ZINVNO.                              "MADK991565
        CHECK t_data-zccode IN s_zccode.
        t_det-zamount  = t_det-zamount * t_det-zexrate.
        SELECT SINGLE  y0mmtarget2
                INTO   v_target2
                FROM   y0mmipstranslate
                WHERE  y0mmdatatype = '70' AND
                       y0mmsource = t_det-zchrcode.
        SELECT SINGLE y0mmtarget1
               INTO   t_det-type
               FROM   y0mmipstranslate
               WHERE  y0mmdatatype = '76' AND
                      y0mmsource = v_target2.
        IF t_det-type NE '3Z'.
          v_gsttotal    = v_gsttotal +
                               ( t_det-zamount * 5 / 100 ).
        ENDIF.
      ENDLOOP.
    Regards,
    Raj.

    Hello,
    Following is the procedure to convert alv output to spool and then it to PDF Format.
    After we display the ALV, we can check whether it is running in the background using system field u2018sy-batchu2018. Then,we call an function module named u2018GET_JOB_RUNTIME_INFOu2019 to get the current job information. Then go to spool request table tbtcp to get the spool id.
    Get current job details
      CALL FUNCTION u2018GET_JOB_RUNTIME_INFOu2019
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                               AND jobcount = gd_jobcount
                               AND stepcount = gd_stepcount
                               AND listident <> u20180000000000u2032
                               ORDER BY   jobname
                                                   jobcount
                                                   stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
    Finally, we can call function module u2018CONVERT_ABAPSPOOLJOB_2_PDFu2018 to convert spool reqeust(which is stored in OTF format) to PDF format. Then we can call either function module u2018SO_DOCUMENT_SEND_API1u2032 or SAP BCS (Business Communication Service) to send the pdf as an email attachment.
    CALL FUNCTION u2018CONVERT_ABAPSPOOLJOB_2_PDFu2019
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount = gd_bytecount
           TABLES
                pdf = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
    Regards,
    Sayali
    Edited by: Sayali Paradkar on Apr 20, 2010 12:51 PM

  • Page-break in alv background job for alv output variant not coming correctl

    Hi,
    I have created an ALV grid report. When i run the report in background i get the output with correct page-break on FIELD1. Now when i run the report in background with an "ALV output variant" (its the ALV variant that controls the fields display in the output; this is not the program variant), i do not get the page-break on FIELD1.  I have already build the sort criteria and using:
    gs_sort-group = '* '.     "New-Page
    Please let me know what could be reason for not getting the page-break in background when i am using the alv output variant and how do i correct this problem.
    Regards,
    Rakesh

    Hello Everyone,
    I have solved the problem. While running the program in background, we get the page-breaks when we use the below part of code in the sort catalogue with the condition that the program variant should not use any ALV layout variant.
    gs_sort-group = '* '.     "New-Page
    If you are using the ALV layout variant in the program variant then we can check the ROWPOS, COLPOS, and NO_OUT for that ALV layout variant and pass them along in the fieldcatalog table. You should be careful with not to pass the layout variant in the DISVARIANT. You can notice that i have cleared it and simply passing the program name into that.
    *C-- Process separately for jobs running in Background. Actually
    *C-- sortcat-group solves the problem only in Foreground. In background
    *C-- when ALV layout variant is not selected then it works otherwise it
    *C-- fails. So for background jobs we are reading the fieldcat and then
    *C-- passing the same in the display FM.
      IF sy-batch = 'X'.
        CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
          EXPORTING
           i_dialog                  = ' '
           i_user_specific           = ' '
           i_default                 = ' '
    *   I_TABNAME_HEADER          =
    *   I_TABNAME_ITEM            =
            it_default_fieldcat       = gt_fieldcat
            i_layout                  = gs_layout
    *   I_BYPASSING_BUFFER        =
    *   I_BUFFER_ACTIVE           =
         IMPORTING
    *   E_EXIT                    =
           et_fieldcat               = lt_fieldcat
    *     et_sort                   = gt_sort[]
    *   ET_FILTER                 =
    *     es_layout                 = gs_layout
         CHANGING
           cs_variant                = gs_disvariant
         EXCEPTIONS
           wrong_input               = 1
           fc_not_complete           = 2
           not_found                 = 3
           program_error             = 4
           OTHERS                    = 5
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CLEAR gs_fieldcat.
        LOOP AT gt_fieldcat INTO gs_fieldcat.
    *C-- Transfer all position changes to gt_fieldcat from lt_fieldcat
          CLEAR ls_fieldcat.
          READ TABLE lt_fieldcat
                INTO ls_fieldcat
                WITH KEY fieldname = gs_fieldcat-fieldname.
          IF sy-subrc = 0.
            gs_fieldcat-row_pos = ls_fieldcat-row_pos.
            gs_fieldcat-col_pos = ls_fieldcat-col_pos.
            gs_fieldcat-no_out = ls_fieldcat-no_out.
            MODIFY gt_fieldcat FROM gs_fieldcat INDEX sy-tabix.
            CLEAR gs_fieldcat.
          ENDIF.
        ENDLOOP.
    *C-- Clear the disvariant for the background job as it contains the ALV
    *C-- layout varinat
        CLEAR gs_disvariant.
        gs_disvariant-report = 'ZGPPMP0001'.
    Then pass gt_fieldcat to 'REUSE_ALV_GRID_DISPLAY'.
    The reason i'm doing it this way is that when we pass the layout variant name, the contents in gt_fieldcat were getting modified.
    One more thing i'd like to point out is that that, i tried to delete the fields with no_out = 'x'. Now when i ran the program in background with all the fields in sort catalog (suppose there are 2 fields field1 and field2) also in fieldcatalog it ran fine. In the next run in background i removed one of the fields in sort catalog from the fieldcatalog (delete the fields with no_out = 'x') and i got dump. Basically i had hidden field1 and so the code which was deleting fields with no_out = 'x' deleted this field from gt_fieldcat. So basically we should not delete fields with no_out = 'x'.
    I was getting ABAP runtime errors    MESSAGE_TYPE_X in the following part of the standard code.
    000310     LOOP AT CT_SORT INTO LS_SORT.
    000320
    000330       READ TABLE IT_FIELDCAT ASSIGNING <LS_FIELDCAT>
    000340            WITH KEY FIELDNAME = LS_SORT-FIELDNAME BINARY SEARCH.
    000350       IF SY-SUBRC NE 0.
         >         MESSAGE X000(0K).
    000370       ENDIF.
    000380
    000390       LS_SORT-SELTEXT = <LS_FIELDCAT>-SELTEXT.
    i have just mentioned this part because when i checked the forum many people were getting such errors "MESSAGE_TYPE_X". This could also be one of the reasons.

  • ALV output problem in displaying the field lengths.( LONG_DES1 & LONG DES)

    I have  declared itab of ALV output like below...
    Internal table for ALV report generation***********
    DATA : Begin of pdet_otab_alv occurs 0,
            bukrs LIKE bsid-bukrs, "Company code
            postm(4),              "Posting month (YYMM format)
            xblnr LIKE bsid-xblnr, "Reference document number
            kunnr LIKE bsid-kunnr, "Customer (Supplier Billing Customer)
            name1 LIKE kna1-name1,                              "Name 1
            buzei like bsid-buzei,
            gjahr like bsid-gjahr,
            filkd like bsid-filkd, "Rep Number
            rname like kna1-name1, "Rep Name
            belnr LIKE bsid-belnr, "Document number (invoice number)
            blart LIKE bsid-blart, "Document type
            zfbdt LIKE bsid-zfbdt, "Baseline date
            zterm LIKE knb1-zterm, "Terms
            netdt LIKE bsega-netdt,"Due date
            sgtxt LIKE bsid-sgtxt, "Text
            agerg TYPE t_agerg,    "Age range of invoice
            wrbtr LIKE bsid-wrbtr, "Original invoice amount
            due   LIKE bsid-wrbtr, "Amount outstanding on invoice
           long_des(250) type c,   " Long description
    <b>            long_des  TYPE string,
                long_des1 TYPE string,</b>      
          date_s(10) type c,  " Date
            short_des(20) type c,  " Short Description
            counter type i,
           End of pdet_otab_alv.
    And after filling the internal table fields ( fields 'LONG_DES1' & 'LONG_DES'  from FM READ_TEXT 's longtext, which are  of 265 chars each )
    <b>'LONG_DES1' & 'LONG_DES' are trimmed  in ALV out put  WHY ?</b>
      w_fieldcat-fieldname = 'LONG_DES1'.
      w_fieldcat-tabname   = 'PDEL_OTAB_ALV'.
    w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
    w_fieldcat-ref_tabname   = 'DD03P'.
      w_fieldcat-seltext_l = 'Original Note'.
      w_fieldcat-col_pos   = 17.
      APPEND w_fieldcat TO fieldcat.
      CLEAR w_fieldcat.
      w_fieldcat-fieldname = 'LONG_DES'.
      w_fieldcat-tabname   =  'PDEL_OTAB_ALV'.
    w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
    w_fieldcat-ref_tabname   = 'DD03P'.
      w_fieldcat-seltext_l = 'Latest Note'.
      w_fieldcat-col_pos   = 18.
      APPEND w_fieldcat TO fieldcat.
      CLEAR w_fieldcat.
    <b>next part i.e.,   before passing fieldcat.... I have filled s_layout like below.</b>
    <b>  s_layout-max_linesize = 1000.
      s_layout-colwidth_optimize = 'X'.</b>
    Call the following function to display output in ALV form
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program = 'ZFRSBOI0'
                is_layout          = s_layout
                it_fieldcat        = fieldcat
                it_events          = p_events[]
               it_sort            = p_it_sort[]
                i_save             = 'A'
           TABLES
                t_outtab           = pdet_otab_alv1
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
    If the function call is not successful, raise error message
    and come out from the program
      IF sy-subrc <> 0.
        message e000(00) with
                          'Unable to display report'(e01).
        exit.
      ENDIF.

    some body suggested me....we can display full length of text by below coding ?
    Is that not correct - just asking....
    s_layout-max_linesize = 1000.
    s_layout-colwidth_optimize = 'X'.
    Call the following function to display output in ALV form
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZFRSBOI0'
    is_layout = s_layout
    it_fieldcat = fieldcat
    it_events = p_events[]
    it_sort = p_it_sort[]
    i_save = 'A'
    TABLES
    t_outtab = pdet_otab_alv1
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    If the function call is not successful, raise error message
    and come out from the program
    IF sy-subrc <> 0.
    message e000(00) with
    'Unable to display report'(e01).
    exit.
    ENDIF.

  • Error while printing (SAP spool error)

    Hi,
    I have configured a printer of type 'C : Direct Operating System Call'. On printing a page, an error occurs with the following log entries
    SAP spool error log
    =====================
    Print request processing log
    The host spool is reporting errors
    Windows/NT error 1775: "A null context handle was passed from the client to the host during a remote procedure call."
    Errors occurred processing this print request
    Error during print request output. l_rc = 1
    There may be no printout
    Please. can someone help me out here.
    Thanks!
    Regards,
    Angad

    Ok I am upgrading from R/3 46C to ECC 6.0, on the 46c system the printers are configured as follow:
    Device type          HPLJ4    : HP Laserjet 4 series
    Spool server          sapprod1_PRD_00       sapprod1
    Device class          Standard printer
    Host spool access method C: Direct operating system call
    Host printer          
    srtroot03.startek.com\srt-dc-c4-sharp
    Host name          sapprod1
    On the ECC 6.0 system the printers are configured as follows:
    Device Type          HPLJ4    : HP Laserjet 4 series
    Spool Server          srtsapeccdev1_DEV_00
    Server Description
    Host               srtsapeccdev1
    Device Class          Standard printer
    Host Spool Access Method C: Direct operating system call
    Host printer          
    srtroot03.startek.co\srt-dc-c4-sharp
    HostName          srtsapeccdev1
    The 46c system prints just fine, on the ECC 6.0 systems; I can not get the printers to work.  I have made sure that the hosts file on the ECC server has the printer host address, and I get the following error back:
    SAP spool error log
    =====================                                                     
    Print request processing log
    The host spool is reporting errors
    Windows/NT error 5 [
    srtroot03.startek.com\srt-dc-c4-sharp]: "Access is denied."
    Errors occurred processing this print request
    Error during print request output. l_rc = 1
    There may be no printout
    The access to the Printer Host is wide open, what do I need to do to resolve this issue.

Maybe you are looking for

  • Can't open .term Terminal.app files from command line

    Howdy. I use Terminal.app constantly for ssh'ing into numerous remote machines. On my G4 Powerbook I have simply created .term files with customized colors, titlebars, and an appropriate ssh execution string for each machine/userid combination, which

  • Can you video-chat with more than one friend at a time in new Hello?

    Simply wondering if a group of people can video-chat together at same time, or just one-on-one?

  • How do i change what the stop button does

    Is it possible to change the behavior of the 'STOP' button depending on the state of the 'PLAY' button? What I would like is this; When Logic is playing the 'STOP' button stops play leaving the playhead where it is. If the stop button is pressed agai

  • Error in Excercise 3 in day one

    Hello: I imported the resolution then run, but it end up with the error: Alert.show("There was a problem","Error"); what's the problem? Thanks!

  • WebLogic 9.2 with Apache Connector Config

    Hi I am new to this forum, WebLogic, and all Oracle products for that matter. I am a college intern and I have been asked to learn how to use WebLogic 9.2. I was told that they want it to be connected to apache with the mod_wl_22.so shared module for