Transfering Date field into UNIX server

Hi,
I transferring date field to UNIX server from SAP which later read by MAINFRAME system from UNIX server.I would like to transfer the date field with length 5 into Unix server.I tried to transfer using PACK, but packed date is not readable to validate the unix file.Can anybody help me out on this.
Thanks in Advance,
Kilaru

hi,
  For writing the fields into Unix file, they have to character fields.
  to pass a date field, try like this.
data: v_date(10) type c.
  concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4) into  v_date separated by '/'.
  now send v_date to unix file.
Regards,
Sailaja.

Similar Messages

  • User exit to write CJI3 output into Unix server in background processing

    Hi Experts
       How to write CJI3 (project actual cost) output ALV report into unix server in b/g processing.
    Is there any user exit?
    What is the user exit for adding the fields in CJI3 transaction.
    Thanx
    Yugi

    Hi Experts
       How to write CJI3 (project actual cost) output ALV report into unix server in b/g processing.
    Is there any user exit?
    What is the user exit for adding the fields in CJI3 transaction.
    Thanx
    Yugi

  • Send email including the data field into the html message body

    Hi all,
    I would like to send an email to each recipient once only, and including a data field into the html body message. I am not sure how to achive that with my current stored procedure.
    USE [CallManager]
    GO
    /****** Object: StoredProcedure [dbo].[PersonalCallsReminder] Script Date: 08/27/2014 10:26:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [dbo].[PersonalCallsReminder]
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
    -- Email Users
    declare @email varchar(max)
    declare mycursor cursor FAST_FORWARD for
    SELECT dbo.HumersStaffExtension.email
    FROM dbo.Calls_Mobile_Header INNER JOIN
    dbo.HumersStaffExtension ON
    dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
    GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email,
    dbo.HumersStaffExtension.res_id
    HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
    OPEN mycursor;
    FETCH NEXT FROM mycursor
    INTO @email
    WHILE @@FETCH_STATUS = 0
    BEGIN
    EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'CallsManagement',
    @recipients = @email ,
    @body_format = 'HTML',
    @subject = 'Personal Calls Reminder',
    @body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Personal Calls Reminder</title>
    <style type="text/css">
    body {
    font-family: "Times New Roman", Times, serif;
    font-size: 11pt;
    .auto-style1 {
    background-color: #FFFF00;
    </style>
    </head>
    <body>
    <div>
    <table style="width: 800px">
    <tr>
    <td>Dear,<br />
    <br />
    Please review your phone bills and submit your personal calls using the following link:<br />
    <a href="http://companyxyz/personalcalls/">Personal Calls</a></td>
    </tr>
    </table>
    <br/>
    <table style="width: 800px">
    <tr>
    <td><strong>Kindly be informed that the deadline to process new bills is on the
    <span class="auto-style1">15th of each month</span>.</strong></td>
    </tr>
    </table>
    <br/>
    <table style="width: 800px">
    <tr>
    <td>For assistance, please contact <a href="mailto:[email protected]">[email protected]</a></td>
    </tr>
    </table>
    <br/>
    <table style="width: 800px">
    <tr>
    <td><strong>*** This is an automatically generated email, please do not reply ***</strong></td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    FETCH NEXT FROM mycursor
    INTO @email
    END
    CLOSE mycursor;
    DEALLOCATE mycursor;
    END
    Changing the query to the following:
    SELECT TOP (100) PERCENT dbo.HumersStaffExtension.email, dbo.Calls_Mobile_Header.ExtractDate
    FROM dbo.Calls_Mobile_Header INNER JOIN
    dbo.HumersStaffExtension ON
    dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
    GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email, dbo.HumersStaffExtension.res_id,
    dbo.Calls_Mobile_Header.ExtractDate
    HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
    ORDER BY dbo.HumersStaffExtension.email
    Will provide me with the following results:
    email ExtractDate
    [email protected]
    July-2014
    [email protected]
    August-2014
    [email protected]
    July-2014
    [email protected]
    August-2014
    Is it possible to send email to [email protected] once only including in the html message body the ExtractDate field results for July-2014 and August-2014? 
    I appreciate any assist on the issue.
    Thank you in advance.

    Refer the below code highlighted in bold.
    USE [CallManager]
    GO
    /****** Object:  StoredProcedure [dbo].[PersonalCallsReminder]    Script Date: 08/27/2014 10:26:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:  <Author,,Name>
    -- Create date: <Create Date,,>
    -- Description: <Description,,>
    -- =============================================
    ALTER PROCEDURE [dbo].[PersonalCallsReminder]
    AS
    BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     -- Email Users
    declare @email varchar(max),@date datetime
    declare @temp table (email varchar(50), extractDate datetime)
    insert into @temp
      SELECT     TOP (100) PERCENT dbo.HumersStaffExtension.email, dbo.Calls_Mobile_Header.ExtractDate
      FROM         dbo.Calls_Mobile_Header INNER JOIN
             dbo.HumersStaffExtension ON
             dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
      GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email, dbo.HumersStaffExtension.res_id,
             dbo.Calls_Mobile_Header.ExtractDate
      HAVING      (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
      ORDER BY dbo.HumersStaffExtension.email
    declare mycursor cursor FAST_FORWARD for SELECT DISTINCT email from @temp
    OPEN mycursor;
    FETCH NEXT FROM mycursor
    INTO @email
    WHILE @@FETCH_STATUS = 0
    BEGIN
        DECLARE @date nvarchar(200)
        SELECT @date=Stuff((SELECT ',' + [extractDate]
                  FROM   @temp  where email = @email
                  FOR xml path('')), 1, 1, '')
           EXEC msdb.dbo.sp_send_dbmail
                @profile_name = 'CallsManagement',
                @recipients = @email ,
                @body_format = 'HTML',
                @subject = 'Personal Calls Reminder',
                @body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Personal Calls Reminder</title>
    <style type="text/css">
     body {
     font-family: "Times New Roman", Times, serif;
     font-size: 11pt;
    .auto-style1 {
     background-color: #FFFF00;
    </style>
    </head>
    <body>
    <div>Extract Date : ' + @date + '</div>
    <div>
     <table style="width: 800px">
      <tr>
       <td>Dear,<br />
       <br />
       Please review your phone bills and submit your personal calls using the following link:<br />
       <a href="Personal">http://companyxyz/personalcalls/">Personal Calls</a></td>
      </tr>
     </table> 
     <br/>
     <table style="width: 800px">
      <tr>
       <td><strong>Kindly be informed that the deadline to process new bills is on the
       <span class="auto-style1">15th of each month</span>.</strong></td>
      </tr>
     </table>
     <br/>
     <table style="width: 800px">
      <tr>
       <td>For assistance, please contact <a href="[email protected]:[email protected]">[email protected]</a></td>
      </tr>
     </table>
     <br/>
     <table style="width: 800px">
     <tr>
     <td><strong>*** This is an automatically generated email, please do not reply ***</strong></td>
     </tr>
     </table>
    </div>
    </body>
    </html>
          FETCH NEXT FROM mycursor
          INTO @email
    END
    CLOSE mycursor;
    DEALLOCATE mycursor;
    END
    Regards, RSingh

  • Combine two date field into one timestamp field

    Hello all,
    I need help combining two date fields into one timestamp field.
    I have separate Date and Milliseconds fields and want to
    combine to one Timestamp field can some suggest sql???

    This is my data
    01 JAN 1989 12:01:00.001 AM
    this is my insert drag_time is a timestamp field in another schema
    INSERT
    INTO DRAG (drag_time)
    SELECT to_char(drag_time, 'DD MON YYYY HH12:MI:SS')||(drag_second)||to_char(drag_time, ' AM')
    FROM sa.drag;
    This is the error
    ERROR at line 3:
    ORA-01855: AM/A.M. or PM/P.M. required

  • How to manipulate Date Fields of MSSQL server

    I build a database link from my oracle Database to an sql Server , i can run any select statement that i want with no problem but when i try to run the above :
    select empl."emp_id", "emp_code", "emp_first", "emp_last" ,
    "empio_dtin", "empio_dtout", "section_id",
    to_date ( "empio_dtin" , 'dd/mm/yyyy hh24:mi:ss')
    from "dbo.employees"@ATERMON empl INNER join "dbo.empio"@atermon empio on empl."emp_id" = empio."emp_id"
    where "empio_dtin" > '05/01/09'
    order by "section_id", "emp_code"
    i took the message :
    ORA-02070: database ATERMON does not support TO_DATE in this context
    The problem is the time because when i run the select statement the date fields brings as value only the dates values for example "01/05/09" without the time value that i need most,
    i try to insert the values into an oracle table with Date format fields but i take only the dates values again.

    Is the empio_dtin field defined with a date datatype or a character datatype?? If the field is a date, try using TO_CHAR instead of TO_DATE:
    to_char ("empio_dtin" , 'dd/mm/yyyy hh24:mi:ss')
    Assuming that empio_dtin is defined as a date datatype, you might want to try directly converting the string '05/01/09' to a date rather than letting Oracle impliciting covert the string to a date.
    "empio_dtin" > to_date('05/01/2009', 'MM/DD/YYYY')
    Edited by: user1983440 on Jun 24, 2009 9:58 AM
    Edited by: user1983440 on Jun 24, 2009 9:59 AM
    Edited by: user1983440 on Jun 24, 2009 10:00 AM
    Edited by: user1983440 on Jun 24, 2009 11:30 AM

  • Possible to retrieve Hyperion data directly into SQL Server?

    Currently we retrieve data into Excel spreadsheets and then often import it into SQL Server. It would simplify things if it was possible to call HPVAL from within SQL.
    Is anyone doing this?
    Any suggestions on where to research this further?
    Thx.
    Brooks

    Hello Amith,
    Have a look at the following from the documentation.
    SET DATAEXPORTOPTIONS
      DataExportRelationalFile ON | OFF;
    DataExportRelationalFile ON | OFF
      ON—The output text export file is formatted for import to a relational database.
    For direct export to a relational database using ODBC:
    DATAEXPORT "DSN" "dsnName" "tableName" "userName" "password"
    I hope this helps.
    Regards,
    Philip Hulsebosch.

  • COPA actual data postings into new server.

    Dear Experts,
    I would like to say thanks before update my problem.
    we have existing server and transactions posted since four years. we have total 24 company codes into one controlling area and one operating concern. Now the business requirement is to devide one compnay code into seperate server and with new controlling are and new operating concern.
    now we have only one operating concern, one controlling area and one company code. now the requirement is to update the all the COPA transaction date from old server to new server with only company code data.
    Please share your thoughts on this issue to upload the data.
    Regards,
    Raju.

    Hi Sirini,
    Thank you very much for the assurance and the suggestions.
    I gave it a few of tries and at the best one resulted in a new error from the NS Listener which I didn't have the nerve to research and solve.
    However, the solution I used is "dirty", but I'll post it just in case:
    1. Accidentally I found out that I could run SQL Plus from the old instance's folder, but it actually interacted with the new instance.
    2. I got the entry in the Windows Registry for the new instance at HKE_LOCAL_MACHINE\ORACLE and exported it
    3. I edited the export and altered all paths to the new instance to the old one and then imported the reg file
    4. Started the SQL Plus of the old instance, started and mounted the database
    5. Tested the connectivity (so far everything works like a charm )
    Right now I'm going to follow the best practices for creating a differential backup and set one up on a daily basis so we can do a proper restore if there are any problems in the future.
    Best Regards,
    Borislav

  • In Pages, how to insert a PRINT-DATE field into a doc.?

    Want to insert a field that will show the date of the doc's printing. 
    In MS Word, this is known as 'insert print date'.
    How to do so in Pages?  Thanks.

    You can define placeholder text in Pages v5.5.2 in any of the six header/footer sections. Think of it as a a field code that when you click on it the text you enter replaces the placeholder text using the same style. By example, I placed a combination of text and placeholder text in the lower left footer segment.
    The text and the brackets were selected, and then Format ▸ Advanced ▸ Define as Placeholder Text. Also, because it is in the footer, it is replicated throughout the document. Although you could Insert > Date/Time into this placeholder text, automation may be preferred. I have chosen to use the same date/time style as MS Word uses in its print date field code. You can only change placeholder text programmatically with Pages and AppleScript on Yosemite. Once I run the AppleScript, all placeholder tags are replaced as shown in this image:
    You could make this an Automator Service (e.g. run AppleScript action with no input, and output replacement is checked). One could assign a keyboard shortcut to this service too. One click printed date stamp and document sent to default printer.
    The AppleScript (Yosemite only).
    property tagStr : "[print-date]"
    --- used for testing ---
    -- set f to POSIX path of ((path to desktop) as text) & "arg.pages"
    -- set hf to POSIX file f as alias
    set printDate to "" as text
    set theTags to {}
    tell application "Pages"
          activate
          -- open hf
          tell front document
               set theTags to the tag of every placeholder text whose tag is equal to tagStr
               -- Word print-date field code uses this 12-hour date/time format as mm/dd/YY 00:00 AM/PM
               set printDate to do shell script ("/bin/date +'%D %l:%M %p'") as text
               repeat with i from 1 to count of theseTags
                     set thisTag to item i of theseTags
                     set (every placeholder text whose tag is thisTag) to printDate
               end repeat
               -- use your own System Preferences printer name string
               tell application "Samsung ML-2950 Series (Sammy)"
               activate
               -- no print dialog
                    print front document without «class pdlg»
                    quit
               end tell
          end tell
          -- close front document saving no
    end tell

  • Splitting up a date field into two fields on display

    I have a form that is based on a table which contains two date fields. To populate these date fields I have one date picker using a format of DD-MON-YYYY and two "time" fields that are just based on static LOV select lists. I build the date by piecing together these fields to get my two different dates and save it to the database just fine (using a process on submit, before validation).
    My problem comes when I want to edit the existing records. I am unable to figure out how to populate those fields from the dates. I thought I could do it during the page reduring process but everything I try gives me a format error. I can assign the date to the date picker field no problem but cannot get it to display without the date format, regardless of setting the format or not on the item. I can't get the time off into my time fields at all.
    An example of setting my start time field (select list of times only)
    BEGIN
    :P10_START_TIME := TO_CHAR(:P10_DTE_START,'HH24:MI');
    END;
    Error I get is ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I've tried a few different formats and I think I am just missing something really easy. My static pick list in this case is just the display would be say 1:00 PM but the other value is 13:00.
    The other one I am trying is for the actual date picker itself.
    BEGIN
    :P10_COURSE_DATE := TO_DATE(:P10_DTE_START, 'DD-MON-YYYY');
    END;
    Gives me ORA-01830: date format picture ends before converting entire input string.
    The format of :P10_DTE_START is DD-MON-YYYY HH24:MI (it is a hidden field) and :P10_COURSE_DATE is DD-MON-YYYY.
    Colour me confused...

    Thanks for the reply...I got this error for the last name piece "A subscript must be between 1 and the size of the array.
    ". I was able to put in
    split({Usr.Nam}, " ")[-1]
    and that seemed to pull  the last name piece of the field.
    Thanks Again,
    Reid

  • Still on the inclusion of the time/date field into the spreadsheet file, with 2 real values?

    I have tried to convert the 2 real values to decimal strings, and then taken these 2 values, as well as the date/time strings, put it into an array, converted the array to decimal number, and plugged it into the 1D input of the spreadsheet vi. However, for the date and time, i get the first part only, in a decimal.i.e,for 12:30pm-->12.0000 and for 23/04/2001-->23.0000.
    How can i get the right values, show me an example if u can.
    Thanks.

    1- Open write to spreadsheet file vi.
    2- Save a copy as "Write string array to spreadsheet.vi" or something.
    3- Open this copy.
    4- Replace the numerical controls in the 1D and 2D arrays with string controls.
    5- Save this vi
    6- Now you can wire a string array to this vi and have a spreadsheet from there.
    Remember to modify the COPY, and be careful with the format string.

  • Error while transferring data to a Unix file using the FILTER 'gzip'

    I have to particularly use the 'gzip' filter to compress the files that are placed in Unix directory through ABAP code. This filter was working fine initially and I was able to get the files saved correctly however lately I am getting a short dump at the TRANSFER command. the runtime error 'DATASET_PIPE_CLOSED'. Kindly guide me as to how i can avoid this.

    there is o relation of infoobject name in flat file and infoobjet name at BW side.
    please check with the object in the BW and their lengths and type of the object and check your flat file weather u have the same type there,
    now check the sequence of the objects in the transfer rules  and activate them.
    there u go.

  • Transferring data from MS SQL Server to Oracle through Oracle's Stroed Procedure

    Hi,
    I need to access 3 tables of MS SQL Server database through oracle's Stroed procedure.
    Is It possible? if yes how to do?
    is there any way of accomplishing this?

    Yes. Using Attunity Connect native drivers for Oracle. Attunity Connect drivers are also licensed and resold by Oracle under the name "Oracle Transparent Gateways" or "Oracle Eterogeneous Services".
    The OEM Oracle driver are "light" ones. The Attunity drivers are more complete. Consult www.attunity.com

  • Inserting date from a jsp into sql server 2005 database

    Dear Friends.,
    i have a jsp page, in that there is a form with various user input fields. in that one field is date field. i tried to insert the date field into the sql server 2005 database. but it is not getting inserted into the database.
    when i tried by inserting one field to database, it is getting inserted. for all the fields its works fine, except the date field.
    i need hint or code to insert the date get from the jsp page to database.
    i am using a servlet to do all database related things. i.e making connections, executing prepared statement queries
    thanks
    sekar.

    The variable needs to be outside of the string to be recognized as a variable. You need to remove the variable from the string, then concatinate it onto the string (and concatinate any remaining string parts - the closing paren). For example:
    stmt.executeUpdate("INSERT INTO table VALUES ('test', " + companyID + ")");
    Hope that's clear enough and helps. Good luck on your thesis!
    jim

  • Is there any statement to transfer the data from unix server to another

    Hi All,
    Is there any statement or function module avaliable in sap to transfer the data from one unix server to another unix server apart from FTP(file transfer protocol).?
    My requirement :  I need to fetch the data from one unix server to another sap server. i have a option of FTP but i need to transfer the unix data to another server internal table.
    I need to move the unix data to another sap sevrver internal table
    Regards
    Raja

    not sure what your exact requirement is, but
    if both servers are in the same system group, you could potentially just mount the unix directory from the source machine to the target with nfs mount or something.
    if not, you could consider remote function call. create a remotable function module on the source machine to read the data into an internal table, and call that function module from the target machine. this requires creating entries in the RFCDES table (i think via SM59?). on the target machine, you would call function y_whatever destination xyz, where xyz is the RFCDES you set up. it works great.
    dave

  • Date Field Changed After Persistence

    When persisting an object the date field is changed from it's original
    millisecond value to a new value.
    i.e.
    Before persist fastTime: long = 1065003043301 (java.util.Date)
    After persist fastTime: long = 1065003028240
    (com.solarmetric.kodo.util.ProxyDate)
    It is not consistent. Sometimes it correct, other times it's not.
    So my equal() method fails as the member variable Timestamp is different. I
    need to filter on this value and for it to be 'exactly' the same.
    How?
    Config
    KODO 2.5.3,
    Database MYSQL, Default Table type MYISAM, same on InnoDB
    default .JDO file for persistent object
    defaults in kofo.properties

    Graham-
    Unfortunately, SQLServer is only able to store dates to a 3 millisecond
    precision, which means that if your date's milliseconds part is not
    divisible by 3, then you will get back a different date that you
    entered.
    Two possible solutions:
    1. Subclass the SQL Server dictionary to store all date fields as
    longs. This will require that the date field on the server is also a
    BIGINT.
    2. Manually round the milliseconds part of your date to the nearest 3
    milliseconds.
    In article <ble9lc$dne$[email protected]>, Graham Cruickshanks wrote:
    When persisting an object the date field is changed from it's original
    millisecond value to a new value.
    i.e.
    Before persist fastTime: long = 1065003043301 (java.util.Date)
    After persist fastTime: long = 1065003028240
    (com.solarmetric.kodo.util.ProxyDate)
    It is not consistent. Sometimes it correct, other times it's not.
    So my equal() method fails as the member variable Timestamp is different. I
    need to filter on this value and for it to be 'exactly' the same.
    How?
    Config
    KODO 2.5.3,
    Database MYSQL, Default Table type MYISAM, same on InnoDB
    default .JDO file for persistent object
    defaults in kofo.properties--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

Maybe you are looking for