2007 Mar 19 3:37 PM
Hi everybody,
I'm developing a batch input and I need to send to some people an advice about errors occur during the execution. In SAP 4.6C the application runs in a job perfectly, but now in SAP 4.7.... I have some troubles.
I design a SAPScript and later I transform it. When I invoke the 'OPEN_FORM' function, it shows me the printing dialog box. I want to execute it in background and I don't want this.
My code with OPEN_FORM is:
call function 'OPEN_FORM'
EXPORTING
application = 'TX'
device = 'PRINTER'
dialog = ' '
form = 'Z_REC_PROPIAS'
language = sy-langu
options = i_itcpo.
The parameters 'application' and 'device' have some defined values and I combine all of this and the result is the same.
The i_itcpo has set the 'i_itcpo-tdpreview = 'X'.', 'i_itcpo-tdimmed = 'X'.' and 'i_itcpo-tdgetotf = 'X'.' parameters.
Please, how do I send the mail without this step (in background I can't show the dialog box)?
Regards,
Niurka
Hi everybody,
I'm developing a batch input and I need to send to some people an advice about errors occur during the execution. In SAP 4.6C the application runs in a job perfectly, but now in SAP 4.7.... I have some troubles.
I design a SAPScript and later I transform it. When I invoke the 'OPEN_FORM' function, it shows me the printing dialog box. I want to execute it in background and I don't want this.
My code with OPEN_FORM is:
call function 'OPEN_FORM'
EXPORTING
application = 'TX'
device = 'PRINTER'
dialog = ' '
form = 'Z_REC_PROPIAS'
language = sy-langu
options = i_itcpo.
The parameters 'application' and 'device' have some defined values and I combine all of this and the result is the same.
The i_itcpo has set the 'i_itcpo-tdpreview = 'X'.', 'i_itcpo-tdimmed = 'X'.' and 'i_itcpo-tdgetotf = 'X'.' parameters.
Please, how do I send the mail without this step (in background I can't show the dialog box)?
Regards,
Niurka
2007 Mar 20 6:53 AM
Hi,
You can use this function mdoule and code to send email.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
New object: General header data
OBJECT_HD_CHANGE = R_OBJECT_HD_CHANGE
New object: Object type
OBJECT_TYPE = 'RAW'
Object should be stored in outbox
OUTBOX_FLAG = SPACE
User responsible for the transmission process
OWNER = SY-UNAME
DELETE_FLAG = 'X'
TABLES
OBJCONT = I_OBJCONT " Messages
OBJHEAD = I_OBJHEAD " Message Header
RECEIVERS = I_RECEIVERS " Receivers
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
Call program rsconn01 starts the SAPconnect send process. You can find
detail documentation in the online help
under Basis -> Services -> Communication
submit rsconn01
with mode eq 'INT'
and return.
Contact me for any further clarifications.
DARSHAN PATEL
Reward Points if u find this as a useful solution.
2007 Mar 21 2:35 PM
I need to attach a pdf file to my message. I call the function 'CONVERT_OTF' to do it that, and later call 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send message, but at runtime my program execution finished because when I try to send th mail I receive an error message like this 'You need to invoke and OPEN_FORM or START_FORM', and just before to call those functions I invoke OPEN_FORM, WRITE_FORM, and CLOSE_FORM. I don't know why OPEN_FORM/START_FORM doesn't work, my SAPScript is active.
Regards, Niurka
2007 Mar 22 5:50 PM
This is strange!
Th eoption <u>dialog = ' '</u> will switch off the dialog box, and you will not get any dialog box on execution. I think the problem is somewhere else...
Regards
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |