Email contents using ABAP

Hi,
I am using FM 'SO_NEW_DOCUMENT_SEND_API1' to send an email to internet address.
Problem is even after populating the content internal table in table interface of FM, I am not seeing any contents in actual email.
Here is the sample code:
lt_object_content-line = 'No Records found'.
APPEND lt_object_content.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
      document_data              = l_document_data
      put_in_outbox              = 'X'
      commit_work                = 'X'
    TABLES
      object_header             = lt_object_header
      <b>contents_bin          = lt_object_content</b>
      receivers                  = lt_recievers
    EXCEPTIONS
      too_many_receivers         = 1
      document_not_sent          = 2
      document_type_not_exist    = 3
      operation_no_authorization = 4
      parameter_error            = 5
      x_error                    = 6
      enqueue_error              = 7
      OTHERS                     = 8.
Here the text "No records found" is not coming into email.
Could you pleae guide me on this..?
Thanks,
Samay

Please see the sample program.
report zrich_0003 .
* For API
data: maildata type sodocchgi1.
data: mailtxt  type table of solisti1 with header line.
data: mailrec  type table of somlrec90 with header line.
start-of-selection.
  clear:    maildata, mailtxt,  mailrec.
  refresh:  mailtxt, mailrec.
  maildata-obj_name = 'TEST'.
  maildata-obj_descr = 'Test'.
  maildata-obj_langu = sy-langu.
  mailtxt-line = 'This is a test'.
  append mailtxt.
  mailrec-receiver = '[email protected]'.
  mailrec-rec_type  = 'U'.
  append mailrec.
    call function 'SO_NEW_DOCUMENT_SEND_API1'
         exporting
              document_data              = maildata
              document_type              = 'RAW'
              put_in_outbox              = 'X'
         tables
              object_header              = mailtxt
              object_content             = mailtxt
              receivers                  = mailrec
         exceptions
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              others                     = 8.
    if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
Regards,
Rich Heilman

Similar Messages

  • Sending Formated email content using Mail Adapter !

    Hi,
    I would like to send email notification to customer using mail adapter, could you please to advise how to prepared the content of the email with little bit formated like sample below :
    Dear Madam / Sir
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxx :
    yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
    Best Regards,
    Since the constant function only can accept single line, how i can add change line.
    thank you and Best Regards
    Fernand

    Hi Fernand,
    There are a couple of blogs in SDN regarding sending formatted mail using Mail adapter. I guess there is one written by Prakash Arunachalam. Just do a search and it will give you some idea on using XSLT to achieve the result.
    If all you need is multi line in the content, use a UDF and use \n when ever you need a new line and \t for tab space.
    Regards,
    Jaishankar

  • Read large Excel cell content using ABAP class i_oi_spreadsheet

    Hello,
    I am trying to read an excel file using ABAP methods of interface i_oi_spreadsheet.
    Unfortunetly some of my cells contain data that exceeds the 256 characters size.
    To retrieve the content of the excel speadsheet, I am using method get_ranges_data.
    Unfortunetly as the returned structure is of type soi_generic_table, the content of the cell is truncated to the maximum limit of 256.
    Is there a way to read cells with large content ??
    Thanks
    Regards
    Jean-Pierre

    Same problem for me on ECC 6.0. Hope for a solution.

  • To Get Hyperlink in the email content using report program

    Hi All,
    Using report program i'm sending an email with some content. Some part of the content should be hyperlinked. How we can do this? Is there any Function Module to do this?
    Thanks,
    Anil.

    Hi,
    if you are using SO_NEW_DOCUMENT_ATT_SEND_API1 then
    Just append the link(say www.google.com) directly to the messages internal table. It will automatically take it as link.
    aRs
    Message was edited by:
            aRs

  • How to access Infocube content using an ABAP program

    Hi,
       I am trying to access infocube contents using a ABAP program in BW.
       It is easy to access ODS content as we have NEW DATA or ACTIVE DATA
       tables. Is there any way we can access Infocube content.
       I tried using the FACT table but it has only Keyfigure data.
    thanks
    arshad.

    Hi,
    I would suggest to use a transactionnal cube, even if you do not use BPS to feed it.
    Then, you create a layout in transaction BPS0 (~ similar to a query), and you can access the cube content by simply using the SAP function <b>API_SEMBPS_GETDATA</b>.
    This is easy and fast.
    Regards,

  • Fm or class existing for fetching xml contents from a file using abap ?

    Hi,
    I need to fetch an xml file in a string of type xstring. I am using class cl_gui_frontend_services=>gui_upload.
    This returns me content in table format, than i am planning to conver to xstring.
    Is there any better approach or any existing function module any one know of ?
    thanks
    Regards
    Pooja

    Hi Pooja,
    You can try out this program to read the XML file using abap.
    *& Report  ZXMLTOITAB                                                 *
    REPORT  ZXMLTOITAB                            .
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
    * Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
    *   Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    *   wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table =
    l_xml_table
                                                        size  =
    l_xml_table_size ).
    *   Creating a document
        l_document = l_ixml->create_document( ).
    *   Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
    *   Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
    *   Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
    *   Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
    *   Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
    *   upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *   Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
    replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
    IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
    *   create a node iterator
        iterator  = node->create_iterator( ).
    *   get current node
        node = iterator->get_next( ).
    *   loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
    *         element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
    *           attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
    *         text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
    *     advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    Regards,
    Samson Rodrigues.

  • Using ABAP Webdynpr How to Upload File and download file in SAP R/3

    Hi SAP GURUS ,
                             I wanted to save employee profile from ESS to SAP so i am creating ESS Application .
    For that I go with BDS Approach and create test program for this  I got success while uploading file in my folder
    which i have created with the help of class and content repository . but when i Using ABAP Webdynpro , i got error FM "BDS_BUSINESSDOCUMENT_CREATEF"  message " error_kpro " .
                           Also I wanted to use KM for storage of Documents and wanted to retrive with help of ABAP Webdynpro .
                           So pls tell me / mailed me the process , approach and if you have examples .
        Thanks in Advance ,
         Vishwassap at gmail

    Hi Vishwas,
    Check out the thread [Efficient way of saving documents uploaded|Re: Efficient way of saving documents uploaded by users; and check the blog by Raja Thangamani.
    Also check the thread [Export Images through Function Modules   |Export Images through Function Modules;.
    Hope it helps you.

  • Crystal report using ABAP from SAP ECC6.0 EHP 3.0

    Hi Gurus,
    Can i create crystal report using ABAP in SAP ECC 6.0 EHP 3 . as i am not able to see this link in SPRO.
    IMG > SAP NetWeaver > Application Server > SAP List Viewer > Maintain SAP GUI Specific Settings.
    Kindly guide me urgently.

    http://help.sap.com/saphelp_slc/helpdata/en/27/c9ee1951fc4fb9ac322ac7e6fa7372/content.htm
    If I understood your question correctly.
    Have a look in the link above.
    It is possible to use Crystal Reports from ALV.
    Tammy Powlas also has some good guides on how to do this.
    The ABAP however is not covered that much.
    Best Regards
    Ingrid

  • [Forum FAQ] How do I send multiple rows returned by Execute SQL Task as Email content in SQL Server Integration Services?

    Question:
    There is a scenario that users want to send multiple rows returned by Execute SQL Task as Email content to send to someone. With Execute SQL Task, the Full result set is used when the query returns multiple rows, it must map to a variable of the Object data
    type, then the return result is a rowset object, so we cannot directly send the result variable as Email content. Is there a way that we can extract the table row values that are stored in the Object variable as Email content to send to someone?
    Answer:
    To achieve this requirement, we can use a Foreach Loop container to extract the table row values that are stored in the Object variable into package variables, then use a Script Task to write the data stored in packages variables to a variable, and then set
    the variable as MessageSource in the Send Mail Task. 
    Add four variables in the package as below:
    Double-click the Execute SQL Task to open the Execute SQL Task Editor, then change the ResultSet property to “Full result set”. Assuming that the SQL Statement like below:
    SELECT   Category, CntRecords
    FROM         [table_name]
    In the Result Set pane, add a result like below (please note that we must use 0 as the result set name when the result set type is Full result set):
    Drag a Foreach Loop Container connects to the Execute SQL Task. 
    Double-click the Foreach Loop Container to open the Foreach Loop Editor, in the Collection tab, change the Enumerator to Foreach ADO Enumerator, then select User:result as ADO object source variable.
    Click the Variable Mappings pane, add two Variables as below:
    Drag a Script Task within the Foreach Loop Container.
    The C# code that can be used only in SSIS 2008 and above in Script Task as below:
    public void Main()
       // TODO: Add your code here
                Variables varCollection = null;
                string message = string.Empty;
                Dts.VariableDispenser.LockForWrite("User::Message");
                Dts.VariableDispenser.LockForWrite("User::Category");
                Dts.VariableDispenser.LockForWrite("User::CntRecords");     
                Dts.VariableDispenser.GetVariables(ref varCollection);
                //Format the query result with tab delimiters
                message = string.Format("{0}\t{1}\n",
                                            varCollection["User::Category"].Value,
                                            varCollection["User::CntRecords"].Value
               varCollection["User::Message"].Value = varCollection["User::Message"].Value + message;   
               Dts.TaskResult = (int)ScriptResults.Success;
    The VB code that can be used only in SSIS 2005 and above in Script Task as below, please note that in SSIS 2005, we should
    change PrecompileScriptIntoBinaryCode property to False and Run64BitRuntime property to False
    Public Sub Main()
            ' Add your code here
            Dim varCollection As Variables = Nothing
            Dim message As String = String.Empty
            Dts.VariableDispenser.LockForWrite("User::Message")
            Dts.VariableDispenser.LockForWrite("User::Category")
            Dts.VariableDispenser.LockForWrite("User::CntRecords")
            Dts.VariableDispenser.GetVariables(varCollection)
            'Format the query result with tab delimiters
            message = String.Format("{0}" & vbTab & "{1}" & vbLf, varCollection("User::Category").Value, varCollection("User::CntRecords").Value)
            varCollection("User::Message").Value = DirectCast(varCollection("User::Message").Value,String) + message
            Dts.TaskResult = ScriptResults.Success
    End Sub
    Drag Send Mail Task to Control Flow pane and connect it to Foreach Loop Container.
    Double-click the Send Mail Task to specify the appropriate settings, then in the Expressions tab, use the Message variable as the MessageSource Property as below:
    The final design surface like below:
    References:
    Result Sets in the Execute SQL Task
    Applies to:
    Integration Services 2005
    Integration Services 2008
    Integration Services 2008 R2
    Integration Services 2012
    Integration Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How to print PDF file content from ABAP in background?

    Hi,
    Is it possible to print PDF file content from ABAP in background?
    I have some PDF content which I need to print it, these PDF files are generated outside the SAP.
    Please have you any suggestions?
    Thank you
    Tomas

    <b><u>Solution:</u></b><br>
    <br>
    The target output device must support PDF print, this is only one limitation.<br>
    <br>
    REPORT  z_print_pdf.
    TYPE-POOLS: abap, srmgs.
    PARAMETERS: p_prnds LIKE tsp01-rqdest OBLIGATORY DEFAULT 'LOCL',
                p_fname TYPE file_table-filename OBLIGATORY LOWER CASE,
                p_ncopi TYPE rspocopies OBLIGATORY DEFAULT '1',
                p_immed AS CHECKBOX.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      DATA: lv_rc     TYPE i,
            lv_filter TYPE string.
      DATA: lt_files TYPE filetable.
      FIELD-SYMBOLS: <fs_file> LIKE LINE OF lt_files.
      CONCATENATE 'PDF (*.pdf)|*.pdf|' cl_gui_frontend_services=>filetype_all INTO lv_filter.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          file_filter             = lv_filter
        CHANGING
          file_table              = lt_files
          rc                      = lv_rc
        EXCEPTIONS
          OTHERS                  = 1.
      IF sy-subrc NE 0 AND lv_rc EQ 0.
        MESSAGE 'Error' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      READ TABLE lt_files ASSIGNING <fs_file> INDEX 1.
      IF sy-subrc EQ 0.
        p_fname = <fs_file>-filename.
      ENDIF.
    AT SELECTION-SCREEN.
      DATA: lv_name   TYPE string,
            lv_result TYPE boolean.
      lv_name = p_fname.
      CALL METHOD cl_gui_frontend_services=>file_exist
        EXPORTING
          file                 = lv_name
        RECEIVING
          result               = lv_result
        EXCEPTIONS
          OTHERS               = 1.
      IF sy-subrc NE 0.
        MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      IF lv_result NE abap_true.
        MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
    START-OF-SELECTION.
    END-OF-SELECTION.
      PERFORM process.
    FORM process.
      DATA: lv_name     TYPE string,
            lv_size     TYPE i,
            lv_data     TYPE xstring,
            lv_retcode  TYPE i.
      DATA: lt_file TYPE srmgs_bin_content.
      lv_name = p_fname.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename                = lv_name
          filetype                = 'BIN'
        IMPORTING
          filelength              = lv_size
        CHANGING
          data_tab                = lt_file
        EXCEPTIONS
          OTHERS                  = 1.
      IF sy-subrc NE 0.
        MESSAGE 'Read file error!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
        EXPORTING
          input_length = lv_size
        IMPORTING
          buffer       = lv_data
        TABLES
          binary_tab   = lt_file
        EXCEPTIONS
          failed       = 1
          OTHERS       = 2.
      IF sy-subrc NE 0.
        MESSAGE 'Binary conversion error!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      PERFORM print USING p_prnds lv_data CHANGING lv_retcode.
      IF lv_retcode EQ 0.
        WRITE: / 'Print OK' COLOR COL_POSITIVE.
      ELSE.
        WRITE: / 'Print ERROR' COLOR COL_NEGATIVE.
      ENDIF.
    ENDFORM.                    " PROCESS
    FORM print USING    iv_prndst  TYPE rspopname
                        iv_content TYPE xstring
               CHANGING ev_retcode TYPE i.
      DATA: lv_handle    TYPE sy-tabix,
            lv_spoolid   TYPE rspoid,
            lv_partname  TYPE adspart,
            lv_globaldir TYPE text1024,
            lv_dstfile   TYPE text1024,
            lv_filesize  TYPE i,
            lv_pages     TYPE i.
      CLEAR: ev_retcode.
      CALL FUNCTION 'ADS_SR_OPEN'
        EXPORTING
          dest            = iv_prndst
          doctype         = 'ADSP'
          copies          = p_ncopi
          immediate_print = p_immed
          auto_delete     = 'X'
        IMPORTING
          handle          = lv_handle
          spoolid         = lv_spoolid
          partname        = lv_partname
        EXCEPTIONS
          OTHERS          = 1.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CALL FUNCTION 'ADS_GET_PATH'
        IMPORTING
          ads_path = lv_globaldir.
      CONCATENATE lv_globaldir '/' lv_partname '.pdf' INTO lv_dstfile.
      OPEN DATASET lv_dstfile FOR OUTPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      TRANSFER iv_content TO lv_dstfile.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CLOSE DATASET lv_dstfile.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CALL FUNCTION 'ZBAP_RM_PDF_GET_PAGES'
        EXPORTING
          iv_content = iv_content
        IMPORTING
          ev_pages   = lv_pages.
      lv_filesize = XSTRLEN( iv_content ).
      CALL FUNCTION 'ADS_SR_CONFIRM'
        EXPORTING
          handle   = lv_handle
          partname = lv_partname
          size     = lv_filesize
          pages    = lv_pages
          no_pdf   = ' '
        EXCEPTIONS
          OTHERS   = 1.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CALL FUNCTION 'ADS_SR_CLOSE'
        EXPORTING
          handle = lv_handle
        EXCEPTIONS
          OTHERS = 1.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
    ENDFORM.                    " PRINT

  • How to upload excel file in Webdynpro application using ABAP

    Hi Experts,
    Am developing a webdynpro application in which it will take an excel file as input and display the contents in the form of a table in output. I am able to upload tab delimited text file and populate the table using the below code but not able to do the same with .xls file. Pls let me know if I need to use a different function module for upload excel file.
    get single attribute
      wd_context->get_attribute(
        EXPORTING
          name =  `DATASOURCE`
        IMPORTING
          value = l_xstring ).
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          in_xstring = l_xstring
        IMPORTING
          out_string = l_string.
      SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
    Bind With table Element.
      LOOP AT i_data INTO l_string.
        SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
        READ TABLE fields INTO lv_field INDEX 1.
        fs_table-name = lv_field.
        READ TABLE fields INTO lv_field INDEX 2.
        fs_table-age = lv_field.
        APPEND fs_table TO t_table1.
      ENDLOOP.
    lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
    lo_nd_data->bind_table( T_TABLE1 ).
    Thanks,
    Subathra

    Dear Exports
    Can anyone guide me how to uplode the .xlsx or ..xls formatted excel file using abap webdynpro without converting it to .txt file. Because my client requirement is only to upload the excel file. because to convert the .xlsx flie to .txt file it will be time taking and cost expanssive. Another requirement is suppose today i have create a application for uploading a file which has 8 columns and 10 rows. suppose tomorrow the client will make some changes in that flat file means the client will add 2 extra columns and 10 more columns in that fil. and will upload that file. Then the new file will be display on the browser or old file. but my requirement is to display the new file in browser.
    Can anyone kindly help to solve my problem. I am completely fresher in this field and I need to do it as soon as possible. Please help to solve the problem. 
    Regards
    Rashmita

  • Can't locate email content? All of a sudden my email content has disappeared from inside MacMail? The actual emails are coming through but I am unable to view them as the area is just left blank! Nothing has been done to have changed this?

    Can't locate email content? All of a sudden my email content has disappeared from inside MacMail? The actual emails are coming through but I am unable to view them in the content area! Nothing has been done to have changed this?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • How To Guide on ABAP mapping (How to Use ABAP-Mapping in XI 3.0).

    Hi,
    I am looking for this document: How To Guide on ABAP mapping (How to Use ABAP-Mapping in XI 3.0), and not able to find it.
    Can anybody please point me the location, to look for, or post the document.
    Thanks,
    Namadev

    Hi Namadev Chillal  ,
    These r the links containing PDF docs which u r looking for:
    how to create a flat file out of an IDoc-XML by means of an ABAP mapping program and the J2EE File Adapter.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Excellent PDF Document on Mapping
    http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
    Mapping Development with the ABAP Workbench
    http://help.sap.com/saphelp_nw04/helpdata/en/10/5abb2d9df242f6a62e22e027a6c382/content.htm
    ABAP Mappings
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm

  • Email content won't display in Mail Yosemite

    Hi there,
    I upgraded to Yosemite last week and until yesterday everything seemed to work fine. As of yesterday, my email contents stopped displaying in the content window. The only thing that changed before it started was that I used an external display. My mac is a MBP 13" mid 2012, 2.9 Ghz i7.
    see screen capture attached.
    I appreciate your help,
    Ben.

    Thanks for your quick answer,
    And sorry, I should have said that before:
    It started on the external display and actually the very first time I could still see the message content, it went blank only when I clicked on the "see more from..." hyperlink to unravel the message's full content. Then it started happening to the message as a whole and just by selecting a message to view it. Also, it happens on both the external and laptop displays, on the laptop display both when external display is connected or not, after successive restarts and shutdowns.
    I hope this gives you a better idea, but do get back to me if you need more inf.
    Thanks again,
    Ben.

  • Can somebody post link to How to Use ABAP-Mapping in XI 3.0?

    Hello,
    can somebody post a real link to the document How to Use ABAP-Mapping in XI 3.0. All the links to this documnet in the existing posts are not valid.
    Thanks for your information
    Jayson

    Hi
    Following weblog might help you.
    Testing ABAP Mapping - Testing ABAP Mapping
    XML DOM Processing in ABAP part I -  Convert an ABAP table into XML file using SAP DOM Approach.
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    SDN TV demo to create and test ABAP mapiing - https://media.sdn.sap.com/SDNTV/main.asp?mediaId=128
    How to guide for ABAP mapping.
    https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&
    Also check these links,
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
    Testing ABAP Mapping
    Using ABAP XSLT Extensions for XI Mapping
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Oct 9, 2008 6:27 AM

Maybe you are looking for

  • Itunes 10 will not launch

    After downloading itunes 10 over an older version to my computer, it will no longer open. When you go to launch the program an error message shows and itunes wont even attempt to open. The error code is "This application could not be opened. The file

  • PO and MIGO document type

    Hi, When user creating PO and goods receipt ,he doesnot getting po document type description(in MIGO also) ,only he is getting po document type in header as NB (it shoulb be NB Stadards po). I have checked in options and expert tab also ,still issue

  • GRC 10.0 Workflow customizing problem

    Hi experts, We are working with GRC Access Control 10.0 and when doing the customizing tasks related with workflows we have an issue that doesnt let us continue. Here is the background information. We are in the "IMG/Governance Risk and Compliance/Ge

  • Need help with XML Compatibility between CS3 and CS4

    I'm not a Dreamweaver guru but I am hoping someone will recognize my issue and be able to provide meaningful feedback. Background: A developer buddy and I are working together to create a new home page for an online retailer that utilizes flash banne

  • PARAMETER ID FOR MM03

    Hi Gurus How to know that the parameter ID for a particular trasnsaction ? Please let me know the procedure. regards Mac