How to define output types email or external send in the report program
Hi all,
now we are using a zprogram for output type printer and standard program RVADOR01 for output type external send. Now i want to modify my zprogram itself to support external send email as well as printer also. What modifications should I have to make in my zprogram. My form is a script.
Thank you,
Mallik
hi all,
i made the following changes in my code and it worked well.
thank you for all who tried to share my pain.
thanks one and all.
hope this code will help anybode.
thanks & regards
FORM OPEN_FORM_EMAIL.
TABLES: TNAPR, "Programs & Forms
ITCPO, "Communicationarea for Spool
ARC_PARAMS, "Archive parameters
TOA_DARA, "Archive parameters
ADDR_KEY. "Adressnumber for ADDRESS
TYPE-POOLS SZADR.
DATA: LVF_DEVICE LIKE ITCPP-TDDEVICE,
LVF_DIALOG(1) TYPE C VALUE ' ',
LVS_RECIPIENT LIKE SWOTOBJID,
LVS_SENDER LIKE SWOTOBJID,
LVS_SNAST TYPE SNAST,
LVF_PROGRAM LIKE SY-REPID,
LVS_COMM_TYPE TYPE AD_COMM,
LVS_COMM_VALUES TYPE SZADR_COMM_VALUES,
LVS_TITLE LIKE SNAST-TDCOVTITLE.
reset return code
RETCODE = 0.
if there is a communication strategy used ...
IF NOT NAST-TCODE IS INITIAL AND NAST-NACHA EQ '5'.
... use stratagy to get communication type
CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
EXPORTING
STRATEGY = NAST-TCODE
ADDRESS_TYPE =
ADDRESS_NUMBER = KNA1-ADRNR
PERSON_NUMBER = VBDKA-ADRNP
PERSON_NUMBER = ADDR_KEY-PERSNUMBER
IMPORTING
COMM_TYPE = LVS_COMM_TYPE
COMM_VALUES = LVS_COMM_VALUES
TABLES
STRATEGY_TABLE =
EXCEPTIONS
ADDRESS_NOT_EXIST = 1
PERSON_NOT_EXIST = 2
NO_COMM_TYPE_FOUND = 3
INTERNAL_ERROR = 4
PARAMETER_ERROR = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
RETCODE = SY-SUBRC.
SYST-MSGTY = 'E'.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDIF.
LVS_COMM_TYPE = 'INT'.
CLEAR LVS_COMM_VALUES-ADSMTP-SMTP_ADDR.
CLEAR LVS_SNAST.
LVS_COMM_VALUES-ADSMTP-SMTP_ADDR = V_CUST_EMAIL.
convert communication data
MOVE-CORRESPONDING NAST TO LVS_SNAST.
LVS_SNAST-ANZAL = 1.
LVS_TITLE = 'Mail Header Title'.
MOVE LVS_TITLE TO LVS_SNAST-TDCOVTITLE.
MOVE SY-REPID TO LVF_PROGRAM.
CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
EXPORTING
PI_COMM_TYPE = 'INT'
PI_COMM_VALUES = LVS_COMM_VALUES
PI_SCREEN = XSCREEN
PI_NEWID =
PI_COUNTRY = ADRC-COUNTRY
PI_REPID = SY-REPID
PI_SNAST = LVS_SNAST
PI_MAIL_SENDER = SY-UNAME
IMPORTING
PE_ITCPO = ITCPO_LS
PE_DEVICE = LVF_DEVICE
PE_MAIL_RECIPIENT = LVS_RECIPIENT
PE_MAIL_SENDER = LVS_SENDER
EXCEPTIONS
COMM_TYPE_NOT_SUPPORTED = 1
RECIPIENT_CREATION_FAILED = 2
SENDER_CREATION_FAILED = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
RETCODE = SY-SUBRC.
SYST-MSGTY = 'E'.
PERFORM PROTOCOL_UPDATE.
ENDIF.
CHECK RETCODE EQ 0.
fill structure itcpo
ITCPO = ITCPO_LS.
open form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMS = ARC_PARAMS
DEVICE = 'MAIL'
DIALOG = 'X'
FORM = 'ZSDLS003'
LANGUAGE = SY-LANGU
OPTIONS = ITCPO_LS
MAIL_SENDER = LVS_SENDER
MAIL_RECIPIENT = LVS_RECIPIENT
MAIL_APPL_OBJECT = ' '
RAW_DATA_INTERFACE = '*'
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC NE 0.
CASE SY-SUBRC.
WHEN 7.
RETCODE = SY-SUBRC.
SYST-MSGID = 'VN'.
SYST-MSGNO = '096'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = NAST-KSCHL.
SYST-MSGV2 = NAST-KAPPL.
PERFORM PROTOCOL_UPDATE.
WHEN OTHERS.
RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDCASE.
ENDIF.
SET COUNTRY ADRC-COUNTRY.
ENDFORM.
Similar Messages
-
SD Billing Document Output to email via external send
Hi all,
I hope you can helpt with following issue as I need to send invoices via email using the option 'external send' in the message determination. The settings are as follows:
Message Determination VV32/VV33
Output Type ZI04
Billing Type ZIV
Condition Record Sales Org / Billing Type / Payer
Medium 5 - external send
Dispatch Time 1, 3 or 4
Cover Page Text: any text followed by invoice no. &VBRK-VBELN&
Expectation
With this setting we expect the billing document number to be included in the subject line of the email sent out.
This works fine as long as you maintain the message in the billing document -> header -> output manually.
Problem
If you create a new invoice and the message is created automatically based on above Message Determination settings and you issue the output using any of these options
- option 1 and report RSNAST00
- option 3 using VF31 running in background mode or
- option 4 issuing immediately,
the document number is printed into the subject line but instead is printed the tempory document number $000000001. The correct billing document number is printed on the PDF form included in the mail output which confirms that the document number is available from the database at the point of output issue already.
Any idea how to maintain the settings correctly to get the billing document number on the subject line of the email after creating a new invoice?
Best regards
KarstenHi,
I dont have ABAP skills, but ask your ABAP programmer, (or yourself), to find the point in the invoicing program that get internaly the invoice number.
And you should try to asign the field from the internal temporary structure XVBRK-VBELN.
Should be something like:
Cover Page Text: any text followed by invoice no. &XVBRK--VBELN&
Please confirm with someone that have technical skills.
Regards,
Demétrius
Edited by: Demetrius Pereira de Miranda on Aug 20, 2008 4:21 PM -
Error while trying to assign an output type to medium external send in smar
Hi,
My requirement is to send a smartform through e-mail as PDF attachment.I have made the changes in the print program of the smart form.When I try to assign the output type to the medium external send in vt02n transaction,it is being saved but it is showing the status as 'not processed'.When I check the processing log it is showing 'Please maintain a output device in your user master data'.But I am able to send the mail and open the attachment.When I try to assign the same o/p type to medium special function,this is being successfully processed .Why am I getting error when I try to assign theo/p type to external send?
Regards,
HemaCheck the logic in the entity adapter ENT_Prov_Permitted_Resources.
This adapter is causing problems when you are trying to assign the resource. -
How to find output type givenSapscript form name and print program name
Hi Experts,
Can anyone tell me how to find the output type of a sapscript form if the print program name and sapscript form name is
known.Hi,
There are two ways:
1. Use table TNAPR .. Here is table give PGNAM as your print program name and FONAM as form name.. Now the field KSCHL will be the output type assigned to your script.
2. You can also check the NACE t-code.. In that select a application(Corresponds to your area) -> click on Output types tab -> Here you get list of output type.. You need click on Processing Routine folder to get all other info.. -
Invoice via email to external sender with partner function
Hello all,
sending an invoice via email to the recipient address that's in the customer master is working fine in our system. Now we want the invoice to be sent to one of our employees and we did the following settings:
- Created a personnel number in the HR module and assigned this number to the SAP user ID of the employee.
- Created a partner function ( Transaction OPSPAR1) with partner type ER - Personnel number. Is this the correct partner type?
- Added new partner function in customer master and assigned personnel number of employee.
- In output section of the invoice, we added output type, selected medium = external send, assigned new partner function and partner=personnel number.
After issuing output, a message comes up that output could not be issued.
Any suggestions? Am I missing something?
Thanks
AnneDear Anne,
Have you maintained Recipient field with User Id of employee in the condition record Communication detail screen.
If not maintained maintain Recipient field with User Id of employee then try.
I hope this will help you,
Regards,
Murali. -
Output type settings; print pdf from on the printer defined in user profile
Hi
I have a requirement where i should print the pdf form in the printer defined in user profile when i select save in MB1A transaction; I know this can be done by changing the output type cofiguratioin in the NACE transaction
Could any one please let me know step by step process on how to make changes in the nace transaction to print the form in the printer defined in user profile
Right now we are using a custom output type i tried changing the print parameter to 'S' and followed the sap documentation
in the sap help doc at last it says to check the table TNADR for the entries
but when i saw the table TNADR i couldnt find any entries related to ME application
It would be great if any one can explain in details regarding the changes in output type configuration , TNADR table and related stuff
thanksHi,
Just maintain the condition records in NACE transaction.
Just follow the steps...
1.Goto NACE transaction
2.Select the application for example for sales order 'V1' and then click on 'Condidtion Record' button
3.Double click on your Zoutput type.
4.U will may get radio button dialogbox/key combination.select anyone and click on ok button
5.U can see a selection screen..Fill all the filed/fileds.
6.Click on F8
7.A tabular control appers..fill it. select the mediem as 1(print output).U can see a 'communication' button over there..click on it.
8.Maintain ur own printer settings and click on SAVE button..
Actuallly Condition records contain the actual data against which the business rules are checked to propose an output. Using condition records, we can define Output types, transmission medium for the document type. So that we need not to give all the output parameters every time the document is to be printed. We use the condition records for automatic printing of Invoices when we save it.
It maintains a key combination to process the output automatically whenever a system finds the entry/entries with that key combination. We maintain the values in the condition records only.
Hope it is useful...
Regards
Kiran -
Define Output type and Local destination per user
Hi Gurus,
Nowadays us have defined Output type by Sales Organiztion/Order Type (S_TCODE = VV11).
Is possible define Output type and Local destination per user?. How to do?.
thanks and best regards,
WilsonHi Wilson
As per my understanding of requirement: you want output type and Local destination for each SAP End user (i.e. who is processing sales order) not the customer. If this is the requirement, we have two solution for it:
1) If for a particular region/sales district customer are contacting to one particular destination, then create access sequence with output type/order type/sales district. Means for one sales district one Local destination. If sales district is big area and you have many local destination with in that, then you can divide it into regions.
2) Ask your ABAPer to create a Z table and maintain Local destination for all Users. And amend the print program such that before saving the output entry into NAST table, based on SY-UNAME(user's id), fetch the printer (local destination) from Z table and update the NAST table accordingly.
As per my observations, option 2 is simpler and more effective.
try and revert. -
How to create output type for GR,GI?
Can any one explain,How to create output type for Goods Receipt,Goods Issue.?
and How to take print out for both?Hi, jayant in standard u have output type for picking list, delivery doc complete, theres no output type seperately for PGI or PGR
I am sure u need the help of tech guy to create the new output type for ur requirement
regards
giri -
Hi,
I am creating a new output for print PO in NACE. Now I am getting the problem of setting the access key combination. Now I Even want to get that new cretead output type in me23n messaages.
regards
AashishHI,
I think you need not to create OUTPUT type. But you want to assign print program and SAPscript/Smartform to the existing output type.
You can set the output type, print program and SAPscript/Smartform in the table TNAPR.
YOu can do it either from SM30 or from SE16 as Table maintenance is allowed for this Table.
Sample entries are like below:
MANDT 030
KSCHL NEU
NACHA 1
KAPPL EA
PGNAM SAPFM06P
RONAM ENTRY_NEU
FONAM Z_MEDRUCK
PGNAM2
RONAM2
FONAM2
PGNAM3
RONAM3
FONAM3
PGNAM4
RONAM4
FONAM4
PGNAM5
RONAM5
FONAM5
FUNCNAME
SFORM
Message was edited by: Ramakrishna Prasad -
Error while trying to assign an o/p type to medium external send in smartfo
Hi,
My requirement is to send a smartform through e-mail as PDF attachment.I have made the changes in the print program of the smart form.When I try to assign the output type to the medium external send in vt02n transaction,it is being saved but it is showing the status as 'not processed'.
When I check the processing log it is showing 'Please maintain a output device in your user master data'.But I am able to send the mail and open the attachment.
When I try to assign the same o/p type to medium special function,this is being successfully processed .Why am I getting error when I try to assign theo/p type to medium external send?
Regards,
HemaWell ok, think i don't need it anymore. thx anyways...
-
Hello Guru's reg IMG settings for output det of PO External Send
Hello Gurus,
While configuring output determination Medium for External Send At Message Type Purchase order step in IMG Settings, I need to configure the following settings
Program, routine, form
I have Output type: Neu ( for Purchase orders)
Application: EF Purchase Order
Medium----External Send
Program:?????
Routine:
Form:
What is the the program name, routine Name and Form, should I select from the drop down bar. There is no description for the SAP STD program for External Send mode will anyone guide me.
Full points for the answerHI,
You can get some idea by clicking this.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/75/ee122c55
c811d189900000e8322d00/frameset.htm
regards -
How can I prevent that emails are downloaded (POP3) when the lid of my MacBook Pro is closed?
Disable Power Nap in the Energy Saver pane of System Preferences. Uncheck the box marked Enable Power Nap... in each of the tabs.
-
I bought a used iPhone and found him email iCloud does not affect me so how can I deleted this email in order to use the device freely and privacy
help me pleaseYou can't. Return the phone for a refund, if you can, because without the previous owner's Apple ID/Password, you will not be able to re-activate the phone. It will be useless to you.
Apple can't/won't help you with this. -
To SET -UP message type 5 External Send to the purchase order approver
Hi All
Please help me to To SET -UP message type 5 External Send to the purchase order approver
SusanSusan,
This to me sounds like a release strategy setup using workflow. Could you please set up Release strategies initially and and then the workflow part couldd be handled by a workflow personnel.
Else, Setup teh message type with medium 7, and partner function MP, put the user name in the partner field. Go to communication method, choose the recipient type and fiull other required parameters and you should be set.
Edited by: Pavan Kumar on Apr 6, 2010 12:27 PM -
Output type is used for sending / printing "schedule lines" against sch agr
hi
which output type is used for sending / printing "schedule lines" against sch agreement
LPET or LPH1?
saraHi Sara,
It is LPET.
Thanks & Regards,
Kiran
Maybe you are looking for
-
Hello, After I upgraded my kernel to 2.6.25 on my laptop with an Atheros AR242x, which I use normally use MadWifi with, stopped working. I am unable to get any wifi0 or ath0 device to show up in ifconfig. The most descriptive error I could pull up wa
-
Hi! Can anyone please help me out as to whats the problem with the report thats causing in loss of records , presently when I combine the two internal tables and try extracting the records its not showing up all the records , its just taking the entr
-
Auto-filter in PDF-file?
In my PDF file, I have tables with data. Is there an auto-filter function to use so that you can select data?
-
Changed View Still Shows Original View Name
I'm using Crystal XI I built a report (MyReport_v1.rpt) using a view (vwMyView_v1) created in SQL Server. Now I have to modify the view enough that it would affect the report. So I made a copy of the report (MyReport_v2.rpt) and a copy of the view
-
Sql insert statement will fail if the data value has empty line
Hi, I notice if the insert statement in my .sql file contains data that has new line (enter key), the insert will fail. For example: insert into mytable (message) values ('this is the first line this is the second line that will cause insert statemen