BCS Business Data List data HTML Formatting data
I have a Business Data List webpart in Sharepoint Online (2013) which pulls data from a BCS List. This data contains HTML which is not rendering as HTML but the HTML text.
I've modified the data to HTML format the data, no joy (example: < img src="/)
I've modified the data to spit out the native html, no joy (example: <img src="/)
I've modified the XSLT of the webpart using the Data View Properties (when editing the webpart in Sharepoint) to output the text from the list as below, which didn't work:
<xsl:value-of select="@ArticleBody" disable-output-escaping="yes" ddwrt:nbsp-preserve="yes"/>
and also this hasn't worked:
<xsl:value-of select="@ArticleBody" disable-output-escaping="yes"/>
I'm now at a loss as to how I can get the data to show with the html text being rendered as actual HTML on page
found, the issue - there was a section further down the XSLT file that needed the disable-output-escaping adding to (below is the original section) - once updated it worked like a charm - thanks
<xsl:template name="_LFtoBRloop">
<xsl:param name="input" />
<xsl:variable name="beforeText" select="substring-before($input, '
')" />
<xsl:choose>
<xsl:when test="string-length($beforeText) = 0 and substring($input, 1, 1) != '
'">
<xsl:value-of select="$input" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$beforeText" />
<br />
<xsl:call-template name="_LFtoBRloop">
<xsl:with-param name="input" select="substring($input, string-length($beforeText)+2)" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Similar Messages
-
Help writing HTML formatted data to JEditorPane multiple times
I have problems writing data to a JEditorPane more than once. The first time, it works, but the 2nd, 3rd, and so on, the data that is displayed is corrupt. This is where I print the data:
ResultsDisplay.getEditorKit().createDefaultDocument();
ResultsDisplay.setText(inputStore.toString());There seems to be something wrong with the way I display the data. What do I have to do to change HTML formated data that is printed to an JEditorPane?
This is how I set up the JEditorPane:
javax.swing.JEditorPane ResultsDisplay = new javax.swing.JEditorPane();
JScrollPane ResultsDisplayScrollPlane = new JScrollPane(ResultsDisplay);
HTMLEditorKit htmlEdKit = new HTMLEditorKit();and
ResultsDisplay.setEditable(false);
ResultsDisplay.setEditorKit(htmlEdKit);
ResultsDisplay.setContentType("text/html");
ResultsDisplay.setEditorKitForContentType("text/html", htmlEdKit);
getContentPane().add(ResultsDisplayScrollPlane);
ResultsDisplayScrollPlane.setBounds(50,50,700,450);Am I doing anything wrong here? Why can I only write the data once during the Applet's run life?Hi again,
Does anyone have experience writing to a JEditorPane multiple times during the run-life of a Applet? When I first send the data, it is displayed correctly. But everytime after that, the data is corrupted. My data is written in tables (in HTML format). The second time I write to the JEditorPane, it only displays the first of my tables, and only displays the collumn names and in the last column it displays the first row of data squeezed into the last column name's cell. If I run a third time, it takes this old table and adds a new table from the third run. With the fourth run I end up with 3 tables each containing only one row with the column names and the 1st row of data squeezed into the last collumn name cell.
Can anyone help? I've already tried creating a new document as described in the JEditorPane's API. -
Exporting data from a html format into database
Hello:
Maybe someone can help me. I wrote a Test Stand program and save the test results in the html format everyone liked be able to access the data thru a web page but now we want to save the data to a database witch I was able to do. I need import the files save in html to the database. Does any knows how to do this or at least convert into a .txt or .csv formatHey Toro,
Unfortunately there is no utility that will parse your HTML format files into your DataBase. This is primarily because the report files don't have all the information that is stored in the database. The data stored in the database is quite complex. So you might have to resort to manually inserting the fields, although this process is quite tedious. Also you cannot really convert your HTML files into .csv file, just because once a report is created TestStand doesn't know what data fields of the HTML file is important or not.
I'll place a product suggestion over to R&D to maybe look into creating a utility for our future releases.
SijinK
National Instruments -
How To formate PDF Data(Binary) to HTML Formate
Hi All,
I am using PDFs in my application. Once the user has submitted his project in formation through pdf, it stores in BAPI. When i tried to retrive the data from back end to display in a view. it shows me all the information is in single line because of PDf binary data. Can any one knows about how to display pdf data in a view (html) with multiple lines.
Thanks
Regards
Ravi.GollaHi Ravi,
See this thread...It might be useful for u..
/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4fd2d690-0201-0010-de83-b4fa0c93e1a9
Urs GS -
Hover Card is showing US formated date rather than UK formated date
The HoverCard in the search results is showing the last modified date in US culture i.e. MMM/dd/yyyy rather than UK dd/MMM/YYYY. The culture of the search site collection is UK.
jamtodayWhen you say culture you mean locale? Might be worth re-checking the time / calendar options as sometimes switching the locale doesn't switch out the remainder of the options in that config page.
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
No data list is coming in Data View...
Hi ,
I have created a print form in SFP. I have created the CONTEXT and activated it. But when I press the LAYOUT tab my DATA VEIW is not getting populated. My DATA VIEW pallet is empty, even though the after creating the context and activation it...
Can you suggest me the solution... Thanks in advance...
Hi every one... did any body faced this problem...
Thanks and Regards,
Bharat Kumar Reddy.V
Message was edited by: Bharat Kumar Reddy VakaHi Sharadha and Markus,
Thank you for your replies. I have downloaded LiveCycle designer and installed it once again. Now my data view pallet is getting populated.
Thanks and Regards,
Bharat Kumar Reddy.V -
Can i get the report output in HTML format?
Hello everybody,
I have developed a report whose output needs to be printed in HTML format.
Can anybody suugest how this can be accomplished by coding in program itself using any function modules if necesary?
Helpful answers will surely be rewarded.
Thanx in advance,
Sanghamitra.refer the below code
Generate an HTML file from a Report in ABAP
data: begin of itab occurs 0,
matnr type mara-matnr,
mtart type mara-mtart,
matkl type mara-matkl,
groes type mara-groes,
end of itab.
data: ifields type table of w3fields with header line.
data: ihtml type table of w3html with header line.
select * into corresponding fields of table itab
from mara up to 100 rows.
call function 'WWW_ITAB_TO_HTML'
EXPORTING
TABLE_ATTRIBUTES = 'BORDER=1'
TABLE_HEADER =
ALL_FIELDS = 'X'
tables
html = ihtml
fields = ifields
ROW_HEADER =
itable = itab
check sy-subrc = 0.
call function 'GUI_DOWNLOAD'
exporting filename = 'c:\test.html'
tables data_tab = ihtml
or for conerting internal table data into html
See below simple report to convert the internal table data to a HTML format data and stores in a internal table and then pass that internal table as an attachment to the external email using function module SO_NEW_DOCUMENT_ATT_SEND_API1.
You need for create a spool also.
REPORT Z_HTML .
include <icon>.
types: begin of msg,
type like icon-id,
text(140) type c,
end of msg.
constants: gc_marked type c value 'X',
gc_ok like icon-id value '@5B@'.
data:
gt_msg type standard table of msg,
gs_msg like line of gt_msg,
gv_msg(138) type c,
*-- html
html_container type ref to cl_gui_custom_container,
html_control type ref to cl_gui_html_viewer,
my_row_header like w3head occurs 10 with header line,
my_fields like w3fields occurs 10 with header line,
my_header like w3head,
my_html type standard table of w3html ,
ok_code like sy-ucomm.
Start of Selection *
start-of-selection.
clear gv_msg.
gv_msg = 'MESSAGES for HTML'.
do 3 times.
perform message using gc_ok gv_msg .
enddo.
End of Selection *
end-of-selection.
set screen 0100.
*& Form message
form message using p_type
p_text.
clear gs_msg.
gs_msg-type = p_type.
gs_msg-text = p_text.
append gs_msg to gt_msg.
endform. " MESSAGE
*& Module STATUS_0100 OUTPUT
module status_0100 output.
perform convert_itab_html.
set titlebar '100' .
set pf-status 'MAIN100'.
create object html_container
exporting
container_name = 'CONTAINER'.
create object html_control
exporting
parent = html_container
saphtmlp = gc_marked .
data: assigned_url type url.
call method html_control->load_data
EXPORTING
URL = url
TYPE = 'text'
SUBTYPE = 'html'
SIZE = 0
ENCODING =
CHARSET =
importing
assigned_url = assigned_url
changing
data_table = my_html
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_GENERAL = 2
CNTL_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.
endif.
call method html_control->show_url
exporting
url = assigned_url
FRAME =
IN_PLACE = ' X'
EXCEPTIONS
CNTL_ERROR = 1
CNHT_ERROR_NOT_ALLOWED = 2
CNHT_ERROR_PARAMETER = 3
DP_ERROR_GENERAL = 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.
endmodule. " STATUS_0100 OUTPUT
*& Module exit INPUT
module exit input.
leave program.
endmodule. " exit INPUT
*& Module user_command_0100 INPUT
text
module user_command_0100 input.
case ok_code.
when 'EXIT' or 'BACK'.
leave program.
when others.
call method cl_gui_cfw=>dispatch.
endcase.
endmodule. " user_command_0100 INPUT
*& Form convert_itab_html
form convert_itab_html.
data: lv_tabix like sy-tabix.
*-- table header
call function 'WWW_ITAB_TO_HTML_HEADERS'
exporting
field_nr = 1
text = 'Type'
fgcolor = 'navy'
bgcolor = 'red'
font = 'Arial'
tables
header = my_row_header.
call function 'WWW_ITAB_TO_HTML_HEADERS'
exporting
field_nr = 2
text = 'Message'
fgcolor = 'navy'
bgcolor = 'red'
font = 'Arial'
tables
header = my_row_header.
*-- table rows
clear lv_tabix.
loop at gt_msg into gs_msg.
lv_tabix = sy-tabix.
call function 'WWW_ITAB_TO_HTML_LAYOUT'
exporting
field_nr = 1
line_nr = lv_tabix
icon = gc_marked
tables
fields = my_fields.
call function 'WWW_ITAB_TO_HTML_LAYOUT'
exporting
field_nr = 2
line_nr = lv_tabix
fgcolor = 'red'
bgcolor = 'black'
font = 'Arial'
size = '2'
tables
fields = my_fields.
endloop.
*-- header
move 'Messages during program run' to my_header-text.
move 'Arial' to my_header-font.
move '2' to my_header-size.
move 'Centered' to my_header-just.
move 'red' to my_header-bg_color.
move 'blue' to my_header-fg_color.
refresh my_html.
call function 'WWW_ITAB_TO_HTML'
exporting
table_header = my_header
all_fields = ' '
tables
html = my_html
fields = my_fields
row_header = my_row_header
itable = gt_msg.
endform. "convert_itab_html
regards,
srinivas
<b>*reward for useful answers*</b> -
hi
i want to download data from database tables to the html format what is function module for that.
regards
srinivas.HI USE fm
LIST_DOWNLOAD_HTML
OR CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
RQIDENT = SPOOL_NUMBER
IMPORTING
REAL_TYPE = G_DOC_TYPE
TABLES
BUFFER = COMPRESSED_LIST
CALL FUNCTION 'TABLE_DECOMPRESS'
TABLES
IN = COMPRESSED_LIST
OUT = LISTOBJECT
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
TABLES
HTML = IT_HTML
LISTOBJECT = LISTOBJECT
then you get a HTML include the content of your report in IT_HTML.
You can use the function LIST_DOWNLOAD_HTML to download a list in HTML format
Demonstrate various things that can be done with lists
The first example shows how to have a list go to memory instead of the
screen or a spool, and how to write out that list.
The second set of examples shows how to save the screen list in
various formats
REPORT ZKBTST31.
DATA: MTAB_REPORT_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA: MTAB_REPORT_HTML LIKE W3HTML OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF MTAB_REPORT_ASCII OCCURS 0,
LINE(255) TYPE C,
END OF MTAB_REPORT_ASCII.
START-OF-SELECTION.
*-- Submit a report. This one is the chart of accounts
SUBMIT RFSKPL00
EXPORTING LIST TO MEMORY " Save list in memory
AND RETURN. " Return control to this program
END-OF-SELECTION.
*-- Get the list from memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = MTAB_REPORT_LIST
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
*-- Write the list out
*-- This is a trivial example. A better use would be when the
*-- requirement is to have one report print out several different
*-- reports on the same list level.
CALL FUNCTION 'WRITE_LIST'
TABLES
LISTOBJECT = MTAB_REPORT_LIST
EXCEPTIONS
EMPTY_LIST = 1
OTHERS = 2.
The examples below this line do not require that the report be *
submitted to memory when run. All that they require is that the *
report has been written to the screen. *
*-- Take the current list that has been written to screen, and format
*-- as an HTML file.
CALL FUNCTION 'WWW_LIST_TO_HTML'
TABLES
HTML = MTAB_REPORT_HTML
EXCEPTIONS
OTHERS = 1.
*-- Save the list. Same as using System->List->Save->Local File or
*-- entering %pc in the OKCODE box. This function does not need the
*-- include <%_LIST> in a program.
*-- Method can be:
*-- NOCO - No conversion
*-- RTF - Rich Text Format
*-- DAT - Tab delimited Format
*-- When no method is given, a selection screen is presented for the
*-- user to choose the method.
CALL FUNCTION 'LIST_DOWNLOAD'
EXPORTING
METHOD = 'NOCO'
EXCEPTIONS
OTHERS = 1.
rEWADS IF HELPFUL -
How to convert CLOB data (now it is in html format) to Normal text format
Hi,
Can anybody let me know the solution for how to convert CLOB data into normal Text.In my case the table column having CLOB datatype and the data is in html format.when i run the report the column is displaying html tags .Now i need to convert that html tags into normal text.
Pl. let me know if any one know the solution.
Regards,
Thulasi.KLONG has been depricated since 8i so I don't believe there is a general solution to go backwards short of reloading the data.
Justin -
Hi all,
I am using the Business Data List Web Part to show and search data from external database as following link
http://msdn.microsoft.com/en-us/library/office/ms493107(v=office.12).aspx
But the Business Data List Web Part doesn't allow me to choose one or multiple items as other SP lists. I mean it doesn't have the CheckBox column. How could I have it?
ThanksHi,
According to your description, Business Data List Web Part which data from external database doesn't have the check box column.
I have done a test in my SharePoint 2013, and I met the same issue with you. Although I defined the edit action for the external content types, I still couldn’t edit a record from business data list web part.
I would suggest you to use External List. In this case you will be able to Add/Edit/View item if your External Content Type has all operations.
Here is a blog about how to Create an External List, you can use as a reference:
http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2013/01/07/how-to-create-external-list-including-database-from-sharepoint-designer-2013.aspx
beside, here is a similar post, you can use as a reference:
https://social.technet.microsoft.com/forums/sharepoint/en-US/1a958e61-2c73-472c-83c7-443466aefcf8/edit-item-in-business-datra-list-webpart
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
Dear all,
I am using Labview 8.5.
I am trying to get system date.
I use Format Date/Time String tool in a "%Y%m%d" format.
The PROBLEM is the Format Date/Time String return 'YYYYMMDD' only.
Please see my attachment to see.
Please help me with this, every time I encounter this problem it force for to re-install the labview program.
Best Thanks!
Solved!
Go to Solution.
Attachments:
DateTime Error.JPG 7 KBtyk007 - It is sucessfully working with other computers but there are some computer having this problem.
altenbach - Please see attached file for actual VI. I assume that it will work on your pc.
After leaving Format unwired, the output is YYYY-MM-DD 00:00:00 PM.
How Labview connects with the local machine system date?
Attachments:
Format DateTime String.vi 6 KB -
Java message bundle format date - Help
Hi, I use that MessageSource.java:
String description = getMessageSource().getMessage(msgCode, msgParams, ApplicationLocales.DEFAULT_LOCALE);
where msgParams is Object[]{myDate}
and msgCode is what I have in my .properties file...
for example:
customer.create.message=New customer has been created, date: {0}
myDate can have different formats (with date and without it): like 2005-10-10 14:00
If it doesn't have hours, the {0} should manage it and the description shouldn't have the nonsense 0:00 time (it happens, if date is without hours)
I know that i should write something to {0} but thats the question. Maybe someone has better knowlegdne of this technique?I've gathered info from about 5 different links. Do u
know some good tutorial covering formatting data in
details?Formatting dates is quite well-documented in the API docs (links from reply 1)
You can check DecimalFormat for numeric data, or ChoiceFormat for formatting a range of numbers.
There is also a tutorial from Sun about formatting.
Hope it helps. -
Need to send my spool in HTML format as Email attachment
Hi All,
Can anyone let me know how to send a HTML attachment in a mail.
I have a ALV Report, when i execute, my report should pick the ALV Report output from spool, and should send a mail with spool output as HTML attachment.
Please explain me how i need to do the above.
Regards
NandaHi Nanda,
You can use 2 reports for this.
In one report just display the ALV..
and in the second report submit this first report to memory and get it html format and then send it as an email.
Just check this code (instead of alv...this is a normal report that is sent as HTML attachment)
*--Tables
TABLES: VBRK.
TYPES DECLARATION *
TYPES: BEGIN OF TY_VBRK,
KUNAG TYPE KUNAG," Payer Id
END OF TY_VBRK,
*-- customer details
BEGIN OF TY_KNA1,
KUNNR TYPE KUNNR," Customer Id
NAME1 TYPE NAME1," Customer Name
ADRNR TYPE ADRNR," Address No
END OF TY_KNA1,
*-- Mailing details
BEGIN OF TY_ADDR,
ADDRNUMBER TYPE AD_ADDRNUM, " Address No
MAIL_ID TYPE AD_SMTPADR, " Email Address
END OF TY_ADDR,
*-- Log details
BEGIN OF TY_MSG,
STR1 TYPE AD_SMTPADR, " Email Address
STR2 TYPE KUNNR, " Payer Id
STR3 TYPE NAME1, " Payer Name
STR4 TYPE D, " Date
STR5 TYPE T, " Time
END OF TY_MSG.
I N T E R N A L T A B L E S *
DATA: RECEPIENTS TYPE TABLE OF AD_SMTPADR, "table for email id's
LISTOBJECT TYPE TABLE OF ABAPLIST, "table with displayed list
HTML TYPE TABLE OF W3HTML, "html container
RETURN TYPE TABLE_OF_STRINGS, "message table
IT_VBRK TYPE TABLE OF TY_VBRK, "Billing Details
IT_KNA1 TYPE TABLE OF TY_KNA1, "Customer Details
IT_ADDR TYPE TABLE OF TY_ADDR, "Mail id
IT_MSG TYPE TABLE OF TY_MSG. "Log Details
*-- Structure Declarations
DATA: WA_REC TYPE AD_SMTPADR,
WA_KNA1 TYPE TY_KNA1,
WA_ADDR TYPE TY_ADDR,
WA_MSG TYPE TY_MSG.
Declarations for Sending mail *
*-- To Create link and add recepients address
DATA: SEND_REQUEST TYPE REF TO CL_BCS.
*-- To Create HTML document
DATA: DOCUMENT TYPE REF TO CL_DOCUMENT_BCS.
*-- To Create Sender Id
DATA: SENDER_ID TYPE REF TO IF_SENDER_BCS.
*-- To Create recepient address
DATA: RECIPIENT TYPE REF TO IF_RECIPIENT_BCS.
*-- To Handle Exceptions
DATA: BCS_EXCEPTION TYPE REF TO CX_BCS.
*-- To check if the mail is sent to all recepients
DATA: SENT_TO_ALL TYPE OS_BOOLEAN.
DATA: CONLENGTHS TYPE SO_OBJ_LEN . "To calculate length of the HTML file
V A R I A B L E S *
DATA: REPORT TYPE PROGRAMM, "Report name
SENDER TYPE AD_SMTPADR, "Sender Address
SUBJECT TYPE SO_OBJ_DES. "Subject
DATA: BCS_MESSAGE TYPE STRING ."String to store exceptions
DATA: V_KUNAG TYPE KUNAG. "Payer Id
DATA: V_MAIL TYPE AD_SMTPADR, "Mail Address
V_DATE TYPE ZZBCDATE. "To Validate Entered Date
S E L C T I O N - S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_ZZBCDA FOR VBRK-ZZBCDAT. "Billing Complete Date
PARAMETERS: P_MAILFT TYPE AD_SMTPADR, "Mail id
P_MAILSC TYPE AD_SMTPADR. "Mail id
SELECTION-SCREEN END OF BLOCK B1.
At Selection Screen *
AT SELECTION-SCREEN.
*-- Validate the dates entered
SELECT ZZBCDAT UP TO 1 ROWS
FROM VBRK
INTO V_DATE
WHERE ZZBCDAT IN S_ZZBCDA.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E002 WITH 'Dates Not Found In The Given Range'(002).
ENDIF.
S T A R T - O F - S E L E C T I O N *
CONCATENATE SY-UNAME '@YAHOO.COM'(003) INTO SENDER.
*-- Populating the Subject Line
MOVE 'Invoice Due Date Details'(004) TO SUBJECT.
*-- Selecting the Payer Details Based on Input Dates
SELECT KUNAG
FROM VBRK
INTO TABLE IT_VBRK
WHERE ZZBCDAT IN S_ZZBCDA.
*-- Selecting the Address Number from Customer Master
SELECT KUNNR
NAME1
ADRNR
FROM KNA1
INTO TABLE IT_KNA1
FOR ALL ENTRIES IN IT_VBRK
WHERE KUNNR = IT_VBRK-KUNAG.
*-- Selecting the Mail Id's
SELECT ADDRNUMBER
SMTP_ADDR
FROM ADR6
INTO TABLE IT_ADDR
FOR ALL ENTRIES IN IT_KNA1
WHERE ADDRNUMBER = IT_KNA1-ADRNR.
*-- Getting all the selected mail Id's
RECEPIENTS = IT_ADDR[].
MOVE (your first report name) TO REPORT.
IF NOT RECEPIENTS[] IS INITIAL .
LOOP AT IT_KNA1 INTO WA_KNA1.
AT NEW KUNNR.
READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNA1-KUNNR
BINARY SEARCH.
REFRESH RECEPIENTS.
*-- Populating the Recepients Mail Id's for the Particular Kunnr
LOOP AT IT_ADDR INTO WA_ADDR WHERE ADDRNUMBER = WA_KNA1-ADRNR.
IF NOT WA_ADDR IS INITIAL.
TRANSLATE WA_ADDR-MAIL_ID TO UPPER CASE.
APPEND WA_ADDR-MAIL_ID TO RECEPIENTS.
ENDIF.
ENDLOOP.
*-- Appending the mail id's from the input fields when not initial
IF NOT P_MAILFT IS INITIAL.
TRANSLATE P_MAILFT TO UPPER CASE.
APPEND P_MAILFT TO RECEPIENTS.
ENDIF.
IF NOT P_MAILSC IS INITIAL.
TRANSLATE P_MAILSC TO UPPER CASE.
APPEND P_MAILSC TO RECEPIENTS.
ENDIF.
*-- Sending the Kunnr while Submitting the Report
V_KUNAG = WA_KNA1-KUNNR.
TRANSLATE REPORT TO UPPER CASE .
*--Submitting the Report Exporting the List to Memory
SUBMIT (REPORT) WITH S_ZZBCDA IN S_ZZBCDA
WITH P_KUNAG = V_KUNAG
EXPORTING LIST TO MEMORY AND RETURN.
CLEAR: LISTOBJECT , HTML .
REFRESH : LISTOBJECT, HTML .
*-- Calling the Fn Module to get the list from the Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LISTOBJECT.
*-- Calling Fn Module to get the List in HTML Format
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME = REPORT
TABLES
HTML = HTML
LISTOBJECT = LISTOBJECT.
*-- Getting the Size of the Html Document
DATA: V_LINES TYPE I.
DESCRIBE TABLE HTML LINES V_LINES.
CLEAR CONLENGTHS .
CONLENGTHS = V_LINES * 255.
TRY.
CLEAR SEND_REQUEST .
SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
CLEAR DOCUMENT .
*-- Creating the Document
DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
I_TYPE = 'HTM'
I_TEXT = HTML
I_LENGTH = CONLENGTHS
I_SUBJECT = SUBJECT ).
*-- add document to send request
CALL METHOD SEND_REQUEST->SET_DOCUMENT( DOCUMENT ).
CLEAR SENDER_ID .
*-- Creating the internet address for the sender id.
SENDER_ID = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( SENDER ).
CALL METHOD SEND_REQUEST->SET_SENDER
EXPORTING
I_SENDER = SENDER_ID.
CLEAR WA_REC .
*-- Creating the Recepients address
LOOP AT RECEPIENTS INTO WA_REC .
CLEAR RECIPIENT .
RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
WA_REC ).
add recipient with its respective attributes to send request
CALL METHOD SEND_REQUEST->ADD_RECIPIENT
EXPORTING
I_RECIPIENT = RECIPIENT
I_EXPRESS = 'X'.
ENDLOOP .
CALL METHOD SEND_REQUEST->SET_STATUS_ATTRIBUTES
EXPORTING
I_REQUESTED_STATUS = 'E'
I_STATUS_MAIL = 'E'.
CALL METHOD SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
*-- Sending the Document
CALL METHOD SEND_REQUEST->SEND(
EXPORTING
I_WITH_ERROR_SCREEN = 'X'
RECEIVING
RESULT = SENT_TO_ALL ).
IF SENT_TO_ALL = 'X'.
*-- Getting the details to display the Job Log
LOOP AT RECEPIENTS INTO V_MAIL.
WA_MSG-STR1 = V_MAIL.
WA_MSG-STR2 = WA_KNA1-KUNNR.
WA_MSG-STR3 = WA_KNA1-NAME1.
WA_MSG-STR4 = SY-DATUM.
WA_MSG-STR5 = SY-UZEIT.
APPEND WA_MSG TO IT_MSG.
ENDLOOP.
ELSE.
APPEND 'Mail not sent'(005) TO RETURN.
ENDIF.
COMMIT WORK.
CATCH CX_BCS INTO BCS_EXCEPTION.
BCS_MESSAGE = BCS_EXCEPTION->GET_TEXT( ).
APPEND BCS_MESSAGE TO RETURN .
EXIT.
ENDTRY.
ENDAT.
ENDLOOP.
ELSE .
APPEND 'Specify email address for sending'(006) TO RETURN .
ENDIF .
E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
*-- Displaying the Job Log
FORMAT COLOR 1 INTENSIFIED ON.
WRITE:/ SY-ULINE(121),
(40) 'Mail Sent to'(007),
SY-VLINE,
(12) 'Payer Id'(008),
SY-VLINE,
(35) 'Payer Name'(009),
SY-VLINE,
(10) 'Sent Date'(010),
SY-VLINE,
(10) 'Sent Time'(011),
SY-VLINE,
SY-ULINE(121).
LOOP AT IT_MSG INTO WA_MSG.
FORMAT COLOR 2 INTENSIFIED ON.
WRITE:/ SY-ULINE(121),
(40) WA_MSG-STR1,
SY-VLINE,
(12) WA_MSG-STR2,
SY-VLINE,
(35) WA_MSG-STR3,
SY-VLINE,
(10) WA_MSG-STR4 DD/MM/YYYY,
SY-VLINE,
(10) WA_MSG-STR5 USING EDIT MASK '__:__:__',
SY-VLINE,
SY-ULINE(121).
ENDLOOP. -
How to Send an Email in HTML Format
I'm trying to send an email to Outlook in HTML format but it's not working. As I have limited knowledge of HTML, can anyone please show me how to do this?
Your help is highly appreciated.Hello,
You can use function WWW_LIST_TO_HTML to convert list into HTML format. Then use function SO_NEW_DOCUMENT_ATT_SEND_API1 to send it as attachment.
Thanks,
Venu -
Business Data List View ONLY Displays records - Cannot Edit them
Using SharePoint 2010, I created an External Content Type. Data is coming from SQL Server. I created a new Read operation on my External Content type. I added a few filters in this Read View.
I have created a web part page in which I placed a Business Data List Web Part. In Web Part properties I chose the VIEW in question. I can now filter my External List data and the Business Data List Web Part displays them. But I cannot edit these
records!!!
From the web Part properties window, I can ONLY choose Views that are created from READ operations. How do I allow users to edit data and save data in the original source (SQL Server).
MayankBelow are the reference links on how to CRUD operations on external data using BCS
CRUD operations using BCS using SharePoint designer
http://zimmergren.net/technical/sp-2010-getting-started-with-business-connectivity-services-bcs-in-sharepoint-2010
CRUD operations using BCS using Visual studio
http://www.c-sharpcorner.com/uploadfile/anavijai/creating-external-content-type-with-crud-operations-using-business-data-connectivity-model-in-sharep/
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
Maybe you are looking for
-
Data Federator and Information Design tool
Hi, First, Can Data Federator be a single data source for Information Design Tool? Second, from performance point of view, using Information Design tool to build multi-sources Universe or building Universe on Data Federator, which way is better? Than
-
Hundreds of unwanted BBM Add Requests per day!
I started getting BBM requests from people I don't know in July, and at one point it was up to 500 a day. I deleted BBM from my phone but I still get the requests, they just go into my Messages folder now. They come up in red, and some of them say <
-
Hi all, I am facing problems in GR reversal, I tried with two posting dates, for one its giving i) Account determination for an entry ...... not possible. ii) Account 500700 requires an assignment to a CO object. What could be the probable solution.
-
PDFs in iCloud wont open on the iPAD
I have moved PDFs from my iMac into iCloud so I could read them on my iPad. I've been told I should put them into iBooks, but I don't know how. Can anyone help?
-
Getting Error "java.lang.StackOverflowError" while adding Strage library
Hi I am getting following Error when trying to Add Static Storage Library java.lang.StackOverflowError Any Help please ... I am running Ops Center Verion 12c update 4 on Solaris 11 Regards, Shahid