Field names are not getting into excel sheet while download

Hi All,
I am using gui_download fm to download internal table data to excel sheet.
have passed fieldnames parameter also.
defined each column with char type and length of those descriptions also.
but while downloading only first column description is getting.
Please help me.
Thanks in advance.
Regards,
eswar

hi,
check this sample code.
DATA : BEGIN OF it_join_fields OCCURS 0,
         field_name(20),
         END OF it_join_fields.
CLEAR it_join_fields.
  it_join_fields-field_name = 'pernr'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'empname'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'new_joinee'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'begda'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'fath_name'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'gbdat'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'gesch'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
  it_join_fields-field_name = 'usrid_long'.
  APPEND it_join_fields.
  CLEAR it_join_fields.
it_join_fields-field_name = 'werks'.
  APPEND it_join_fields.
CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
  BIN_FILESIZE                    =
      filename                        = file_name
      filetype                        = 'ASC'
      append                          = 'X'
      write_field_separator           = 'X'
  HEADER                          = '00'
  TRUNC_TRAILING_BLANKS           = ' '
  WRITE_LF                        = 'X'
  COL_SELECT                      = ' '
  COL_SELECT_MASK                 = ' '
  DAT_MODE                        = ' '
  CONFIRM_OVERWRITE               = ' '
  NO_AUTH_CHECK                   = ' '
  CODEPAGE                        = ' '
  IGNORE_CERR                     = ABAP_TRUE
  REPLACEMENT                     = '#'
  WRITE_BOM                       = ' '
  TRUNC_TRAILING_BLANKS_EOL       = 'X'
  WK1_N_FORMAT                    = ' '
  WK1_N_SIZE                      = ' '
  WK1_T_FORMAT                    = ' '
  WK1_T_SIZE                      = ' '
  WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
  SHOW_TRANSFER_STATUS            = ABAP_TRUE
IMPORTING
  FILELENGTH                      =
    TABLES
      data_tab                        = it_join_det_new
      fieldnames                      = it_join_fields
EXCEPTIONS
  FILE_WRITE_ERROR                = 1
  NO_BATCH                        = 2
  GUI_REFUSE_FILETRANSFER         = 3
  INVALID_TYPE                    = 4
  NO_AUTHORITY                    = 5
  UNKNOWN_ERROR                   = 6
  HEADER_NOT_ALLOWED              = 7
  SEPARATOR_NOT_ALLOWED
  FILESIZE_NOT_ALLOWED            = 9
  HEADER_TOO_LONG                 = 10
  DP_ERROR_CREATE                 = 11
  DP_ERROR_SEND                   = 12
  DP_ERROR_WRITE                  = 13
  UNKNOWN_DP_ERROR                = 14
  ACCESS_DENIED                   = 15
  DP_OUT_OF_MEMORY                = 16
  DISK_FULL                       = 17
  DP_TIMEOUT                      = 18
  FILE_NOT_FOUND                  = 19
  DATAPROVIDER_EXCEPTION          = 20
  CONTROL_FLUSH_ERROR             = 21
  OTHERS                          = 22
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Similar Messages

  • When inserting 2 column details in a single table using Stored Procedure.Only 2 Column details getting inserted.1column details are not getting into the table.Please see the below script and help me to change.

    Line 390 Under the (Insert into SALES_TRADEIN Table)
    I need to insert (TradeIn_1_VIN) Values If there is no values in (TradeIn_1_VIN) then i have to insert (TradeIn_2_VIN) values to the (SALES_TRADEIN) Table.
    After i run then below script only (TradeIn_2_VIN) values are get inserted in the table. (TradeIn_1_VIN) are not getting loaded in to the table.
    I think there is the problem from Line No (404 to 414) Please help me change those particular lines to insert (TradeIn_1_VIN) Values also.If there is no details then (TradeIn_2_VIN) need to be inserted.
    -- =============================================
    -- Stored Procedure for Flatfile_Sales
    -- =============================================
    USE [IconicMarketing]
    ---==========Sales_Cursor
    --USE [IconicMarketing]
    --GO
    DECLARE
    @FileType
    varchar(50),
    @ACDealerID
    varchar(50),
    @ClientDealerID
    varchar(50),
    @DMSType
    varchar(50),
    @DealNumber
    varchar(50),
    @CustomerNumber
    varchar(50),
    @CustomerName
    varchar(50),
    @CustomerFirstName
    varchar(50),
    @CustomerLastName
    varchar(50),
    @CustomerAddress
    varchar(50),
    @CustomerCity
    varchar(50),
    @CustomerState
    varchar(50),
    @CustomerZip
    varchar(50),
    @CustomerCounty
    varchar(50),
    @CustomerHomePhone
    varchar(50),
    @CustomerWorkPhone
    varchar(50),
    @CustomerCellPhone
    varchar(50),
    @CustomerPagerPhone
    varchar(50),
    @CustomerEmail
    varchar(50),
    @CustomerBirthDate
    varchar(50),
    @MailBlock
    varchar(50),
    @CoBuyerName
    varchar(50),
    @CoBuyerFirstName
    varchar(50),
    @CoBuyerLastName
    varchar(50),
    @CoBuyerAddress
    varchar(50),
    @CoBuyerCity
    varchar(50),
    @CoBuyerState
    varchar(50),
    @CoBuyerZip
    varchar(50),
    @CoBuyerCounty
    varchar(50),
    @CoBuyerHomePhone
    varchar(50),
    @CoBuyerWorkPhone
    varchar(50),
    @CoBuyerBirthDate
    varchar(50),
    @Salesman_1_Number
    varchar(50),
    @Salesman_1_Name
    varchar(50),
    @Salesman_2_Number
    varchar(50),
    @Salesman_2_Name
    varchar(50),
    @ClosingManagerName
    varchar(50),
    @ClosingManagerNumber
    varchar(50),
    @F_AND_I_ManagerNumber
    varchar(50),
    @F_AND_I_ManagerName
    varchar(50),
    @SalesManagerNumber
    varchar(50),
    @SalesManagerName
    varchar(50),
    @EntryDate
    varchar(50),
    @DealBookDate
    varchar(50),
    @VehicleYear
    varchar(50),
    @VehicleMake
    varchar(50),
    @VehicleModel
    varchar(50),
    @VehicleStockNumber
    varchar(50),
    @VehicleVIN
    varchar(50),
    @VehicleExteriorColor
    varchar(50),
    @VehicleInteriorColor
    varchar(50),
    @VehicleMileage
    varchar(50),
    @VehicleType
    varchar(50),
    @InServiceDate
    varchar(50),
    @HoldBackAmount
    varchar(50),
    @DealType
    varchar(50),
    @SaleType
    varchar(50),
    @BankCode
    varchar(50),
    @BankName
    varchar(50),
    @SalesmanCommission
    varchar(50),
    @GrossProfitSale
    varchar(50),
    @FinanceReserve
    varchar(50),
    @CreditLifePremium
    varchar(50),
    @CreditLifeCommision
    varchar(50),
    @TotalInsuranceReserve
    varchar(50),
    @BalloonAmount
    varchar(50),
    @CashPrice
    varchar(50),
    @AmountFinanced
    varchar(50),
    @TotalOfPayments
    varchar(50),
    @MSRP varchar(50),
    @DownPayment
    varchar(50),
    @SecurityDesposit
    varchar(50),
    @Rebate
    varchar(50),
    @Term varchar(50),
    @RetailPayment
    varchar(50),
    @PaymentType
    varchar(50),
    @RetailFirstPayDate
    varchar(50),
    @LeaseFirstPayDate
    varchar(50),
    @DayToFirstPayment
    varchar(50),
    @LeaseAnnualMiles
    varchar(50),
    @MileageRate
    varchar(50),
    @APRRate
    varchar(50),
    @ResidualAmount
    varchar(50),
    @LicenseFee
    varchar(50),
    @RegistrationFee
    varchar(50),
    @TotalTax
    varchar(50),
    @ExtendedWarrantyName
    varchar(50),
    @ExtendedWarrantyTerm
    varchar(50),
    @ExtendedWarrantyLimitMiles
    varchar(50),
    @ExtendedWarrantyDollar
    varchar(50),
    @ExtendedWarrantyProfit
    varchar(50),
    @FrontGross
    varchar(50),
    @BackGross
    varchar(50),
    @TradeIn_1_VIN
    varchar(50),
    @TradeIn_2_VIN
    varchar(50),
    @TradeIn_1_Make
    varchar(50),
    @TradeIn_2_Make
    varchar(50),
    @TradeIn_1_Model
    varchar(50),
    @TradeIn_2_Model
    varchar(50),
    @TradeIn_1_ExteriorColor
    varchar(50),
    @TradeIn_2_ExteriorColor
    varchar(50),
    @TradeIn_1_Year
    varchar(50),
    @TradeIn_2_Year
    varchar(50),
    @TradeIn_1_Mileage
    varchar(50),
    @TradeIn_2_Mileage
    varchar(50),
    @TradeIn_1_Gross
    varchar(50),
    @TradeIn_2_Gross
    varchar(50),
    @TradeIn_1_Payoff
    varchar(50),
    @TradeIn_2_Payoff
    varchar(50),
    @TradeIn_1_ACV
    varchar(50),
    @TradeIn_2_ACV
    varchar(50),
    @Fee_1_Name
    varchar(50),
    @Fee_1_Fee
    varchar(50),
    @Fee_1_Commission
    varchar(50),
    @Fee_2_Name
    varchar(50),
    @Fee_2_Fee
    varchar(50),
    @Fee_2_Commission
    varchar(50),
    @Fee_3_Name
    varchar(50),
    @Fee_3_Fee
    varchar(50),
    @Fee_3_Commission
    varchar(50),
    @Fee_4_Name
    varchar(50),
    @Fee_4_Fee
    varchar(50),
    @Fee_4_Commission
    varchar(50),
    @Fee_5_Name
    varchar(50),
    @Fee_5_Fee
    varchar(50),
    @Fee_5_Commission
    varchar(50),
    @Fee_6_Name
    varchar(50),
    @Fee_6_Fee
    varchar(50),
    @Fee_6_Commission
    varchar(50),
    @Fee_7_Name
    varchar(50),
    @Fee_7_Fee
    varchar(50),
    @Fee_7_Commission
    varchar(50),
    @Fee_8_Name
    varchar(50),
    @Fee_8_Fee
    varchar(50),
    @Fee_8_Commission
    varchar(50),
    @Fee_9_Name
    varchar(50),
    @Fee_9_Fee
    varchar(50),
    @Fee_9_Commission
    varchar(50),
    @Fee_10_Name
    varchar(50),
    @Fee_10_Fee
    varchar(50),
    @Fee_10_Commission
    varchar(50),
    @ContractDate
    varchar(50),
    @InsuranceName
    varchar(50),
    @InsuranceAgentName
    varchar(50),
    @InsuranceAddress
    varchar(50),
    @InsuranceCity
    varchar(50),
    @InsuranceState
    varchar(50),
    @InsuranceZip
    varchar(50),
    @InsurancePhone
    varchar(50),
    @InsurancePolicyNumber
    varchar(50),
    @InsuranceEffectiveDate
    varchar(50),
    @InsuranceExpirationDate
    varchar(50),
    @InsuranceCompensationDeduction
    varchar(50),
    @TradeIn_1_InteriorColor
    varchar(50),
    @TradeIn_2_InteriorColor
    varchar(50),
    @PhoneBlock
    varchar(50),
    @LicensePlateNumber
    varchar(50),
    @Cost varchar(50),
    @InvoiceAmount
    varchar(50),
    @FinanceCharge
    varchar(50),
    @TotalPickupPayment
    varchar(50),
    @TotalAccessories
    varchar(50),
    @TotalDriveOffAmount
    varchar(50),
    @EmailBlock
    varchar(50),
    @ModelDescriptionOfCarSold
    varchar(50),
    @VehicleClassification
    varchar(50),
    @ModelNumberOfCarSold
    varchar(50),
    @GAPPremium
    varchar(50),
    @LastInstallmentDate
    varchar(50),
    @CashDeposit
    varchar(50),
    @AHPremium
    varchar(50),
    @LeaseRate
    varchar(50),
    @DealerSelect
    varchar(50),
    @LeasePayment
    varchar(50),
    @LeaseNetCapCost
    varchar(50),
    @LeaseTotalCapReduction
    varchar(50),
    @DealStatus
    varchar(50),
    @CustomerSuffix
    varchar(50),
    @CustomerSalutation
    varchar(50),
    @CustomerAddress2
    varchar(50),
    @CustomerMiddleName
    varchar(50),
    @GlobalOptOut
    varchar(50),
    @LeaseTerm
    varchar(50),
    @ExtendedWarrantyFlag
    varchar(50),
    @Salesman_3_Number
    varchar(50),
    @Salesman_3_Name
    varchar(50),
    @Salesman_4_Number
    varchar(50),
    @Salesman_4_Name
    varchar(50),
    @Salesman_5_Number
    varchar(50),
    @Salesman_5_Name
    varchar(50),
    @Salesman_6_Number
    varchar(50),
    @Salesman_6_Name
    varchar(50),
    @APRRate2
    varchar(50),
    @APRRate3
    varchar(50),
    @APRRate4
    varchar(50),
    @Term2
    varchar(50),
    @SecurityDeposit2
    varchar(50),
    @DownPayment2
    varchar(50),
    @TotalOfPayments2
    varchar(50),
    @BasePayment
    varchar(50),
    @JournalSaleAmount
    varchar(50),
    @IndividualBusinessFlag
    varchar(50),
    @InventoryDate
    varchar(50),
    @StatusDate
    varchar(50),
    @ListPrice
    varchar(50),
    @NetTradeAmount
    varchar(50),
    @TrimLevel
    varchar(50),
    @SubTrimLevel
    varchar(50),
    @BodyDescription
    varchar(50),
    @BodyDoorCount
    varchar(50),
    @TransmissionDesc
    varchar(50),
    @EngineDesc
    varchar(50),
    @TypeCode
    varchar(50),
    @SLCT2
    varchar(50),
    @DealDateOffset
    varchar(50),
    @AccountingDate
    varchar(50),
    @CoBuyerCustNum
    varchar(50),
    @CoBuyerCell
    varchar(50),
    @CoBuyerEmail
    varchar(50),
    @CoBuyerSalutation
    varchar(50),
    @CoBuyerPhoneBlock
    varchar(50),
    @CoBuyerMailBlock
    varchar(50),
    @CoBuyerEmailBlock
    varchar(50),
    @RealBookDate
    varchar(50),
    @CoBuyerMiddleName
    varchar(50),
    @CoBuyerCountry
    varchar(50),
    @CoBuyerAddress2
    varchar(50),
    @CoBuyerOptOut
    varchar(50),
    @CoBuyerOccupation
    varchar(50),
    @CoBuyerEmployer
    varchar(50),
    @Country
    varchar(50),
    @Occupation
    varchar(50),
    @Employer
    varchar(50),
    @Salesman2Commission
    varchar(50),
    @BankAddress
    varchar(50),
    @BankCity
    varchar(50),
    @BankState
    varchar(50),
    @BankZip
    varchar(50),
    @LeaseEstimatedMiles
    varchar(50),
    @AFTReserve
    varchar(50),
    @CreditLifePrem
    varchar(50),
    @CreditLifeRes
    varchar(50),
    @AHRes
    varchar(50),
    @Language
    varchar(50),
    @BuyRate
    varchar(50),
    @DMVAmount
    varchar(50),
    @Weight
    varchar(50),
    @StateDMVTotFee
    varchar(50),
    @ROSNumber
    varchar(50),
    @Incentives
    varchar(50),
    @CASS_STD_LINE1
    varchar(50),
    @CASS_STD_LINE2
    varchar(50),
    @CASS_STD_CITY
    varchar(50),
    @CASS_STD_STATE
    varchar(50),
    @CASS_STD_ZIP
    varchar(50),
    @CASS_STD_ZIP4
    varchar(50),
    @CASS_STD_DPBC
    varchar(50),
    @CASS_STD_CHKDGT
    varchar(50),
    @CASS_STD_CART
    varchar(50),
    @CASS_STD_LOT
    varchar(50),
    @CASS_STD_LOTORD
    varchar(50),
    @CASS_STD_URB
    varchar(50),
    @CASS_STD_FIPS
    varchar(50),
    @CASS_STD_EWS
    varchar(50),
    @CASS_STD_LACS
    varchar(50),
    @CASS_STD_ZIPMOV
    varchar(50),
    @CASS_STD_Z4LOM
    varchar(50),
    @CASS_STD_NDIAPT
    varchar(50),
    @CASS_STD_NDIRR
    varchar(50),
    @CASS_STD_LACSRT
    varchar(50),
    @CASS_STD_ERROR_CD
    varchar(50),
    @NCOA_AC_ID
    varchar(50),
    @NCOA_COA_ADDSRC
    varchar(50),
    @NCOA_COA_MATCH
    varchar(50),
    @NCOA_COA_MOVTYP
    varchar(50),
    @NCOA_COA_DATE
    varchar(50),
    @NCOA_COA_DELCD
    varchar(50),
    @NCOA_COA_RTYPE
    varchar(50),
    @NCOA_COA_RTNCD
    varchar(50),
    @NCOA_COA_LINE1
    varchar(50),
    @NCOA_COA_LINE2
    varchar(50),
    @NCOA_COA_CITY
    varchar(50),
    @NCOA_COA_STATE
    varchar(50),
    @NCOA_COA_ZIP
    varchar(50),
    @NCOA_COA_ZIP4
    varchar(50),
    @NCOA_COA_DPBC
    varchar(50),
    @NCOA_COA_CHKDGT
    varchar(50),
    @NCOA_COA_CART
    varchar(50),
    @NCOA_COA_LOT
    varchar(50),
    @NCOA_COA_LOTORD
    varchar(50),
    @NCOA_COA_URB
    varchar(50),
    @NCOA_COA_Z4LOM
    varchar(50),
    @NCOA_COA_ACTION
    varchar(50),
    @NCOA_COA_QNAME
    varchar(50),
    @NCOA_DPV_AA
    varchar(50),
    @NCOA_DPV_A1
    varchar(50),
    @NCOA_DPV_BB
    varchar(50),
    @NCOA_DPV_CC
    varchar(50),
    @NCOA_DPV_M1
    varchar(50),
    @NCOA_DPV_M3
    varchar(50),
    @NCOA_DPV_N1
    varchar(50),
    @NCOA_DPV_P1
    varchar(50),
    @NCOA_DPV_P3
    varchar(50),
    @NCOA_DPV_RR
    varchar(50),
    @NCOA_DPV_R1
    varchar(50),
    @NCOA_DPV_STATUS
    varchar(50),
    @NCOA_DPV_F1
    varchar(50),
    @NCOA_DPV_G1
    varchar(50),
    @NCOA_DPV_U1
    varchar(50),
    @myerror
    varchar(500),
    @SalesID
    int,
    @errornumber int,
                @errorseverity varchar(500),
                @errorstate int,
                @errorprocedure varchar(500),
                @errorline varchar(50),
                @errormessage varchar(1000);
    DECLARE Sales_Cursor CURSOR FOR 
    SELECT * from FLATFILE_SALES;
    OPEN Sales_Cursor;
     :r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
    WHILE @@FETCH_STATUS = 0
    BEGIN
    PRINT @VehicleVIN    ;
    --===============================================================================
    -- ****************** insert into Sales Table ***********
    BEGIN TRY
        INSERT INTO Sales 
    IconicDealerID,
    DealNumber,
    CustomerNumber,
    DMSType,
    ContractDate
    VALUES (@ClientDealerID,@DealNumber,@CustomerNumber,@DMSType,@ContractDate);
    END TRY
    BEGIN CATCH
         SELECT
            @errornumber = ERROR_NUMBER()
            ,@errorseverity = ERROR_SEVERITY() 
            ,@errorstate = ERROR_STATE() 
            ,@errorprocedure = ERROR_PROCEDURE() 
            ,@errorline = ERROR_LINE()
            ,@errormessage = ERROR_MESSAGE();
           :r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
    @errornumber ,
                @errorseverity ,
                @errorstate,
                @errorprocedure,
                @errorline,
                @errormessage);
    END CATCH
    PRINT @errornumber;
    PRINT @errorseverity;
    PRINT @errorprocedure;
    PRINT @errorline;
    PRINT @errormessage;
    PRINT @errorstate;
    set @myerror = @@ERROR;
        -- This PRINT statement prints 'Error = 0' because
        -- @@ERROR is reset in the IF statement above.
        PRINT N'Error = ' + @myerror;
    set @SalesID = scope_identity();
    PRINT @SalesID;
    --================================================================================
    --Insert into SALES_TRADEIN Table
    BEGIN TRY
    INSERT INTO SALES_TRADEIN
    SalesID,
    TradeIn_VIN,
    TradeIn_Make,
    TradeIn_Model,
    TradeIn_ExteriorColor,
    TradeIn_Year,
    TradeIn_Mileage,
    TradeIn_Gross,
    TradeIn_Payoff,
    TradeIn_ACV,
    TradeIn_InteriorColor
    VALUES
    @SalesID,
    case when  @TradeIn_1_VIN is not null then @TradeIn_2_VIN end,
    case when  @TradeIn_1_Make is not null  then @TradeIn_2_Make end,
    case when  @TradeIn_1_Model is not null  then @TradeIn_2_Model end,
    case when  @TradeIn_1_ExteriorColor is not null  then @TradeIn_2_ExteriorColor end,
    case when @TradeIn_1_Year is not null  then @TradeIn_2_Year end,
    case when  @TradeIn_1_Mileage is not null  then @TradeIn_2_Mileage end,
    case when @TradeIn_1_Gross is not null  then @TradeIn_2_Gross end,
    case when @TradeIn_1_Payoff is not null  then @TradeIn_2_Payoff end,
    case when @TradeIn_1_ACV is not null  then @TradeIn_2_ACV end,
    case when  @TradeIn_1_InteriorColor is not null  then @TradeIn_2_InteriorColor end
    END TRY
    BEGIN CATCH
    SELECT
            @errornumber = ERROR_NUMBER()
            ,@errorseverity = ERROR_SEVERITY() 
            ,@errorstate = ERROR_STATE() 
            ,@errorprocedure = ERROR_PROCEDURE() 
            ,@errorline = ERROR_LINE()
            ,@errormessage = ERROR_MESSAGE();
          :r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
    END CATCH

    This is what I've understood from your question. You want to replace @TradeIn_2_VIN value if @TradeIn_1_VIN
    is NULL, else the value of @TradeIn_1_VIN.
    If this is the requirement then, your CASE statement is missing ELSE part. You can re-write this as below
    case when  @TradeIn_1_VIN is null then @TradeIn_2_VIN
    ELSE @TradeIn_1_VIN end,
    or simply you can replace the CASE statement with the below
    COALESCE function,
    COALESCE(@TradeIn_1_VIN, @TradeIn_2_VIN),
    Krishnakumar S

  • Field names are not coming in file when dloaded frm apserv to prserv

    Here i'm dloading data to Appserver..frm there data is dloading to pre server..but fieldnames are downloading...i am working in 4.6c version.same code is working in ECC version...Plzz give me a suggestion...
    FORM dload_file_from_server  USING     p_srfname            "#EC *
                                           p_fname              "#EC *
                                           p_psfile             "#EC *
                                           p_flag.
      DATA: lv_fname TYPE string.
      CASE p_flag.
        WHEN 'MSEG'.
          ASSIGN it_fn TO <fn>.
          ASSIGN wa_fn TO <fn_wa>.
          ASSIGN it1_mseg TO <fs>.
          ASSIGN wa1_mseg TO <fs_wa>.
          ASSIGN p_srfname TO <fs_fname>.
          CONCATENATE p_psfile p_fname INTO lv_fname SEPARATED BY '\'.
        WHEN 'MKPF'.
          ASSIGN it_fn TO <fn>.
          ASSIGN wa_fn TO <fn_wa>.
          ASSIGN it1_mkpf TO <fs>.
          ASSIGN wa1_mkpf TO <fs_wa>.
          ASSIGN p_srfname TO <fs_fname>.
          CONCATENATE p_psfile p_fname INTO lv_fname SEPARATED BY '\'.
         WHEN OTHERS.
      ENDCASE.
      OPEN DATASET <fs_fname> FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      READ DATASET  <fs_fname> INTO <fn_wa>.
      APPEND <fn_wa> TO <fn>.
      DO.
        IF sy-tabix GE 1.
          READ DATASET <fs_fname> INTO <fs_wa>.
          IF sy-subrc = 0.
            APPEND <fs_wa> TO <fs>.
          ELSE.
            EXIT.
          ENDIF.
        ENDIF.
      ENDDO.
      CLOSE DATASET <fs_fname>.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                  = lv_fname
          filetype                  = 'ASC'
          trunc_trailing_blanks     = 'X'
          trunc_trailing_blanks_eol = 'X'
        TABLES
          data_tab                  = <fs>
          fieldnames                = <fn>.
      IF sy-subrc <> 0.                                         "#EC
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR: <fn>, <fn_wa>.
    ENDFORM.                    " dload_file_from_server
    Please use code tags - it makes your code easier to read
    Edited by: Rob Burbank on Dec 6, 2010 4:00 PM

    Hi,
        I think for 4.6 C <fn> must be declared as an internal table and the field names should be given as records and not as one single record.
       the fieldnames internal table should contain records as :
       Field1
       Field2 ....  and not as Field1 Field2 ....
    Regards,
    Srini.

  • Special characteristics are not allowed in excel sheet

    Hi  experts,
                         Pls help me when i m loading one excel sheet containing one record with # symbol , it is loaded to PSA sucessfully
                     but loaded into cube is failed. i have already maintained special characteristics RSKC and putted # and excuteed.
                  still i m  getting  error message. other records are loaded  to cube...
    Regards
    Giri
    Edited by: Siddhes on Aug 4, 2011 1:04 PM

    Please follow the below steps.
    1.First check what you have given in t-code RSKC or check
    the table RSALLOWEDCHAR.
    Try to give CAPITAL_ALL_PLUS_HEX.Then delete the data and
    reload it.
    2.If there is some other error,thene
    delete the request from data target.
    Go to psa search for error record and correct it and reload it.
    3.If some space is coming then you
    need to write some formula to remove the
    space.
    4.You can also enabl the Error stack DTP,so that
    erreneous record will go to stack and you can manually correct
    then and reload them.
    Hope this is helpful.
    Thanks,
    Saveen Kumar

  • Misalignement in Excel sheet,while downloading reports with huge data

    Hi,
    While downloading reports in excel with huge volume of data ,we are getting misalignments in the excel sheet(some data comes in wrong rows). Can you please suggest what could be the reason and how to correct it.
    Regards,
    Roopak

    Hi,
    If you are using Office 2003, then you cannot download morethan 65000+. However if you use Office 2007, I think it gives you somewhere around 400000 records. (I didnt scroll below that!!!). Also the columns are morethan IV.
    However assuming that, even that version can have limitation, you can always download your data in a wordpad/notepad/textpad etc which are basically text editing tools. They dont have any such row or column restrictions.
    Once downloaded, you can randomly split them into some x number of files, based on the number of records and then open the same documents using xls sheet using tab value as delimiter. Now the alignment will be perfect in the excel sheet.

  • When inserting 3 column details in a single table using Stored Procedure.Only 1 Column details getting inserted.Other 2 Column details are not getting into the table.Please see the below script and help me to change.

    From the Parent Table i need to insert rows which are all under this column {(TradeIn_1_VIN),(TradeIn_2_VIN),(TradeIn_3_VIN) } into SALES_TRADEIN Table .
    I have used the below Query,
    But it reads only (TradeIn _1_Vin) Column in the SALES_TRADEIN table rest 2 records got skipped..
    INSERT INTO SALES_TRADEIN
    SalesID,
    TradeIn_VIN,
    TradeIn_Make,
    TradeIn_Model,
    TradeIn_ExteriorColor,
    TradeIn_Year,
    TradeIn_Mileage,
    TradeIn_Gross,
    TradeIn_Payoff,
    TradeIn_ACV,
    TradeIn_InteriorColor
    VALUES
    @SalesID,
    case when @TradeIn_1_VIN is null then @TradeIn_2_VIN else @TradeIn_1_VIN end,
    case when @TradeIn_1_Make is null then @TradeIn_2_Make else @TradeIn_1_Make end,
    case when @TradeIn_1_Model is null then @TradeIn_2_Model else @TradeIn_1_Model end,
    case when @TradeIn_1_ExteriorColor is null then @TradeIn_2_ExteriorColor else @TradeIn_1_ExteriorColor end,
    case when @TradeIn_1_Year is null then @TradeIn_2_Year else @TradeIn_1_Year end,
    case when @TradeIn_1_Mileage is null then @TradeIn_2_Mileage else @TradeIn_1_Mileage end,
    case when @TradeIn_1_Gross is null then @TradeIn_2_Gross else @TradeIn_1_Gross end,
    case when @TradeIn_1_Payoff is null then @TradeIn_2_Payoff else @TradeIn_1_Payoff end,
    case when @TradeIn_1_ACV is null then @TradeIn_2_ACV else @TradeIn_1_ACV end,
    case when @TradeIn_1_InteriorColor is null then @TradeIn_2_InteriorColor else @TradeIn_1_InteriorColor end
    END TRY
    Actually my problem is
     If  [(TradeIn_1_VIN),(TradeIn_2_VIN),(TradeIn_3_VIN)] these 3 columns have details i need all the 3 columns  details need to be read to SALES_TRADEIN table.
    Suppose if we have data only in [(TradeIn_1_VIN),(TradeIn_2_VIN)] then these column details need to loaded in the SALES_TRADEIN table.
    If any columns are blank no problem it can move next process.
    Please help me change those particular lines to insert all the 3 records  (TradeIn_1_VIN) (TradeIn_2_VIN) (TradeIn_3_VIN) in to the table.

    From SQL2008 on, besides INSERT-SELECT, and INSERT-EXEC, the INSERT-VALUES form of the insert command is improved. It can insert multiple rows like this:
    INSERT INTO my_table(MyColA, MyColB)
    VALUES
    (1, 1),
    (2, 2),
      (3, 3)
    You could also use that in SELECTs, like this:
    SELECT *
    FROM
    (    VALUES (1,2), (3,4)
    ) t(a, b)

  • Export ALV List into Excel Sheet

    Hi Friends,
    We are displaying an ALV List in report Program and we are exporting that into excel sheet using the icon "Spreadsheet(ctrlshiftF7)"provided by ALV Grid.
    But when it is displayed in Excel sheet it changes the sequence of columns (fields).
    And we observed that it displays all the CHAR fields first then the CURRENCY fields and then the DATE fields that we specified in field catalog.
    So, what should be done so that the fields are exported into Excel in the same order as specified in the field catalog of ALV List.

    Give this a look.
    REPORT ZEXCEL .
    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
    workbook TYPE ole2_object,
    sheet TYPE ole2_object,
    cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
    DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
    *START-OF-SELECTION
    START-OF-SELECTION.
    APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
    '=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
    'John' TO itab1, 'Smith' TO itab2,
    '=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
    CREATE OBJECT application 'excel.application'.
    SET PROPERTY OF application 'visible' = 1.
    CALL METHOD OF application 'Workbooks' = workbook.
    CALL METHOD OF workbook 'Add'.
    Create first Excel Sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 1.
    CALL METHOD OF sheet 'Activate'.
    SET PROPERTY OF sheet 'Name' = 'Sheet1'.
    LOOP AT itab1.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab1-first_name.
    ENDLOOP.
    Create second Excel sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 2.
    SET PROPERTY OF sheet 'Name' = 'Sheet2'.
    CALL METHOD OF sheet 'Activate'.
    LOOP AT itab2.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab2-last_name.
    ENDLOOP.
    Create third Excel sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 3.
    SET PROPERTY OF sheet 'Name' = 'Sheet3'.
    CALL METHOD OF sheet 'Activate'.
    LOOP AT itab3.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Formula' = itab3-formula.
    SET PROPERTY OF cells 'Value' = itab3-formula.
    ENDLOOP.
    Save excel speadsheet to particular filename
    CALL METHOD OF sheet 'SaveAs'
    EXPORTING #1 = 'c:\temp\exceldoc1.xls' "filename
    #2 = 1. "fileFormat
    Closes excel window, data is lost if not saved
    SET PROPERTY OF application 'visible' = 0.

  • How to convert the customized report sales price list into excel sheet

    hi friends,
    i am faceing the probulem in VK13 report is not conveting into excel sheet, then i developed the one customized report,
    in this report i am using the tables are a506, konp,and makt, result is coming and it converted into excel sheet in my systam. when i was clik on the excel sheet icon it comming  excel format it working fine and save it. But in menubar list>export> localfile and select redio button spredsheet this navigation only it print the three colums not coming the total colums,
    same program test in another system it not converted into excel sheet, when i am click on excel sheet icon  it's given the message is 'VIEW CAN NOT BE SWITCHED, PRODUCT NOT INSTALLED OR INTEGRATION NOT ACTIVE'. but i giving the print privew it giving the three colums only,.
    In program i am using regular using reuse_alv_grid_display FM only.
    sorry this qusition is repeted becuse before that one mising some text.
    any one plz help me.
    thanks
    raj

    nice answer

  • I need to get into my old account and get my addresses and then cancel the old account but can not get into it. Had to change my user name when I moved and now I can't get into Firefox. Can't remember the old password. What to do??

    I moved during the summer. I changed to highspeedand & when I set my computer up it told me that my email address was already in use so I had to change it(????) I changed from jkady to [email protected] I tried to change it on firefox but it would not except the new name and I could not get into my old account.I need all my addresses and would like to cancel the old account but I can not get into it. This is very frustrating!!!!! I need my addresses!!!!!!!!

    I logged in changed the primary E-Mail address to a different one, vertified it then tried to log in it said either to send an E-Mail to veritify again or to do my security questions, so I choose to do the security questions and put in my Birthday like it asked and it said that it was wrong and I had to authenticate it to get in, why is it so hard to just set up a Apple ID really though!
    So I tried the E-Mail to and it has not sent me an E-Mail then I tried to log in again and it has locked me out of my account so I try to recover my password and it gave me the same options to get my password back and both options are doing the same as before, it says I don't know my on birth date or it is wrong or needs authenticate it, then the E-Mail doesn't come through!
    This is just stupid now.

  • How to Get the excel sheet formula from the server side into the j2me app?

    How to Get the excel sheet formula from the server side into the j2me application?
    Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
    But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
    So how to get the excel sheet formula frome the server side into j2me Application...
    Plz guide me to solve this issue...
    thanks & regards, Sivakumar.J

    You should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.

  • Data carrier & application field are not getting displayed in CV04N

    Hi Guru's
    In TCode : CV04N,  data carrier & application field are not getting displayed.
    While i compare with my IDES system, data carrier & application fields are getting displayed in CV04N.
    Let me know is there any configuration that has been missed out.
    Regards
    Bhanu

    Hi Bhanu,
    Please note that the fields 'Data carrier' & 'Application field'  are visible only if no document type is entered.
    Suppose you enter a document type and press ENTER then these fields disappear. This is because the field 'Application' was designed when only the storage is archive, vault or SAP-SYSTEM was possible and the number of added originals was limited.
    Currently DMS allows storage of originals on Content Server and there is no limit on the number of added originals, the system behavior was changed due to performance reasons. To avoid performance problems if you search for a document with a lot of originals attached this field gets invisible if you enter a document type which uses the KPRO storage.
    Regards,
    Pradeepkumar Haragoldavar

  • Date and time fields are not getting updated in database

    Hi,
    I am Using the bapi SD_SHIPMENT_HEADER_CHANGE in my program ...
    I  am using bapi_shipemnt_create for creating shipment document but, trying to enter the date fileds using this bapi .
    can anybody please tell me how shud i pass this variables exactly ...
    i tried giving test data and checked this bapi .. the result in changing parameters is also appearing but in databade itself the date fields are not getting reflected ...
    The fields ate DTDIS ,UZDIS, DATEN,UATEN. ( i am trying to map these fields in changing parameters)
              gw_vttkvb_new-mandt = sy-mandt.
              gw_vttkvb_new-tknum = gw_return-message_v1(passing shipment number )
              gw_vttkvb_new-dtdis = gi_ship_doc-dtdis.
              gw_vttkvb_new-daten = gi_ship_doc-daten.
              gw_vttkvb_new-uzdis = gi_ship_doc-uzdis.
              gw_vttkvb_new-uaten = gi_ship_doc-uaten.
              APPEND gw_vttkvb_new TO gi_vttkvb_new.
              CALL FUNCTION 'SD_SHIPMENT_HEADER_CHANGE'
              EXPORTING
                i_tvtk                             =  '
              I_DESTINATION                      =
              I_DEPARTURE                        =
              OPT_DIALOG                         = 'X'
            IMPORTING
              E_SERV_AGENT_FROM_DELIVERY         =
              E_ROUTE_FROM_DELIVERY              =
              E_LEG_DETERMINATION_DONE           =
              E_NUMBER_OF_CHANGED_LEGS           =
                 TABLES
                   c_xvttk                            = gi_xvttk
                   c_yvttk                            = gi_yvttk
                   c_xvttp                            = gi_xvttp
                   c_yvttp                            = gi_yvttp
                   c_xvtts                            = gi_xvtts
                   c_yvtts                            = gi_yvtts
                   c_xvtsp                            = gi_xvtsp
                   c_yvtsp                            = gi_yvtsp
                   c_xvbpa                            = gi_xvbpa
                   c_yvbpa                            = gi_yvbpa
                   c_xvbadr                           = gi_xvbadr
                   c_yvbadr                           = gi_yvbadr
                   i_xtrlk                            = gi_vtrlk
                   i_xtrlp                            = gi_vtrlp
              I_DEPARTURE_SEQUENCE               =
              I_XVTFA                            =
              I_YVTFA                            =
                 CHANGING
                   c_xvttk_new                        = gi_vttkvb_new
                EXCEPTIONS
                  invalid_change                     = 1
                  route_insert_failed                = 2
                  tdlnr_insert_failed                = 3
                  status_planned_failed              = 4
                  status_registrated_failed          = 5
                  status_loading_start_failed        = 6
                  status_loading_end_failed          = 7
                  status_completion_failed           = 8
                  status_shipment_start_failed       = 9
                  status_shipment_end_failed         = 10
                  OTHERS                             = 11.
              IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             ELSE.
                 **** Save shipment created
               CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             WAIT          =
                  IMPORTING
                    return        = gw_return.
              ENDIF.
    Regards,
    shilpa talluri .

    Hi,
    Try this
    DATA: wa TYPE zvariant.
    wa-mandt     = sy-mandt.
    wa-z_var     = 'test'.
    wa-projid      = 'test'. 
    wa-relid        = 'test'.
    wa-srtf2       = 'test'.
    wa-clustr      = 'test'.
    wa-clustd     = ''test'. 
    INSERT zvariant CLIENT SPECIFIED FROM wa.
    Raul Natu

  • CJ20N-fields are not getting updated in table PROJ

    Hi all,
    I have a requirement where I need to transfer the WBS element data created in one system to another using IDOC.
    The idoc has generated sucessfully and was also sent/processed successfully in the recieving system but fields STSPD and STSPR are not getting poulated in table PROJ.
    In the confic I have assigned FM:IDOC_INPUT_PROJECT to the process code.
    Thanks,
    Gaurav

    Hi,
    Please check with the Customer and Material Statistics group in the Customer and material master respectively.
    Further check with the LIS settings (Sales Area combination with the Update group).
    Reward points if this helps you.
    Regards,
    Harsh

  • Sub items are not getting copied into excise invoice

    Hi Guru's
    I am using Sales BOM in my sale order, pricing and inventory are controlled at sub-item level.
    I am creating the outbound delivery with reference to sale order and billing document (Commercial Invoice) with reference to outbound delivery.
    When I create an excise invoice in J1IIN, subitems are not getting copied from billing document, instead only main item is getting copied along with sum of all the excise duties of subitems. Ex: A is main item (Not relevant for pricing). B and C are subitems with excise duty 10 and 20 respectively. Here A is getting copied with excise duty 30 (10 +30).
    When I download the excise register, register is showing all A, B and C items with quantity but it is not showing the corresponding excise duties of subitems. We would like to avail cenvat at sub items.
    Kindly suggest me how can I copy subitems into excise invoice from billing document.
    Thanks & Regards.
    Swamy H P

    Hi Lakshmipathi,
    Thank you so much for the response.
    Yes, I am able to save the outgoing excise invoice(J1IIN) without any errors. It's working fine for normal materials(With out BOM), but for BOM materials even though main item is not relevant for pricing as pricing is controlled at sub items all the excise duties (BED, ECS and S&H cess) of sub items are getting copied to main item while creating the outgoing excise invoice.
    I mean excise invoice is showing only main item with all the sub items excise duties. same is getting posted also.
    But when I extract and download RG1 register, RG1 report is showing both main item and sub items with quantity but excise duties are not shown.
    I debugged and found that excise duties are not flowing to table J_1irg1 from J_1iexcdtl.
    Thanks & Regards,
    Swamy H P

  • Changes to Excel files are not getting updated

    File updates not reflected. I modified content, added data validation and saved the file back - next day file is still the way it was before modification.
    Other file, another site but similar situation.
    Content changed - form added but next day the change is not reflected. File updates not reflected. I modified content, added data validation and saved the file back - next day file is still the way it was before modification.
    Other file, another site but similar situation.
    Content changed - form added but next day the change is not reflected.

    Hi,
    According to your post, my understanding is that changes to Excel files are not getting updated.
    I recommend to configure Excel Services data refresh by using Secure Store and an external Office Data Connection (ODC) file.
    For more information, you can refe to:
    Configure Excel Services data refresh by using external data connections in SharePoint Server 2013
    If you use PowerPivot, you can refer to:
    Refreshing PowerPivot Data in SharePoint 2013
    If you use Office Web Apps, you can use New-SPWOPISuppressionSetting -extension xlsx -action view to refresh data.
    You can refer to:
    PowerPivot for SharePoint - Browser Refresh Fails (Data Refresh not supported in Office Web Apps)
    In addition, here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/office/en-US/2c4009f3-62bc-4af0-9e16-e40e9d418e3b/user-changes-to-sharepoint-documents-lost
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • What are the pro's and con's of the 4s?

    I am not yet an owner of the 4s iphone. So what are the pro's and con's of owning the white 32gb iphone 4s? I have had the white 32 gb iphone 3gs for two years and until I get a job I will not be buying the 4s I so need.

  • Nano 3rd gen

    I just got a Nano 3rd gen from someone and it's not doing as I wish. When I connect it to a computer, sometimes it will be recognised and sometimes it won't. When it's not recognised, the Apple logo will just flash on and off for hours. I kept it plu

  • Xsan 1.4 First Look & Stability Report

    Immediately installed Xsan 1.4 with a client that's been suffering under the FCP render issues introduced with 1.3. I'm happy to report that with a reasonable sized installation (12 seats & 22 seats) both have been running flawlessly all day and have

  • Create a BEx variable which should by default contain current date, etc

    Hi, I need to create 2 variables: ZDATE01 and ZDATE02. They will be used in the following situation: 0DATETO >= ZDATE01 and 0DATEFROM <= ZDATE02 to only display records on a current "key" date. ZDATE01 should be a variable that has current date pre-p

  • Just bought an iPod Touch without january updates

    Hi, Two days ago, I bought an iPod Touch 8GB in the Apple Store of the 5th avenue. I asked if the firmware included the january updates and the Apple salesman told me all iPods were up to date. Unfortunately, this was wrong. I paid full price for an