Customer PO through Email-Conver to SO
Hi All,
We receive Customer PO through Email. Now the requirement is to convert the same into Sales Order.
Please suggest the process
Thanks in advance
mskgnt
HI ,
Sorry Could not reply immediately.
System is already stabilized and running fine.
New Requirement:want to automate the sales order process; is it possible? if so how to do it any suggestions
Customer sends his PO in plain email with list of materials required along with Qty or Sales guys give it in writing.
Now how to proceed?
Am already in process of developing an excel sheet with required filed list Am testing Sand box- if it is working as per requirement-then will configure the same in development server
1. Which process is suitable LSMW or BDC?
2. If Lsmw can be used, which method to be used.
3. How to handle Pricing and Excise conditions
4. what about availability check-how to handle it?
5. Should I go directly for BDC.
Thanks in advance.
Hope am clear in explaining scenario.
Regards,
Mskgnt
Similar Messages
-
Customer correspondence through email
Hi experts,
Anyone has any inputs/pointers on how to generate AR correspondence, such as balance confirmation, statement of account, etc through E-mail?
Any inputs on this regard would be highly appreciated.
Thanks,
ShivStart of by reviewing the IMG activities in Finacial global settings.
Correspondence
In the following activities, you make the settings for correspondence with your business partners and for internal purposes.
The correspondence function in the standard system is set up for mailing letters. To fax or e-mail correspondence, see the activity Develop enhancements for correspondence.
Correspondence includes:
Payment notifications
Account statements
Bill of exchange charges statements
Internal documents
Individual letters
Document extracts
Balance confirmations
First you make the fundamental specifications for the aforementioned correspondence types in the following activities. Specific definitions for each correspondence type are made at other points in the IMG.
SCOT sends them out. Once you have your email server set up at any list, report etc you create you can select send and then you go to business workplace and it can then be emailed. -
I need to contact customer service through email
I am out of the country and i couldn't find any ways to contact the AT&T customer service. I really need help with my U-verse account. If anyone knows how to contact them instead of local phone calls or step in their stores?
Many Thanks!!!You can send a private message to the escalation team at ATT Customer Care and someone will get in touch with you in two to three business days to help you get a resolution to your problems.
To check for their reply, click the little blue envelope. -
Need to Generate PDF file and send it to customer through email-ALV report
HI All,
I am having data in Internal table.
can we create PDF file with out having spool-request number.
My requirement is whenever user clicks on execute button the output is generated in PDF format automatically and then send it to customer through email.
I found few programs in SDN for generation PDF. But problem is everyone passing the spool request to the function module.
spool request will be generated whenever we click on print button.
Am I correct?.
Is there any other way to create spool request automatically. If so we can pass the this spool number to the function module.
Regards,
vinod.hi
For sending a mail, this code will help you.
Pls reward if help.
FORM send_mail_2 USING msgid msgno msgv1.
mailuser oder Gruppe like sy-uname default 'Ruckerk'.
DATA: express_hold_time LIKE sovaltime.
DATA: text LIKE sotxtinfo.
DATA: receiver LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
MESSAGE ZF100 (FTP an UDB fehlgeschlagen)
text-msgid = msgid.
text-msgno = msgno.
text-msgv1 = msgv1.
text-msgv2 = ' '.
text-msgv3 = ' '.
text-msgv4 = ' '.
express_hold_time
express_hold_time-days = 01.
express_hold_time-h_min_sec = 240000.
receiver
receiver-receiver = mreceivr.
Gruppe von Empfängern
receiver-rec_type = 'C'.
und Expressmeldung ausgeben
receiver-express = 'X'.
APPEND receiver.
CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
EXPORTING
msgid = text-msgid
msgno = text-msgno
msgv1 = text-msgv1
msgv2 = text-msgv2
msgv3 = text-msgv3
TABLES
receivers = receiver.
IF sy-subrc <> 0.
WRITE:/ 'hat nicht geklappt', 'SY-SUBRC =', sy-subrc.
ENDIF.
PERFORM print_error_report.
Fehlermeldung zum Abbrechen des Report's ausgeben.
MESSAGE e398 WITH 'Jobabbruch' msgv1.
ENDFORM. " SEND_MAIL_2
Another Program:
*& Report ZSENDEMAIL *
*& Example of sending external email via SAPCONNECT *
REPORT zsendemail .
PARAMETERS: psubject(40) type c default 'Hello',
p_email(40) type c default '[email protected]' .
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.
*START-OF-SELECTION.
START-OF-SELECTION.
Perform populate_message_table.
*Send email message, although is not sent from SAP until mail send
*program has been executed(rsconn01)
PERFORM send_email_message.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
perform initiate_mail_execute_program.
*& Form POPULATE_MESSAGE_TABLE
Adds text to email text table
form populate_message_table.
Append 'Email line 1' to it_message.
Append 'Email line 2' to it_message.
Append 'Email line 3' to it_message.
Append 'Email line 4' to it_message.
endform. " POPULATE_MESSAGE_TABLE
*& Form SEND_EMAIL_MESSAGE
Send email message
form send_email_message.
Fill the document data.
gd_doc_data-doc_size = 1.
Populate the subject/generic message attributes
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
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.
Add the recipients email address
clear it_receivers.
refresh it_receivers.
it_receivers-receiver = p_email.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-notif_del = 'X'.
it_receivers-notif_ndel = 'X'.
append it_receivers.
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'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
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.
endform. " SEND_EMAIL_MESSAGE
*& 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 -
Customer open items send Through Email
Hi Friends,
my client wants to send the customer open items through email.
as of now they are sending with print out only. now they asking to send the open items in FBL5n vai Emails.in FBL5n there is option called email but it is desabled mode.
how this possible in SAP
please give me the inputs points will be awardedHi,
I think this calls for an ABAP program.
Aravind -
How to send zip file as attachment through email
Hi All,
I am having a requirement that I need to download the internal table data into .txt file and I need to zip the text file. And this zip files needs to send to the customer through email.
I am able download the data into .txt and able to zip the file. But I am not able send the .zip file through email.
I know that we can send .xls, .txt, .csv and also .ppt, .doc file types we can send as an attachement through abap program. But I don't know about .zip files. Is there any possibilty to send .zip file as an attachment thorugh email.
Can any one help me how to send a .zip file thorugh email as an attachment.
Regards,
vinodhi Vinod,
Can you please tell me how you have zipped the file.
I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
What I need on the whole is just to reduce the size of the file.
form ZIP_FILE .
DATA: lt_data TYPE TABLE OF x255,
lt_textdata TYPE TABLE OF x255.
DATA: ls_data LIKE LINE OF lt_data.
DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
*DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
DATA: lv_file_length TYPE i.
DATA: lv_content TYPE xstring.
DATA: lo_zip TYPE REF TO cl_abap_zip.
CREATE OBJECT lo_zip.
Read the data as a string
clear lv_content .
OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
READ DATASET lv_dsn1 INTO lv_content .
CLOSE DATASET lv_dsn1.
lo_zip->add( name = 'sample.TXT' content = lv_content ).
lv_content = lo_zip->save( ).
*clear lv_content .
Conver the xstring content to binary
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_content
IMPORTING
output_length = lv_file_length
TABLES
binary_tab = lt_data.
OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT lt_textdata INTO ls_data.
TRANSFER ls_data TO lv_dsn3.
ENDLOOP.
CLOSE DATASET lv_dsn3.
IF sy-subrc EQ '0'.
MESSAGE s999(zfi_ap_gl) WITH text-t10.
ENDIF.
Can you please help.
Thanks Aravind -
I've forgotten my Apple ID and my security question. I've tried to receive the Apple ID through email but I never receive the email.
The Best Alternatives for Security Questions and Rescue Mail
a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
b. Call Apple Support in your country: Customer Service: Contact Apple support.
c. Rescue email address and how to reset Apple ID security questions. -
Hi,
I want to send dunning letter ( Tcode F150) through email.As per SAP note 328124, I copied OPEN_FI_PERFORM_00001040_P into z FM. Also add new entry for 00001040 event in FIBF tcode.But still when Iam running the Tcode F150, it shows print preview option.Email is not sent to the user. When I debug the program, it stops in std. FM ( i.e OPEN_FI_PERFORM_00001040_P ) not in Z FM that I have created. Please guide on this issue.
Thanks & Regards,
Anagha DeshmukhDid you activate your product? FIBF -> Settings -> Products -> Customer (click the checkbox)
-
Vendor payment advice through email
Hi gurus
i want to send vendor payment advice through email , i am using the form F110_IN_AVIS for payment advice
and from the report RFFOAT_P i want to send the email , is any configuration needed to send the email , or just i have to give selection detials properly and it will work ,
regards
m.aHi Afzal,
For sending Payment advice by E-Mail, "You need to copy SAMPLE_PROCESS_00002040 and adjust it to write code as per your requirement. This BTE runs for each payment advice note to be sent and in the module, it is mentioned 1=print, 2 = Fax and I=mail, so you can set your priority, that if an E-Mail address is maintained in the vendor master, send mail or if no E-mail address is maintained send Fax, and if both are not possible shoot a Print.
From Configuration side, you need to maintain the Z copy of SAMPLE_PROCESS_00002040 in FIBF transaction under the Process module of a customer without country or application indicator.
SAP Note 836169 - Consulting: Payment advice notes by email or fax.
Regards,
SAPFICO -
How to send invoice through email with output type RD00?
What are the configuration settings to send invoices through email with output type RD00?
Hi,
Please go through the following links:
[E-mail|Email Configuration Settings]
[e-mail|Re: EMAIL BILLING DOCUMENT TO CUSTOMER THROUGH SEND MAIL OPTION IN VF02]
After triggering the output,goto T.Code SOST and process it.
So that e-mail will be triggered immediately.
You can use External send/EDI/simple mail for this.
Regards,
Krishna. -
Sending Attachemnt along with PO to Vendor through Email
Hi
Currently we are able to send only the PO in PDF format to the Vendor through Email, i also want to send the attachments that the PO has to the Vendor. Please if you can tell me the settings.
Thanks
AnkitThis is not possible without development .Refer notes 786847,191470
Details for the print program:
In the customer namespace, a central class is first created that takes care of actually shipping the e-mail with texts and attachments.
Furthermore, application-specific classes are created in the customer namespace (if required). At present, these are available for purchasing documents (purchase order, request for quotation, and so on) and sales documents (sales order or order acknowledgment, quotations, and so on). Further applications can be considered after consultation.
You can continue to use the print program that you have used up until now. Only minor adjustments are required in order to use the corresponding class in the case of external sending (Medium 5).
A new dummy message type is created in Customizing. You can use transaction MN04 to create an additional condition record for this message type for the relevant vendor. However, medium 7 is used here, which allows you to maintain communication settings. The communication settings include an individual e-mail text and an individual recipient list (type INT) for each condition record.
The dummy message type is not used in the purchase order, rather it is used only as a workaround to enable you to maintain recipients and texts in the standard system with ease.
A new Z table is created that contains each application (KAPPL) and purchasing organization parameter. In this way, for example, the text prefixes can be filled for the attachments in the e-mail or you can specify which additional attachments are to be copied to the e-mail.
Processing the message:
If the message type of the purchasing document is processed, the recipients and the text are read from the dummy message type and are added to the e-mail. Placeholders (for example, &EKKO-EBELN&) may be triggered.
If NO condition record is found for the dummy message type, the system uses the standard text and the recipient address from the master record. In this way, you automatically continue to have the standard behavior (with an additional e-mail text) for partners that you do not want to receive special treatment.
The purchasing document is attached as a PDF file.
Further attachments are added as described in the settings (see above). There is a distinction made between attachments from the generic object services (GOS) and attachments from the Document Management System. The Document Management System attachments can be assigned, for example, to the object EKPO (purchase order item) or MARA (material master).
If no errors have occurred up to now, the completed e-mail is sent and delivered to the sending system. Otherwise, errors can be transferred to the message collector as normal and can be checked there. -
HI,
I have config the Customer statement by means of correnpondence & it working fine.
But I need to send it through email maintained in customer master when i run f.27 mails should be send automatically.
For doing this do we need to do any config required or do we need to direaclty write it in the program code it self.
Regards
RaviI have the same requirement to email from f.27 customer statement automatically
what logic did you put to solved, can you explain me please
There are two problems which is controlling F.27. IT have created Z PROGRAM to control the printing and email the customer
ZFIO_ACCOUNT_STATEMENT_EMAIL -> program
ZWAG_COMMON_ROUTINE - > Include
ZWAG_SAPSCRIPT_ROUTINES_EM -> Include
ZEMAIL_SEND -> Include added for email .
The program is running fine but I have to type email id and spool number which I don't want. The program should search customer automatically based on email address from XD02 ( Customer ) .
*& Include ZEMAIL_SEND *
*ZEMAIL_SEND.
*& Form setup_output_parameters
* text
*& Include
* Purpose:
* Provide generic subroutines for any ABAP programs with intention of
* sending email (SAPOffice or Internet) with attachments
* This report provides an example for sending an Spool
* request as PDF via BCS
parameters:
mailto type ad_smtpadr default '[email protected]' obligatory,
rqident type tsp01-rqident obligatory.
DATA:v_adrnr LIKE kna1-adrnr.
" Mail related declarations
"Variables
DATA :
G_SENT_TO_ALL TYPE SONV-FLAG,
G_TAB_LINES TYPE I.
"Types
TYPES:
T_DOCUMENT_DATA TYPE SODOCCHGI1,
T_PACKING_LIST TYPE SOPCKLSTI1,
T_ATTACHMENT TYPE SOLISTI1,
T_BODY_MSG TYPE SOLISTI1,
T_RECEIVERS TYPE SOMLRECI1,
T_PDF TYPE TLINE.
"Workareas
DATA :
W_DOCUMENT_DATA TYPE T_DOCUMENT_DATA,
W_PACKING_LIST TYPE T_PACKING_LIST,
W_ATTACHMENT TYPE T_ATTACHMENT,
W_BODY_MSG TYPE T_BODY_MSG,
W_RECEIVERS TYPE T_RECEIVERS,
W_PDF TYPE T_PDF.
"Internal Tables
DATA :
I_DOCUMENT_DATA TYPE STANDARD TABLE OF T_DOCUMENT_DATA,
I_PACKING_LIST TYPE STANDARD TABLE OF T_PACKING_LIST,
I_ATTACHMENT TYPE STANDARD TABLE OF T_ATTACHMENT,
I_BODY_MSG TYPE STANDARD TABLE OF T_BODY_MSG,
I_RECEIVERS TYPE STANDARD TABLE OF T_RECEIVERS,
I_PDF TYPE STANDARD TABLE OF T_PDF.
data send_request type ref to cl_bcs.
data document type ref to cl_document_bcs.
data recipient type ref to if_recipient_bcs.
data bcs_exception type ref to cx_bcs.
data sent_to_all type os_boolean.
data pdf_size type so_obj_len.
data pdf_content type solix_tab.
data pdf_xstring type xstring.
DATA: TAB_LINES LIKE SY-TABIX.
*Variables for EMAIL functionality
DATA: MAILDATA LIKE SODOCCHGI1.
DATA: MAILPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: MAILHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: MAILBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: MAILREC LIKE SOMLREC90 OCCURS 0 WITH HEADER LINE.
DATA: SOLISTI1 LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
start-of-selection.
perform create_pdf.
perform send.
* perform get_otf_code. " piroz
*& Form send
form send.
try.
* -------- create persistent send request ------------------------
send_request = cl_bcs=>create_persistent( ).
* -------- create and set document -------------------------------
pdf_content = cl_bcs_convert=>xstring_to_solix( pdf_xstring ).
document = cl_document_bcs=>create_document(
i_type = 'PDF'
i_hex = pdf_content
i_length = pdf_size
i_subject = 'Accounting statement' ). "#EC NOTEXT
* add document object to send request
send_request->set_document( document ).
* --------- add recipient (e-mail address) -----------------------
* create recipient object
recipient = cl_cam_address_bcs=>create_internet_address( mailto ).
* add recipient object to send request
send_request->add_recipient( recipient ).
* ---------- send document ---------------------------------------
sent_to_all = send_request->send( i_with_error_screen = 'X' ).
commit work.
if sent_to_all is initial.
message i500(sbcoms) with mailto.
else.
message s022(so).
endif.
* ------------ exception handling ----------------------------------
* replace this rudimentary exception handling with your own one !!!
catch cx_bcs into bcs_exception.
message i865(so) with bcs_exception->error_type.
endtry.
endform. "send
*& Form create_pdf
* Create PDF Content
* 1) get attributes of spool request
* 2) convert spool request to PDF dependent on document type
form create_pdf.
data rq type tsp01.
data bin_size type i.
data dummy type table of rspoattr.
* ------------ get attributes of spool request ---------------------
call function 'RSPO_GET_ATTRIBUTES_SPOOLJOB'
exporting
rqident = rqident
importing
rq = rq
tables
attributes = dummy
exceptions
no_such_job = 1
others = 2.
if sy-subrc <> 0.
message e126(po) with rqident.
endif.
* TYPE-POOLS szadr.
* DATA: l_addr1_complete TYPE szadr_addr1_complete,
* l_adsmtp_line TYPE szadr_adsmtp_line,
* ld_intad type knb1-intad.
** default: print payment advice
* c_finaa-nacha = '1'.
** Read mail address of vendor from knb1.customer no is available in kna1 payment data structure
* clear ld_intad.
* IF NOT i_knb1-kunnr IS INITIAL and
* not i_knb1-zbukrs is initial.
* SELECT SINGLE intad
* INTO ld_intad
* FROM knb1
* WHERE kunnr = i_knb1-kunnr
* AND bukrs = i_knb1-zbukrs.
* IF NOT ld_intad IS INITIAL.
* c_finaa-nacha = 'I'.
* c_finaa-intad = ld_intad.
* ENDIF.
* ENDIF.
** check that address number is available
* IF NOT i_kna1-zadnr IS INITIAL.
** read complete address of vendor/customer
* CALL FUNCTION 'ADDR_GET_COMPLETE'
* EXPORTING
* addrnumber = i_kna1-zadnr
* IMPORTING
* addr1_complete = l_addr1_complete
* EXCEPTIONS
* OTHERS = 4.
* IF sy-subrc EQ 0.
* READ TABLE l_addr1_complete-id_intad "Insert ECDK900445
* INTO l_adsmtp_line "Insert ECDK900445
* WITH KEY adsmtp-flgdefault = 'X'. "Insert ECDK900445
* IF sy-subrc EQ 0
* AND NOT l_adsmtp_line-id_intad IS INITIAL.
** choose message type 'I'nternet and fill email address
* c_finaa-nacha = 'I'.
* c_finaa-intad = ld_intad.
* ENDIF.
* ENDIF.
* ENDIF.
*ENDFUNCTION.
* select SINGLE adrnr from kna1 from adr6
* into table internal table where
* kna1-kunnr eq = it_kna1-kunnr.
** select email ids from adr6
* select addrnumber smtp_addr from adr6 INTO table it_adr6
* where addrnumber = v_adrnr.
* LOOP AT it_adr6 INTO wa_adr6.
* i_reclist-receiver = wa_adr6-smtp_addr.
* i_reclist-rec_type = 'U'.
* i_reclist-com_type = 'INT'.
* i_reclist-notif_del = 'X'.
* i_reclist-notif_ndel = 'X'.
* i_reclist-notif_read = 'X'.
* i_reclist-express = 'X'.
* APPEND i_reclist.
* CLEAR: i_reclist, wa_adr6-smtp_addr.
* ENDLOOP.
*in function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' field receivers = i_reclist.
*CALL FUNCTION 'ZCUSTOMER_MAIL_00002310' "
* EXPORTING
* i_bkorm = bkorm
* i_koart = bkorm-koart
* i_kna1 = kna1
* i_knb1 = knb1
** i_lfa1 = lfa1
** i_lfb1 = lfb1
* TABLES
* t_fimsg = fimsg
* CHANGING
* c_finaa = finaa
* c_itcpo = itcpo
** c_archive_index = SPACE " toa_dara
** c_archive_params = SPACE " arc_params . " ZCUSTOMER_MAIL_00002310
*Function module to send mail to Recipients
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOCUMENT_DATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL = G_SENT_TO_ALL
TABLES
PACKING_LIST = I_PACKING_LIST
CONTENTS_BIN = I_ATTACHMENT
CONTENTS_TXT = I_BODY_MSG
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 I303(ME) WITH 'Mail has been Successfully Sent.'.
ELSE.
WAIT UP TO 2 SECONDS.
"This program starts the SAPconnect send process.
SUBMIT RSCONN01 WITH MODE = 'INT'
WITH OUTPUT = 'X'
AND RETURN.
ENDIF.
* --- convert spool request into PDF, dependent on document type ---
if rq-rqdoctype = 'OTF' or rq-rqdoctype = 'SMART'.
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
exporting
src_spoolid = rqident
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
importing
pdf_bytecount = bin_size
bin_file = pdf_xstring
exceptions
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message e712(po) with sy-subrc 'CONVERT_OTFSPOOLJOB_2_PDF'.
endif.
elseif rq-rqdoctype = 'LIST'.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = rqident
no_dialog = 'X'
pdf_destination = 'X'
no_background = 'X'
importing
pdf_bytecount = bin_size
bin_file = pdf_xstring
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
if sy-subrc <> 0.
message e712(po) with sy-subrc 'CONVERT_ABAPSPOOLJOB_2_PDF'.
endif.
else.
message e789(po) with rq-rqdoctype.
endif.
pdf_size = bin_size.
endform. "create_pdf
* FORM OUTPUT_OPENFI *
FORM OUTPUT_OPENFI.
DATA: T_FIMSG LIKE FIMSG OCCURS 10 WITH HEADER LINE.
CALL FUNCTION 'OPEN_FI_PERFORM_00002310_P'
EXPORTING
I_BKORM = BKORM
I_KOART = C_KOART
I_KNA1 = KNA1
I_KNB1 = KNB1
* I_LFA1 = LFA1
* I_LFB1 = LFB1
TABLES
T_FIMSG = T_FIMSG
CHANGING
C_FINAA = ST_FINAA
C_ITCPO = ST_ITCPO.
* C_ARCHIVE_INDEX = H_ARCHIVE_INDEX
* C_ARCHIVE_PARAMS = H_ARCHIVE_PARAMS.
LOOP AT T_FIMSG.
CALL FUNCTION 'FI_MESSAGE_COLLECT'
EXPORTING
I_FIMSG = T_FIMSG
I_XAPPN = 'X'
EXCEPTIONS
MSGID_MISSING = 1
MSGNO_MISSING = 2
MSGTY_MISSING = 3
OTHERS = 4.
ENDLOOP.
ENDFORM.
Form GET_OTF_CODE.
DATA: BEGIN OF OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF OTF.
DATA: ITCPO LIKE ITCPO.
DATA: ITCPP LIKE ITCPP.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
* Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'Z140_ACC_STAT_01'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO
DIALOG = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
WINDOW = 'MAIN'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
* Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
ERROR_MESSAGE = 01
OTHERS = 02.
MOVE-CORRESPONDING ITCPO TO ITCPP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = ITCPP
TABLES
OTFDATA = OTF
EXCEPTIONS
OTHERS = 1.
* Move OTF code to structure SOLI form email
CLEAR SOLISTI1.
REFRESH SOLISTI1.
LOOP AT OTF.
SOLISTI1-LINE = OTF.
APPEND SOLISTI1.
ENDLOOP.
ENDFORM. "GET_OTF_CODE
SAP recommends to use BTE 2013 and added the coding for email.
CREATED: ZCUSTOMER_MAIL_00002310
TABLES: KNA1, "Kunden A-Segment
KNB1, "Kunden B-Segment
LFA1, "Lieferanten A-Segment
LFB1, "Lieferanten B-Segment
BKORM, "Korrespondenzanforderungen
FINAA. "Daten zum Sendemedium
DATA: SAVE_KOART LIKE BKORM-KOART, "Hilfsfeld Kontoart
SAVE_LAND1 LIKE KNA1-LAND1, "Hilfsfeld Faxanschluß
SAVE_TELFX LIKE KNA1-TELFX, "Hilfsfeld Faxanschluß
SAVE_ZSABE LIKE KNB1-ZSABE, "Hilfsfeld Faxanschluß
SAVE_INTAD LIKE KNB1-INTAD. "Hilfsfeld Internet
KNA1 = I_KNA1.
LFA1 = I_LFA1.
KNB1 = I_KNB1.
LFB1 = I_LFB1.
BKORM = I_BKORM.
SAVE_KOART = I_KOART.
CLEAR: SAVE_LAND1,
SAVE_TELFX,
SAVE_ZSABE.
IF SAVE_KOART = 'D'.
SAVE_LAND1 = KNA1-LAND1.
SAVE_TELFX = KNB1-TLFXS.
SAVE_ZSABE = KNB1-ZSABE.
SAVE_INTAD = KNB1-INTAD.
ELSE.
SAVE_LAND1 = LFA1-LAND1.
SAVE_TELFX = LFB1-TLFXS.
SAVE_ZSABE = LFB1-ZSABE.
SAVE_INTAD = LFB1-INTAD.
ENDIF.
IF SAVE_INTAD NE SPACE.
FINAA-NACHA = 'I'. "Ausgabe über Internet
FINAA-INTAD = SAVE_INTAD.
FINAA-TEXTF = 'PDF'.
ELSEIF SAVE_TELFX NE SPACE.
FINAA-NACHA = '2'. "Ausgabe auf Fax
FINAA-TDSCHEDULE = 'IMM'.
FINAA-TDTELELAND = SAVE_LAND1.
FINAA-TDTELENUM = SAVE_TELFX.
FINAA-TDFAXUSER = SPACE.
FINAA-NAMEP = SAVE_ZSABE.
FINAA-FORMC = 'FI_FAX_COVER_A4'.
FINAA-FORNR = SPACE.
ELSE.
FINAA-NACHA = '1'. "Drucken
ENDIF.
* Daten zum Sendemedium merken für Aufrufer
C_FINAA = FINAA.
ENDFUNCTION.
______________________________________ OR _________________________________________
To get the email id from the customer file.
TYPE-POOLS szadr.
DATA: l_addr1_complete TYPE szadr_addr1_complete,
l_adsmtp_line TYPE szadr_adsmtp_line,
ld_smtp_addr type adr6-smtp_addr.
* default: print payment advice
c_finaa-nacha = '1'.
* Read mail address of customer from knb1-kunnr no is available
clear ld_smtp_addr
IF NOT i_kna1-kunnr IS INITIAL and
not i_adr6-smtp_addr is initial.
SELECT SINGLE smtp_addr
INTO ld_smtp_addr
FROM kna1
where kna1-adrnr = adr6-addrnumber.
IF NOT ld_smtp_addr IS INITIAL.
c_finaa-nacha = 'I'.
c_finaa-intad = ld_smtp_addr.
ENDIF.
ENDIF.
* IF sy-subrc = 0.
** choose message type 'I'nternet and fill email address
* c_finaa-nacha = 'I'.
* ENDIF.
* ENDIF.
* check that address number is available
IF NOT i_kna1-zadnr IS INITIAL.
* read complete address of vendor/customer
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
addrnumber = i_kna1-zadnrada
IMPORTING
addr1_complete = l_addr1_complete
EXCEPTIONS
OTHERS = 4.
IF sy-subrc EQ 0.
* check that internet address is available
* READ TABLE l_addr1_complete-adsmtp_tab INTO l_adsmtp_line INDEX 1. "Delete ECDK900445
READ TABLE l_addr1_complete-adsmtp_tab "Insert ECDK900445
INTO l_adsmtp_line "Insert ECDK900445
WITH KEY adsmtp-flgdefault = 'X'. "Insert ECDK900445
IF sy-subrc EQ 0
AND NOT l_adsmtp_line-adsmtp-smtp_addr IS INITIAL.
* choose message type 'I'nternet and fill email address
c_finaa-nacha = 'I'.
c_finaa-intad = ld_smtp_addr.
ENDIF.
ENDIF.
ENDIF.
ENDFUNCTION.
( No output is going to the customer email address for the below steps )
1. Generate spool requst ..
2. Close_FORM ...will get the spool request
3. RSPO_RETURN_SPOOLJOB will convet spool to OTF data
4. Convet OTF data into PDF and send to mail.
Try all sorts of programming testing with the coding but no result in SOST ( to send email it is asking to enter the email id , when the email is enter going the customer which is not correct as there are bunches of account with different email address )
Regards
Piroz
Message was edited by: Piroz Eslam -
Send a printworkbench form through Email??
Hi Experts,
We have the requirement to send a bill to a customer external mailId, Which is made in Printworkbench application through EMAIL? Is anybody have a idea how to do this thing?
Moderator note - Thread locked due to rules violation. Follow Adding mail text in email - IS-U invoice through Email
Edited by: William Eastman on Jan 5, 2010 8:44 PMYes you can, you should modify the print variant, which should be asociated to the repective exp. control "MAIL".
Best regards. -
Sending sapscript form through Email
Hi,
I modifyed a std sapscript form for customer statement and that output i want to send to the customer through Email.So now i need a help for further what are the steps need to be do for sending that form by email.Pls be in details so that for me easy to solve this.
Thanks,
Rajendra.Hi ,
I am using the below code to send the form output by mail but it is not working for me.pls correct my code where i want to change so that i can solve my issues.
DATA: itcpo LIKE itcpo,
tab_lines LIKE sy-tabix.
Variables for EMAIL functionality
DATA: maildata LIKE sodocchgi1.
DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
parameter: p_email1 like somlreci1-receiver .
PERFORM send_form_via_email.
FORM SEND_FORM_VIA_EMAIL *
FORM send_form_via_email.
CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
Creation of the document to be sent File Name
maildata-obj_name = 'TEST'.
Mail Subject
maildata-obj_descr = 'Subject'.
Mail Contents
mailtxt-line = 'Here is your file'.
APPEND mailtxt.
Prepare Packing List
PERFORM prepare_packing_list.
Set recipient - email address here!!!
mailrec-receiver = p_email1.
mailrec-rec_type = 'U'.
APPEND mailrec.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = maildata
put_in_outbox = ' '
TABLES
packing_list = mailpack
object_header = mailhead
contents_bin = mailbin
contents_txt = mailtxt
receivers = mailrec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
ENDFORM.
Form PREPARE_PACKING_LIST
FORM prepare_packing_list.
CLEAR: mailpack, mailbin, mailhead.
REFRESH: mailpack, mailbin, mailhead.
DESCRIBE TABLE mailtxt LINES tab_lines.
READ TABLE mailtxt INDEX tab_lines.
maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
Creation of the entry for the compressed document
CLEAR mailpack-transf_bin.
mailpack-head_start = 1.
mailpack-head_num = 0.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'RAW'.
APPEND mailpack.
Creation of the document attachment
This form gets the OTF code from the SAPscript form.
If you already have your OTF code, I believe that you may
be able to skip this form. just do the following code, looping thru
your SOLISTI1 and updating MAILBIN.
PERFORM get_otf_code.
LOOP AT solisti1.
MOVE-CORRESPONDING solisti1 TO mailbin.
APPEND mailbin.
ENDLOOP.
DESCRIBE TABLE mailbin LINES tab_lines.
mailhead = 'TEST.OTF'.
APPEND mailhead.
Creation of the entry for the compressed attachment
mailpack-transf_bin = 'X'.
mailpack-head_start = 1.
mailpack-head_num = 1.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'OTF'.
mailpack-obj_name = 'TEST'.
mailpack-obj_descr = 'Subject'.
mailpack-doc_size = tab_lines * 255.
APPEND mailpack.
ENDFORM.
Form GET_OTF_CODE
FORM get_otf_code.
DATA: BEGIN OF otf OCCURS 0.
INCLUDE STRUCTURE itcoo .
DATA: END OF otf.
DATA: itcpo LIKE itcpo.
DATA: itcpp LIKE itcpp.
CLEAR itcpo.
itcpo-tdgetotf = 'X'.
Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'Z2006FICSE'
language = sy-langu
options = itcpo
dialog = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
error_message = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'
EXCEPTIONS
error_message = 01
OTHERS = 02.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
error_message = 01
OTHERS = 02.
MOVE-CORRESPONDING itcpo TO itcpp.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
result = itcpp
TABLES
otfdata = otf
EXCEPTIONS
OTHERS = 1.
Move OTF code to structure SOLI form email
CLEAR solisti1. REFRESH solisti1.
LOOP AT otf.
solisti1-line = otf.
APPEND solisti1.
ENDLOOP.
ENDFORM.
Hope i can expect the feedback soon from you guys.
Thanks,
Rajendra. -
Hello SDNs,
I have a requirement to send the billing output directly to the customer(BP) who is receiving billing document but it should be specific customers. Can you please explain where do we maintain for automatic billing output through customer email.
I have maintained transmission medium as email at billing output type level and maintained output codition record level.
Outout is not triggering as i have maintained above settings. Can you please guide the steps for getting output through email.
Regards,
KHi,
If you want to sent email to the BP the invoice copy then create your output type in SPRO>SD>Basic Functions>O/P control>O/P determination>O/P determination using condition technique>maintain Output Determination for billing documents.
Select RD00 and create an output type of your own. In the Default values tab maintain transmission medium "5" and partner function "BP" and Communication Strategy "CS01". Now at left side "Dialog structure " Maintain the values for each one
In the processing routines maintain medium "5" .Your program ,form routine and form.Also type "2 PDF".
In partner functions Maintain medium "5" and partner function "BP" these are the configurations when you maintain the new output type.
After creating the new output type maintain the same in output determination procedure. with Step/Output type (created by you).
Maintain the email address in customer master of BP.
Also check in SCOT to ensure the email is triggered
Maybe you are looking for
-
Dear all, I am about to compile my matlab code into a stand-alone program, which works fine. However, as soon as I start the data acquisition the program fails to initialize the DAQ-board. I'm using the NI-9201 USB-ADC in combination with the NIDAQmx
-
Running FlexUnit tests from command line
Sorry if that has been posted before: I searched best I could and nothing came up. I am interested in building and running my unit tests from the command line so we can add it to a nightly build process. I am *very* new to all this: basically I picke
-
I received my DX2 in November of 2011, It worked fine until January of 2013. With the occasional lock up texting. However since January it will not place a call regularly. It gets as far as the green phone to complete call and will not go further. Tr
-
Need a bapi for change component in CO02
hi! i need to change mass old material in production order(CO02) . so i need a bapi or FM to do it but i can't find it! thank you very much!
-
AnyConnect users cannot access internet
When AnyConnect users try to connect to the internet it will not let them out. I've included a copy of my config below. Also, I have a 5505 with base license but the AnyConnect for mobile is disabled. I got what seems to be a demo license from Cis