How to display an ouput in d specific format?

hi frnds.. i wud lik to display d output(may it be a name or a number) in d following format..
O
R
A
C
L
E
how do i write a query to display d output in dis format??

mythbe wrote:
hi frnds.. i wud lik to display d output(may it be a name or a number) in d following format..
O
R
A
C
L
E
how do i write a query to display d output in dis format??Well, question is do you need 6 rows back (each returning a letter) or 1 row. All solutions so far were splitting one row into six. You could insert NEW LINE after each character and return it as single not six rows:
SQL> select regexp_replace('Oracle','(.)','\1' || chr(13) || chr(10)) from dual
  2  /
REGEXP_REPLACE('OR
O
r
a
c
l
e
SQL>  SY.

Similar Messages

  • Display Multiple Parameter Values in Specific Format

    In CR XI, I have a string parameter that allows single and multiple values.
    Values are Ward 1, Ward 2, Ward 3, Ward 4
    Iu2019m still a newbie at Crystal and canu2019t figure out how to display the parameter values in the report header in a specific way. Join({?ward},",") works fine to show the values selected, but the format is awkward.
    Would love to hear any suggestions on a formula that will display the parameter values in the header as follows:
    For a single parameter value:     Ward 1
    For two parameter values:     Wards 1 and 2
    For three parameter values:     Wards 1, 2 and 3
    If all four values are selected:     All Wards
    Hope I made my question clear, and thanks in advance!

    Thank you so much for your response; it does work, at least partially.Certainly is pointing me in the right direction.
    Is it possible to modify the case statement to add more arguments? I tried, but it didn't work correctly, although that is likely user error.
    For instance, if selecting a single value, it could any of the wards, not just Ward 1. And multiple values could be Wards 2 and 3, or Wards 1 and 4, or Wards 2, 3 and 4. There are at least a dozen different possibilities, and I need a formula  or case statement to account for all those possibilities.

  • How to display 'List' of objects in table format

    I am trying to display bunch of records in the table format.
    I have the List of bean object populated with table datas.
    Currently the code is working fine ,if I tend to display one record.I am wondering how to display all the records.
    I know theres a 'Fieldloop'.If thats the one please explain with example.

    iterate the object list using field loop. eg. is given below
    [      <Field name='MatchTable'>
    <Display class='SimpleTable'>
    <Property name='columns'>
    <List>
    <String>title</String>
    </List>
    </Property>
    </Display>
         <FieldLoop for='name' in='userlist'>
    <Field name='username'>
    <Display class='Label'>
    <Property name='labels'>
    <ref>name</ref>
    </Property>
    </Display>
    </Field>
         <FieldLoop>
         </Field>

  • How to conver a BINARY Table in specific format Documento to send by e-mail

    Hello all
    i am trying to send a file that is located in application server, this file was created in BINARY MODE, so now i need to download from this server and then send it by e-mail, i haver already download in BINARY MODE but when i send it and i open this appears in BINARY MODE i need to see in the specific format, for example:
    I have a FILE.XLSX which is BINARY MODE in the server and i used this function to download it
    CALL FUNCTION 'C13Z_RAWDATA_READ'
        EXPORTING
          i_file           = input_file
        IMPORTING
          e_file_size      = lv_file_size
          e_lines          = lv_lines
        TABLES
          e_rcgrepfile_tab = it_tab
        EXCEPTIONS
          no_permission    = 1
          open_failed      = 2
          read_error       = 3
          OTHERS           = 4.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        w_doc_data-doc_size = lv_file_size.
        LOOP AT it_tab INTO wa_itab.
          t_attachment-line   = wa_itab-orblk.
          APPEND t_attachment.
        ENDLOOP.
      ENDIF.
    fter to recive the file in binary mode i move it to the internal table  t_attachment, after that i send it by e-mail,
    w_doc_data-obj_langu  =  sy-langu.
      w_doc_data-obj_name   =  'EDISO'.
      w_doc_data-obj_descr  =  ld_mtitle.
      w_doc_data-sensitivty =  'F'.
    *--> Crea el cuerpo del mensaje
      t_packing_list-transf_bin =  space.
      t_packing_list-head_start =  1.
      t_packing_list-head_num   =  0.
      t_packing_list-body_start =  1.
      DESCRIBE  TABLE  it_mensaje  LINES  t_packing_list-body_num.
      t_packing_list-doc_type  =  'RAW'.
      APPEND  t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin  = space. "'X'.
      t_packing_list-head_start  =  1.
      t_packing_list-head_num    =  1 ."5.
      t_packing_list-body_start  =  1. "5.
      IF t_attachment[] IS NOT INITIAL.
        DESCRIBE  TABLE  t_attachment  LINES  t_packing_list-body_num.
        t_packing_list-doc_type   =  c_format. THIS IS THE FORMAT I NEED TO SEE THE FILE FOR EXAMPLE: XLSX
        t_packing_list-obj_descr  =  ld_attdescription.
        t_packing_list-obj_name   =  ld_attfilename.
        t_packing_list-doc_size   =  t_packing_list-body_num * 255.
        APPEND  t_packing_list.
      ENDIF.
    But when i open the mail and open the file attach appears in BINARY so i need to see in XLSX format,
    Thanks a lot for you help

    Thanks for you help

  • How to display the values in JSpinner in format  day:HH:mm

    Hi All,
    I want to know how can I display the values inside a JSpinner in the format day:HH:mm. Here the value of 'day' can be anything say from 0 to 365 and HH stand for hour and mm stands for minutes.
    I tried to implement it using
    mSpinner.setEditor(new JSpinner.DateEditor(mSpinner, "DD:HH:mm"));
    but here the values of day was not proper. Please let me know if there is any standard format or how can I configure my own editor.
    Thanks,
    Rohit.

    Hi,
    It worked well for 112 as 112 comes under April month.. i.e. it will work properly for the range 91 to 120 as the current month is April and if we start counting from january 01 then for April month , the number of day will fall under range 91 to 120.
    See, it will allow you to change the values beyond the limit (i.e. less than 91 or more than 120) but the real problem is that I used this spinner in the table and when I will try to save the value of spinner , then if the value of day in beyond the limit 91 to 120 then it will automatically changing in the range between 91 to 120.
    I tried to use format DD:HH:mm ...... do I need to use any other format..
    Hi All,
    I want to know how can I display the values inside
    de a JSpinner in the format day:HH:mm. Here thevalue
    of 'day' can be anything say from 0 to 365 and HH
    stand for hour and mm stands for minutes.
    I tried to implement it using
    mSpinner.setEditor(newJSpinner.DateEditor(mSpinner,
    , "DD:HH:mm"));
    but here the values of day was not proper. Define "not proper". I just tried it and it displayed
    day 112 for today which seems correct.

  • How to display data in table with specified format?

    Hi,
    Jdev 11.1.1.4, ADF BC and ADF Faces
    In my application I have created a EO based view object which will return data as below.
    Deptid       Loc          seq
       1            Loc1         1
       1            Loc2         2
       2            Loc1         3
       2            Loc2         4
       3            Loc1         5
       3            Loc2         6Now I have to display the data in table like below
                     Loc1
       1                              1st row
                     Loc2                  Loc1
       2                              2nd row
                     Loc2                  Loc1
       3                             3rdrow
                     Loc2 How can I do that? Any help will be appreciated.
    ~Abhijit
    Edited by: Abhijit Dutta on Nov 5, 2011 6:18 PM

    check this thread...
    display the data in chart format

  • How to display webdynpro view data in PDF format.

    Dear All,
    Greetings!!!
    scenario :
    i am having five tabstrips  in a table , first four for the different kinds of data
    and fifth one is for to display all tabstrips data in a PDF format.
    Kindly let me know how to acheive this .
    is it possible with out ADLC..?  any demo or article is available for similar requirement?
    Thanks in Advance.
    Best Regards,
    Kranthikumar Palle.

    It's better to use the Adobe form to display your WD data. But you can choose Smartform as a PDF doc to display the WD data.
    Check out the thread [Display a Smartform as PDF document in WD ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785] for more details.

  • How to display date field in ALV in format 'YYYY-MM-DD'?

    Hi experts,
    I am not getting displayed the date field in ALV in the format 'YYYY-MM-DD' if it is different than my user setting's format (DD.MM.YYYY).
    Tried with the edit mask
    LVC_S_FCAT-EDIT_MASK = '____-__-__'  but it does not work.
    I could not find the conversion routine for this. Is it possible to write customer conversion routine?
    I have to use DATE field, otherwise if I display this format in CHAR10 field , sorting in ALV does not work for this field.
    PLEASE ANY HELP!
    Kind regards,
    Danijela

    Hi,
    Use FM FORMAT_DATE_4_OUTPUT.
    TYPE-POOLS : slis, KKBLO.
    TYPES: BEGIN OF t_data,
           sel     TYPE char1,
           matnr   TYPE matnr,
           bldat   type char10,
           END OF t_data.
    DATA: it_tab TYPE STANDARD TABLE OF t_data,
          it_fcat TYPE slis_t_fieldcat_alv.
    DATA: wa_tab TYPE t_data,
          wa_fcat TYPE slis_fieldcat_alv,
          wa_layout type SLIS_LAYOUT_ALV.
    data: lv_repid    TYPE syrepid.
    data : lv_date    type NLEI-IBGDT,
           lv_outdate type RN1DATUM-DATEX,
           lv_format  type RN1DATUM-FORMAT value 'YYYY-MM-DD'.
    lv_repid = sy-repid.
    lv_date = sy-datum.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000001'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 1.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000002'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 2.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000003'.
    APPEND wa_tab TO it_tab.
    wa_fcat-fieldname = 'SEL'.
    wa_fcat-ref_fieldname = 'XCHPF'.
    wa_fcat-ref_tabname = 'MARA'.
    wa_fcat-edit = 'X'.
    wa_fcat-checkbox = 'X'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'MATNR'.
    wa_fcat-ref_fieldname = 'MATNR'.
    wa_fcat-ref_tabname = 'MARA'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'BLDAT'.
    wa_fcat-ref_fieldname = 'BLDAT'.
    wa_fcat-ref_tabname = 'BKPF'.
    APPEND  wa_fcat TO  it_fcat.
    call 'REUSE_ALV_GRID_DISPLAY'' after this
    Edited by: Ankur Parab on Oct 1, 2009 2:50 PM
    Edited by: Ankur Parab on Oct 1, 2009 2:51 PM

  • How to display long text in a paragraph format using class CL_GUI_TEXTEDIT?

    I need to display a long paragraph in the text editor. I realize I have to declare a very long table line for my text table. For example, I wrote a subroutine set_paragraph_text.
    FORM set_paragraph_text USING p_paragraph.
      DATA:  l_line(1000) TYPE c,
                 lt_paragraph LIKE TABLE OF l_line.
      APPEND p_paragraph TO lt_paragraph.
    Display the paragraph in the text editor.
      CALL METHOD g_textedit->set_text_as_r3table
        EXPORTING
          table = lt_paragraph.
    ENDFORM.                    " set_paragraph_text
    This approach works well in release 6.4. Will it also work for earlier versions with more stringent char length limit? If not, can anybody suggest a better solution for the problem? The bottom line is that the paragraph needs to be displayed in its natural format, not one sentence per line. Another restriction is that the paragraph text is pre-fixed so it is hard coded into the program as a string literal.
    Thanks in advance for any help.

    Could this help you?
    <a href="https://wiki.sdn.sap.com/wiki/display/profile/2007/09/18/Playing%2BWith%2BText%2BEditor">Playing with text editor</a>
    Greetings,
    Blag.
    Message was edited by:
            Alvaro Tejada Galindo

  • How to create a Notification which required specific formatted response

    Hi,
    I'd like ask about the notification.
    In the Workflow guide, there are some documentations about the templated message.
    I mean that there is a response instructions that should be obeyed in order to get the right action.
    I found in the System: Mailer.
    There are many example of messages such as
    - Orig. Workflow Open Mail (Direct)
    - Orig. Workflow Open Mail (Templated)
    Those messages' body said about a formatted response, such as
    To submit your response, reply to this message, including this note with your reply.
    The first lines of your reply must be your responses to the notification questions.
    Instructions below detail exactly what should be placed on each line of your reply.
    My questions are :
    1. What should I do to create a notification such like that?
    I mean, how to parse the message and then said to the Workflow Engine about what
    will happen based on the respond received?
    Since there will be some lookup codes in my workflow definition.
    As far as I know, the Message (in Workflow Builder) is only use to specify the
    notification's text.
    2. Should I use a custom PL/SQL to parse each statement from the response?
    Is there any example about how to use the PL/SQL (perhaps how to parse)?
    3. Or is it automatically processed by the Workflow if I used the message provided by
    the System: Mailer?
    4. What if I'd like to make my custom message (instead of using the System: Mailer's
    messages)?
    Where should I put (or define) my PL/SQL code ?
    Perhaps the response should look like this
    The first line should be "Yes" or "No"
    The second line should be the reasons with maximum length of 100 characters.
    5. How to handle if the response is not exactly fullfil the instructions specified in the
    message body?
    Will there be errors?
    Or the Workflow will stop running?
    Or the Workflow will wait until the exact response is received?
    6. I'd like to know if there is any example of it.
    Perhaps, anybody has ever successed to meet these reqiurement.
    Many thanks,
    Buntoro

    Hi,
    Thanks Luiz, for the reply.
    If I use lookup code, the response will look like in the Worklist of the Workflow Monitor, using some buttons to send the respon. And the button I clicked will determine which path the Workflow will run.
    My requirement is the response is using an e-mail (not by clicking any button).
    So the Approver should reply the notifications by writing and sending an e-mail, and the text body should look like the requirement I need.
    i.e.
    The first line of the response (in e-mail) should "Yes" or "No"
    The second line is the reason of approving.
    So how could I read the e-mail sent, extract it line by line, and inform the Workflow which path should be run.
    If the first line of the e-mail is "Yes" then the Workflow will choose the "Yes" path.
    else the Workflow will choose the "No" path.
    Thanks,
    Buntoro

  • How to display Employee Attendance Data in Crosstab Format?

    Hi all,
    I have the data in sql server 2005 like below, which saves the employee in date and in time and entry type 
    How can i create a cross tab query for the above records in sql server 2005. and i need the record in the below format:
    where 1, 2, 3 are indate days, and below is intime, out time and the difference of hours per employee...
    How can i achieve it as i have to make report for it... need sql query or stored procedure for the format required.
    Thanks in adv.

    One could argue that the crosstab is best produced in the presentation layer and that SQL Server should only return the raw data. But if you like to hurt yourself...
    First you need an unpivoting query to put starttime, endtime and length in a single row. Since all columns in a row needs to have the same data type, this requires some care.
    We take this CTE:
    WITH CTE AS (
      SELECT t.EmpID, u.n, datepart(day, t.starttime) AS day
             substring(convert(char(23),
                CASE u.n WHEN 1 THEN t.starttime
                         WHEN 2 THEN t.endtime
                         WHEN 3 THEN dateadd(ss, datediff(ss, t.starttime, t.endtime), '19000101')
                END, 108), 11, 5)
      FROM   tbl
      CROSS  JOIN (SELECT n = 1 UNION ALL SELECT 2 UNION ALL SELECT 3)
      WHERE  t.starttime >= @month + '01'
        AND  t.starttime <  dateadd(month, 1, @month + '01')
    I assume here that @month is on the form YYYYMM.
    Before I go on, I like to point out that something you need to consider is what output you want if there are multiple entries the same day. And even worse, what output do you want if the intervals are overlapping? To keep this post down in complexity, I
    will ignore this situation, but I like to stress that unless you have the appropriate triggers and constraints in place, you will have that sort of data in a real production scenarion. Bad data knows how to creep in.
    With the CTE above, we can now pivot the data per day. It is kind of boring to write:
    SELECT EmpID,
           MIN (CASE day WHEN 1 THEN data END) AS [1],
           MIN (CASE day WHEN 2 THEN data END) AS [2],
           MIN (CASE day WHEN 31 THEN data END) AS [31]
    FROM   CTE
    GROUP  BY EmpID, n
    ORDER  BY EmpID, n
    Note: all code here is untested. If you want a tested solution, you need to supply the CREATE TABLE statements for your table and sample data as INSERT statements.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to display a javascript value in xml format

    Hi,
    I want to display this string that returns from javascript in jsp in xml format.Can anyone help me on this.
    This is my code...I want to displat string jScriptCode in xml format.
    <HTML>
    <TITLE>test.jsp</TITLE>
    <BODY>
    <SCRIPT LANGUAGE="javascript">
    <%
    String jScriptCode = "<!-- \n";
    jScriptCode=jScriptCode+ "var TE = new ActiveXObject(\"HostAccess.TerminalEmulation\"); ";
    jScriptCode=jScriptCode+ "TE.MakeEntry(\"<FORMAT>OP/W*</FORMAT>\"); ";
    jScriptCode=jScriptCode+ "var strTemp = TE.ResponseLine(0); ";
    jScriptCode=jScriptCode+ "document.writeln(\"<CENTER>You are using \" + strTemp + \"</CENTER>\"); ";
    jScriptCode=jScriptCode+ "TE.Close(); ";
    jScriptCode=jScriptCode+ "var SD = new ActiveXObject(\"HostAccess.StructuredQuery\"); ";
    jScriptCode=jScriptCode+ "var request = \"<FlightInfo_6_0><FltInfoMods><ItemAry><Item><DataBlkInd>F</DataBlkInd><FltQual><AirV>UA</AirV><StartCity>DEN</StartCity><EndCity>IAD</EndCity><FltNum>1532</FltNum><StartDt>20011201</StartDt></FltQual></Item></ItemAry></FltInfoMods></FlightInfo_6_0>\"; ";
    jScriptCode=jScriptCode+ "var identity = \"<Application><VendorId>XMDL</VendorId><VendorType>G</VendorType><SourceId>GSLKPR</SourceId><SourceType>G</SourceType></Application><User><UserId>N92119</UserId><Pseudo>79G2</Pseudo></User>\"; ";
    jScriptCode=jScriptCode+ "var response = SD.ExecuteXMLQuery(request, identity); ";
    jScriptCode=jScriptCode+ "document.writeln(); ";
    jScriptCode=jScriptCode+ "document.writeln(\"<CENTER>The current Date and Time in Denver is <B>\" + response + \"</B></CENTER>\"); ";
    jScriptCode=jScriptCode+ "//-->";
    //System.out.println(jScriptCode);
    %>
    </SCRIPT>
    <%=jScriptCode%>
    </BODY>
    </HTML>
    Thanks
    Hitchchi

    In jsp page set content type to text/xml
    <%@ page contentType="text/xml" %>

  • How to display the proxy settings for a specific group of servers in an OU ?

    Hi,
    Can anyone here please assist me in how to display the value of Proxy server settings from the computers in a specific OU member ?
    $Computers = Get-ADComputer -Filter * -SearchBase "OU=Terminal Servers,OU=Servers,DC=domain,DC=com" | Where-Object { Test-Connection $_.Name -Count 1 -Quiet }
    ForEach ($Computer in $Computers) {
    | Export-csv "C:\Proxy-Setting-Results.csv" -Append -NoTypeInformation -UseCulture
    I've done similar script for some other task but not sure how to do this for Proxy setting.
    Thanks.
    /* Server Support Specialist */

    Proxy settings are not set in Active Directory
    The below code works for 2003 servers and Win XP
    $colItems = get-wmiobject -class "Win32_Proxy" -namespace "root\CIMV2" `
    -computername $env:computername
    foreach ($objItem in $colItems) {
    write-host "Caption: " $objItem.Caption
    write-host "Description: " $objItem.Description
    write-host "Proxy Port Number: " $objItem.ProxyPortNumber
    write-host "Proxy Server: " $objItem.ProxyServer
    write-host "Server Name: " $objItem.ServerName
    write-host "Setting ID: " $objItem.SettingID
    write-host
    You can try checking the registry values- Works in 2008 + and Windows 7
    Get-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
    or use netsh
    netsh winhttp show proxy -r <remotemachinename>
    Regards Chen V [MCTS SharePoint 2010]

  • How to display URL images and URL link (html) from Smartforms?

    Hi Gurus,
    I'm having difficulty on how to display targeted URL images and URL link from the smartforms, after i sending it out as html mail. The mail i sent just can be preview as a plain text, which can't execute the html code that i put inside the smartforms itself. I follow a few step from this very useful blog.. Hopefully, you guys can give me some solutions or ideas on this.
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp -thanks to Pavan for his useful blog.
    My code is like this..
    <--- Start Code.
    FORM call_smartforms.
      DATA : lv_subject TYPE so_obj_des,
             lc_true(1) VALUE 'X',
             lw_control_parameters TYPE ssfctrlop,
             lw_output_options TYPE ssfcompop,
             lc_graphics(8) VALUE 'GRAPHICS',
             lw_xsfparam_line TYPE ssfxsfp,
             lc_extract(7) VALUE 'EXTRACT',
             lc_graphics_directory(18) VALUE 'GRAPHICS-DIRECTORY',
             lc_mygraphics(11) VALUE 'mygraphics/',
             lc_content_id(10) VALUE 'CONTENT-ID',
             lc_enable(6) VALUE 'ENABLE',
             lw_job_output_info TYPE ssfcrescl,
             lw_html_data TYPE trfresult,
             lw_graphics TYPE ssf_xsf_gr,
             lt_graphics TYPE tsf_xsf_gr,
             lv_html_xstr TYPE xstring,
             lw_html_raw LIKE LINE OF lw_html_data-content,
             lv_incode TYPE tcp00-cpcodepage VALUE '4110',
             lv_html_str TYPE string,
             lv_html_len TYPE i,
             lc_utf8(5) VALUE 'utf-8',
             lc_latin1(6) VALUE 'latin1',
             lv_offset TYPE i,
             lv_length TYPE i,
             lv_diff TYPE i,
             lt_soli TYPE soli_tab,
             lw_soli TYPE soli,
             lc_mime_helper TYPE REF TO cl_gbt_multirelated_service,
             lv_name TYPE mime_text VALUE 'sapwebform.htm',
             lv_xstr TYPE xstring,
             lw_raw TYPE bapiconten,
             lt_solix TYPE solix_tab,
             lw_solix TYPE solix,
             lv_filename TYPE string,
             lv_content_id TYPE string,
             lv_content_type TYPE w3conttype,
             lv_obj_len TYPE so_obj_len,
             lv_bmp TYPE so_fileext VALUE 'BMP',
             lv_description TYPE so_obj_des VALUE 'Graphic in BMP format',
             lc_doc_bcs TYPE REF TO cl_document_bcs,
             lc_bcs TYPE REF TO cl_bcs,
             lc_send_exception TYPE REF TO cx_root,
             lw_adsmtp TYPE lty_adsmtp,
             lv_mail_address TYPE ad_smtpadr,
             lc_recipient TYPE REF TO if_recipient_bcs,
             lc_send_request TYPE REF TO cl_bcs,
             lv_sent_to_all TYPE os_boolean.
      DATA : v_language TYPE sflangu VALUE 'E',
             v_e_devtype TYPE rspoptype.
      v_form_name = 'ZTEST_EMAIL'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = v_form_name
        IMPORTING
          fm_name            = v_namef
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
    starting here. ***
    Set title for the output
      lv_subject = 'Smartforms.'.
    Set control parameters to "no dialog"
      lw_control_parameters-no_dialog = lc_true.
    IF lw_service_subject-code = lc_fm1.
    *--- To get output device type
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          i_language    = v_language
          i_application = 'SAPDEFAULT'
        IMPORTING
          e_devtype     = v_e_devtype.
      lw_output_options-tdprinter = v_e_devtype.
      lw_control_parameters-getotf = 'X'.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
    Set output options
      lw_output_options-xsf        = lc_true.
      lw_output_options-xsfcmode   = lc_true.
      lw_output_options-xsfoutmode = 'A'.
      lw_output_options-xsfoutdev  = space.
      lw_output_options-xsfformat  = lc_true.
      lw_xsfparam_line-name  = lc_graphics.
      lw_xsfparam_line-value = lc_extract.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
      lw_xsfparam_line-name  = lc_graphics_directory.
      lw_xsfparam_line-value = lc_mygraphics.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
      lw_xsfparam_line-name  = lc_content_id.
      lw_xsfparam_line-value = lc_enable.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
    Get the smartform content
      CALL FUNCTION v_namef
        EXPORTING
          control_parameters   = lw_control_parameters
          output_options       = lw_output_options
    *pass other application specific parameters (eg order number, items ).
      IMPORTING
          job_output_info    = lw_job_output_info
      TABLES
          tt_tabh              = tt_tabh
          tt_tabb              = tt_tabb
          tt_tabf              = tt_tabf
      EXCEPTIONS
          formatting_error = 1
          internal_error   = 2
          send_error       = 3
          user_canceled    = 4
          OTHERS           = 5.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
      lw_html_data  = lw_job_output_info-xmloutput-trfresult.
      lt_graphics[] = lw_job_output_info-xmloutput-xsfgr[].
      CLEAR lv_html_xstr.
      LOOP AT lw_html_data-content INTO lw_html_raw.
        CONCATENATE lv_html_xstr lw_html_raw INTO lv_html_xstr IN BYTE MODE.
      ENDLOOP.
      lv_html_xstr = lv_html_xstr(lw_html_data-length).
      CALL FUNCTION 'SCP_TRANSLATE_CHARS'
        EXPORTING
          inbuff       = lv_html_xstr
          incode       = lv_incode
          csubst       = lc_true
          substc_space = lc_true
        IMPORTING
          outbuff      = lv_html_str
          outused      = lv_html_len
        EXCEPTIONS
          OTHERS       = 1.
    *HACK THE HTML CODE GENERATED BY SMARTFORM TO MAKE THE
    *EXTERNAL IMAGES APPEAR AS <IMG> TAG IN HTML
      REPLACE ALL OCCURRENCES OF '<IMG' IN lv_html_str WITH '<IMG' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '/>' IN lv_html_str WITH '/>' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '</A>' IN lv_html_str WITH '' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '<' IN lv_html_str WITH '<' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '>' IN lv_html_str WITH '>' IGNORING CASE.
    CALL METHOD html_control - >load_mime_object
       EXPORTING
         object_id  = 'ZWN'
         object_url = 'ZWN.GIF'
       EXCEPTIONS
         OTHERS     = 1.
      REPLACE ALL OCCURRENCES OF lc_utf8 IN lv_html_str WITH lc_latin1.
    REPLACE ALL OCCURRENCES OF lc_utf8 IN lv_html_str WITH 'iso-8859-1'.
       break mhusin.
      lv_html_len = STRLEN( lv_html_str ).
      lv_offset = 0.
      lv_length = 255.
      WHILE lv_offset < lv_html_len.
        lv_diff = lv_html_len - lv_offset.
        IF lv_diff > lv_length.
          lw_soli-line = lv_html_str+lv_offset(lv_length).
        ELSE.
          lw_soli-line = lv_html_str+lv_offset(lv_diff).
        ENDIF.
        APPEND lw_soli TO lt_soli.
        ADD lv_length TO lv_offset.
      ENDWHILE.
      CREATE OBJECT lc_mime_helper.
      CALL METHOD lc_mime_helper->set_main_html
        EXPORTING
          content     = lt_soli
          filename    = lv_name
          description = lv_subject.
      LOOP AT lt_graphics INTO lw_graphics.
        CLEAR lv_xstr.
        LOOP AT lw_graphics-content INTO lw_raw.
          CONCATENATE lv_xstr lw_raw-line INTO lv_xstr IN BYTE MODE.
        ENDLOOP.
        lv_xstr = lv_xstr(lw_graphics-length).
        lv_offset = 0.
        lv_length = 255.
        CLEAR lt_solix[].
        WHILE lv_offset < lw_graphics-length.
          lv_diff = lw_graphics-length - lv_offset.
          IF lv_diff > lv_length.
            lw_solix-line = lv_xstr+lv_offset(lv_length).
          ELSE.
            lw_solix-line = lv_xstr+lv_offset(lv_diff).
          ENDIF.
          APPEND lw_solix TO lt_solix.
          ADD lv_length TO lv_offset.
        ENDWHILE.
        CONCATENATE lc_mygraphics lw_graphics-graphics text-001 INTO lv_filename.
        CONCATENATE lc_mygraphics lw_graphics-graphics text-001 INTO lv_content_id.
        lv_content_type = lw_graphics-httptype.
        lv_obj_len      = lw_graphics-length.
    *Add images to the email
        CALL METHOD lc_mime_helper->add_binary_part
          EXPORTING
            content      = lt_solix
            filename     = lv_filename
            extension    = lv_bmp
            description  = lv_description
            content_type = lv_content_type
            length       = lv_obj_len
            content_id   = lv_content_id.
      ENDLOOP.
      TRY.
          lv_subject = lv_subject.
          lc_doc_bcs = cl_document_bcs=>create_from_multirelated(
                   i_subject          = lv_subject
                   i_multirel_service = lc_mime_helper ).
        CATCH cx_document_bcs INTO lc_send_exception.
        CATCH cx_bcom_mime INTO lc_send_exception.
        CATCH cx_gbt_mime INTO lc_send_exception.
      ENDTRY.
    Create send request
      TRY.
          lc_bcs = cl_bcs=>create_persistent( ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
      TRY.
          lc_bcs->set_document( i_document = lc_doc_bcs ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
    Set-up email receiver
      lv_mail_address = '[email protected]'.
    TRANSLATE lv_mail_address TO UPPER CASE.
      TRY.
          lc_recipient = cl_cam_address_bcs=>create_internet_address(
              i_address_string = lv_mail_address ).
        CATCH cx_address_bcs INTO lc_send_exception.
      ENDTRY.
      TRY.
          lc_bcs->add_recipient( i_recipient = lc_recipient ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
    Send smartforms as HTML email
      TRY.
          lc_bcs->send( ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
      COMMIT WORK.
      WRITE:/ 'Mail sent'.
    ENDFORM.                    "call_smartforms
    End Code --->
    Thanks and Regards.

    1- put your images in a directory under the web app directory. Example: app/images/
    2- in your jsp, use: String file = application.getRealPath("/images/"); to get the images directory. See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
    3- it's not the right forum to post this kind of question. Post them in the JSP/Servlet JSTL forum instead

  • How to display database items

    can anyone tell me how to display the selected contents of
    the database by using a variable from my form field(like text box
    )

    Hello Guys!
    Sorry forever to get back. Going to throw this up here quick
    so I dont time out, but if you need further help post back and I
    will help with specific questions.
    Using the City, State example. This operation is two fold.
    (a) the search page, and (b) the results page.
    (a) On your search page you would have two fields. City and
    State. Make sure your table that holds these fields are containted
    within a form tag. (Insert > Form > Form). Also make sure
    your textfields have names. You can click on the textfield to
    highlight in design view and change the name from 'textfield' and
    'textfield1' to 'city' and 'state'..
    Highlight the form tag and in the properties panel where it
    says "action" insert the URL/file of your results page. This is the
    page that is actually going to display the information, then save
    your work.
    (b) Open up your results page, and in the bindings panel
    click the "+" then select query. In the 'simple' window name your
    recordset (example: rsStores) select your connection, then select
    the table you desire to display results from. From this window you
    can also choose a field to use as an order by. Do not use the
    filter!
    With this done and 'without' saving yet, click on the
    "advanced" tab. You should now see and a simple statement in the
    window that looks something like:
    SELECT *
    FROM Stores (The name 'Stores' will actually be replaced with
    your table name)
    Below the statement you will see 'parameters' with a + and -.
    Hit the plus to add a parameter. For name use varState, for Type
    use text, for Value use Request("State") and for default value use
    zero. Replicate the process for varCity using Request("City") for
    the value. (The requests are the same names as the names you used
    to name your fields in the search form). Now go up to the original
    statement and edit it to look like this:
    SELECT *
    FROM Stores WHERE yourfieldname = varState AND WHERE
    yourfieldname = varCity
    Replace 'yourfieldname' with the actual field name holding
    the values. Keep EVERYTHING case sensitive. Testing in design view
    will not work because there are no values yet passed. So click ok,
    save the page and upload them to server. Test by going to the
    search page and submitting the search form.
    Hope that helps..!!

Maybe you are looking for

  • Error Message from ITS "host parameter is null" - Huh?

    I am having trouble submitting a podcast to the iTunes Store. I have a podcast that I can access directly through my blog: blog.mindthegap.us The RSS2 feed to my podcast is: http://blog.mindthegap.us/podcasts-only/rss2.aspx I have subscribed to my po

  • Date parameter in a process flow

    Hi, I´m working with OWB 10.1.0.2.0. I have a process flow with a transform. The transform has a date parameter and I´ve defined a date parameter in the start activity, which is bound to the start parameter. If I try to pass a date parameter in this

  • Full screen Playback only on Main Display

    I noticed that after upgrading to Lion quicktime player won't play movies full screen on my second display.  Under Snow Leopard if the quicktime window was on the second display and you hit full screen it would fill the display is was on.  Now the vi

  • What does 'Socket is not connected' when slow booting mean?

    I updated software and restarted my mac, It didn't move from the grey screen so I powered off and on while pressing Shift + Cmd +V. It now will not not move from 'launch_msg(): Socket is not connected'. What does this mean?

  • New field on field catelogue

    Hi For a discount condition type I want to create a new condition table with a filed which is not in filed catelogue. So what and all the entire procedure I have to do. thns & rgds raju