Link to SAP Report Output from SAP Mail Inbox
Hi Experts,
I wants to send a link of SAP ALV Report output screen to SAP mail inbox and if a user clicks that link ,the report output
screen should open and user has to see & interact the ouput of that ALV Report.how can i achieve this without webdynpro
and workflow.
Regards,
Veera.
Hi Asif
When I said 'pdf/rtf/html/htmlcss', I meant any one of the above.
You need to run the report as:
rwrun60 <report_name> <connection_string> desformat=pdf destype=mail desname=<email_id> batch=yes
In case you want to mail as HTMLCSS, replace PDF in DESFORMAT option in the above command to:
DESFORMAT=HTMLCSS.
Regards
Sripathy
Similar Messages
-
Is it possible to can a program (report output) from SAP Script?
Hi,
From SAP Script I would like to call a report output (without displaying the selection screen).
Is this possible. If so, how can I do this?
Thanks.H i kumar g,
why not?
In script you can call external subroutine. You must define the subroutine in a program, there you can do a SUBMIT or whatever you want.
See online docu for further explanation.
Regards,
Clemens -
Down load report output from SAP to Excel sheet
Hi,
Actually i am downloading report out into Excel sheet using FM GUI_LOAD. But in this case in Excel sheet we are getting the date format as *3/21/2008. But the requerment is the date format in Excel sheet should be display like 3/21/2008.So please advice me.
Code:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = w-filename
filetype = 'DBF'
col_select = 'X'
col_select_mask = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
wk1_n_format = 'X'
wk1_t_format = 'X'
DAT_MODE = 'X'
TABLES
data_tab = dtab_dat
fieldnames = htab.
Thanks in advance.
Regards,
Satya.Hi,
Please let me know the type of dtab_dat.
Regards
jana -
Send a File(Report Output) From Sap as an Email
Hi,
Appreciate if someone can point me to a direction of finding a Function, which can email the File residing on the Application Server or Presentation Server.
Exact Requirement:
We have some (.dat) files on the Unix Application Server Folder and we want the ability to email these files in excel format.
Thanks,
VasuHi Sastry,
I have explored this option of reading the data into Internal Table and handle the Descriptions field and then send via SO_NEW_DOCUMENT_ATT_SEND_API1.
I am looking for a better and if any easy option available where i dont have to handle any string operations. -
Problem to run the Crystal report inside from SAP B1 based on SQL views.
Hello,
I have a problem to run my Crystal report inside from SAP B1 which is based on SQL views.And the SQL views are stored in a separate database in SQL server.The error which i am getting is saying the the tablename does not exist.What i need to do in order to sort this problem.
Great if somebody can help me to sort out this so that i can run my report based on SQL views stored on separate database other than SAP databases inside from SAP B1.
Edited by: rozenagrawal on Apr 19, 2011 11:51 AMTry using a SQL synonym in your company database for the views outside the company database. I don't know if SBO will let you get away with it, but its worth a shot.
If your company database is MyCompany and you have a view called MyView in Views database, assuming the view belongs to schema dbo, and you want the synonym to belong to dbo schema in your company database, run this:
Use MyCompany
go
create synonym dbo.OutsiderView for
Views.dbo.MyView
go
select * from OutsiderView
The select statement should return the contents of MyView in the Views database while you are connected to your MyCompany database.
For more info, see the Books Online for MSSQL on topic synonym.
You will need to change your CR options to include displaying synonyms along with tables, views, etc. You may also need to grant select to B1 users.
Edited by: Cindy Lange on Apr 21, 2011 4:00 PM -
Sending report output via E-mail (excel pivoted format)
Hi all,
i have a written a report where i need to send the report output to somebody via
E-mail.i am sending this report output via E-mail successfully.The receiver receives, my output in excel format.but this excel is not <b>pivoted</b>.
i want , the receiver should get my output in pivoted excel format.i.e my output data should be exactly fit in the excel sheet.
now the columns in excel sheet are overlapping.once i double clicked, the columns are getting separated.i do not want to double click.i want all the columns should come properly i.e excel field length should be adjusted as per the output field length.
i am giving my coding below.plz suggest how i can do the above thing .it's urgent.
any idea will be highly appreaciated.
Regards
if not p_email1 is initial.
perform fill_report_csv.
perform f_send_internet_mail.
endif.
FORM fill_report_csv.
data : l_text(232) type c,
v_matnr1(21) type c,
v_matnr(21) type c,
v_matkl(14) type c,
v_maktx(45) type c,
v_ttlstk(14) type c,
v_verpr(14) type c,
v_werks(14) type c,
v_lgort(14) type c,
v_char(10) type c,
v_stks type p ,
v_po(40) type c,
v_qty(13) type c,
v_qty1 type sy-datum,
v_date(15) type c,
v_date1(15) TYPE C,
v_name(35) type c,
v_eknam(18) type c,
v_lifnr(15) type c,
l_po(40) type c,
v_matnr(20) type c,
l_rate(11) type p decimals 5,
l_flag type c.
concatenate c_equal c_colon 'PO no.' c_colon
into v_po.
concatenate c_equal c_colon 'Material no.' c_colon
into v_matnr.
concatenate c_equal c_colon 'Description.' c_colon
into v_maktx.
concatenate c_equal c_colon 'Due Qty.' c_colon
into v_qty.
concatenate c_equal c_colon 'Del Date.' c_colon
into v_date.
concatenate c_equal c_colon 'Vendor.' c_colon
into v_name.
concatenate c_equal c_colon 'Buyer.' c_colon
into v_eknam.
concatenate c_equal c_colon 'Vendor Code.' c_colon
into v_lifnr.
concatenate
v_po v_matnr v_maktx v_qty
v_date v_name v_eknam v_lifnr
into i_download
SEPARATED BY con_tab.
append i_download .
clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
clear wa_output.
loop at i_output into wa_output.
on change of wa_output-ebeln.
clear v_lines.
loop at i_eket into wa_eket
where ebeln = wa_output-ebeln.
v_lines = v_lines + 1.
clear wa_eket.
endloop.
**-- Checking of page break
v_lines = sy-linno + v_lines .
if 55 < v_lines .
write:/0(161) sy-uline.
new-page.
endif.
clear v_lines.
loop at i_eket into wa_eket
where ebeln = wa_output-ebeln.
v_lines = v_lines + 1.
clear wa_eket.
endloop.
*-- Calculating the due qty.
wa_output-dumng = wa_output-menge - wa_output-wemng.
*-- Writing the Line items of the PO.
read table i_ekpo into wa_ekpo
with key ebeln = wa_output-ebeln
ebelp = wa_output-ebelp.
l_rate = wa_ekpo-netpr / wa_ekpo-peinh.
*-- Writing of PO detail
if wa_output-dumng gt 0 .
v_qty = wa_output-dumng.
v_date1 = wa_output-eindt.
v_maktx = wa_output-maktx.
if wa_output-maktx+0(1) = '"' .
concatenate c_equal wa_output-maktx
into v_maktx .
else .
concatenate c_equal c_colon wa_output-maktx c_colon
into v_maktx .
endif .
if wa_output-name1+0(1) = '"' .
concatenate c_equal wa_output-name1
into v_name .
else .
concatenate c_equal c_colon wa_output-name1 c_colon
into v_name .
endif .
v_name = wa_output-name1.
v_lifnr = wa_output-lifnr.
write wa_output-eindt to v_date1 DD/MM/YYYY.
concatenate '="' wa_output-ebeln '/'
wa_output-ebelp '"' into v_po .
concatenate '="' wa_output-matnr '"' into v_matnr .
concatenate c_equal c_colon wa_output-maktx c_colon
into v_maktx .
concatenate c_equal c_colon wa_output-dumng c_colon
into v_qty1 .
concatenate c_equal c_colon wa_output-eindt c_colon
into v_date1 .
concatenate c_equal c_colon wa_output-name1 c_colon
into v_name .
concatenate c_equal c_colon wa_output-eknam c_colon
into v_eknam .
concatenate c_equal c_colon wa_output-lifnr c_colon
into v_lifnr .
concatenate c_equal c_colon wa_mard-werks '/'
wa_mard-lgort c_colon
into v_lgort .
concatenate '="' wa_output-lifnr '"' into v_lifnr .
condense:v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
concatenate
v_po v_matnr v_maktx v_qty
v_date1 v_name v_eknam v_lifnr
into i_download
SEPARATED BY con_tab.
concatenate con_cret i_download INTO i_download .
append i_download .
endif.
clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
endloop.
ENDFORM. " fill_report_csv
*& Form f_send_internet_mail
text
--> p1 text
<-- p2 text
FORM f_send_internet_mail.
Variables
data: it_packing_list like sopcklsti1 occurs 0 with header line,
it_contents like solisti1 occurs 0 with header line,
it_receivers like somlreci1 occurs 0 with header line,
it_attachment like solisti1 occurs 0 with header line,
gd_cnt type i,
gd_sent_all(1) type c,
gd_doc_data like sodocchgi1,
gd_error type sy-subrc.
data: it_message type standard table of SOLISTI1 initial size 0
with header line.
data : found_receiver type c,
v_title(80) type c,
l_text(180) type c.
Fill the document data.
gd_doc_data-doc_size = 1.
Adds text to email text table
append 'Pls see attached open purchase order report.' to it_message.
append '' to it_message.
concatenate 'Note: This is system generated report'
', figures may subject to actual physical count.'
into l_text separated by space.
append l_text to it_message.
Populate the subject/generic message attributes
CLEAR gd_doc_data.
READ TABLE i_download INDEX w_cnt.
gd_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( i_download ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
if p_asdate is initial .
concatenate p_title ' '
sy-datum sy-uzeit into v_title separated by space.
else .
concatenate p_title ' '
p_bldat p_cputm into v_title separated by space.
endif .
gd_doc_data-obj_descr = v_title .
gd_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = i_download[].
Describe the body of the message
clear it_packing_list.
refresh it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
describe table it_message lines it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
append it_packing_list.
Create attachment notification
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES it_packing_list-body_num.
it_packing_list-doc_type = 'XLS'.
it_packing_list-obj_descr = 'OPEN PURCHASE ORDER' .
it_packing_list-obj_name = 'PO.XLS' .
it_packing_list-doc_size = it_packing_list-body_num * 255.
APPEND it_packing_list.
assign SAP user smtp address from successful retrieval.
loop at p_email.
Add the recipients email address
found_receiver = 'X' .
it_receivers-receiver = p_email-low.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = ''.
it_receivers-notif_ndel = 'X'.
append it_receivers .
endloop .
Add default recipient email when unable to locate purc group email
if found_receiver is initial .
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = ''.
it_receivers-notif_ndel = 'X'.
append it_receivers.
endif .
Call the FM to post the message to SAPMAIL
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = it_receivers
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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.
Instructs mail send program for SAPCONNECT to send email.
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = ' '
and return.
endif.
ENDFORM. " f_send_internet_mailHi,
go through this link,
http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm
you have some sample programs.
Regards,
Raghavendra -
Hi all,
i have a written a report where i need to send the report output to somebody via
E-mail.i am sending this report output via E-mail successfully.The receiver receives, my output in excel format.but this excel is not <b>pivoted</b>.
i want , the receiver should get my output in pivoted excel format.i.e my output data should be exactly fit in the excel sheet.
now the columns in excel sheet are overlapping.once i double clicked, the columns are getting separated.i do not want to double click.i want all the columns should come properly i.e excel field length should be adjusted as per the output field length.
i am giving my coding below.plz suggest how i can do the above thing .it's urgent.
any idea will be highly appreaciated.
Regards
if not p_email1 is initial.
perform fill_report_csv.
perform f_send_internet_mail.
endif.
FORM fill_report_csv.
data : l_text(232) type c,
v_matnr1(21) type c,
v_matnr(21) type c,
v_matkl(14) type c,
v_maktx(45) type c,
v_ttlstk(14) type c,
v_verpr(14) type c,
v_werks(14) type c,
v_lgort(14) type c,
v_char(10) type c,
v_stks type p ,
v_po(40) type c,
v_qty(13) type c,
v_qty1 type sy-datum,
v_date(15) type c,
v_date1(15) TYPE C,
v_name(35) type c,
v_eknam(18) type c,
v_lifnr(15) type c,
l_po(40) type c,
v_matnr(20) type c,
l_rate(11) type p decimals 5,
l_flag type c.
concatenate c_equal c_colon 'PO no.' c_colon
into v_po.
concatenate c_equal c_colon 'Material no.' c_colon
into v_matnr.
concatenate c_equal c_colon 'Description.' c_colon
into v_maktx.
concatenate c_equal c_colon 'Due Qty.' c_colon
into v_qty.
concatenate c_equal c_colon 'Del Date.' c_colon
into v_date.
concatenate c_equal c_colon 'Vendor.' c_colon
into v_name.
concatenate c_equal c_colon 'Buyer.' c_colon
into v_eknam.
concatenate c_equal c_colon 'Vendor Code.' c_colon
into v_lifnr.
concatenate
v_po v_matnr v_maktx v_qty
v_date v_name v_eknam v_lifnr
into i_download
SEPARATED BY con_tab.
append i_download .
clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
clear wa_output.
loop at i_output into wa_output.
on change of wa_output-ebeln.
clear v_lines.
loop at i_eket into wa_eket
where ebeln = wa_output-ebeln.
v_lines = v_lines + 1.
clear wa_eket.
endloop.
**-- Checking of page break
v_lines = sy-linno + v_lines .
if 55 < v_lines .
write:/0(161) sy-uline.
new-page.
endif.
clear v_lines.
loop at i_eket into wa_eket
where ebeln = wa_output-ebeln.
v_lines = v_lines + 1.
clear wa_eket.
endloop.
*-- Calculating the due qty.
wa_output-dumng = wa_output-menge - wa_output-wemng.
*-- Writing the Line items of the PO.
read table i_ekpo into wa_ekpo
with key ebeln = wa_output-ebeln
ebelp = wa_output-ebelp.
l_rate = wa_ekpo-netpr / wa_ekpo-peinh.
*-- Writing of PO detail
if wa_output-dumng gt 0 .
v_qty = wa_output-dumng.
v_date1 = wa_output-eindt.
v_maktx = wa_output-maktx.
if wa_output-maktx+0(1) = '"' .
concatenate c_equal wa_output-maktx
into v_maktx .
else .
concatenate c_equal c_colon wa_output-maktx c_colon
into v_maktx .
endif .
if wa_output-name1+0(1) = '"' .
concatenate c_equal wa_output-name1
into v_name .
else .
concatenate c_equal c_colon wa_output-name1 c_colon
into v_name .
endif .
v_name = wa_output-name1.
v_lifnr = wa_output-lifnr.
write wa_output-eindt to v_date1 DD/MM/YYYY.
concatenate '="' wa_output-ebeln '/'
wa_output-ebelp '"' into v_po .
concatenate '="' wa_output-matnr '"' into v_matnr .
concatenate c_equal c_colon wa_output-maktx c_colon
into v_maktx .
concatenate c_equal c_colon wa_output-dumng c_colon
into v_qty1 .
concatenate c_equal c_colon wa_output-eindt c_colon
into v_date1 .
concatenate c_equal c_colon wa_output-name1 c_colon
into v_name .
concatenate c_equal c_colon wa_output-eknam c_colon
into v_eknam .
concatenate c_equal c_colon wa_output-lifnr c_colon
into v_lifnr .
concatenate c_equal c_colon wa_mard-werks '/'
wa_mard-lgort c_colon
into v_lgort .
concatenate '="' wa_output-lifnr '"' into v_lifnr .
condense:v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
concatenate
v_po v_matnr v_maktx v_qty
v_date1 v_name v_eknam v_lifnr
into i_download
SEPARATED BY con_tab.
concatenate con_cret i_download INTO i_download .
append i_download .
endif.
clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
endloop.
ENDFORM. " fill_report_csv
*& Form f_send_internet_mail
text
--> p1 text
<-- p2 text
FORM f_send_internet_mail.
Variables
data: it_packing_list like sopcklsti1 occurs 0 with header line,
it_contents like solisti1 occurs 0 with header line,
it_receivers like somlreci1 occurs 0 with header line,
it_attachment like solisti1 occurs 0 with header line,
gd_cnt type i,
gd_sent_all(1) type c,
gd_doc_data like sodocchgi1,
gd_error type sy-subrc.
data: it_message type standard table of SOLISTI1 initial size 0
with header line.
data : found_receiver type c,
v_title(80) type c,
l_text(180) type c.
Fill the document data.
gd_doc_data-doc_size = 1.
Adds text to email text table
append 'Pls see attached open purchase order report.' to it_message.
append '' to it_message.
concatenate 'Note: This is system generated report'
', figures may subject to actual physical count.'
into l_text separated by space.
append l_text to it_message.
Populate the subject/generic message attributes
CLEAR gd_doc_data.
READ TABLE i_download INDEX w_cnt.
gd_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( i_download ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
if p_asdate is initial .
concatenate p_title ' '
sy-datum sy-uzeit into v_title separated by space.
else .
concatenate p_title ' '
p_bldat p_cputm into v_title separated by space.
endif .
gd_doc_data-obj_descr = v_title .
gd_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = i_download[].
Describe the body of the message
clear it_packing_list.
refresh it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
describe table it_message lines it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
append it_packing_list.
Create attachment notification
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES it_packing_list-body_num.
it_packing_list-doc_type = 'XLS'.
it_packing_list-obj_descr = 'OPEN PURCHASE ORDER' .
it_packing_list-obj_name = 'PO.XLS' .
it_packing_list-doc_size = it_packing_list-body_num * 255.
APPEND it_packing_list.
assign SAP user smtp address from successful retrieval.
loop at p_email.
Add the recipients email address
found_receiver = 'X' .
it_receivers-receiver = p_email-low.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = ''.
it_receivers-notif_ndel = 'X'.
append it_receivers .
endloop .
Add default recipient email when unable to locate purc group email
if found_receiver is initial .
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = ''.
it_receivers-notif_ndel = 'X'.
append it_receivers.
endif .
Call the FM to post the message to SAPMAIL
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = it_receivers
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.
Store function module return code
gd_error = sy-subrc.
Get it_receivers return code
loop at it_receivers.
endloop.
Instructs mail send program for SAPCONNECT to send email.
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = ' '
and return.
endif.
ENDFORM. " f_send_internet_mailans
-
Insert SAP ICONS into from SAP into Word document (OLE)
Hi ,
I want to Insert SAP ICONS into from SAP into Word document (OLE) .
Please let me know how can I do it? I would really appreciate it.
Regards,
SanjeevHello,
Try this out:
(1) Copy program DD_ADD_PICTURE into your own version called ZDD_ADD_PICTURE. Make sure
you select all the checkboxes (including GUI Status and screens).
(2) Paste the modified code at the end of this reply into your ZZ_ADD_PICTURE program.
(3) Run ZZ_ADD_PICTURE for a range of Icons (e.g. enter Icon name ICON_IN* on the selection screen)
(4) When you get the result list, type in ok-code EXPO directly in the ok-code
field (you could also add a button for this function in the GUI status).
(5) Download all the displayed icons as .gif files into a Windows folder
that you have created to hold the icon .gif files (e.g. C:SAPICONS)
(6) Now you can work with the icon files as you would any .gif file. (e.g. In a Word doc, use menu path
Insert -> Picture -> From file.)
Here is the code:
REPORT dd_add_picture.
TYPE-POOLS: sdydo.
DATA: do TYPE REF TO cl_dd_document.
DATA: is_displayed.
TABLES: icont.
DATA: BEGIN OF icontab OCCURS 0.
INCLUDE STRUCTURE icon.
DATA: END OF icontab.
select-options: s_icon for icontab-name obligatory.
SELECT * FROM icon INTO TABLE icontab WHERE locked NE 'X'
AND name in s_icon.
* Event Handler Definition, handling changes of GUI fonts, colors,...
CLASS cl_my_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
use_new_resources FOR EVENT resources_changed OF cl_gui_resources.
ENDCLASS.
DATA: my_handler TYPE REF TO cl_my_event_handler.
CREATE OBJECT my_handler.
* Call Screen
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
IF is_displayed IS INITIAL.
SET PF-STATUS 'BRP'.
SET HANDLER my_handler->use_new_resources.
* create document
CREATE OBJECT do.
* fill document
PERFORM dd_add_icon USING do.
* merge document
CALL METHOD do->merge_document.
* display document .
CALL METHOD do->display_document
EXPORTING container = 'HTML'
EXCEPTIONS html_display_error = 1.
" do some exception handling ...
is_displayed = 'X'.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'. "Beenden
LEAVE PROGRAM.
WHEN 'PRN'.
CALL METHOD do->print_document
EXPORTING reuse_control = 'X'.
WHEN 'PRN_NEW'.
DATA text TYPE sdydo_text_element.
CALL METHOD do->initialize_document.
text = 'Dies Dokument wurde speziell fürs Drucken erstellt!' &
' Druckdatum: '(500).
CALL METHOD do->add_text EXPORTING
text = text
sap_fontsize = cl_dd_area=>large.
WRITE sy-datum TO text DD/MM/YYYY.
CALL METHOD do->add_text EXPORTING text = text .
CALL METHOD do->new_line EXPORTING repeat = 2.
PERFORM dd_add_icon USING do.
CALL METHOD do->merge_document.
CALL METHOD do->print_document.
WHEN 'EXPO'.
CALL METHOD do->export_document EXPORTING to_filesystem = 'X'.
ENDCASE.
CLEAR sy-ucomm.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form DD_ADD_ICON
* text
FORM dd_add_icon USING p_do TYPE REF TO cl_dd_document.
DATA ta TYPE REF TO cl_dd_table_element.
DATA col1 TYPE REF TO cl_dd_area.
DATA col2 TYPE REF TO cl_dd_area.
DATA col3 TYPE REF TO cl_dd_area.
DATA text TYPE sdydo_text_element.
* set Heading
text = ' Bilder in Dynamischen Dokumenten'(001).
CALL METHOD p_do->add_text EXPORTING text = text
sap_style = 'heading'.
CALL METHOD p_do->new_line.
CALL METHOD p_do->new_line.
CALL METHOD p_do->add_table EXPORTING with_heading = 'X'
no_of_columns = 3
width = '100%'
IMPORTING table = ta.
* set columns
text = 'Ikone'(011).
CALL METHOD ta->add_column EXPORTING heading = text
IMPORTING column = col1.
* fill table
LOOP AT icontab.
SELECT SINGLE * FROM icont WHERE langu = sy-langu
AND id = icontab-id.
CALL METHOD col1->add_icon EXPORTING sap_icon = icontab-name
sap_color = 'LIST_GROUP'.
ENDLOOP.
ENDFORM. " DD_ADD_ICON
* CLASS cl_my_event_handler IMPLEMENTATION.
CLASS cl_my_event_handler IMPLEMENTATION.
METHOD use_new_resources.
IF is_displayed EQ 'X'.
* initialize document
CALL METHOD do->initialize_document.
* fill document
PERFORM dd_add_icon USING do.
* merge document
CALL METHOD do->merge_document.
* display document
CALL METHOD do->display_document
EXPORTING reuse_control = 'X'
reuse_registration = 'X'.
ENDIF.
ENDMETHOD.
ENDCLASS.
Regards,
Vasanth -
SAP DB Connection from SAP BI on HP UNIX to MS SQL External Database
Dear All,
Greetings!
I have a scenario to configure a SAP DB Connection from SAP BI System on HP UNIX 11i to the external legacy system MS SQL 2000 Enterprise for data upload. I am interested in connecting the SQL server as a Source System to the BI System.
I read through documents mentioning about installation of a Client driver in the SAP BI System, I also downloaded the JDBC client software and tried installing the same, but the steps as mentioned Setting the CLASSPATH or connecting to the server did not work.
Please help me in connecting the SQL Server as Source System, I would like to know in detail about the same - so kindly help me with the links to documents and guides about the same.
Thank you
Regards,
Vineeth DamodarShort answer: this does not work.
Long answer: To connect directly to the database you need
- a database client for the source system
- a database interface library for the source system
Both of them are not available for HP-UX if the target database is SQL server --> doesn't work.
What you can do is: add a Windows application server to your BI system (heterogeneous installations work and are supported) and add there the database client and the database interface library.
Markus -
Report output send through mail
Dear friends,
Looking for sample report to send the report output through external mail on execution.
Regards,
Praveen Lobo*& Report ZKB_EMAIL
REPORT zkb_email NO STANDARD PAGE HEADING LINE-SIZE 200.
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '<b>WRITE EMAIL ID EG [email protected]'</b>.
Output Table
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
Mail Parameters
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
PERFORM populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment TABLES it_message it_attach
USING p_email 'Example .xls documnet attachment' 'XLS' 'filename'
CHANGING gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR' INTO it_attach SEPARATED BY space.
CONCATENATE space it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY space .
CONCATENATE space it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment TABLES pit_message
pit_attach
USING p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
CHANGING p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
w_doc_data-skip_scren = 'X'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
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_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
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.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
APPEND t_receivers.
CLEAR t_receivers.
t_receivers-receiver = sy-uname. " replace with <login name>
t_receivers-rec_type = 'B'.
t_receivers-express = 'X'.
APPEND t_receivers.
CLEAR t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
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.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "SEND_FILE_AS_EMAIL_ATTACHMENT
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
FORM populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
Rewards if useful.............
Minal -
Discoverer report - Output from Discoverer plus is not the same as Discoverer desktop
As a part of Upgrade project we are migrating the discoverer reports from 11i (11.5.10.2) to R12 (12.1.3) .After migrating to R12, for a custom discoverer report the output given by discoverer desktop is correct (24 rows for a scenario). But the report output from Discoverer plus does not show the credit transactions (2 rows). The output from Discoverer plus shows only 22 rows (24 - 2), which is incorrect. The query is the same in Discoverer desktop and Discoverer plus.
Please let me know why these transactions that are appearing when the report is run from discoverer desktop are not appearing in discoverer plus. Is there any setup in discoverer plus for this?
Regards,
BrajeshPretty hard to answer a question like this. Best bet would be to copy the existing discoverer plus book and start removing conditions, fields, etc until those two rows from desktop show up and see if you can work it out.
-
Changing the seeded rdf report output from text to PDF
Hi All,
I am trying to change the seeded report "Print Requisition Report" output from text to PDF. I changed the output format in the concurrent program definition from text to pdf. The report is now getting displayed in pdf format, but the alignment of the fields are changed. The output is not printing as it was printing while in the text output format. The output looks very sloppy, with uneven fonts and too much of text wrapping.
I tried some formatting and fields are somehow getting displayed but doesnt look in proper format. I am not able to change the font style in the report builder 6i, even if i change it is printing in the same font style with uneven font size. I think reducing the font size might help, but i am unable to change.We are on 11.5.10.2. Please provide your valuable suggestions on how to go about.
Thanks
SarveshHi Hussein,
Thanks for the information. After the adjustments in the layout and the font change the report is now getting displayed without any clipping when clicked on view output. But when the same report is printed some characters on the left and and right side is getting clipped. Please help on how to solve this issue.
Thanks,
Sarvesh -
Documents/PPT for Understanding how SAP SRM works from SAP website
Hi,
Can some one help me in finding some docs/ppts which helps me to understand how SAP SRM working from SAP website.
Regards,
ManeshHi, thanks for the response.
This is what they get
Fatal error: Call to a member function remove_all() on a non-object in .../.../.../welcome.php
This error is not generated by SAP. It is shopping cart error.
And here is the content of welcome.php
<?php
require("includes/application_top.php");
$cart->remove_all();
$hook = $_REQUEST['HOOK_URL'];
?>
The value of HOOK_URL is empty
<a href="index.php?HOOK_URL=<?php echo $hook; ?>">Start shopping here</a>
Edited by: janjan123 on May 14, 2010 5:06 PM -
Gmail emails disappearing from my Mail inbox
Hi,
I use the Mail program to manage my emails on my MacBook Pro (as well as my iPad and iPhone). I recently set up a gmail account and have been having a strange problem. Sometimes after I read a gmail, it disappears from my Mail Inbox folder. I haven't been able to figure out a pattern as it doesn't seem to do it every time. When our IT manager configured my computer for gmail, I ended up with a Gmail folder and two subfolders called "All Mail and one called "Important" on my Mail desktop. I told him I didn't want or need those folders but he couldn't get rid of them. When the gmails disappear from my Mail Inbox, I can always find them in one or both of these Gmail folders. But the problem is I get so many emails I don't always notice that one has disappeared until it is too late! This is causing some significant problems. No one has been able to figure out how to stop these emails from moving on their own. Our IT manager is more familiar with PCs than Macs. I hope you can help!! It's very frustrating!No. The email never makes it to me. It is on my iPhone for an instant, but then it disappears. It never makes it to my Outlook on my computer, and it is not in the Junk Mail, Deleted Items, or in my Sonic Wall Spam Filter box. There are 4 other people in my office, and I know that at least 2 of them are having the same problem. I can't tell if this is a problem with my iPhone or my Exchange Server. Help!
-
SAP BW HR Reporting book from SAP Press
Hi,
is there any book/documentation that explicitly covers extraction, Modeling, and Reporting concerned to SAP BW HR with good real time scenarios.
I have searched a lot in SDN, but no luck.
spent Hrs on BI content for HR, its vague for me.
Searched SAP Press, could not find anything.
Appreciate any suggestions.Hi ,
Check the book from the below link from SAP Press , it covers the BI Reporting also
http://www.sap-press.com/products/HR-Reporting-with-SAP.html
Regards,
Sathya
Maybe you are looking for
-
How to I make my animated vector images better quality when exporting to a SWF file?
I created an interactive PDF and SWF file. My animation only works on the SWF file, but the vector image is low res. On the PDF it doesn't animate (which I know,) but it's high res. However, the SWF file animated, but looks low res. Thoughts?
-
Multiple IDocs - XI - Flat file
We are looking at a scenario to send multiple IDOCS from SAP to Flat File. We implemented this using the Collect Pattern in BPM, merge all the IDocs into a single message and write it in a file. But is there any a way to avoid BPM and still be able t
-
hi i have just converted a movie for my iphone i read the instruction on how to put on iphone " Open Apple iTunes and drag the newly converted video files to the library window. If you have selected "Automatically update all videos" for the video pre
-
Cannot export query output when using UNION ALL
Hi I can run a query in SQL Developer 1.5.5 and if it's a SELECT statement it works fine, but if I output the result of several SELECT statements using UNION ALL after some 10,000 records the SQL Developer crashes and it generates a file whose size i
-
Before I take the Plunge ...
I am about to purchase a Mac-Mini 1.66GHZ Intel Core Duo (2gig RAM) with the Apple 20" Cinema Display. Just a few questions before I take the plunge... I have been reading endless posts surrounding the GMA950 graphics processor and have a quick quest