Adding attachment to the post
How can i add a word document while posting a new thread?
What types of attahment can be added.?
Yogesh
Up towards the right corner of the page you are looking at should be a link marked 'FAQ'.
I encourage you to click on that link, search for the work 'attach' and read the official statement about attachments.
If you can't find the link, try http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
Similar Messages
-
Hi Guys
I have been trying to add an attachment to the form using a script but all i get is for the user to browse to the attachment , is it possible to add an attachment to the form using xml tag ???
thank youHey,
Thanks a bunch, first one works like a charm!
The attachmentbutton however. I'm currently using a totally different script (found it online);
form1.#subform[0].Button1[1]::click - (JavaScript, client)
var AttachmentDescription = this.name;
AttachmentDescription.rawValue = "New Attachment" + AttachmentDescription.rawValue;
var strAttachmentName = AttachmentDescription.rawValue;
var myDoc = event.target;
myDoc.importDataObject(strAttachmentName);
var objDoc = myDoc.getDataObject(strAttachmentName);
var FileName = "";
FileName.rawValue = objDoc.path;
//this.presence = "invisible";
AttachmentDescription.access = "protected";
This works perfectly for me, but perhaps it's not compatible with the second button I need?
Btw, I do have LiveCycle Reader Extensions.
Again, thanks, and thanks in advance!
Anton B. -
Function for Adding Attachment to invoice post.
I have a report to read txt files, and post vendor or customer invoice documents with BAPI_ACC_DOCUMENT_POST.
now with the txt file i have a pdf file to attach .
how can i do that?
thanks ,
pd.: sorry my english.Hi,
Don´t know if this is what you want..but i had put some attachments using this code...
data: d_file type RLGRAP-FILENAME,
d_objkey type borident-objkey.
select single URL from /cockpit/tmime into d_file
where invoice_guid = E_STR_HEADER-invoice_guid.
CONCATENATE
E_STR_HEADER-SAP_DOC_NO
E_STR_HEADER-FISCAL_YEAR
into d_objkey.
CONDENSE d_objkey.
submit ZSEND_IMAGE
with f_filena = d_file
with d_objkey = d_objkey
and RETURN.
and
IF wa_thdr-fi_mm_flg EQ 'FI'.
ls_object-objtype = 'BKPF'.
CONCATENATE wa_thdr-comp_code wa_thdr-sap_doc_no INTO ls_object-objkey SEPARATED BY space.
ELSEIF wa_thdr-fi_mm_flg EQ 'MM'.
ls_object-objtype = 'BUS2081'.
ls_object-objkey = wa_thdr-sap_doc_no.
ENDIF.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = f_filename
filetype = 'BIN'
TABLES
data_tab = it_content
EXCEPTIONS
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_table_width = 4
invalid_type = 5
no_batch = 6
unknown_error = 7
OTHERS = 8.
CALL FUNCTION 'SO_CONVERT_CONTENTS_BIN'
EXPORTING
it_contents_bin = it_content[]
IMPORTING
et_contents_bin = it_content[].
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
region = 'B'"'Q'
IMPORTING
folder_id = ls_fol_id
EXCEPTIONS
OTHERS = 1.
ls_obj_data-objsns = 'O'.
ls_obj_data-objla = sy-langu.
CONCATENATE 'Anexo - ' space
wa_thdr-zeic_data_dig+6(2) '.'
wa_thdr-zeic_data_dig+4(2) '.'
wa_thdr-zeic_data_dig(4)
INTO ls_obj_data-objdes.
lv_offset = STRLEN( f_filename ) - 3.
ls_obj_data-file_ext = f_filename+lv_offset(3).
ls_obj_data-objlen = LINES( it_content ) * 255.
*ALI X X Documento de lista ABAP
*ARC X Objeto de arquivo (Image)
*BCS X Arquivo documento externo
*BIN X Documento binário
*DLI X Lista de distribuição
*EXT X X Documento PC
*FOL X Pasta
*GRA X X Gráfico SAP
*OBJ X Business object
*OFO X Pasta de objeto
*OTF X Documento OTF
*R3I X IDoc
*RAW X X Documento editor SAP
*SCR X Documento SAPscript
*URL Link para Inter/Intranet
*WIM X Work item
*XXL X X Documento para Listviewer
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
folder_id = ls_fol_id
object_type = 'EXT'
object_hd_change = ls_obj_data
IMPORTING
object_id = ls_obj_id
TABLES
objhead = it_objhead
objcont = it_content
EXCEPTIONS
active_user_not_exist = 35
folder_not_exist = 6
object_type_not_exist = 17
owner_not_exist = 22
parameter_error = 23
OTHERS = 1000.
IF sy-subrc = 0 AND ls_object-objkey IS NOT INITIAL.
ls_folmem_k-foltp = ls_fol_id-objtp.
ls_folmem_k-folyr = ls_fol_id-objyr.
ls_folmem_k-folno = ls_fol_id-objno.
ls_folmem_k-doctp = ls_obj_id-objtp.
ls_folmem_k-docyr = ls_obj_id-objyr.
ls_folmem_k-docno = ls_obj_id-objno.
lv_ep_note = ls_folmem_k.
ls_note-objtype = 'MESSAGE'.
ls_note-objkey = lv_ep_note.
CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
EXPORTING
obj_rolea = ls_object
obj_roleb = ls_note
relationtype = 'ATTA'
EXCEPTIONS
OTHERS = 1.
DELETE FROM zeic_enviar_wf WHERE invoice_guid = wa_wk-invoice_guid.
ELSE.
wa_wk-erro_img_doc = 'X'.
MODIFY it_wk FROM wa_wk INDEX d_tabix.
ENDIF.
This is just a scratch but i think it will help.. -
Error in adding attachment to the workitem. load:class Query.class not foun
Hi,
We are using WebGui to access the Business Workplace(SBWP transaction) through Portal. For any work item, when i try to import a file from the local PC, i get a screen with the header -"Enter Some FIle attributes". Text displayed in the screen is "Please wait. You will be forwarded automatically. This page had to be included for techincal reasons". And i am struck in that screen. I believe a java popup winddow should come up at this point to select the PC File but it never happened. The screen also has a status message "
Loading Java applet failed. Applet Query.class not inited ".
WHen i look at the java console, i find the following error trace. Please let me know if anybody experienced this problem before and how to fix it. Thanks for the help.
Trace ---
load: class Query.class not found.
java.lang.ClassNotFoundException: Query.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
Regards
hariHi all,
I have encountered same problem in ITS 6.20.
Query.class is packed in ws.jar which is stored at C:\Inetpub\wwwroot\<SID>\sap\its\mimes\webgui\99\applets and C:\Inetpub\wwwroot\<SID>\sap\its\mimes\webgui\2002\applets in ITS server.
I increased the trace level to 3 in the Java console to inevestigate the problem further.
== Java console (Trace level 3 ) ===
network: cache entry not found URL: https://hostname.domain.co.jp:443/sap/its/mimes/webgui/2002/applets/ws.jar、version: null
network: Connect to https://hostname.domain.co.jp:443/sap/its/mimes/webgui/2002/applets/ws.jar (Proxy=DIRECT)
network: Connect to http://hostname.domain.co.jp:443/ (Proxy=DIRECT)
java.net.ConnectException: Connection refused: connect
load: class Query.class not found.
java.lang.ClassNotFoundException: Query.class
==========================
Then I found out that when system tried to load class Qery.class the connection to ITS was refused becase the incorrect protocol ( https ) was chosen. In my case, SSL was not setup, therefore protocol must be http.
I activated http by changing the configuration file for WGate in C:\Program Files\SAP\ITS\6.20\config\ ItsRegistryWGATE.xml
After that, I restarted the WGate by accessing to http://hoostname.domain.co.jp:port/scripts/wgate/wgate-restart to activate the configuration.
And also I restarted the AGate by restarting the Windows Service "SAP ITS Manager - <SID>".
Anyway, the html (BHTML) file that displays the message below is stored at C:\Program Files\SAP\ITS\620\templates\system\dm\itsdoc.html
"Please Wait. You will be forwarded automatically"
"This page has been loaded due to technical Reasons"
Best regards,
Akira -
I upgraded to Mountain from Snow and find that there is now a problem adding iphoto to the cloud. I have iphoto '08,version 7.1.5. Tried to follow one poster's advice and upgrade to 9.1 but I need 9.0 first and I can't find that. suggestions? thanks!
You have to buy iPhoto from the Mac App Store.
-
CRM 2013: Adding Attachment to Posts
Hello,
I am cresting a new entity will serve the following purpose
a) Save the internal conversations (with attachment)
b) Save conversation between the agent and customer (with attachment)
Now for "a" - I can use the "Notes".
for "b" - I would like use the posts - but there are 2 problems
I) I can not add an attachment
II) The character limitation of 1000
Could anyone kindly advise of ways (configuration or code) to resolve the 2 problems?
Thanks,
HasibHello Andrii,
I am not sure if your reply got chopped off. But as I mentioned I am already creating a custom entity - that is not my problem. My problem is for posts
I) I can not add an attachment
II) The character limitation of 1000
Could anyone kindly advise of ways (configuration or code) to resolve the 2 problems?
Thanks,
Hasib -
Invoice output to be added as an attachment in the same invoice
Hi All,
We are using attachment functionality in R/3 System & we have a requirement that the output associated to that invoice should be attached to the same invoice as a PDF format, can this be achieved in simpler ways.
I am looking more at standard ways or with minimal developments, below is the logic which am planning but it is complex
PDF conversion to be adopted, but not sure on how it works on batch job ( if this is possible, please let me know)
Populating the output in an application layer as a PDF by batch job using VF31 transaction ( not clear on the way the naming convention that can be made on such things & hence presume for naming convention atleast i need to go for custom development).
I was indicating about naming convention in the earlier step which will be useful for me when i create a z-program that will take the file name & opens the invoice in VF02 & take that PDF for attaching it.
if we have any other alternatives, please let me know.
Regards
IlangoAt the first outset, I dont think, this is possible. Moreover, this approach is definitely not recommended since it will severely impact on the system performance and if there is a Security Team, they will not allow to have this practice.
Normally, either we can send as PDF attachment to any internal user via email or this can also be sent externally via PDF. There is also an option to view as PDF from the existing output itself.
G. Lakshmipathi -
To avoid the attachment for the body content while sending email from ABAP
SAP Version : 4.7
When i tried to send an external email from the abap report program, the body content of the mail is coming as an attachment for the same. I need to avoid this. Please give the suggestion. Am attaching the code.
DECLARATION PART *
TYPE-POOLS : SLIS.
TABLES : VBAK.
DECLARATION FOR ALV.
DATA : F_FIELD TYPE SLIS_T_FIELDCAT_ALV,
W_FIELD TYPE SLIS_FIELDCAT_ALV,
L_HEADER TYPE SLIS_T_LISTHEADER,
W_HEADER TYPE SLIS_LISTHEADER,
W_LAYOUT TYPE SLIS_LAYOUT_ALV,
t_sort type slis_t_sortinfo_alv,
w_sort type slis_sortinfo_alv.
TYPES : BEGIN OF T_VBAK,
VBELN LIKE VBAK-VBELN,
VKGRP LIKE VBAK-VKGRP,
KUNNR LIKE VBAK-KUNNR,
ERDAT LIKE VBAK-ERDAT,
VTWEG LIKE VBAK-VTWEG,
LIFSK LIKE VBAK-LIFSK,
VKBUR LIKE VBAK-VKBUR,
END OF T_VBAK.
TYPES : BEGIN OF T_VBAP,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
WERKS LIKE VBAP-WERKS,
ARKTX LIKE VBAP-ARKTX,
KWMENG LIKE VBAP-KWMENG,
CUOBJ LIKE VBAP-CUOBJ,
NETWR LIKE VBAP-NETWR,
ZSCHL_K LIKE VBAP-ZSCHL_K,
KONDM LIKE VBAP-KONDM,
ZZURWN LIKE VBAP-ZZURWN,
END OF T_VBAP.
TYPES : BEGIN OF T_LIPS,
VBELN LIKE LIPS-VBELN,
POSNR LIKE LIPS-POSNR,
VGBEL LIKE LIPS-VGBEL,
VGPOS LIKE LIPS-VGPOS,
END OF T_LIPS.
TYPES : BEGIN OF T_KNA1,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
ADRNR LIKE KNA1-ADRNR,
END OF T_KNA1.
TYPES : BEGIN OF T_VBKD,
VBELN LIKE VBKD-VBELN,
POSNR LIKE VBKD-POSNR,
BSTKD LIKE VBKD-BSTKD,
BSTDK LIKE VBKD-BSTDK,
KURSK LIKE VBKD-KURSK, " CURRENCY CHECK
BZIRK LIKE VBKD-BZIRK, " SALES DISTRICT
KDGRP LIKE VBKD-KDGRP,
IHREZ LIKE VBKD-IHREZ,
END OF T_VBKD.
TYPES : BEGIN OF T_LIKP,
VBELN LIKE LIKP-VBELN,
ERDAT LIKE LIKP-ERDAT,
END OF T_LIKP.
TYPES : BEGIN OF T_ADR6,
ADDRNUMBER LIKE ADR6-ADDRNUMBER,
SMTP_ADDR LIKE ADR6-SMTP_ADDR,
END OF T_ADR6.
DATA : BEGIN OF IT_CUST OCCURS 0,
KUNNR LIKE VBAK-KUNNR,
END OF IT_CUST.
TYPES : BEGIN OF T_VBUP,
VBELN LIKE VBUP-VBELN,
POSNR LIKE VBUP-POSNR,
KOSTA LIKE VBUP-KOSTA,
WBSTA LIKE VBUP-WBSTA,
END OF T_VBUP.
TYPES : BEGIN OF T_TVLST,
LIFSP LIKE TVLST-LIFSP,
VTEXT LIKE TVLST-VTEXT,
END OF T_TVLST.
TYPES : BEGIN OF T_CONFIG.
INCLUDE STRUCTURE CONF_OUT.
TYPES : END OF T_CONFIG.
DATA : TMP LIKE VBAK-KUNNR.
DATA : NAME_TEXT LIKE THEAD-TDNAME.
DATA : TLINE1 LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA : TMP_BRAKET LIKE CONF_OUT-ATWRT,
TMP_BRAKET1 LIKE CONF_OUT-ATWRT.
DATA : BEGIN OF IT_FINAL OCCURS 0,
WERKS LIKE VBAP-WERKS,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
KUNNR LIKE VBAK-KUNNR,
NAME1 LIKE KNA1-NAME1,
VBELN1 LIKE LIKP-VBELN,
ERDAT LIKE LIKP-ERDAT,
LIFSK LIKE VBAK-LIFSK,
ZZURWN LIKE VBAP-ZZURWN,
IHREZ LIKE VBKD-IHREZ,
ERDAT1 LIKE VBAK-ERDAT,
NETWR(25) type C,
BSTKD LIKE VBKD-BSTKD,
BSTDK LIKE VBKD-BSTDK,
SALORD(17) TYPE C,
PUMP_TYPE LIKE CONF_OUT-ATWRT,
PUMP_SIZE LIKE CONF_OUT-ATWRT,
VTEXT LIKE TVLST-VTEXT,
KWMENG(25) TYPE C,
FOOTER(330) TYPE C,
ITMTXT(330) TYPE C,
END OF IT_FINAL.
DATA : IT_VBAK TYPE STANDARD TABLE OF T_VBAK,
IT_VBAP TYPE STANDARD TABLE OF T_VBAP,
IT_VBKD TYPE STANDARD TABLE OF T_VBKD,
IT_LIKP TYPE STANDARD TABLE OF T_LIKP,
IT_LIPS TYPE STANDARD TABLE OF T_LIPS,
IT_VBUP TYPE STANDARD TABLE OF T_VBUP,
IT_KNA1 TYPE STANDARD TABLE OF T_KNA1,
IT_ADR6 TYPE STANDARD TABLE OF T_ADR6,
IT_FINAL1 LIKE IT_FINAL OCCURS 0 with header line,
IT_TVLST TYPE STANDARD TABLE OF T_TVLST,
IT_CONFIG TYPE STANDARD TABLE OF T_CONFIG,
W_VBAK TYPE T_VBAK,
W_VBAP TYPE T_VBAP,
W_VBKD TYPE T_VBKD,
W_LIKP TYPE T_LIKP,
W_ADR6 TYPE T_ADR6,
W_LIPS TYPE T_LIPS,
W_VBUP TYPE T_VBUP,
W_KNA1 TYPE T_KNA1,
W_TVLST TYPE T_TVLST,
W_CONFIG TYPE T_CONFIG.
DATA: it_message 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: 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.
SELECTION-CRITERIA *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : R2 RADIOBUTTON GROUP G1 USER-COMMAND radio DEFAULT 'X',
R1 RADIOBUTTON GROUP G1 .
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.
PARAMETERS : P_VTWEG LIKE W_VBAK-VTWEG ,
P_WERKS LIKE W_VBAP-WERKS.
select-options : s_vkgrp for w_vbak-vkgrp,
s_ERDAT for w_LIKP-ERDAT.
selection-screen end of block b2.
Initialization
INITIALIZATION.
s_vkgrp-sign = 'I'.
s_vkgrp-option = 'BT'.
s_vkgrp-low = '313'.
s_vkgrp-high = '324'.
APPEND s_vkgrp.
s_erdat-sign = 'I'.
s_erdat-option = 'BT'.
s_erdat-low = '20080108'.
s_erdat-high = '20080108'.
s_erdat-low = '20070101'.
s_erdat-high = sy-datum.
APPEND s_erdat.
selection-screen validations
AT SELECTION-SCREEN.
Validation for Plant.
IF p_werks NE '7210'.
MESSAGE : 'Plant entered should be 7210' TYPE 'E'.
ENDIF.
START OF SELECTION *
start-of-selection.
GETTING THE DATA FROM THE DATABASE TABLE
PERFORM DATA_FETCH.
FILLING THE FINAL INTERNAL TABLE
PERFORM FILL_FINAL.
GETTING THE LIST FOR SENDING MAIL OR DISPLAY.
IF R1 = 'X'.
Populate table with details to be entered into .xls file
LOOP AT IT_CUST.
PERFORM build_xls_data_table using it_cust-kunnr.
ENDLOOP.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
ELSEIF R2 = 'X'.
PERFORM LIST_DISPLAY.
ENDIF.
END OF SELECTION *
end-of-selection.
*& Form DATA_FETCH
text
--> p1 text
<-- p2 text
FORM DATA_FETCH .
SELECT VBELN
VKGRP
KUNNR
ERDAT
VTWEG
LIFSK
VKBUR
INTO TABLE IT_VBAK
FROM VBAK
WHERE VTWEG = P_VTWEG
AND VKGRP IN S_VKGRP
AND LIFSK NE ''.
IF IT_VBAK[] IS NOT INITIAL.
SELECT LIFSP
VTEXT
INTO TABLE IT_TVLST
FROM TVLST
FOR ALL ENTRIES IN IT_VBAK
WHERE LIFSP = IT_VBAK-LIFSK
AND SPRAS = 'EN'.
SELECT VBELN
POSNR
MATNR
WERKS
ARKTX
KWMENG
CUOBJ
NETWR
ZSCHL_K
KONDM
ZZURWN
INTO TABLE IT_VBAP
FROM VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN
AND WERKS = P_WERKS.
SELECT KUNNR
NAME1
ADRNR
INTO TABLE IT_KNA1
FROM KNA1
FOR ALL ENTRIES IN IT_VBAK
WHERE KUNNR = IT_VBAK-KUNNR.
SELECT VBELN
POSNR
BSTKD
BSTDK
KURSK
BZIRK
KDGRP
INTO TABLE IT_VBKD
FROM VBKD
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN.
ENDIF.
IF IT_VBAP[] IS NOT INITIAL.
SELECT VBELN
POSNR
VGBEL
VGPOS
INTO TABLE IT_LIPS
FROM LIPS
FOR ALL ENTRIES IN IT_VBAP
WHERE VGBEL = IT_VBAP-VBELN
AND VGPOS = IT_VBAP-POSNR.
ENDIF.
IF IT_LIPS[] IS NOT INITIAL.
SELECT VBELN
ERDAT
INTO TABLE IT_LIKP
FROM LIKP
FOR ALL ENTRIES IN IT_LIPS
WHERE VBELN = IT_LIPS-VBELN
AND ERDAT IN S_ERDAT.
SELECT VBELN
POSNR
KOSTA
WBSTA
INTO TABLE IT_VBUP
FROM VBUP
FOR ALL ENTRIES IN IT_LIPS
WHERE VBELN = IT_LIPS-VBELN
AND POSNR = IT_LIPS-POSNR
AND KOSTA EQ 'C'
AND WBSTA NE 'C'.
ENDIF.
IF IT_KNA1[] IS NOT INITIAL.
SELECT ADDRNUMBER
SMTP_ADDR
INTO TABLE IT_ADR6
FROM ADR6
FOR ALL ENTRIES IN IT_KNA1
WHERE ADDRNUMBER = IT_KNA1-ADRNR.
ENDIF.
ENDFORM. " DATA_FETCH
*& Form LIST_DISPLAY
text
--> p1 text
<-- p2 text
FORM LIST_DISPLAY .
REFRESH F_FIELD.
IF R2 = 'X'.
W_FIELD-col_pos = 1.
W_FIELD-fieldname = 'WERKS'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Plant'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 2.
W_FIELD-fieldname = 'VBELN'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Sales Order'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 3.
W_FIELD-fieldname = 'KUNNR'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer Code'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 4.
W_FIELD-fieldname = 'NAME1'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer Name'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 5.
W_FIELD-fieldname = 'VBELN1'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Number'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 6.
W_FIELD-fieldname = 'ERDAT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Date'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 7.
W_FIELD-fieldname = 'LIFSK'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Block'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 8.
W_FIELD-fieldname = 'PUMP_TYPE'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Pump Type'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 9.
W_FIELD-fieldname = 'PUMP_SIZE'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_l = 'Pump Size'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 10.
W_FIELD-fieldname = 'ZZURWN'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Pump Srno'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 11.
W_FIELD-fieldname = 'IHREZ'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Indent No.'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 12.
W_FIELD-fieldname = 'ERDAT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Order Booking Dt'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 13.
W_FIELD-fieldname = 'NETWR'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C710'.
W_FIELD-seltext_m = 'Net Value'.
w_field-do_sum = 'X'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 14.
W_FIELD-fieldname = 'KWMENG'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C710'.
W_FIELD-seltext_m = 'Qty'.
w_field-do_sum = 'X'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 15.
W_FIELD-fieldname = 'BSTKD'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer PONO'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 16.
W_FIELD-fieldname = 'BSTDK'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Customer PODT'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 17.
W_FIELD-fieldname = 'SALORD'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Sales Order/Item'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 18.
W_FIELD-fieldname = 'VTEXT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Delivery Block Desc.'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 19.
W_FIELD-fieldname = 'FOOTER'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Footer Text'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
W_FIELD-col_pos = 20.
W_FIELD-fieldname = 'ITMTXT'.
W_FIELD-tabname = 'IT_FINAL'.
W_FIELD-emphasize = 'C410'.
W_FIELD-seltext_m = 'Item Text'.
APPEND W_FIELD TO F_FIELD.
CLEAR W_FIELD.
PERFORM SORT_FIELD.
PERFORM LAYOUT_DISPLAY.
PERFORM GRID_DISPLAY.
ENDIF.
ENDFORM. " LIST_DISPLAY
*& Form FILL_FINAL
text
--> p1 text
<-- p2 text
FORM FILL_FINAL .
REFRESH IT_FINAL.
LOOP AT IT_VBUP INTO W_VBUP.
READ TABLE IT_LIPS INTO W_LIPS WITH KEY VBELN = W_VBUP-VBELN POSNR = W_VBUP-POSNR.
READ TABLE IT_LIKP INTO W_LIKP WITH KEY VBELN = W_LIPS-VBELN.
IF SY-SUBRC EQ 0.
READ TABLE IT_VBAP INTO W_VBAP WITH KEY VBELN = W_LIPS-VGBEL POSNR = W_LIPS-VGPOS.
READ TABLE IT_VBAK INTO W_VBAK WITH KEY VBELN = W_VBAP-VBELN.
READ TABLE IT_VBKD INTO W_VBKD WITH KEY VBELN = W_VBAK-VBELN.
READ TABLE IT_KNA1 INTO W_KNA1 WITH KEY KUNNR = W_VBAK-KUNNR.
READ TABLE IT_TVLST INTO W_TVLST WITH KEY LIFSP = W_VBAK-LIFSK.
IT_FINAL-WERKS = W_VBAP-WERKS.
IT_FINAL-VBELN = W_VBAP-VBELN.
IT_FINAL-KUNNR = W_VBAK-KUNNR.
IT_FINAL-NAME1 = W_KNA1-NAME1.
IT_FINAL-VBELN1 = W_LIKP-VBELN.
IT_FINAL-ERDAT = W_LIKP-ERDAT.
IT_FINAL-LIFSK = W_VBAK-LIFSK.
IT_FINAL-ZZURWN = W_VBAP-ZZURWN.
IT_FINAL-IHREZ = W_VBKD-IHREZ.
IT_FINAL-ERDAT1 = W_VBAK-ERDAT.
IT_FINAL-NETWR = W_VBAP-NETWR.
IT_FINAL-BSTKD = W_VBKD-BSTKD.
IT_FINAL-BSTDK = W_VBKD-BSTDK.
IT_FINAL-POSNR = W_VBAP-POSNR.
IT_FINAL-VTEXT = W_TVLST-VTEXT.
IT_FINAL-KWMENG = W_VBAP-KWMENG.
CONCATENATE W_VBAP-VBELN W_VBAP-POSNR INTO IT_FINAL-SALORD SEPARATED BY '/'.
IF W_VBAP-CUOBJ NE '000000000000000000'.
REFRESH IT_CONFIG.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE = W_VBAP-CUOBJ
LANGUAGE = SY-LANGU
TABLES
CONFIGURATION = IT_CONFIG
EXCEPTIONS
INSTANCE_NOT_FOUND = 1
INTERNAL_ERROR = 2
NO_CLASS_ALLOCATION = 3
INSTANCE_NOT_VALID = 4
OTHERS = 5.
IF SY-SUBRC = 0.
READ TABLE IT_CONFIG INTO W_CONFIG WITH KEY ATNAM = 'IN_PUMP_TYPE'.
IT_FINAL-PUMP_TYPE = W_CONFIG-ATWRT.
CLEAR W_CONFIG.
READ TABLE IT_CONFIG INTO W_CONFIG WITH KEY ATNAM = 'IN_PUMP_SIZE' .
IT_FINAL-PUMP_SIZE = W_CONFIG-ATWRT.
CLEAR W_CONFIG.
ENDIF.
ENDIF.
move w_vbap-vbeln to name_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ZKT1'
language = 'E'
name = name_text
object = 'VBBK'
TABLES
lines = tline1
EXCEPTIONS
OTHERS = 8.
LOOP AT TLINE1.
CONCATENATE IT_FINAL-FOOTER TLINE1-TDLINE+0(65) INTO IT_FINAL-FOOTER.
CLEAR : TLINE1.
ENDLOOP.
clear : name_text,tline1[].
concatenate w_vbap-vbeln w_vbap-posnr into name_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ZKT3'
language = 'E'
name = name_text
object = 'VBBP'
TABLES
lines = tline1
EXCEPTIONS
OTHERS = 8.
LOOP AT TLINE1.
CONCATENATE IT_FINAL-ITMTXT TLINE1-TDLINE+0(65) INTO IT_FINAL-ITMTXT.
CLEAR : TLINE1.
ENDLOOP.
APPEND IT_FINAL.
ENDIF.
CLEAR : IT_FINAL,W_VBAP,W_VBKD,W_VBUP,W_LIPS,W_LIKP,W_KNA1,W_VBAK,W_TVLST,name_text,tline1[].
ENDLOOP.
IT_FINAL1[] = IT_FINAL[].
SORT IT_FINAL1 BY KUNNR.
LOOP AT IT_FINAL1.
IF TMP NE IT_FINAL1-KUNNR.
IT_CUST-KUNNR = IT_FINAL1-KUNNR.
APPEND IT_CUST.
clear : tmp,it_cust.
TMP = IT_FINAL1-KUNNR.
ENDIF.
CLEAR : IT_FINAL1.
ENDLOOP.
ENDFORM. " FILL_FINAL
*& Form LAYOUT_DISPLAY
text
--> p1 text
<-- p2 text
FORM LAYOUT_DISPLAY .
W_LAYOUT-colwidth_optimize = 'X'.
ENDFORM. " LAYOUT_DISPLAY
*& Form GRID_DISPLAY
text
--> p1 text
<-- p2 text
FORM GRID_DISPLAY .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = W_LAYOUT
IT_FIELDCAT = F_FIELD
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = T_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
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
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_FINAL
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. " GRID_DISPLAY
*& Form SORT_FIELD
text
--> p1 text
<-- p2 text
FORM SORT_FIELD .
w_sort-spos = 1.
w_sort-fieldname = 'KUNNR'.
w_sort-up = 'X'.
append w_sort to t_sort.
clear w_sort.
w_sort-spos = 2.
w_sort-fieldname = 'VBELN'.
w_sort-up = 'X'.
append w_sort to t_sort.
clear w_sort.
ENDFORM. " SORT_FIELD
*& Form TOP_OF_PAGE
text
FORM top_of_page.
IF R2 = 'X'.
REFRESH l_header.
w_header-typ = 'S'.
w_header-key = 'Delivery Block : '.
w_header-info = 'Outbound delivery created but not despatched'.
APPEND w_header TO l_header.
CLEAR w_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = l_header.
ENDIF.
ENDFORM. "TOP_OF_PAGE
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table using custcode.
CONSTANTS: con_cret TYPE X VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
data : it_custcode like vbak-kunnr.
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
clear : it_attach,it_attach[].
CONCATENATE 'Customer PONO' 'Customer PODT' 'Sales Order No' 'Item No'
'Pump Type' 'Pump Size' 'Order Value Rs' 'Delivery No.' 'Delivery Dt.'
'Quantity' 'Reasons for not getting Despatch'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
it_custcode = custcode.
CLEAR : W_KNA1,W_ADR6. "Code need to be added once testing is over.
READ TABLE IT_KNA1 INTO W_KNA1 WITH KEY KUNNR = IT_CUSTCODE.
READ TABLE IT_ADR6 INTO W_ADR6 WITH KEY ADDRNUMBER = W_KNA1-ADRNR.
P_EMAIL = W_ADR6-SMTP_ADDR.
LOOP AT it_final where kunnr = it_custcode.
CONCATENATE
IT_FINAL-BSTKD
IT_FINAL-BSTDK
IT_FINAL-VBELN
IT_FINAL-POSNR
IT_FINAL-PUMP_TYPE
IT_FINAL-PUMP_SIZE
IT_FINAL-NETWR
IT_FINAL-VBELN1
IT_FINAL-ERDAT
IT_FINAL-KWMENG
IT_FINAL-VTEXT
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
clear it_final.
ENDLOOP.
if R1 = 'X'.
Populate message body text
perform populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'AWAITING DESPATCH CLEARANCE'
'XLS'
'Delivery_Block'
'Delivery_Blk'
'[email protected]'
'INT'
changing gd_error
gd_reciever.
endif.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& 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: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
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,w_cnt.
DESCRIBE TABLE it_attach LINES w_cnt.
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.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
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
packing_list = t_packing_list
object_header = objhead
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.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'We have manufactured the pump/s against your purchase order and regret to inform'.
APPEND it_message.
it_message = 'you that same cannot be despatched for the reason/s indicated below.'.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = 'Please find the below attachment "Delivery_Blk.xls" for the details.'.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = 'We now request you to send the required detail/s by return mail/post to enable us '.
APPEND it_message.
it_message = 'to despatch the pump/s at the earliest.'.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = ' '.
APPEND it_message.
it_message = 'Best Regards'.
APPEND it_message.
it_message = 'O.E. ENGINEER'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODYHi,
Refer to the following piece of code. This is the simple code to send email with content and attachment.
Declaration
DATA: lwa_hd_change TYPE sood1,
lt_objcont TYPE STANDARD TABLE OF soli,
lwa_objcont TYPE soli,
lt_receivers TYPE STANDARD TABLE OF soos1,
lwa_receivers TYPE soos1 ,
lt_att_cont TYPE STANDARD TABLE OF soli,
lwa_att_cont TYPE soli,
lt_packing TYPE STANDARD TABLE OF soxpl,
lwa_packing TYPE soxpl,
lf_sent TYPE sonv-flag,
lf_size TYPE i.
CONSTANTS: lc_obj(11) TYPE c VALUE 'BOMSouthco',
lc_desc(20) TYPE c VALUE 'BOM Download',
lc_lang(1) TYPE c VALUE 'E',
lc_raw(3) TYPE c VALUE 'RAW',
lc_net(1) TYPE c VALUE 'U',
lc_mail(4) TYPE c VALUE 'MAIL',
lc_xls(3) TYPE c VALUE 'XLS',
lc_ext(3) TYPE c VALUE 'EXT'.
Passing values to the strutures used in SO_OBJECT_SEND function module
lwa_hd_change-objla = lc_lang.
lwa_hd_change-objnam = lc_obj.
lwa_hd_change-objdes = lc_desc.
lwa_hd_change-objlen = 255.
lwa_objcont-line = text-t29.
APPEND lwa_objcont TO lt_objcont.
CLEAR lwa_objcont.
lwa_receivers-recextnam = text-t31.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
lwa_receivers-recextnam = text-t30.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
Passing values for the attachment file
LOOP AT gt_output INTO gwa_output.
CONCATENATE gf_lf gwa_output-matnr gf_etb gwa_output-idnrk gf_etb
gwa_output-type gf_etb gwa_output-menge gf_etb
gwa_output-meins gf_etb gwa_output-comp gf_etb
INTO lwa_att_cont-line.
APPEND lwa_att_cont TO lt_att_cont.
CLEAR lwa_att_cont.
ENDLOOP.
CHECK lt_att_cont IS NOT INITIAL.
DESCRIBE TABLE lt_att_cont LINES lf_size.
lwa_packing-transf_bin = ' '.
lwa_packing-head_start = 1.
lwa_packing-head_num = 0.
lwa_packing-body_start = 1.
lwa_packing-body_num = lf_size.
lwa_packing-file_ext = lc_xls.
lwa_packing-objlen = lf_size * 255.
lwa_packing-objtp = lc_ext.
lwa_packing-objdes = lc_desc.
lwa_packing-objnam = lc_obj.
APPEND lwa_packing TO lt_packing.
CLEAR lwa_packing.
CHECK gf_error IS NOT INITIAL. "Check if unix file is written
FM to send email to the intended recipients
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = lwa_hd_change
object_type = lc_raw
IMPORTING
sent_to_all = lf_sent
TABLES
objcont = lt_objcont
receivers = lt_receivers
packing_list = lt_packing
att_cont = lt_att_cont
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
originator_not_exist = 20
x_error = 21
OTHERS = 22.
IF sy-subrc = 0.
MESSAGE s004 WITH text-t34.
ENDIF.
COMMIT WORK.
Reward if helpful.
Regards,
Ramya -
Adding objects to the stage & acceessing stage properties - I'm a bit confused..
Hi,
I'm a little confused on two fronts regarding display
programming:
A. What the best way to add objects to the stage?
B. How to access stage properties.
I can do both of these when the project is an 'Action Script
Project', but I'm having trouble when it is a 'Flex Project' (e.g.
an MXML file). See the two attached files with questions included
in the comment to see exactly what I mean.
A. What the best way to add objects to the stage?
=====================================
In an action script project that extends Sprite I can just
call addChild()
In an MXML project I can add objects to the stage by first
adding them to a UIComponent, then adding that to the stage.
1. Is that the best way to do it?
In this doc:
http://livedocs.adobe.com/flex/3/html/help.html?content=05_Display_Programming_02.html
it says that
quote:
Each SWF file has an associated ActionScript class, known as
the main class of the SWF file. When Flash Player opens a SWF file
in an HTML page, Flash Player calls the constructor function for
that class and the instance that is created (which is always a type
of display object) is added as a child of the Stage object. The
main class of a SWF file always extends the Sprite class
2. why cant I just add a sprite object direct to the stage
without the UIComponent?
3. What is the 'main class', and how can i get access to it?
B. How to access stage properties.
=========================
In an action script project that extends Sprite I can just
call trace(stage.framerate)
But in an MXML file I cannot figure out how to access the
stage properties.
See the attached code for the things that I tried, but which
didnt work.
In the page:
http://www.actionscript.org/forums/showthread.php3?t=140655
It says
quote:
For stage access you have a couple of rules:
* natively, only display objects have inherent access to
stage
* display objects only have a valid reference to stage if
they're within the stage's display list (on the screen, after added
to it with addChild)
* The only display objects which immediately have access to
the stage before the use of addChild (in their constructor) are the
document/application class instance (root) and any instance from
the library placed on the timeline (not created with AS).
* Non-display object classes have to be passed or assigned a
reference to the stage from another object which already has access
to it - they cannot access it otherwise.
4. How do I access the stage properties in the MXML project?
5. I suspect this is related to the "main class", which I
dont yet understand - is it?
Sorry for the long post.
cheers
tom"tom saffell" <[email protected]> wrote in
message
news:gd7cm9$d1v$[email protected]..
> Thanks Luigi - that helps a lot.
> I hadnt seen the Flex 3 Developer Guide before - it's
very useful.
>
> I now see that I can access properties of the
application object directly
> with
> this.<property>.
> However, the framerate property cannot be set by
actionscript, only in
> MXML (I
> can set it in the <mx:application> tag). But I
need to be able to set it
> programatically, dependent on user input.
>
> 5. Is there a way around this?
> 6. Can I set the stage's framerate to achieve the same
outcome?
>
> I still dont understand why I cannot access the stage
object. When I call
> either
this.stage or
uic.stage * then I get
quote:
Cannot access
> a
> property or method of a null object reference.
My understanding is
> that I
> can access the stage object via any display object on
the display list.
> I'm
> confused about this bit..
>
> * - uic is a UIComponent that has been added to the
display list (i think)
> by
> calling addChild(uic) from the AS3 within the
application
>
> 7. How do I access stage properties in AS3 in an MXML
project?
http://www.adobe.com/livedocs/flex/3/html/help.html?content=05_Display_Programming_10.html
It seems like possibly your real problem is that you're
having trouble
searching the Help effectively:
http://flexdiary.blogspot.com/2008/07/getting-help-in-flex-builder.html -
Adding attachment via File browse not working
Hi, I'm using Apex 4.1.1 through GlassFish server 3.1.1. Recently I've imported my database application and after running my app, adding of an attachment isn't working anymore. Before I used Apex via Emb. PL/SQL Gateway(from which I've exported app sql) and everything worked just fine. My code for adding attachment is like this:
IF (:P2_ATTACHMENT IS NOT NULL)
THEN
INSERT INTO ATTACHS
(ID_ATACHMENT,NAME_ATTACH, TYPE_ATTACH, ATTACHMENT, DATE_ATTACH)
SELECT ID,NAME, mime_type,blob_content, sysdate
FROM wwv_flow_files
WHERE NAME = :P2_ATTACHMENT;
DELETE wwv_flow_files
WHERE NAME = :P2_ATTACHMENT;
:P2_ATTACHMENT := NULL;
END IF;
If I skip this piece of code, and try to submit page(where is also couple of other insert statements), then is ok.
What is the problem of this, GlassFish, wwv_flow_files table, apex listener...?
Thanks.Hi,
>
isn't working anymore.
>
Do you get an error? What diagnostic details do you have? E.g. what do see in View Debug if you run the page in Debug mode?
Prima facie, there is nothing wrong in the code or in the infrastructure.
Regards,
PS: Please post code in {code} tags.
Edited by: Prabodh on Jun 21, 2012 5:00 PM -
Application for the post of an ORACLE DBA
=================================================================
============
ARUNKUMAR RAGHAVAN MSc,BEd,PGDMCH,(MBA)
=================================================================
============
CURRICULUM VITAE
Covering letter
From
Arunkumar.R, email : [email protected],
[email protected]
No 16 /9 Nagendra nagar,
Velachery main road, checkpost,
Near jaya hospital,
Chennai -600 042.
Respected Sir / Madam,
SUB : Application for the post of
ORACLE DBA / DBO - Reg
I wish to submit the following few lines for your kind
consideration.
I feel more comfortable and satisfactory with this type of job
as
I am keen to serve as an employee of your esteemed organization,
which has an intellectually stimulating and emotionally
satisfying environment.
I assure that, I will do my duty to the fullest satisfaction of
my
higher officials, colleagues and to the best of my knowledge and
belief.
I am attaching my CV, first 2 pages of my first book –“ORACLE
ARCHITECTURE MADE EASY”, and a newsletter about Penta Media
Graphics Ltd, my present employer.
Expecting the favour of your earliest reply.
Thanking you with respectful regard,
Yours truly,
(ARUNKUMAR.R)
=================================================================
============
CAREER OBJECTIVE
1. To be a dependable ORACLE DBA and to deploy an
efficient DATA WAREHOUSE and DATA MART.
2. To write unique books on ORACLE DBA and DATA WAREHOUSING
for enthusiastic learning
Experience summary
q Five years and six months of overall experience in
Software Industry.
q Over 24 months of work experience in the administering,
and maintaining the Oracle Database of sizes 3 GB
q Training and authoring books, CBT’s,WBT’s for Oracle DBA
and
Data Warehousing .
Technical skills
Hardware IBM PC, MAC
Operating Systems WINDOWS NT, 95/98/2K, MS-DOS,
LINUX, MAC-OS
RDBMS ORACLE 8I, DBASE, FoxPro,
MSACCESS
Internet Tools HTML, IIS, FrontPage
Responsibilities at PENTAMEDIA GRAPHICS LTD,
(formerly known as PENTFOUR SOFTWARE EXPORTS LTD, SEI-CMM LEVEL
4 COMPANY )
1. Maintaining an "Oracle Pre-Production Database" of size 3 GB.
2. In charge of the CBT's on Data Warehousing & ORACLE
DBA.
3. Installing and upgrading the Oracle server (Oracle 7.3,
Oracle 8.0,
ORACLE 8i,) and application tools.
3. Allocating system storage and planning future storage
requirements
for the database system.
5. Creating Tablespaces for the different group of
projects namely
SOFTWARE, ENGINEERING, MANAGEMENT, and SCHOOL PROJECTS.
6. Creating tables, views and modifying the database
structure, as
necessary, required by Project Leaders and Programmers.
7. Enrolling users and maintaining system security and
controlling and
monitoring user access to the database.
8. Backing up and restoring the database.
Specific Achievements
1. CBT's and WBT's authored (Reference:
www.pentalearn.com )
* Data Warehousing for beginners
* Data Warehousing - Intermediate
* Stepping into ORACLE DBA
* ORACLE DBA - Security
* ORACLE DBA - Backup & Recovery
* Step by Step - ORACLE DBA
* OCP GUIDE - Architecture & Administration
Under Production
* OCP GUIDE - Backup & Recovery
2. Book's authored (Under compilation)
* ORACLE ARCHITECTURE MADE EASY.
* Learn ORACLE DBA in 23 days.
4. Knowledge of documentation and procedures for SEI CMM -
ISO –
QUALITY AUDITS.
4. Academic Project - (Reference: [email protected])
o Title ORACLE QUESTION BANK
o Outline Training software for OCP
(Oracle Certified Professional)
o Period DEC 1998 - JAN 1999
o Software VB 5.0, M.S.ACCESS
5. Awards :
State first & district first in Vivekananda Academy
of cultural
Studies
=================================================================
============
Employment History
1. Company Name : Pentamedia
Graphics ltd
Title : instructional designer
Level : Senior Executive
Specialization : IT/Computer Systems/Software
Function : Professional /
Consultant / Specialist
Industry : Computer / Information
Technology (Software)
Date Joined : 12 oct 1999
Duties : Responsible for CBT’s,
WBT’s on DATA
WAREHOUSING & ORACLE DBA.
project guide for TEAM
members.
Developed 5 training
software.
Maintaining "ORACLE-
PRODUCTION DATABASE"
of size 3GB.
Reason for leaving: working currently
2. Company Name : S.A.International ltd
Title : training officer
Level : Senior Executive
Specialization : IT/Computer Systems/Software
Function : Lecturer / Teacher /
Trainer
Industry : Computer / Information
Technology (Software)
Date Joined : 08 Aug 1997
Date Left : 09 Sep 1999
Duties : At S.A.INTERNATIONAL LTD,(A joint
venture company of ELCOT, GOVT OF TAMILNADU UNDERTAKING)
Responsible for all training programmes.
Project guide
for all college students.
Senior Faculty
for "ORACLE DBA" classes.
Accomplishment : Wrote student guides on office
2000 and on ORACLE DBA
Developed 3 training
software.
Reason for
leaving : To get more
experience on ORACLE DATABASE
MAINTENANCE
3. Company Name : G.K.M.college of
engineering & technology
Title : lecturer
Level : Junior Executive
Specialization : Education
Function : Lecturer / Teacher /
Trainer
Industry : Education
Date Joined : 06 May 1996
Date Left : 09 Aug 1997
Duties : Incharge of computer
science department,
Conducting classes and
all academic
activities.
Accomplishment : Wrote 2 student guides on office
1997 and on
ORACLE DBA.
Reason for
leaving : To get more
experience on ORACLE DBA
Activities
4. Company Name : Infra computers pvt ltd
Title : Asst.technical manager
Level : Junior Executive
Specialization : Training & Development
Function : Executive
Industry : Computer / Information
Technology
Date Joined : 30 Apr 1995
Date Left : 06 Jun 1996
Duties : Monitor the day to day
operations of the
SOFTWARE/HARDWARE SERVICE DEPARTMENT. Monitor the DEPARTMENT
STOCK and cash flow position, Meeting executives for Business
development activities
Accomplishment : Joined the Company since August 1994
as Asst TECHNICAL MANAGER. Promoted to TECHNICAL MANAGER in july
1996.
Reason for
leaving : To study M.B.A
(master business
Administration)
ORACLE DBA SKILLS SELF EVALUATION FORM
Oracle: SQL and PL/SQL Skills:
rate
from
0 = None
through 5 = Guru
Creating and maintaining database objects 3
Store, retrieve, and manipulating data 3
Create PL/SQL blocks of application code 1
Familiarity with PL/SQL packages 1
Familiarity with PL/SQL tables and records 0
Calling PL/SQL functions from within SQL statements 0
Building reusable code
0
Crafting code that automatically adapts to changes
in data structures
0
Writing SQL inside PL/SQL programs
0
Reading and writing operating system files 3
Executing host commands and C programs 0
Issuing database alerts
1
Analyzing memory utilization in your session 2
Debugging and tracing program execution 1
Manipulating raw data and large objects 1
Building your own packages
1
Oracle Enterprise Manager Skills:
rate
from
0 = None
through 5 = Guru
Install Oracle Enterprise Manager 5
Administer and monitor Oracle database environments 5
Oracle Enterprise Manager architecture 3
Setup a console for your own environment 3
Implement job and event based system management 3
Understand the integration of shared administrator
responsibilities
3
Tuning Pack
1
(which comprise Oracle Expert, Tablespace Manager
and SQL Analyze)
Diagnostic Pack
0
(which comprise Oracle Trace and Data Viewer,
Performance Manager,
Capacity Planner,and Top Sessions)
Change Management Pack
0
(which comprise Database Alter, Capture, Diff,
Propagate, Quick Change, and Plan Manager)
Database Administration/ Backup and Recovery Skills:
rate
from
0 = None
through 5 = Guru
Familiarity with Oracle7 database environments 5
Familiarity with Oracle8 database environments 5
Set up, maintain, and troubleshoot database 4
Plan and implement database backup and recovery
strategies
4
Understanding of backup, restore and recovery
operations
4
Oracle8 Recovery Manager 4
Network Administration Skills:
rate from
0 = None
through 5 = Guru
Familiarity with Oracle7 Server 5
Familiarity with Oracle8 Server 5
Familiarity with architecture of Net8 4
Establishing connections between peers 5
Client and a server node using various
naming methods
4
Configuring middle tier systems 0
Familiarity with Names Server
1
Familiarity with Connection Manager
3
Memory, I/O, physical structure and
resource contention 2
Familiarity with dynamic performance views 4
Familiarity with initialization parameters 5
Familiarity with diagnostics and tuning guidelines 3
Data Modeling and Relational Database Design Skills:
Arun's
rate from
0 = None
through 5 = Guru
Knowledge with entity-relationship models 2
Knowledge of normalization and relational
database design
1
Defining business information requirements 3
Creating entity-relationship models
3
Transforming requirements into an initial
database designs
3
Personal Strengths :
INVOLVEMENT alone gives PERFORMANCE. With my
spiritual base &
MOTIVATION, I am confident that I will reach the
pinnacle
in the field of ORACLE DBA. I hope my right thinking &
Hardworking nature will make me successful.
Current Communication Address
Address : 16/9, nagendra nagar, velachery
main road,
near jaya hospital, chennai-42
chennai, 600042 India
Tel [home] : 91-44-2552406
Tel [office]: 91-44-4839854
Tel [mobile]:
Email : [email protected],
[email protected]
Permanent Address
Address : s/o N.Raghavan, laksminayackan
patty(po)
thevaram(via), theni(dt), pin
625530
laxminayakan patty,
625530 India
Tel : 91-4454-54739
Email : [email protected], [email protected]
Personal Particulars
Date of Birth : 05 Aug 1971
Gender : Male
Nationality : India
Marital Status : married
Permanent Residence of : India
Passport Number : T465022
Valid Upto Jan 2005
EDUCATIONAL QUALIFICATION
COURSE UNIVERSITY/BOARD Yr.of PASSING
CLASS & %
S.S.L.C TAMILNADU SECONDARY MAR 1986
FIRST 85.40
H.S.C TAMILNADU HIGER SECONDARY APR 1988
FIRST 68.90
B.Sc MADURAI KAMARAJ UNIVERSITY APR 1991
FIRST 68.63
(PHYSICS) VIVEKANANDA COLLEGE
M.Sc MADURAI KAMARAJ UNIVERSITY APR 1994
FIRST 70.40
(PHYSICS)
BEd MADURAI KAMARAJ UNIVERSITY NOV 1995
SECOND 52.20
TECHNICAL QUALIFICATION
COURSE UNIVERSITY/INSTITUTION Yr.of
PASSING %
PGDMCH# St.JOSEPH'S COLLEGE JULY
1995 59.70
BHARATHIDASAN UNIVERSITY
DPCS* @ DOE & TC.T.S- NCVT TRADE SEP 1996
79.47
(AICTE^ APPROVED)
# POST GRADUATE DIPLOMA IN MICROPROCESSOR AND COMPUTER
HARDWARE
* DATA PREPARATION AND COMPUTER HARDWARE
@ DIRECTORATE OF EMPLOYMENT & TRAINING CRAFTSMEN TRAINING
SCHEME
^ ALL INDIA COUNCIL OF TECHNICAL EDUCATION
PROFESSIONAL
TRAINING UNDERGONE
Completed 'ORACLE DBA' Course at RADIANT SOFTWARE PVT LTD,
WEST MABALAM,
CHENNAI -33.
Language Proficiency :
Languages - Proficiency (1=worst - 10=best)
Spoken
Written
English 5 6
Tamil 9
9
Supplementary
If and when employed by the company
Willing to Travel : yes
Willing to be Relocated : yes
Possess Own Transport : T465022 Valid
Upto Jan 2005
Expected Monthly Salary :
Negotiable
Availability :
Immediately
=================================================================
============Sorry, but according to Apple, iTunes Store: All Sales Are Final
You can avoid accidental purchases.
From the iTunes menu bar click iTunes / Preferences then select the Parental tab.
Select: iTunes Store
Click OK. -
Restrict the posting period opening and closing for some users
Dear SAP gurus,
I want to restrict some users to open the posting period and for some users close posting periods. I knew that these can be done through authorization group. Pls explain how to create authorization groups and how to use those? Anybody can help me out?
Regards,
Venkata ReddyDear Venkatareddy,
There are two sets of period in OB52. The first set of "From" and "To" is for the authorised group and second set is for the non authorised group. In the "Authorisation Group" (last column) give some 4 charecters name. Say "FICO".
Now ask the basis to attach the object "FICO" for the users who are authorised say user1, user 2 and user3.
Now in the first set of period you can maintain say 1 2008 to 16 2008 and in the second set 1 2008 to 1 2008.
So except user1,2 and 3, all the others can post only in 1 2008. Whereas users 1,2 and3 can post in all the periods of 2008.
Assign points if useful
regards
Venkatesh -
How do I move a clip with transitions attached on the primary storyline?
One more frustrating problem with the mysterious magnetic timeline: on the priumary storyline I created a text clip with a gap clip on each side, then added cross dissolve at the beginning and end of the clip so that it fades in and out to black:
Now I want to reposition this text in the timeline, mantaining the fade in/out at the head and tails. In FCP7 this was simple as a gap in the timeline simply showed black and the clip could be moved as one piece. In FCPX when I try to move the text clip with the P position tool, the transitions disappear after repositioning. Extremely frustrating:
If I select the clip and the fades together, plus the gap clip at the end, and move them together with the Position tool then the fade out is retained, but the fade in still disappears. I've also tried rolling from the fade in from the gap clip before it, but instead of rolling the clip ahead this shortens the fade (I think the behavior of trimming and rolling transitions is totally wacky). The trim tool is also useless in this situation as you can only select one edit point at a time with it.
The only solution I found is to cut the gap clip before the transition, then move the text clip and transitions with the P tool. This will create two abuting gap clips before the text clip, but allow the transitions to remain intact. Not hard, but annoying to have to do
Often I have to adjust the position of a text clip in the timeline like this after adding the transitions to get the timing right. Is there any way to move the clip while retaining the transitions at the beginning and end? It would be so much easier to be able to roll the edges of the gap clips so that I didn't have to make extra edits and workarounds.
The problem seems to be that the gap clip acts as like a regular black slug video clip in some cases, but not in other case. When you move a clip in the primary storyline a gap clip is automatically created to fill a gap -- okay, fine. But you can roll the edges of a video clip with the P tool, but not a gap clip. ***?
I'm using the latest update, 10.0.8. I will be submitting this to Apple as well....I am trying to move the text clip forward with the transitions still attached. The difference is that in FCP7 you can leave a gap before a dissolve and it will fade in from black. If you move the text clip, the dissolve moves with it, still attached.
In FCPX however, the gap has to be a gap clip. So the dissolve is attached to both the gap clip and to the text clip. Once you put the dissolve on the edit point, there is no way to move the text clip forward or back on the timeline without deleting the dissolve. Or, if you move the clip forward or back with the Position tool (necessary to create a gap) then the transitions just disappear.
Basically, I am looking to roll the transition with the clip.
I could use the opacity handle on the text clip (using "show video animation") in stead of a dissolve, but then I have no control over the shape of the dissolve curve and I'd have to add extra handles to the text clip to center the dissolve where I want it.
Regarding "I very seldom use the position tool. Rolling the gap clips can be done with the regular arrow tool - *that* is one example of the magnetic timeline working for you."
This is true, but clips behave differently when you you roll with the P tool vs the A tool. With the A tool, other clips are magnetically rippled forward or back on the timeline to maintain their relative relationship and avoid all gaps. With the P tool, video clips maintain their position on the timeline, creating or trimming gap clips when a gap is created or filled. The problem arises when a transition is attached to the clip you are moving or trimming.
I understand in priniciple why it behaves the way it does, but it's inconvenient in this case, and inconsistent with the normal behavior of gap clips when a transition isn't involved.
In my mind the transition should be anchored to the video clip, not to both the video and gap clip when there is a transition between the two. -
Hi All
Please help
my server not working showing display error window server 2008 r2 error show "stop :- c00002e3 security account manager initialization failed because of the for A DIVICE ATTACHED to the system is not funcation"
Please help me how to resolve this issue ???
thnaks !!!Hi,
If there is any external device plug into your computer, please unplug it and restart the Server.
You can also test the issue in Safe mode.
If it can boot into Safe mode, please update any driver has yellow warning on it, also check if the dump file is existing under %SystemRoot%\, if so, please help to post back for our research.
Kate Li
TechNet Community Support -
System.Diagnostics.EventLog - A device attached to the system is not functioning
I was getting an error ....
System.ComponentModel.Win32Exception was caught
ErrorCode=-2147467259
HResult=-2147467259
Message=A device attached to the system is not functioning
NativeErrorCode=31
Source=System
StackTrace:
at System.Diagnostics.EventLogInternal.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type)
at VB_Braums_ClassLib.LogIt.WriteEventLog(String Entry, EventLogEntryType eventType, String Source) in \\Corp01\Vol1\Mis\Pccode\Ms.net\ProductionLibs\ProductionLibs\ProdLibCommon.vb:line 3666
InnerException:
This code is in a library, so I create a "hello world" to demonstrate the issue. I will post it at the end. This .net 4 framework and it's been around for a while in our code. We are starting to upgrade from XP to Win 7. Basically event log sizes
are limited to the 32667 number. So we had a test, if the string is bigger than that, then we would write it in 32000 byte chucks. On two different win7 boxes we get the "device attached" error message. Run the same code on a XP box and it works.
Oh, and the Win 7 boxes are 64 bit. I wonder if the win 7 32 bit would have the same issue? Can others duplicate it? The tmpsize seems to be different numbers, but if you play with it, you can get it down to number x works and (x+1) does not.
Here the code .....
Module Module1
Sub Main()
Dim logName As String = "BraumsLog"
Dim objEventLog As New System.Diagnostics.EventLog()
Dim needCreate As Boolean = False
Dim Source As String = ""
If Source.Length = 0 Then Source = "Test"
Dim Entry As String = "".PadLeft(64000, "1"c)
'Register the App as an Event Source
If EventLog.SourceExists(Source) Then
Dim slog As String = EventLog.LogNameFromSourceName(Source, ".")
If slog <> logName Then EventLog.DeleteEventSource(Source) : needCreate = True
Else
needCreate = True
End If
If needCreate Then EventLog.CreateEventSource(Source, logName)
objEventLog.Source = Source
'*********** New Code ****************
objEventLog.MaximumKilobytes = 20480
objEventLog.ModifyOverflowPolicy(OverflowAction.OverwriteAsNeeded, 0)
'WriteEntry is overloaded; this is one
'of 10 ways to call it
Dim tmp As String = ""
Dim tmpSize As Integer = 32000 '31890 works 31891 does not
Do While Entry.Length > tmpSize
tmp = Entry.Substring(0, tmpSize - 1)
objEventLog.WriteEntry(tmp, EventLogEntryType.Information)
Debug.WriteLine(tmp.Length.ToString)
Entry = Entry.Substring(tmpSize)
Loop
tmp = Entry
objEventLog.WriteEntry(tmp, EventLogEntryType.Information)
End Sub
End ModuleRun the same code on an XP 64 bit box and it works? XP comes in multiple flavors.
Perhaps you should compile to x86 CPU and see if it works on Win 7 64 bit. Win 7 comes in 32 and 64 bit also.
On the other hand Win 7 service pack 1 mainstream support ended on the 13th of this month. Extended support ends in 2020 supposedly. Perhaps you should upgrade to Win 8.1 instead. Win 10 is coming soon enough.
Windows lifecycle fact sheet
Microsoft Product Lifecycle Search - Windows 7 result
La vida loca
Maybe you are looking for
-
Internal order number not present in debit memo request in External billing
Hi Experts, We are working on external billing in CRM and have single object controlling configured. I am trying to create a Debit Memo Request in ECC from a confirmation in CRM. This confirmation is created as a follow-up to the service order. The d
-
How do I set a user to access with ftp to his/her website folder ?
I am new to MacOSX I come from Linux Server administrated with Virtualmin I was able to setup with SLP 10.6.8 Now everything works but ftp ... I want to do this: 1) web site domain1 = OK 2) mail user@domain1 = OK 3) mysql access user(domain1) = OK --
-
Newbee - How to parse XML document
I need complete code to parse java. It can be using SAX or Xerces2. Any help would greatly be appreciated
-
The manager just said..."here hold down the on/home key together..etc..etc.. like the manual!!! i said well i already did that!
-
I bought a prepaid pantech caper today..i tried to program it..it will not!!! lol i do not have a number to call a person!! someone please help me!