With in smart forms   i need time format like 12:26:37

hi,
in smart forms time format is coming to one variable time in this format 122637, but i need this format  12:26:37
plz tell me the answer.
thanks.

Hi
Check this:
REPORT  ztest_time_conv.
DATA: hour(2) TYPE n,
      min(2) TYPE n,
      sec(2) TYPE n,
      tim TYPE i.
DATA: time TYPE p DECIMALS 2.
DATA: timeformat TYPE sy-uzeit.
time = '1.38'.
tim = time * 3600.
hour = tim DIV 3600.
tim = tim MOD 3600.
min = tim DIV 60.
sec = tim MOD 60.
CONCATENATE hour min sec INTO timeformat.
WRITE timeformat.
BREAK-POINT.
PS:Code given by Vijay Babu Dudla in other thread..in ABAP general..when I pasted the link,it did not work..so I am giving it here like this.
Regards,
VIshwa.
Edited by: Vishwa Sri Hari on Nov 5, 2008 1:01 PM

Similar Messages

  • Sandard Smart Form output into PDF format.

    Hi to all,
    Any one please guide me, how  to convert  sandard Smart Form output into PDF format.
    Regards,
    Thanesh

    hi thanesh,
    the below code may help you.
    data: FM_NAME TYPE RS38L_FNAM.
    DATA:       W_BIN_FILESIZE TYPE I,
          T_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
          T_PDF_TAB TYPE TLINE OCCURS 0 WITH HEADER LINE,
          W_FILESIZE TYPE I,
          WA_CTRLOP TYPE SSFCTRLOP,
          WA_OUTOPT TYPE SSFCOMPOP,
          T_OTFDATA TYPE SSFCRESCL.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = <ur form name>
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = FM_NAME
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 2
       OTHERS                   = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    WA_CTRLOP-GETOTF = 'X'.
    WA_CTRLOP-NO_DIALOG = 'X'.
    WA_OUTOPT-TDNOPREV = 'X'.
    call function <function module generated for ur form>
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = WA_CTRLOP
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = WA_OUTOPT
       USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = T_OTFDATA
      JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 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.
    T_OTF[] = T_OTFDATA-OTFDATA[].
    call function 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
    IMPORTING
       BIN_FILESIZE                = W_BIN_FILESIZE
      BIN_FILE                    =
      tables
       OTF                         = T_OTF
        LINES                       = T_PDF_TAB
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 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.
    call function 'WS_DOWNLOAD'
    EXPORTING
       BIN_FILESIZE                  = W_BIN_FILESIZE
      CODEPAGE                      = ' '
       FILENAME                      = 'D:\TEST11.PDF'
       FILETYPE                      = 'BIN'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
       FILELENGTH                    = W_FILESIZE
      tables
        data_tab                      = T_PDF_TAB
      FIELDNAMES                    =
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_WRITE_ERROR              = 2
       INVALID_FILESIZE              = 3
       INVALID_TYPE                  = 4
       NO_BATCH                      = 5
       UNKNOWN_ERROR                 = 6
       INVALID_TABLE_WIDTH           = 7
       GUI_REFUSE_FILETRANSFER       = 8
       CUSTOMER_ERROR                = 9
       NO_AUTHORITY                  = 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.
    WRITE: / 'SUCCESSFULLY CONVERTED'.
    endif.

  • I am about to replace my hard drive with Apple.  Do I need to format my existing drive to clear my data?

    I am about to replace my hard drive with Apple.  Do I need to format my existing drive to clear my data? 

    In my view, definitely. Make sure you have reliable and tested backup of all your important data by way of TIme Machine or a clone (preferably both) so that you can restore once the drive is replaced and then erase the internal drive.

  • To convert Smart Form output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Smart Forms output to PDF format and send it via email to customer. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Refer the links -
    how to convert smartform into pdf and send through mail
    Smartform as PDF attachment to a mail.
    smartform pdf and mail
    smartform to pdf to mail
    Regrads,
    Amit
    Reward all helpful replies.

  • Data services with SQL Server 2008 and Invalid time format variable

    Hi all
    Recently we have switched from DI on SQL Server 2005, to DS(Date Services) on SQL Server 2008. However I have faced an odd error on the query that I was running successfully in DI.
    I validate my query output using a validation object to fill either Target table (if it passes), or the Target_Fail table (if it fails). Before sending data to the Target_Fail table, I map the columns using a query to the Target_Fail table. As I have a column called 'ETL_Load_Date' in that table, which I should fill it with a global variable called 'Load_Date'. I have set this global variable in the script at the very first beginning of the job. It is a data variable type:
    $Load_Date = to_char(sysdate(),'YYYY.MM.DD');
    When I assign this global variable to a datetime data type cloumn in my table and run the job using Data Services, I get this error:
    error message for operation <SQLExecute>: <[Microsoft][ODBC SQL Server Driver]Invalid time format>.
    However I didn't have this problem when I was running my job on the SQL Server 2005 using Data Integrator. The strange thing is that, when I debug this job, it runs completely successfully!!
    Could you please help me to fix this problem?
    Thanks for your help in advance.

    Thanks for your reply.
    The ETL_Date is a datetime column and the global variable is date data type. I have to use the to_char() function to be able to get just the date part of the current system datetime. Earlier I had tried date_part function but it returns int, which didn't work for me.
    I found what the issue was. I don't know why there were some little squares next to the name of the global variable which I had mapped to the ETL_Date in the query object!!! The format and everything was OK, as I had the same mapping in other tables that had worked successfully.
    When I deleted the column in the query object and added it again, my problem solved.

  • I'm having trouble with a Text Field and a Time Format

    I have created a form.
    There are many text fields for clients to fill out.
    One Field have been formatted to enter a time. Ex. 6:00pm.
    This works great unless it's a 12:00am time then the field reads 00:00am
    I would rather it read 12:00 am.
    How can I do this?

    Maybe you should put the time format in 24hour instead.

  • GP and WD with Adobe Interactive form question - need some guidance.

    Hello experts,
    FYI, I'm running ECC 5.0 Support Stack 9, EP 7.0 SPS 11, NWDS 2.0.9_15 with Adobe Livecyle Designer.
    I am slightly stuck with what I'm trying to do. I have created a web dynpro application that has an Adobe interactive form. I'm trying to use guided procedures to initiate a process so that this interactive form can be filled out and submitted to an approver. I need the relevant parties to receive a notification email. I have setup email templates and services, I just need to know how it will fit into the process. Once approved in the process, a BAPI should be invoked to populate some fields in the form. Should I be creating the Web Dynpro application to invoke the bapi or should a guided procedure callable object invoke the bapi? I know how to do these things, but I dont know which method I should use, in order to correctly have this process flow from point A - point B. Should the process appear in the Universal Worklist? If not, why not? Will it only appear in the GP runtime? I have pretty much read thru most of the tutorials but still cannot get this GP stuff to work as a WHOLE process.
    Any guidance, suggestions, possible solutions will be greatly appreciated.
    Thanks
    Kunal.

    Hi,
    It seems you have not activated the Composite Form object. Only after activation you will be able to use it to create a Callable Object of type composite form.
    Hope this helps,
    Ashutosh

  • Need Time stamp like yyyymmddThhmmssGMT

    Hi Friends,
    i am doing file to file scenario.
    i am getting file with time stamp as 20081020-062614-501.txt. 
    But i want Time stamp as yyyymmddThhmmssGMT.txt.
    please give me replies.
    Thanks
    Anil M

    Hii
    You can solve this by using dynamic configuration.
    Please follow the below blog for reference.
    The specified item was not found.
    Implement the below code to achieve the same.
    Create UDF with Date(pre-defined function) as input parameter.
    Map the UDF to the root node level of the target message.
    //Get Current time
    Calendar cal =new GregorianCalendar();
    int hour = cal.get(Calendar.HOUR);
    if(cal.get(Calendar.AM_PM) != 0)
    hour+=12;
    int min=cal.get(Calendar.MINUTE);
    int sec=cal.get(Calendar.SECOND);
    String cur_time=hour""min""sec;
    //Get Input Date in the reqd format
    String Datetime= Date+""cur_time"GMT";
    //I hope file name is constant
    String Filename ="ABC";
    String extension =".txt"
    String dynaname = FilenameDatetimeextension
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
    “http://sap.com/xi/XI/System/File”,
    “FileName”);
    conf.put(key,dynaname);
    return "";
    Rgds

  • Forms 9i - Cell based formatting like Excel in canvas

    Does anyone know how to display cell-based formatting in a canvas, like how excel displays data. Example below
    |_____EVENTS_____|_____2002_____|_____2003______|
    |jlklsdjfkfsdlk__|_M Oct 13_____|__T Jan 7______|
    Etc... Pretty much I am trying to display information is a similar format to notify users of important dates, that they may register for events based on the dates, but I would like to keep it in a excel cell format.
    Any help would be appreciated.

    Hi,
    there is no spread table functionality provided within Forms. You can use an OCX (client/server only) or a JTable Java Bean (Web only). If you try to do this with Forms native methods, then you better off creating your canvas as a forms based display and set itn size and location saccordingly.
    Frank

  • How to pass in URL time format like this : DD/MM/YYYY HH24:MI:SS ?

    Hi,
    I have items date format in the folllowing format : 'DD/MM/YYYY HH24:MI:SS'.
    I want to pass them in URL but the sign':' is interpreted as an end of value by apex;
    For example if the item value is '21/03/2010 10:20:43' i get this as a result '21/03/2010 10';
    How top pass the tiem value in the URL wthout if possible to change the mask format ?
    Thank you for your help !
    Christian.

    This a bit of a brute force aproach, but is worth considering as it caters for all Apex specific characters (that htf.escape_sc preserves). It's also useful when extracting text to SQL scripts that may include line feeds, quotes etc etc. RAW representation is twice the as long as the input date string, so use with caution... It also helps obfuscate the URL which helps reduce URL hacking...
    SQL> select UTL_RAW.cast_to_raw('21/03/2010 10:20:43') from dual
    UTL_RAW.CAST_TO_RAW('21/03/201010:20:43')
    32312F30332F323031302031303A32303A3433
    1 row selected.
    SQL> select UTL_RAW.cast_to_varchar2('32312F30332F323031302031303A32303A3433') from dual
    UTL_RAW.CAST_TO_VARCHAR2('32312F30332F323031302031303A32303A3433')
    21/03/2010 10:20:43
    1 row selected.
    Edited by: maceyah on Mar 25, 2010 9:38 AM

  • Word Format of Smart Forms Output

    Hi,
    We want the Smart Form output in DOC format. If we are using the function module 'CONVERT_OTF', the output is perfect when downloaded as PDF with all background pictures and formats but when we are downloading in DOC format all the formatting and background pictures are absent.But we need all formatting options like boxes, fonts and background pictures in the downloaded DOC format.
    If any of you have worked on the same please reply
    Thanks in advance.

    As far as I know there is no way to convert the smartform into word, without loosing the format and pictures.
    But you may convert the pdf output to word by a third party solution. Use SolidConverter. Version 1 is free and it is the best converter I have seen.
    If it helps please give points.

  • How to create barcode in Smart Forms with MS Word as Editor?

    Hi,
    I created a character format for a barcode in a smart style.
    The problem is that I do not know how to assign it to the text in Smart Form because the Editor is MS Word and not the normal Editor.
    Any suggestion or idea.
    Thanks & best regards
    Viktoria

    Hi and thanks for the fast reply,
    I have created a smartstyle and also a characterformat for the barcode. This is not the problem.
    I call the layout via HRFORMS. The Form Builder for Smart Forms is called and the Editor for the text nodes is preset and is the MS Word editor. This cannot be changed. I tried different things also in the settings. The normal text editor cannot be called.
    I choose and enter the field that I want to convert into the barcode &wa_barcode&. I do not work with standard texts (SO10). The text field is a normal text node in Smart Forms. The character format that applies converts the number in the variable field into the barcode.
    In the MS word editor I have only formats that are in the office environment (arial, ...) I do not see the formats that I created in smartstyle also when I assign it in the output options of the text node.
    So maybe I have to work like this for now. Swich between HRFORMS and SMARTFORMS when working with barcodes. In the Smart Forms transaction it is the normal editor where I can see the paragraph/ character formats from smartstyle.
    Thanks and best regards
    Viktoria

  • Is it possible to CREATE an XML data with Smart Forms??

    Hello at all,
    i have an Smart Form Formular, which contains all information about a customer.
    My question is, if i want to send this Formular to another System, can I send this as a XML File or something else???
    I have no idea, how i can send my smart forms formular to another System.
    With kind regards.
    ETN

    I guess you want to send "spools" in XML format, not the definition of smart forms. So, the XML for Smart Forms is called XSF: read [SDN article - SAP SMART FORMS XSF - XML OUTPUT FOR SMART FORMS|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0b6bc290-0201-0010-5b87-a0e7c7eb55d0] and [sap library - smart forms - output in XSF format|http://help.sap.com/saphelp_nw70/helpdata/EN/a5/28d3b6d26211d4b646006094192fe3/frameset.htm]

  • Smart form problem with multiple pages & table problem

    Hi experts,
    I have a problem with my smart form with multiple pages
    Situation: I have a smart form that ALWAYS has at least 2 pages. In one page the quotation, in the second page (basically this is the 3rd page as the 2nd page is optional) the terms and conditions. Sometimes however, when there are many items in the quotation more than 1 page is needed for the quotation.
    The (optional) second page of a quotation has a different header than the first page of a quotation. So I made a second page with 2 secondary windows (where the header texts are in). The main window is after the secondary windows and has to finish the quotation.
    The problem is that my headers of the second page are never printed, it stays a blank space. The table however does continue and is printed.
    Another problem I have is that I have a table (with the quotations) with 6 columns. The first 2 columns are displayed correctly but once the 3rd column the columns are shown on a lign below.
    Regards,
    PJ

    I would suggest another approach to this problem.
    Use just one page. For the headers on the first page, use a secondary window and on the conditions tab, choose the additional event - Only on First Page.
    For the different header on the second page, create another secondary window on the same page (probably even overlapping the first header on your layout). But in this one, on the conditions tab, choose the additional event - Not on First Page.
    The table should flow as you would be using the Main window for this one.
    As for columns, if they are too wide and wont fit in the same line, it would move to the next line. So you would have to re-adjust the line width and test.
    Hope this resolves your problem.
    Regards,
    Ancy
    Edited by: abapfreak on Oct 4, 2010 11:52 AM

  • Time Format using text variable with replacement path

    Hi Friends,
                                 I've used "Text variable with replacement path" to make the column heading dynamic by replacing the values referring from "0calday"...
    everything is working fine, but here it is displaying the time format like
    YYYYMMDD (20030101), i want it to be displayed DDMMYYYY (01012003) in the column heading... how to make it possible?
    pls waiting for ur inputs, it's an urgent...
    Regards,
    Pattnaik

    Hi Satyakam,
    In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
    Hope that helps.
    Regards
    Mr Kapadia

Maybe you are looking for