E-mail generation by sap
Hi Gurus
in my system I want that system should generate
mail as the stock of perticular material reach re order point
level
hoe this is possible where to do setting for that ?
is their any std.tcode or setting
please suggest me
regard
Dear Friend
It can be catered with the exception messages sent to the MRP controller.
Else , its a work flow scenario. In standard there is no such scenario mentioned for such a task. But you have to create customized events for this case.
Events are created to report status changes for an application object and to allow a reaction to the changes.
Better take help of a work flow consultant.
Similar Messages
-
Problem in Automatic mail generation after shipment creation in vt01
Hi All,
In VT01 Automatic mail generation to customer whenver a new shipment is created & in from address user mail adderess is mentioned but in my requirements i have to mention different mail id in user mail address.
how can i do this?
please give me ur suggestions.
ThanxHi...
When user close the shipment ,then he gets a mail on his id automatically generated from sap system.
he want this mail should come to the mail id of his colleague.
Pls reply asap.
Thanx
Vj -
To Trigger a mail into my outlook when i get a mail to my SAP Bussiness WP
Hi ,,
I want to trigger an email to my oulook when i get a mail into my SAP Bussiness Workplace Tcode So01.
Please help me on this.
Regards
Srinivas MandaHi Srinivas,
Please check this..
1) goto so13 tcode and click on Automatic forwarding tab ,
2) click on create icon ,
3) Enter your id in provided Forward to text box ,
4) specify it as External address ,
5) Click on enter
Now work item or mail would come to the id you had specified...
after that execute your workflow and check in your outlook inbox
Hope this would solve your issue.
Any questions please revert back
Good luck
Narin -
INBOUND MAIL PROCESSING in SAP for Offline ADOBE FORM Concept
Hi to all,
Please can anyone tell me, what INBOUND MAIL PROCESSING in SAP for Offline ADOBE FORM?
What is concept and how to use it, is any program need to write for that or only need to configure it.
I have searched the SDN, but only get topic how to configure inbound mail processing.
I am new to this area; please any one put some light on it.
I shall be thankful to you for this.
Regards
Pavneet RanaHi Pavneet,
Inbound processing of an offline adobe form consists of several things -
a) an email id to be created on the server (to accept the mail & process the adobe form - this needs to have the right roles)
b) the smtp config needs to be done by basis
c) the abap developer needs to create a handler class that gets called when an email is recd in SAP. This handler class has 3-4 methods (first to read the mail and extract the pdf, convert data in pdf to the abap variable, process the form to do the specific function in sap (which will vary from requirement to another).
I found this blog very useful when I was getting my adobe form done -
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
Hope this helps.
Cheers, Liz
(ps: you might get more help in the adobe form specific forum in sdn) -
E-mail functionality in SAP BO X1 3.1
Hi All,
I have few questions regarding the E-mail functionality in SAP BO X1 3.1
1)Is there a limitation on size of report in Email within the SAP BO X1 3.1?
2)Can you zip reports within SAP BO X1 3.1 ?file type options(?)
3)Is there an Impact on performance front end/back end if many users are mailing the reports using SAP BO X1 3.1?
4)How can we restrict users to only email the public folder Reports?
5)Only people with Scheduling have access to Email Functionality - Are there any other ways we can place restrictions around this?
Please help in this regard
Thanks in Advance
Regards,
Pavithra PHi Pavithra,
We can send a report instance (after schedulling) to an email address and not the actual report.
Adaptive Job Server (Web Intelligence Scheduling and Publishing Service) is used to generate the instance and Destination Job Server is used to deliver that instance to the email address.
If multiple users are expected to send instances to email concurrently then we could have multiple instances of Destination Job Server.
As far as I am aware, there is no direct way to zip reports.
If I am not wrong, the size of attachment would depend on the limitations set at Mail Servers. Your network administrator might help you on this.
Hope this will help.
Regards,
Yuvraj -
Sending mail from one Sap system to another
Hi all,
plz explain me how can i send mail from one SAP system to other SAP system.
Thanks in advance
VenkatHai Venkat
Go through the following Code
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA L_NUM(3).
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDFILE'.
Mail Subject
DOC_CHNG-OBJ_DESCR = 'Delivered Mail'.
Mail Contents
OBJTXT = 'Object text'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Creation of the document attachment
LOOP AT ITAB_DATA.
CONCATENATE ITAB_DATA-PRODUCTOR
ITAB_DATA-VBELN
ITAB_DATA-POSNR
ITAB_DATA-MATNR INTO OBJBIN.
APPEND OBJBIN.
ENDLOOP.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'ORDERS'.
APPEND OBJHEAD.
Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'TXT'.
OBJPACK-OBJ_NAME = 'WEBSITE'.
OBJPACK-OBJ_DESCR = 'ORDERS.TXT'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
target recipent
clear RECLIST.
RECLIST-RECEIVER = '[email protected]'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
copy recipents
clear RECLIST.
RECLIST-RECEIVER = '[email protected]'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
RECLIST-COPY = 'X'.
APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
Thanks & regards
Sreenivasulu P -
U2018The next generation of SAP B1 add-onsu2019 - The power of mobility.
AbacusConsulting has come out with the next generation of SAP Business One add-ons. The SAP Business One Mobilizer!
Now the conventional boundaries have been broken down and limitless possibilities are within grasp with the introduction of the SBO Mobilizer. Dwelling on futuristic technology, the SBO Mobilizer allows you to have access to your SAP B1 database and its key functions around the clock, from anywhere in the world.
Extremely reliable, robust and secure, the SBO Mobilizer enables sales teams, distribution teams, management, field force employees, etc to post and view sales orders, delivery orders, invoices, returns and payments from remote locations, enabling them to make instant and well calculated decisions without any delay. It provides greater control over the whole operation process and securely centralizes data within minutes.
Working on both offline and online modes, the SBO Mobilizer not only saves time and money but itu2019s highly flexible design also enables limitless On-The-Fly form designing. A few clicks and new forms are ready to be published.
Language not being a barrier anymore, the product can be custom developed for any language intended and keeping a futuristic approach, the product is not limited to SAP but can be custom developed for any ERP system.
And the possibilities donu2019t end there. AbacusConsultingu2019s product will let you set your possibilities yourself. Itu2019s all in your hand. Amplifying the power of SAP B1 several folds, it is a product that I recommend you have a look at.
If you wish to discuss the possibilities in further detail, drop me an email at arqum.tashfeen@abacus-global. com or call me directly at +92 322 7171078.
Best Regards,
Arqum Tashfeen
Edited by: arqum.tashfeen on May 9, 2011 1:54 PM
Edited by: arqum.tashfeen on May 9, 2011 1:56 PMSorry,
I figured that out. I would rather inherit from <b>B1Menu</b>
public class B1BrowserAdd: B1Menu {
public B1BrowserAdd() {
this.MenuUID = "1282";
[B1Listener(BoEventTypes.et_MENU_CLICK, true)]
public virtual bool OnBeforeMenuClick(MenuEvent pVal) {
Console.WriteLine("1282 Menu Pressed");
return true; -
Mail configuration in SAP SOLUTION MANAGER 7.1
Hi All,
I am working on SMTP (Mail)Configuration in SAP Solution Manager 7.1. And our mail host is GOOGLE APPS.
Does any one had configured mail in SAP for hosted on GOOGLE APPS?
Does SAP will support this as it is external (mail) server?
I read note 455140, related notes and configured accordingly.
Steps I followed:
1. parameters maintained:
icm/server_port_2 = PROT=SMTP,PORT=25000,TIMEOUT=180
is/SMTP/virt_host_0 = *:25000;
2. User maintained: Dialog user with S_A.SCON profile with user address as username@<companyname>.com
3.Client Assignment: (SICF): a. Host Data:Profile Parameter Number: is/SMTP/virt_host_0
b. Service data: Client 100, user: username, password: ***, language: EN.
c. Handler List: CL_SMTP_EXT_SAPCONNECT in the first position
Saved Changes n Activated.
4.SAPconnect administration (SCOT):
a. Default domain: <companyname>.com
b. Nodes: SMTP Under node:
Mail Host: smtp.gmail.com
Mail Port: 25 and also tried 587
In Internet Address Area: *
5.Scheduled periodic Job with SAP&CONNECTALL variant
6. telnet <HOSTNAME> 25000 is successful
In both cases I am getting error as:
No delivery to ishan.sangai@<companyname>.com, authentication required
Message no. XS853
Diagnosis
The message was processed successfully in the SAP system. The mail server that is supposed to receive the message for further processing requires authentication. The SAP system does not support this procedure. As a result, the message was not delivered to recipient ishan.sangai@<companyname>.com.
Information from External System
_530 5.7.0 Must issue a STARTTLS command first. p1admin@<companyname>.com
Procedure
The administration settings must be changed. The specified mail server must not request authentication.
7. I tried to telnet smtp.gmail.com 25 and 587 also
I am getting following output:
220 mx.google.com ESMTP ds5sm2193379ibb.5
HELO <HOSTNAME>
250 mx.google.com at your service
HELO <companyname>.com
250 mx.google.com at your service
MAIL FROM solman_admin@<companyname>.com ENVID=12345
530 5.7.0 Must issue a STARTTLS command first. ds5sm2193379ibb.5
Does we need to talk with Google Apps provider for any modifications to be made for this.
if yes, which changes should I request them?
Please help me to solve this problem.
Please provide links,guides.notes etc. for this scenario
Thanks & Regards,
IshanHi we are configuring Google SMTP getting below error..
No delivery to xxx.com, authentication required
Message no. XS856
Diagnosis
The message was processed successfully in the SAP system. The mail server that is to receive the message for further processing requires authentication. Probably there is no logon data specified in the SAPconnect configuration.
Information from external system (if available)
smtp.gmail.com:587
530 5.7.0 Must issue a STARTTLS command first. i91sm11178241qgd.25 - gsmtp
Procedure
Enter the logon data in the SAPconnect node.
Using Gmail SMTP server using "smtp.gmail.com" with port 587
Please advise.
Regards,
Sudarshan -
Dynamic actions settings to mail generation
Hi
The actions are set for mali generation ,when ever personnel action happen.while testing the mail generation some actions are fine which are set in dynamic actions with out action for reasons.but some of actions are not working which are mentioned action for reason.
one case i set dynamic actions for hiring action with mentioning action reason.that time it will entered in to programing and generating mail.
but in another case i have 3-4 reason for actions that time the program will considering only action type ,its not entering into program considering action for reason.
can any body give me brief advise how to set dynamic action while action having the action reasons.
Regards,
arjunSreehari,
You can configure feature M0001 (Add MASSN/MASSG as your decision operation) and you can call this feature in the dynamic action table T588Z
Reward Points if this is helpful.
Sanghamitra
Message was edited by:
Sanghamitra11 -
P.O auto mail generation pdf to word
Hi everyone,
this is regarding the automatic mail generation in smartforms. Its like when you process the smartforms the mails are automatically shooted to the address maintained for eg usually to the vendors. So what I need is incase I proces my smartforms the mail shouldnt be in the pdf format but in normal text format.
I dont want to take that pdf convert to word/text by external sofware and attch it to the mail. I want it to be automatic.
Plz suggest the possible ways of doing it. Thanks to all in advance.
Rgds,
Anuc.*& Report ZCS_IRN
report zpo_spool no standard page heading line-size 260.
Table Declaration *******************************
tables : zptreg,zpoinb,dd07t,nase.
Data Declaration ********************************
type-pools: slis.
data : report_id like sy-repid.
data : ws_title type lvc_title value 'Reprint PT Inbound Register'.
data : i_layout type slis_layout_alv.
data : i_fieldcat type slis_t_fieldcat_alv.
data : lf_fm_name type rs38l_fnam.
data : ls_control_param type ssfctrlop.
data : ls_composer_param type ssfcompop.
data : ls_recipient type swotobjid.
data : ls_sender type swotobjid.
data : control_parameters type ssfctrlop.
data : output_options type ssfcompop.
Internal Table Declaration *******************************
data: begin of itab occurs 0,
chk,
indno type zptreg-indno,
dtype type zptreg-dtype,
ernam type zptreg-ernam,
erzet type zptreg-erzet,
aedat type zptreg-aedat,
traid type zptreg-traid,
traty type zptreg-traty,
vehnum type zptreg-vehnum,
bolnr type zptreg-bolnr,
lrdat type zptreg-lrdat,
lrdelv type zptreg-lrdelv,
lrtime type zptreg-lrtime,
datia type zptreg-datia,
uhria type zptreg-uhria,
lifnr type zptreg-lifnr,
werks type zptreg-werks,
anzpk type zptreg-anzpk,
btgew type zptreg-btgew,
gewei type zptreg-gewei,
ntgew type zptreg-ntgew,
idtxt type zptreg-idtxt,
waybl type zptreg-waybl,
dpack type zptreg-dpack,
ebeln type zpoinb-ebeln,
vbeln type zpoinb-vbeln,
menge type eket-menge,
wemng type eket-wemng,
wemng1 type eket-wemng,
chaln type zptreg-chaln,
paymt type zptreg-paymt,
zchquan type zptreg-zchquan,
rdesc(60) type c,
trdesc(60) type c,
tydesc(60) type c,
pdesc(60) type c,
name1 type lfa1-name1,
end of itab.
data : itab1 like itab occurs 0 with header line.
data : itab2 like itab occurs 0 with header line.
data: begin of ieket occurs 0,
ebeln type eket-ebeln,
ebelp type eket-ebelp,
menge type eket-menge,
wemng type eket-wemng,
end of ieket.
data : ieket1 like ieket occurs 0 with header line.
data : ieket2 like ieket occurs 0 with header line.
data : flag type c.
Selection Screen *******************************
selection-screen : begin of block b1 with frame title text-001.
select-options : x_indno for zptreg-indno matchcode object zindnohelp2.
select-options : x_aedat for zptreg-aedat.
select-options : x_werks for zptreg-werks .
select-options : x_lrdat for zptreg-lrdat.
select-options : x_lifnr for zptreg-lifnr no intervals no-extension.
select-options : x_ebeln for zpoinb-ebeln no intervals no-extension.
select-options : x_bolnr for zptreg-bolnr no intervals no-extension.
select-options : x_traid for zptreg-traid no intervals no-extension.
selection-screen : end of block b1.
Start of Selection *****************************
start-of-selection.
set pf-status 'STATUS'.
perform get_data.
perform display_data.
*& Form get_data
form get_data .
select * from zptreg into corresponding fields of table itab1
where indno in x_indno
and aedat in x_aedat
and werks in x_werks
and lrdat in x_lrdat
and lifnr in x_lifnr
and bolnr in x_bolnr
and traid in x_traid.
if sy-subrc ne 0.
message i001(zmsg).
stop.
endif.
select * from zpoinb into corresponding fields of table itab
for all entries in itab1
where indno = itab1-indno
and ebeln in x_ebeln.
if sy-subrc ne 0.
message i001(zmsg).
stop.
endif.
loop at itab.
at new indno.
flag = 1.
endat.
if flag = 1.
read table itab1 with key indno = itab-indno.
move itab1-traid to itab-traid.
move itab1-lifnr to itab-lifnr.
move itab1-traty to itab-traty.
move itab1-bolnr to itab-bolnr.
move itab1-traid to itab-traid.
move itab1-werks to itab-werks.
move itab1-vehnum to itab-vehnum.
move itab1-lifnr to itab-lifnr.
move itab1-btgew to itab-btgew.
move itab1-gewei to itab-gewei.
move itab1-ntgew to itab-ntgew.
move itab1-idtxt to itab-idtxt.
move itab1-waybl to itab-waybl.
move itab1-anzpk to itab-anzpk.
move itab1-aedat to itab-aedat.
move itab1-dpack to itab-dpack.
move itab1-erzet to itab-erzet.
move itab1-ernam to itab-ernam.
move itab1-zchquan to itab-zchquan.
move itab1-paymt to itab-paymt.
move itab1-chaln to itab-chaln.
move itab1-lrdat to itab-lrdat.
move itab1-lrdelv to itab-lrdelv.
move itab1-lrtime to itab-lrtime.
move itab1-datia to itab-datia.
move itab1-uhria to itab-uhria.
clear flag.
endif.
modify itab.
endloop.
delete itab where indno not in x_indno.
select * from eket into corresponding fields of table ieket for all entries in itab
where ebeln = itab-ebeln.
loop at ieket.
move ieket-ebeln to ieket1-ebeln.
move ieket-menge to ieket1-menge.
collect ieket1.
endloop.
loop at ieket.
move ieket-ebeln to ieket2-ebeln.
move ieket-wemng to ieket2-wemng.
collect ieket2.
endloop.
loop at itab.
read table ieket1 with key ebeln = itab-ebeln.
move ieket1-menge to itab-menge.
read table ieket2 with key ebeln = itab-ebeln.
move ieket2-wemng to itab-wemng.
itab-wemng1 = itab-menge - itab-wemng.
select ddtext from dd07t into itab-rdesc where domvalue_l = itab-idtxt and domname = 'ZIDTXT'.
endselect.
select ddtext from dd07t into itab-trdesc where domvalue_l = itab-traid and domname = 'ZTRAID'.
endselect.
select ddtext from dd07t into itab-tydesc where domvalue_l = itab-traty and domname = 'ZTRATY'.
endselect.
select ddtext from dd07t into itab-pdesc where domvalue_l = itab-paymt and domname = 'ZPAYMT'.
endselect.
select name1 from lfa1 into itab-name1 where lifnr = itab-lifnr.
endselect.
modify itab.
clear itab.
endloop.
if itab[] is initial.
message i001(zmsg).
stop.
endif.
endform. " get_data
*& Form display_data
form display_data .
report_id = sy-repid.
perform f1000_layout_init changing i_layout.
perform f2000_fieldcat_init changing i_fieldcat.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = report_id
i_callback_pf_status_set = 'STATUS'
i_callback_user_command = 'USER_COMMAND'
I_STRUCTURE_NAME =
is_layout = i_layout
it_fieldcat = i_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
EXCEPTIONS
PROGRAM_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.
endform. " display_data
*& Form f1000_layout_init
form f1000_layout_init using i_layout type slis_layout_alv.
clear i_layout.
i_layout-colwidth_optimize = 'X'.
i_layout-edit = ''.
i_layout-box_fieldname = 'CHK'.
endform. " F1000_Layout_Init
*& Form f2000_fieldcat_init
form f2000_fieldcat_init changing i_fieldcat type slis_t_fieldcat_alv.
data: line_fieldcat type slis_fieldcat_alv.
clear line_fieldcat.
line_fieldcat-fieldname = 'CHK'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_l = 'Checkbox'.
line_fieldcat-checkbox = 'X'. " Display this field as a checkbox
line_fieldcat-outputlen = '8'.
line_fieldcat-edit = 'X'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'INDNO'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' PT Register No '.
line_fieldcat-outputlen = '15'.
line_fieldcat-hotspot = 'X' .
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'AEDAT'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Creation Date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'TRDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Transporter Name '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'TYDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Transport Type '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'VEHNUM'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Vehicle Number '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'BOLNR'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' L .R Number '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'NAME1'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Vendor / Supplier'.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'WERKS'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Site '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'EBELN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Purchasing Document '.
line_fieldcat-outputlen = '15'.
line_fieldcat-hotspot = 'X' .
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'WEMNG1'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Still To Be Delivered '.
line_fieldcat-outputlen = '20'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'VBELN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Sales Document '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ANZPK'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'No.of Packages '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'DPACK'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Damaged Packages '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'BTGEW'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Total Weight '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'GEWEI'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Weight Unit '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'NTGEW'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = ' Net Weight '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'RDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Remarks '.
line_fieldcat-outputlen = '60'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'WAYBL'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Weigh Bill Number '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ERNAM'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Created By '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ERZET'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Created At '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'LRDAT'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'L.R Date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'LRDELV'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'L.R Delivery Date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'LRTIME'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'L.R Time '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'DATIA'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_l = 'Appointments: From date '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'UHRIA'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_l = 'Appointments: Time from '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'CHALN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Challan No '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'PDESC'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Payment method '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
clear line_fieldcat.
line_fieldcat-fieldname = 'ZCHQUAN'.
line_fieldcat-tabname = 'ITAB'.
line_fieldcat-seltext_m = 'Challan Quantity '.
line_fieldcat-outputlen = '15'.
append line_fieldcat to i_fieldcat.
endform. "f2000_fieldcat_init
*& Form user_command
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
data: wa_job_output_info type ssfcrescl.
data wa_spoolids type tsfspoolid.
data wa_spoolnum type rspoid.
data: objpack like sopcklsti1 occurs 2 with header line,
objhead1 like solisti1 occurs 1 with header line,
objbin like solisti1 occurs 10 with header line,
objtxt like solisti1 occurs 10 with header line,
reclist like somlreci1 occurs 5 with header line,
doc_chng like sodocchgi1,
tab_lines like sy-tabix.
data : wa_itab like itab.
data : line type c.
case r_ucomm.
when 'SAVE'.
clear line.
refresh itab2.
read table itab index rs_selfield-tabindex.
loop at itab where chk ne space.
move-corresponding itab to itab2.
collect itab2.
endloop.
describe table itab2 lines line.
if line ge 2.
message 'Please Select Only Document for Print Output ' type 'E'.
endif.
set parameter id : 'ZIN' field itab-indno.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZPTREG_NEW'
importing
fm_name = lf_fm_name.
if sy-subrc <> 0.
endif.
control_parameters-no_dialog = 'X'.
control_parameters-preview = 'X'.
output_options-tddest = 'LOCL'.
output_options-tdcopies = '2'.
call function lf_fm_name
exporting
control_parameters = ls_control_param
output_options = ls_composer_param
mail_recipient = ls_recipient
mail_sender = ls_sender
user_settings = 'X'
p_indno = itab-indno
importing
DOCUMENT_OUTPUT_INFO =
job_output_info = wa_job_output_info
JOB_OUTPUT_OPTIONS =
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
endif.
move wa_job_output_info-spoolids[] to wa_spoolids[].
read table wa_spoolids into wa_spoolnum index 1.
if sy-subrc = 0.
data :id like tsp01-rqident.
move wa_spoolnum to id.
endif. .
*loop at wa_spoolids INTO wa_spoolnum .
write : id.
*endloop.
data i_soli like soli occurs 0 with header line.
call function 'RSPO_RETURN_SPOOLJOB'
exporting
rqident = id
desired_type = 'OTF'
tables
buffer = i_soli
exceptions
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
others = 8.
data content_bin type solix_tab.
data objhead type soli_tab.
data i_soli_tab type soli_tab.
data boolean type sx_boolean.
data length type so_obj_len.
loop at i_soli.
append i_soli to i_soli_tab[].
endloop.
call function 'SX_OBJECT_CONVERT_OTF_RAW'
exporting
format_src = 'OTF'
format_dst = 'RAW'
changing
transfer_bin = boolean
content_txt = i_soli_tab
content_bin = content_bin
objhead = objhead
len = length
exceptions
err_conv_failed = 1
others = 2.
endcase.
*describe table objbin lines tab_lines.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = '100'. "tab_lines.
* objpack-doc_type = c_asc.
objpack-doc_type = 'DOC'.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'ATTACH'. "p_attach.
"Name of Attachment
objpack-doc_size = tab_lines * 255.
append objpack..
reclist-receiver = '[email protected]'.
reclist-rec_type = 'U'.
append reclist.
objbin[] = i_soli_tab[].
call function 'SO_RAW_TO_RTF'
tables
objcont_old = objbin
objcont_new = objbin
exceptions
others = 0.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
tables
packing_list = objpack
object_header = objhead1
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
endform. "user_command
Message was edited by:
anu c -
Ticket Generation in SAP Solution Manager
Dear all Gurus,
I have installed SAP Solution Manager and now i want to generate Ticket in SAP Solution Manager 4.0.
anyone could tell me the procedure of Ticket generation in SAP Solution manager.
Regards,
JamilWhat means Ticket? What do you wish to receive?
If you want to generate key --> http://help.sap.com/saphelp_sm40/helpdata/EN/45/50b3347f166600e10000000a114a6b/frameset.htm
Regards. -
Ticket Generation in SAP Solution Manager 4.0
Dear all Gurus,
I have installed SAP Solution Manager and now i want to generate Ticket in SAP Solution Manager 4.0.
anyone could tell me the procedure of Ticket generation in SAP Solution manager.
Regards,
JamilHello Abdul,
Are you referring to Service Desk ticket generation in Solution Manager? If so, please use the following links which should assist you in that.
Setting Up an SAP® Support Desk in SAP Solution Manager
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2fd8f3ca-0e01-0010-a691-c85883a3fd29
The following link Provides Answers to Frequently Asked Questions
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a281d7ea-0c01-0010-679d-b8c7fd120295
If you are looking for Change Request Management tickets generation, then please go through the following links.
First steps to work with Change Request Management scenario
Hope the above links may helpful
Regards,
Satish -
Hi Gurus,
I am new to workflow.. I have created a workflow from one of the examples of User Decision and SendMail.
After i recive the work item .. i have three options: Approve, reject and cancel.
when i click aprrove ior reject, i am supposed to recieve mail in my sap inbox..
But i am unable to see the same/get the same..
Can neone tell me if some settings need to be in place..?
Best Regards,
Navin Fernandes.Please check the setting in SWU3...
there Maintain Runtime Environment should be maraked as Green tick mark...
If not...please do the Perform Automatic customizing...by clicking the second icon at the top....
Then test your workflow.... -
How to receive mails from External mail ids to SAP SBWP
Dear Experts!!!!!
Gud Evening and Wish you all a HAPPY DIWALI !!!!!!!!
I have requirement like suppose say I have my company mail id for eg: abc<AT>xyz<DOT>com and also have a gmail ID. My login ID in sap is say BASIS. Normally, if I configure SMTP with our exchange server then I can send mails from SAP to my company ID and also gmail ID.
Similarly, I want to know like what needs to be configured for receiving mails in to SAP if I send mails from my compnay ID or gmail ID. To be more precise...my interest is mostly from Gmail i.e., if I send a mail from my Gmail ID, I should be able to see the mail in SBWP of my BASIS login.
Please suggest how this can be acheived.....
Thanks & Regards,
SharathHi Sharath,
Generally it is not recommended to configure income mail on SAP.
as it increase heaby memory utilization as well as it make big impact on sap database. i.e it is unwanted increase the databse of sap.
Thanks
Anil -
Sending mail from one sap box to other sap box
how to send mail from one sap box to other sap box?
Hi Pavan,
To send mail Internally check this sample code.
*& Report ZMATURITYREPORT *
*& Title - Maturity report *
*& Module - FI *
REPORT ZMATURITYREPORT.
tables: bseg.
SELECTION SCREEN--------------------------------------------------- *
parameters: p_email type somlreci1-receiver default
'<b><email_removed_by_moderator></b>.
Data: p_email(25) type c value <b><hardcoding_removed_by_moderator></b>.
END OF SELECTION SCREEN ------------------------------------------- *
--DATA DECLARATION--
data: it_message type standard table of solisti1 initial size 0
with header line.
data: it_message1 type standard table of solisti1 initial size 0
with header line.
data: it_message2(10) type N.
data: it_message3 type standard table of solisti1 initial size 0
with header line.
data: it_message4 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: text(150).
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.
data: lv_date type sy-datum.
data: lv_date1 type sy-datum.
data: lv_formatdate(10) type c.
data: lv_formatdate1(10) type c.
data: var1(4) type c,
var2(2) type c,
var3(2) type c.
data: begin of int_bseg occurs 0,
BELNR LIKE BSEG-BELNR,
ZUONR LIKE BSEG-ZUONR,
GJAHR LIKE BSEG-GJAHR,
DMBTR LIKE BSEG-DMBTR,
HKONT LIKE BSEG-HKONT,
end of int_bseg.
data: begin of int_SKAT occurs 0,
TXT50 LIKE SKAT-TXT50,
SAKNR LIKE SKAT-SAKNR,
KTOPL LIKE SKAT-KTOPL,
end of int_SKAT.
data: begin of int_bkpf occurs 0,
BELNR LIKE BKPF-BELNR,
BUKRS LIKE BKPF-BUKRS,
GJAHR LIKE BKPF-GJAHR,
BUDAT LIKE BKPF-BUDAT,
end of int_BKPF.
data: 2days_out type sy-datum.
2days_out = sy-datum + 2.
data: var4(4) type c,
var5(2) type c,
var6(2) type c.
-- END OF DATA DECLARATION--
--- CONCATENATING AND ARRANGING DATE -
lv_date = 2days_out.
var1 = lv_date+(4).
var2 = lv_date+4(2).
var3 = lv_date+6(2).
concatenate var3 var2 var1 into lv_formatdate separated by '.'.
--- END OF CONCATENATING AND ARRANGING DATE -
--SELECTION FOR BSEG--
select zuonr belnr bukrs GJAHR DMBTR HKONT from bseg into
corresponding fields of table int_bseg
where bukrs = 'company name' and
ZUONR = lv_formatdate.
*--END OF SSELECTION FOR BSEG--
--SELECTION FOR BKPF--
select BUDAT BUKRS BELNR GJAHR from BKPF into
corresponding fields of table int_BKPF
where bukrs = 'company name'.
append int_BKPF.
--END OF SELECTION FOR BKPF--
--SELECTION FOR SKAT--
select SAKNR TXT50 from SKAT into
corresponding fields of table int_SKAT
where KTOPL = 'company name'.
*and SAKNR = INT_BSEG-HKONT.
APPEND INT_SKAT.
*--END OF SSELECTION FOR SKAT--
----POPULATING EMAIL SUBJECT -
perform populate_email_message_body.
perform send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Maturity after 2 days'
'XLS'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*endif.
end-of-selection.
----END OF POPULATING EMAIL SUBJECT -
*& 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'.
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.
Add the recipients email address
clear t_receivers.
refresh t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
append 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
object_header = t_object_header
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.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
endif.
endform. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
refresh it_message.
refresh it_message1.
refresh it_message3.
refresh it_message4.
LOOP FOR BSEG -
loop at int_BSEG.
read table int_bKPF WITH KEY BELNR = INT_BSEG-BELNR
GJAHR = INT_BSEG-GJAHR.
read table int_SKAT WITH KEY SAKNR = INT_BSEG-HKONT.
*-CHANGING DATE FORMAT FOR BKPF--
lv_date1 = int_bkpf-budat.
var4 = lv_date1+(4).
var5 = lv_date1+4(2).
var6 = lv_date1+6(2).
concatenate var6 var5 var4 into lv_formatdate1 separated by '.'.
*-END OF CHANGING DATE FORMAT FOR BKPF--
it_message = int_bseg-belnr.
it_message1 = lv_formatdate1.
it_message2 = int_bseg-dmbtr.
it_message3 = int_bseg-hkont.
IT_MESSAGE4 = INT_SKAT-TXT50.
SHIFT IT_MESSAGE2 LEFT DELETING LEADING '0'.
POPULATING EMAIL BODY WITH DATA -
concatenate 'Maturity After 2Days' 'for' 'G/L account-' it_message3
'--' IT_MESSAGE4 ',' 'Amount-' it_message2
into it_message separated by space.
append it_message.
append it_message1.
append it_message3.
clear it_message.
clear it_message1.
clear it_message2.
clear it_message3.
endloop.
END OF LOOP FOR BSEG -
endform. " POPULATE_EMAIL_MESSAGE_BODY
To send an mail with external attachment check this one
first create a Include report with the following coding
*& Include ZPA1_INCLFOR_MAIL *
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
Then include that report in the following report and copy the same code and paste it there
*& Report ZPA_TEMP147 *
REPORT ZPA_TEMP147 .
INCLUDE zpa1_inclfor_mail.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
These are the FM for sending external email :-
SO_DOCUMENT_SEND_API1
SAPoffice: Send new document with attachments via RFC
SO_NEW_DOCUMENT_ATT_SEND_API1
(In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
SAPoffice: Send new document with attachments via RFC
Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.
SO_NEW_DOCUMENT_SEND_API1
SAPoffice: Send new document
Check this sample report
DATA : BEGIN OF ITAB OCCURS 0,
PERNR LIKE PA0001-PERNR,
ENAME LIKE PA0001-ENAME,
END OF ITAB.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
START-OF-SELECTION.
SELECT PERNR ENAME
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM PA0001
WHERE PERNR < 50.
LOOP AT ITAB.
WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
SY-VLINE.
ENDLOOP.
Receivers
receiver_list-recextnam = '[email protected]'. "-->
EMAIL ADDRESS
RECEIVER_list-RECESC = 'E'. "<-
RECEIVER_list-SNDART = 'INT'."<-
RECEIVER_list-SNDPRI = '1'."<-
APPEND receiver_list.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
Mail subject
w_object_hd_change-objdes = 'Message subject'.
Mail body
APPEND 'Message content' TO message_content.
Attachment
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = listobject.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = listobject
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Attachment description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.
Settings for sending mail
Configuring SAP 4.6x Internet mail Gateway
SAP can be configured to send and receive emails from different sources.This section explains how to integrate SAPOffice with an external emailsystem. Your Internet email must be configured and running prior to this.Email from SAP is forwarded to the users external email system..
You can configure inbound and outbound forwarding. Outbound flow forwardsa SAP message (eg: update termination) via UNIX sendmail to the intended recepient. Inbound accepts a message from sendmail and places it in the users SAPOffice inbox. Many companies prefer to configure outbound only.
Configuring outbound forwarding
SAP configuration
1. Create your RFC destination for outbound email using transaction SM59
RFC Destination : SAP_INTERNET_GATEWAY
Connection Type : T
Description : SAP internet mail gateway
Click on 'Explicit Host' if you wanton demand gateway dameon invocation.
Program : /sapmnt/SID/exe/mlunxsnd
Target Host : Enter hostname that runs your central instance.
Click 'Test Connection' and you should seea successfull message.
2. Shared Office Settings transaction SO16-> Send -> Settings or
directly via transaction SCOT- SAPconnect Administation
Nodes - Create
Node : IMAIL
Description : SAP internet mail gateway
RFC Destination : SAP_INTERNET_GATEWAY
Tick : Internet
Address Area : *
Tick : All formats
Dev. type : Choose an approciate Printer Device
Set further addresstype : N
Maximum waiting timefor repeat send attempt procedure : Blank or decide for yourself
Tick : Node is ready for use
Setting
- DefaultDomain : <your company domain>.com
- Conversionrule : require if your communication device only support one format.
e.g. if you email system only support the format RAW (ASCII text format)
Format To Format Ranking Function module
ALI RAW 1 SX_OBJECT_CONVERT_ALI_RAW (convert APAP List)
Referto note 171698 - SAPconnect: Formats, conversion, device type
UNIX configuration
1 .. cd /sapmnt/SID/exe
2 ..csh
..mlsomadm mailgw.ini
System Name [C11] :
Client [000] :
Username : MAILADM
Password : MAILADM
Language : E
Load Balancing :
Hostname : <hostname>
System number : <instance_number>
Gateway hostname: <central_instance_hostname>
Gateway Service : <instance number>
Use SAP Router :
Trace level :
Sendmail Command [/usr/lib/sendmail -i -f<SENDER_ADDRESS>]:
Codepage [ISO-8859-1] :
Trace Level (Outbound) [0] :
Update file sapmailsid.cfg? [Y]
Testing whether your configuration is successful
1. Logon to SAP
2. Execute transaction SO01
3. Write a message and send it to <your_internet_email_address>
4. If you don't see the mail in your internet mailbox, go back and review steps 1-12
Schedule the SAP Internet Mail Gateway Jobs to start every 5 minutes
1. Create
2. Position your cursor at INT
3. Click Schedule and supply the date and time
4. Click Schedule periodically and tick Minutes and type in 5
5. Click Create and you are done
6. Click Show Scheduling to check
Problems that you might encounter :-
If you have set up a node in SCOT and it tests out well but recieve the reply.
"Cannot process message in node, parameterscannot be converted".
Make sure the RFC connection is working, and that SapConnect has been installed on the Unix Server or the Microsoft Exchange Server. Originally, I had the same error, and found that nothing had been installed on Unixor Exchange, to support SapConnect.
In SCOT (View -> System Status), your mail remains at the Intransit column.
Check you sendmail.cf files (e.g.Sun Solaris /etc/mail/sendmail.cf). Try using the sendmail command to send a test file at the Unix level. You must be able to send mail at theUnix level before you can send mail at the SAP level.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/700b405bacdd5fe10000000a155106/content.htm
http://www.tamboly.com/SAPEmailConfiguration.html
Check my previous links
Mail Send
sending mails from abap program
Mail Sending to external email id's
settings needed for sending emails
<b><points_request_removed_by_moderator></b>
Cheers,
CHAITANYA.
Maybe you are looking for
-
Release of po when two plants with two difrent procedures
Hi, i am having one po with two line items .one line item with one plant and other with an other plant.two plant have difrent releasing procedure.what r the customisations required to pick the system related releasing procedure when it pick item one
-
So every time I go from Windows XP in Boot Camp back to OS X, I find that my time has been put exactly 5 hours behind (so if it was 5:00 pm when I restarted into OS X, my Mac says that it is 12:00 pm). I was wondering if anyone know how to prevent OS
-
Installed BOE XI R3.1 Client tools now I cant open crystal reports?
After I unistalled the client tools I cant open Crystal Reports from local drives. I can from BOE, but not local or network drives. Plus all the Icons from these drives have been removed. What did I do wrong?
-
How to generate OLAP DML code or CWM2 code outside of workspace manager 10g
I am using AWM 10.2, where I am creating cubes and dimensions etc. I can export the workspace into XML, but i want more, i want to generate definition of my OLAP, i want to see OLAP DML code for creating my workspace. Anybod has an idea ? 1) How can
-
Is there any issues to use exp in a live production instance?
Hi all, I'll migrate from 9.0.1 o hp-ux to a 10gR2 on Redhat AS E4 To prepare my upgrade, I need the whole structure from our 9.0.1 instance. Can I without any danger / problem use exp to export the structure of our live instance while its actively r