Sending a text mail for different user in
Hi Abapers,
I am trying to use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send a Text mail like "Purchase order is pending" .But how i can send a text mail .
Here we are not attach any document only the text message we need to different mail id.Or is there any other FM to send text mail.
Please help me if u have any sample code to send a text mail.
Thanks
Nani
Hi
You can use the fun module
UWSP_SEND_MAIL_TO_WEB
see the sample program using both he fun modules for sending some mails
REPORT zm_reservation_alert
NO STANDARD PAGE HEADING
MESSAGE-ID zm_msg.
D A T A B A S E T A B L E S D E C L A R A T I O N
T Y P E S D E C L A R A T I O N S
Reservations Main Structure
TYPES: BEGIN OF s_res,
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
usnam TYPE usnam, " User Name
bwart TYPE bwart, " Movement Type
aufnr TYPE aufnr, " Order Number
rsart TYPE rsart, " Record Type
bdart TYPE bdart, " Reservation Type
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
usrid TYPE sysid, " User ID
END OF s_res.
Output Main Structure
TYPES: BEGIN OF s_rep,
usnam TYPE usnam, " User Name
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
aufnr TYPE aufnr, " Order Number
END OF s_rep.
User Dept Details
TYPES: BEGIN OF s_dept,
pernr TYPE persno, " Personal No
usrid TYPE sysid, " User ID
orgeh TYPE orgeh, " Orgn Unit
orgtx TYPE orgtx, " Dept Name
END OF s_dept.
For Send Mail Purpose
DATA : i_doc_data LIKE sodocchgi1.
DATA : BEGIN OF i_pack_list OCCURS 0.
INCLUDE STRUCTURE sopcklsti1.
DATA : END OF i_pack_list.
DATA : BEGIN OF i_receivers OCCURS 0.
INCLUDE STRUCTURE somlreci1.
DATA : END OF i_receivers.
DATA : BEGIN OF i_contents OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_contents.
DATA : BEGIN OF i_header OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_header.
DATA : BEGIN OF i_att OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_att.
Internal table for bdcdata
DATA : it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Internal table to handle messages
DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
D A T A D E C L A R A T I O N S
DATA: gv_lines TYPE sy-index, " Total Lines int Table
gv_days TYPE i, " Difference Days
gv_date TYPE sy-datum, " Date
gv_date1 TYPE sy-datum, " Date
gv_date2 TYPE sy-datum, " Date
gv_text(85), " Text Field
gv_mesg(70), " Error Messages
gv_bdc, " BDC Flag
gv_flag TYPE i, " Flag
gv_ernam TYPE ernam. " User ID
C O N S T A N T S D E C L A R A T I O N S
CONSTANTS: c_x VALUE 'X', " Flag
c_endda TYPE endda VALUE '99991231'. " Date
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE, " Reservns
i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE. " Output
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
Process data
PERFORM process_data.
*& Form fetch_data
Fetching the Reservations related data from Database Tables
FORM fetch_data .
CLEAR: gv_date, gv_date1, gv_date2.
gv_date = sy-datum.
gv_date1 = sy-datum - 10.
gv_date2 = sy-datum + 10.
CLEAR i_res.
REFRESH i_res.
SELECT a~rsnum " Reservation No.
b~rspos " Reservation Item
a~usnam " User Name
a~bwart " Movement Type
a~aufnr " Order Number
b~rsart " Record Type
b~bdart " Reservation Type
b~matnr " Material No
b~bdter " Req Date
INTO TABLE i_res
FROM rkpf AS a JOIN resb AS b
ON arsnum = brsnum
WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
b~xloek EQ ' '.
SORT i_res BY rsnum rspos.
DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
Add userid into the i_usr int table
LOOP AT i_res.
i_res-usrid = i_res-usnam.
MODIFY i_res INDEX sy-tabix.
ENDLOOP.
IF NOT i_res[] IS INITIAL.
Get the User Dept Name
CLEAR i_dept.
REFRESH i_dept.
SELECT a~pernr " Personal No
a~usrid " User ID
b~orgeh " Orgn Unit
c~orgtx " Dept Name
INTO TABLE i_dept
FROM pa0105 AS a JOIN pa0001 AS b
ON apernr = bpernr JOIN t527x AS c
ON borgeh = corgeh
FOR ALL ENTRIES IN i_res
WHERE a~usrid = i_res-usrid AND
a~endda EQ c_endda AND
b~endda EQ c_endda.
ENDIF.
SORT i_dept BY pernr.
DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
Move the Creator of Reservation to a diff table
LOOP AT i_res.
MOVE-CORRESPONDING i_res TO i_rep.
APPEND i_rep.
CLEAR i_rep.
ENDLOOP.
SORT i_rep BY usnam rsnum rspos.
ENDFORM. " Fetch_Data
*& Form process_data
Process the Reservations related data for Expiry Date
FORM process_data .
DATA: lv_date1 LIKE sy-datum,
lv_date2 LIKE sy-datum,
lv_date3(10),
lv_menge(13),
lv_tabix LIKE sy-tabix.
LOOP AT i_rep.
CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
lv_tabix = sy-tabix.
AT NEW usnam.
Populate the Contents Table
CLEAR i_att.
REFRESH i_att.
i_att = 'Reservations Reminder'(014).
APPEND i_att.
i_att = '----
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
INTO i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
i_att = 'Please find the List of expiring Reservations'(004).
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
'Due Date'(008) 'Work Center/CC'(005) INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
ENDAT.
gv_days = i_rep-bdter - gv_date.
lv_date1 = i_rep-bdter + 5.
lv_date2 = i_rep-bdter + 10.
MOVE i_rep-menge TO lv_menge.
WRITE i_rep-bdter TO lv_date3.
IF gv_days = 10.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_days = 5.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date1.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date2.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
Mark the Reservation Item 'DELETED' using BDC.
UPDATE resb SET xloek = c_x.
PERFORM delete_item_resb.
ENDIF.
AT END OF usnam.
IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
gv_date = lv_date2 ).
Read the User who creates the Reservn and send a mail alert to him
CLEAR : i_receivers,gv_ernam.
REFRESH: i_receivers.
READ TABLE i_rep INDEX lv_tabix.
gv_ernam = i_rep-usnam.
IF gv_ernam <> space.
Send mail Alert to PR Creator(SAP inbox)
PERFORM send_alert_data.
Send Mail to External Mail ID of the SAP USER
PERFORM send_mail_external.
ENDIF.
ENDIF.
ENDAT.
ENDLOOP.
ENDFORM. " Process_data
*& Form delete_item_resb
Set the Deletion Indicator for the Res. Item in RESB
FORM delete_item_resb.
gv_bdc = 'N'.
Perform to fill it_bdcdata.
PERFORM fill_it_bdcdata.
Call the Transaction MB22
CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
MESSAGES INTO it_messages.
IF sy-subrc <> 0.
gv_flag = 1.
If error occurs in transaction mode run bdc session for that data
PERFORM bdc_process.
ENDIF.
Handles error messages
PERFORM error_messages.
CLEAR : it_bdcdata, it_messages.
REFRESH : it_bdcdata, it_messages.
IF gv_bdc = 'O'.
close bdc if it is open
PERFORM close_bdc.
ENDIF.
ENDFORM. "delete_item_resb
*& Form FILL_IT_BDCDATA
Filling Bdcdata structure with data
FORM fill_it_bdcdata.
PERFORM bdc_dynpro USING 'SAPMM07R' '0560'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM07M-RSPOS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RM07M-RSNUM'
i_rep-rsnum.
PERFORM bdc_field USING 'RM07M-RSPOS'
i_rep-rspos.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-XLOEK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RESB-XLOEK'
c_x.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-ERFMG'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDFORM. " FILL_IT_BDCDATA
*& Form BDC_DYNPRO
Filling the it_bdcdata table with program name & screen number
FORM bdc_dynpro USING program LIKE bdcdata-program
dynpro LIKE bdcdata-dynpro.
it_bdcdata-program = program.
it_bdcdata-dynpro = dynpro.
it_bdcdata-dynbegin = 'X'.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
Filling it_bdcdata with field name and field value
FORM bdc_field USING fnam LIKE bdcdata-fnam
fval.
it_bdcdata-fnam = fnam.
it_bdcdata-fval = fval.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_FIELD
*& Form ERROR_MESSAGES
Displaying error messages
FORM error_messages.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = sy-langu
IMPORTING
msg = gv_mesg
EXCEPTIONS
not_found = 1
OTHERS = 2.
LOOP AT it_messages WHERE msgtyp = 'E'.
WRITE : / 'Message :'(001) ,gv_mesg.
CLEAR it_messages.
ENDLOOP.
ENDFORM. " ERROR_MESSAGES
*& Form BDC_PROCESS
Open bdc session if call transaction fails
FORM bdc_process.
IF gv_bdc = 'N'.
open bdc session
PERFORM open_bdc.
gv_bdc = 'O'.
ENDIF.
IF gv_bdc = 'O'.
insert data into bdc session
PERFORM insert_bdc.
ENDIF.
ENDFORM. " BDC_PROCESS
*& Form OPEN_BDC
Calling function module to open bdc session
FORM open_bdc.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'ZMM'
keep = 'X'
user = sy-uname
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
ENDFORM. " OPEN_BDC
*& Form INSERT_BDC
Insert it_bdcdata into bdc by calling function module bdc_insert
FORM insert_bdc.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'MB22'
TABLES
dynprotab = it_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
ENDFORM. " INSERT_BDC
*& Form CLOSE_BDC
Closing bdc session
FORM close_bdc.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
ENDFORM. " CLOSE_BDC
*& Form send_alert_data
Send Alert for the Expired Contract
FORM send_alert_data .
CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
REFRESH : i_receivers,i_header,i_contents.
DESCRIBE TABLE i_att LINES gv_lines.
i_receivers-receiver = gv_ernam.
i_receivers-receiver = 'SSHEIK'.
i_receivers-rec_type = 'B'.
i_receivers-rec_date = sy-datum.
i_receivers-express = 'X'.
i_receivers-com_type = 'INT'.
i_receivers-notif_del = 'X'.
APPEND i_receivers.
i_doc_data-obj_name = 'SAPoffice'(013).
i_doc_data-obj_descr = 'Reservations Reminder'(014).
i_doc_data-obj_langu = 'E'.
i_doc_data-no_change = c_x.
i_doc_data-obj_prio = 1.
i_doc_data-priority = 1.
i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
i_pack_list-transf_bin = c_x.
i_pack_list-head_start = '1'.
i_pack_list-head_num = '1'.
i_pack_list-body_start = '1'.
i_pack_list-body_num = gv_lines.
i_pack_list-doc_type = 'DOC'.
i_pack_list-obj_name = 'SAPoffice'(013).
i_pack_list-obj_descr = 'Reservations Reminder'(014).
i_pack_list-obj_langu = 'E'.
i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
APPEND i_pack_list.
i_header-line = 'Header'. APPEND i_header.
Data for contents
i_contents-line = 'Please find the Reservations Due List'(016).
APPEND i_contents.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_doc_data
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = i_pack_list
object_header = i_header
contents_bin = i_att
contents_txt = i_contents
receivers = i_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.
IF sy-subrc = 0.
MESSAGE i000 WITH 'Mail Sucessfully sent'(017).
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " send_alert_data
*& Form send_mail_external
Send mail to External MAIL ID of the PR Creator
FORM send_mail_external.
DATA : lv_str(24), lv_str1(40),
lv_pernr LIKE adr6-persnumber,
lv_adrnr LIKE adr6-addrnumber,
lv_usrid LIKE pa0105-usrid,
lv_mail LIKE adr6-smtp_addr,
lv_sendor TYPE syuname,
lv_receiver TYPE string,
lv_header TYPE string,
lv_body TYPE string.
CLEAR: lv_pernr, lv_usrid, lv_adrnr,
lv_mail, lv_sendor, lv_receiver,
lv_header, lv_body .
lv_usrid = gv_ernam.
SELECT SINGLE persnumber addrnumber FROM usr21
INTO (lv_pernr,lv_adrnr)
WHERE bname = lv_usrid.
IF sy-subrc = 0.
SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
WHERE addrnumber = lv_adrnr AND
persnumber = lv_pernr.
IF sy-subrc <> 0.
CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
lv_receiver = lv_mail.
ELSE.
lv_receiver = lv_mail.
ENDIF.
lv_receiver = '[email protected]'.
lv_sendor = 'JALKHATAM'.
lv_header = 'Reservations Reminder'(014).
lv_str = 'Pls check your SAP Inbox'(019).
lv_str1 = 'for the status of Reservations Due List'(020).
CONCATENATE lv_str lv_str1 INTO lv_body
SEPARATED BY space.
Call Function Module To send mail
CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
EXPORTING
id_header = lv_header
id_body = lv_body
id_receiver = lv_receiver
id_sender = lv_sendor
ID_HTML_MAIL =
id_commit_work = 'X'
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " send_mail_external
Reward points for useful Answers
Regards
Anji
Similar Messages
-
VBA inserting form fields, different positions result for different users.
I'm certianly at a loss for wrapping my head around this.
Adobe Acrobat 9 Standard (v 9.5.4)
Excel 2010 (VBA)
The problem: When I create the PDF document from Excel, I search for a string of text in order to capture the Quads for the containing rectangle. Then I use the quads to insert a control with numeric offsets. The problem that I am facing is that the offsets seem to be causing the controls to be in different locations for different users. For example, when I send (-26, -2, 100, 10) {x-offset, y-offset, width, height}; the control aligns exactly where I want it. But when another user user runs the exact same routine, or opens the PDF that I created, the fields are no longer positioned correctly.
Is there some setting that I am missing? EDIT, SOLVED: My Acrobat had a custom point to pixel setting. (Preferences > Page Display > Resolution)
Private Function makePdfControl(ByVal pdfPage As Integer, keyTerm As String, Optional ByVal keyTermLookAhead As Integer = 0, Optional ctrlType As String = "text", Optional cCoords As Variant = 0)
'pdfPage is the target page of the document
'keyTerm is the assembled search term: "Date Shipped >> DATESHIPPED"
'keyTermLookAhead is the number of words assembed into KeyTerm, zero based: "Date Shipped" >> "DATESHIPPED" >> "DATE" = 0, "SHIPPED" = 1
'ctrlType determines the type of control to place on the form; default is text
'cCoords carries an array of integers: x-offset, y-offset, width, and height
txt = ""
Dim fkt As Integer 'counter for keyTermLookAhead
Dim matchFound As Boolean 'flag that a match has been found
Dim maxWords As Integer 'the maximum number of words in pdfPage
Dim coord(3) As Integer 'local array container to provide interface for cCoords
p = 0
matchFound = False
maxWords = jso.getPageNumWords(pdfPage)
Do While p + keyTermLookAhead <= maxWords 'search all words in the target page; break if not found
p = p + 1
For fkt = 0 To keyTermLookAhead
txt = txt & jso.getPageNthWord(pdfPage, p + fkt)
Next fkt
If UCase(txt) <> UCase(keyTerm) Then 'the assembly of terms is complete, check if match
txt = "" 'prepare "txt" for next assembly
matchFound = False
Else
matchFound = True 'we've struck gold, exit the loop preserving val of "p" as the first word in the assembly
Exit Do
End If
Loop
If matchFound = True Then
Dim qtmp() As Variant
Dim q(7) As Double
qtmp = jso.getPageNthWordQuads(pdfPage, p)(0) 'collect the rectangle containing the first word of the search; output is a base-0x7 array
For a = 0 To 7
q(a) = qtmp(a) 'collect the data
Next a
If VarType(cCoords) <> 8204 Then '8204 means that we've inserted an array into the Varient type var cCoords
coord(0) = 0
coord(1) = 0
coord(2) = 100
coord(3) = 15
Else
coord(0) = cCoords(0) 'x-offset value
coord(1) = cCoords(1) 'y-offset value
coord(2) = cCoords(2) 'width value
coord(3) = cCoords(3) 'height value
End If
x0 = coord(0) 'x-offset var
y0 = coord(1) 'y-offset var
w = coord(2) 'ctrl width
h = coord(3) 'ctrl height
x = q(0) + x0
y = q(7) - h + y0
'origin point of doc matrix is lower-left corner
'origin point of control is lower left corner of the rectangle containing the first word of the search phrase
'offsets are placed from this point, negative x shifts to the left, negative y shifts down
'values are in points, not pixels
Set f = aForm.Fields.Add(keyTerm, ctrlType, pdfPage, x, y, x + w, y + h) '(uplf, lwlf, lwrt, uprt) 'add the control to the form using values passed in
End If
End Function
The above function is used while looping through the pages of the created PDF document. I am using the following function to create the document from Excel:
Private Sub exportToPDF()
DoEvents
Application.ScreenUpdating = False
Call showTabs(False)
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=pdfPathData, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Call showTabs(True)
Call locateDoc
Application.ScreenUpdating = True
End Sub
Message was edited by: ilivingston: solvedThanks for the reply, I did spend some time working on this issue... here is what I found...
1) First of all, I did have a custom Points to Inches setting in my Acrobat options... 110 vs 96. Resetting this allowed for me to see the alignment issue that my colleagues were referencing first hand.
As it turned out, my results were better, but still had inconsistency among different workstations. Leading me to..
2) The MSFT creator uses the default printer in some way to create the PDF. Because the different workstations were using different printers, we were getting different results. If everyone used an HP 1320, nobody would see any difference upon creating / adding fields.
The final solution was to change the Application.Printer to a common network printer before the export operation, and return the Application.Printer to the user default after the export completed. This has provided us with a common ground to work upon; we are lucky to have a network printer that can be used for this purpose, as I can see this becoming non-viable in environments where this would be unavailable. -
Change E-mail for system user BWREMOTE
Dear All,
How can i change the E-mail for system user BWREMOTE, i tried in SU01 email field is empty in communication tab, checked in BW and ECC no details were maintained. Currently this user is able to send emails, would like to change the email address to this user.
Thanks,
KartikHi Kartik
For this you have to maintain the list of process and email note faction when process chain failed in transaction code RSPCM in BW system
and also you can refer the SDN inks
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/304c3146-8eb9-2d10-d787-b6dc2d368cb2?QuickLink=index&…
BR
SS -
Triggering of mails for different actions
I have to trigger different mails for different actions. Eg: A2 - Confirmation Action and A3 - Promotion Action.
In dynamic action I have written:
0000 06 4 P T001P-MOLGA='40'
0000 06 6 P P0000-MASSN='A2'/X
0000 06 7 P P0000-MASSN='A3'
0000 06 8 M M0001
and in M0001 feature I have maintained :
A Master Data and Time Data
INFTY Infotype
0000
SUBTY Subtype
A3
IDTXT MAIL_FOR_I0002
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
A2
IDTXT MAIL_FOR_I0006
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
It doesnt work but if i maintain dynamic action as
0000 06 4 P T001P-MOLGA='40'
0000 06 6 P P0000-MASSN='A2'
0000 06 8 M M0001
and in M0001 feature I have maintained :
A Master Data and Time Data
INFTY Infotype
0000
IDTXT MAIL_FOR_I0002
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
the mails are getting triggered with no problem. Im not sure where i am goin wrong. Please help as I have send out different mails for different actions and i have 9 types of actions to take into account here.
Points wil be rewardedHi BI ,
Did you try the dynamic action by including '/X' and try to maintain
M0001 feature as u had maintained earlier.
A Master Data and Time Data
INFTY Infotype
0000
SUBTY Subtype
A3
IDTXT MAIL_FOR_I0002
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
A2
IDTXT MAIL_FOR_I0006
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW -
Where to set sending of e-mails for dunning documents
Hello
Does anyone knows where to set sending of e-mails for dunning documents. They are being printed out but e-mail is not being sent.
Generalyy e-mail sending(trx scot) is set.
I guess it is pure Fi settinng to send e-mail as well. Could anyoune help
Thank you a lot in advance
JanHi Jan,
Please refer SAP note
1042992 - Dunning by mail w/ SAPscript: Introductory text w/ attachmnt
Also refer SCN document
SAP FI Dunning Procedure customization and Functionality
Refer section
Activate the dunning via E-mail (To receive letter by mail)
Dunning letter output can be in two forms.
1) Email
Manual Print out
H Hope this helps.
Regards,
Deepak Kori -
<i>I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users?</i>
Um, there is no such thing as NAS4.1.
I'm assuming that you mean NAS4.0 (maybe NAS4.0sp1?). If so, then the session timeouts are specified in the session section of the NTV configuration files.
AFAIK, you can specify session timeouts on a per user basis. -
Password security - set permissions for different users
I am using Abobe Acrobat 9 Pro.
In the HELP menu, there is a security section in the contents, In the overview, it states the following:
"Each security method offers a different set of benefits. However, they all allow you to specify encryption algorithms, select the document components to encrypt, and set permissions for different users."
I would like to know how you can set permissions for different users using Password Security.
I am the only one in the company who has Acrobat 9 Pro and all others have Adobe Reader 8.
I have created a PDF file in Acrobat 9, this file is accessible to anyone with Abobe Reader. I would like to set different permissions for different users. For example, i would like certain individuals to print the document and other individuals to not be allowed to print. Can this be acheived using Password Security?
Many ThanksI have created a PDF file in Acrobat 9, this file is accessible to
anyone with Abobe Reader. I would like to set different permissions for
different users. For example, i would like certain individuals to print
the document and other individuals to not be allowed to print. Can this
be acheived using Password Security?
No. -
How to create different log files for different users in log4j
I want to create different logs for different users, using different appenders for each user so that logs are created in his file only.
Confusion:How to direct them to different files in my logger classHi Avi,
First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
Thanks and Regards,
Ravi. -
How to set different default interactive reports for different user groups?
I'm probably overlooking an obvious solution, but how do I set different default interactive report for different user groups?
For the same interactive report, I want one set of users to see a default where the default filter is based on column X. However, another group of users doesn't have authorization to see that column so I need to set the default filter to something else for them.
ThanksYou can set a filter on a report in a URL - would that help? I think with apex 4.x you can also link to a saved default report or alternative report...
-
Access control for different user groups in APEX 4.0
Hi guys,
in Apex 4.0, is there any way to use the access control page to configure access control for different user groups?
The access control page currently only has an access control list by users with 3 privileges namely, Administrator, Edit & View where Administrator has the highest access level & View the lowest. Therefore 1 user cannot have more than 1 different privilege, however if the user belongs to 2 or more different groups then we can control what access he can have in a more fine grained manner. We also want to have more than the 3 privileges given.
Can we assign different groups to different users and let them have different privileges to be configured by page, region, process or item level?
Now Apex will create 2 tables, Apex_Access_Control & Apex_Access_Setup to store the application access control mode & access control list. It will also create 3 authorization schemes "access control - administrator", "access control - edit" & "access control - view" based on the 2 tables.
Does this mean we have to change the table structures & edit the authorization schemes to suit our usage? We are reluctant to do this because if we upgrade to a newer version of Apex then we would have to merge our pl/sql coding with Apex's updated code.
How can we auto-configure more than the 3 authorization schemes in the access control page? Is there any way to achieve a finer grain of access control based on the current access control administration page given by Apex without writing it ourselves?
We are afraid that we may have missed something on Apex access control & do not want to reinvent the wheel.Hi Errol,
to build your own application authorization scheme around the security model supplied by Apex for administration of the Apex environment would be a bad idea.
This was never intended for authorization scheme management in custom built Apex applications, it was solely intended to control access in the Apex environment overall. The API for it is not published, and making changes to it, such as adding more roles, would run the risk of breaking the overall Apex security model. It would not be supported by Oracle and Oracle would not guarantee the upwards compatibility of any changes you make in future versions of Apex.
In short, you should follow Tyson's advice and build your own structure. As he indicated, there are plenty of examples around and provided your requirements are not too complicated, it will be relatively simple.
Regards
Andre -
Can we define different session time-outs for different user types in the DD?
Hello,
Do you know a way to specify different session time-outs in deployment
descriptor for different users/roles?
For example:
Role-A should be invalidated after 10 minutes
Role-B should be invalidated after 100 minutes
Shortly, I would be grateful if you can help,
Fehmi."Fehmi" <[email protected]> wrote in message
news:3f50fb75$[email protected]..
>
Hello,
Do you know a way to specify different session time-outs in deployment
descriptor for different users/roles?
For example:
Role-A should be invalidated after 10 minutes
Role-B should be invalidated after 100 minutes
I don't believe you can timeout a session based on a user or a role. I think
you can just specify when
all sessions timeout (via the session descriptor). But, you may want to ask
in the weblogic.developer.interest.servlet newsgroup. -
HT1495 Can I set my iPad for different users? ie user - 1 login & user - 2 login
Can I set my iPad for different users? ie user - 1 login & user - 2 login
Afraid not. The iPad is not intended for multiple users.
-
Can i use the same email address for different users?
we are a small department with one email address, can i use the same email address for different users?
No. Each user needs to have his unique ID.
Mylenium -
Sharing files for different users on same computer without duplicating
Newbie here, I got my 1st mac (in ten years) last week and have been really enjoying it. I set up 3 user's accounts and wanted to share files such as iphoto and itune for all users. So I put my pictures in the shared folder, however, when I opened iphoto in each user's account, I had to import all the photos for every user, which resulted in duplicated files on each user's folders. I have tens of thousands of photos and don't want redundant files eat up my hard drive space. For this reason I'm holding off sharing my itune files.
I'm wondering if there's a way to allow access for different users without making duplicates.
20 in. imac Mac OS X (10.4.8)ewrspotter
Preferably only admin can edit/import
Well this makes things very easy and is the way that iPhoto is intended to share. In your Admin account, go to iPhoto -> Preferences -> Sharing and enable Sharing. Note that you can share an entire library or just individual albums. Leave iPhoto running and use Fast-User Switching to move to the other Account(s). In Launch iPhoto and go to Preferences -> Sharing and enable 'Look for Shared Photos'. The main library will turn up in the Source (or left-hand) pane of the other iPhoto.
Remember that for this to work, the Admin account must be logged in and iPhoto must be running there.
I don't really care as long as there's no redundant files.
Define 'redundant'. You do realise that iPhoto is a database, with built-in image viewer, lightweight editor and version control. Version control means that if you modify a photo then iPhoto makes a copy, including the changes, and keeps the Original. This way you can always Revert to Original from the Photos menu. Many people switching to iPhoto are confused by this at first. If you don't want version control I strongly suggest using a different app. There a many, many image viewers for the Mac.
As to your point comment about One-Touch DVD. I'm not familiar with that piece of Software, but every DVD (and CD) that you burn is assembled on the HD first, then burned. That assembly is a cache file and should be trashed on completion.
As to disk space: you need to keep about 10 gigs of space on the Start-Up disk for Virtual memory, Temp files and other OS uses. If you do get an external at some point in the future it is possible to run both iPhoto and iTunes from it to free up space on the internal. Just check the help or post back to the relevant forum before moving them. It's not difficult, but there is a procedure that needs to be followed.
Regards
TD -
I cannot send an e-mail for my 3GS iPhone using port 110
I cannot send an e-mail for my 3GS iPhone using port 110; how do I find the right port? I have always used this port but now it does not work. I can send e-mails from my iPad using this port.
The port is determined by your Email Service Provider. So first off, who is your email provider?
Port 110 is not a standard port for sending. 25, 465 and 587 are the standard SMTP ports (sending) and 110, 143 and 995 are the standard POP/IMAP ports (receiving).
Maybe you are looking for
-
Posting Date in Service Entry Sheet
Hi All, The problem I am facing is as follows: The Client makes a service PO then it gets released from the highest level. Thereafter when we do service entry sheet in ML81N, that also has a release strategy and if suppose the highest level has relea
-
Creative Cloud App Screen Download error
I continue to get the exclamation point in a triangle and it asks me to uninstall and then download it again. Needless to say I've don't his about five times and I keep getting the same error. PLEASE HELP!!
-
MSI DR4A Owners READ IN NOW!!!!
Hi all, Just found this forum because I was looking for the new official DR4A firmware. I purchased my MSI 4 weeks ago for £117 Sterling. After trawling the net looking for good info i've discovered that the MSI unit is made by Sanyo, who apart from
-
I was running an update in my Ipod Nano the other evening and got the "Do not disconnect" screen come up on the Ipod. After showing this message for ages I decided to do the opposite and disconnect it. Now every time I connect the Ipod to Itunes I ge
-
I love the product and have no real complaints, but I have one problem. When I use the "edit in" feature, it's set to Corel Paint Shop Pro. simply because that's what I have. I often get significant color degradation by the time it returns to Light