Malerial List With DMS document attached to it
Hi
Can any one have idea from where i can get Material list to which Documents are attached.
Hello,
In standard system, It is not possible to print attachment via the message output. Please refer Question 30 of attached
note 457497.
457497 FAQ: Message processing in purchasing
"Can documents that are linked to a purchase order also be output in the message output? " And the answer is: No."
There is no posibility to print attached documents from ME9F. Printing the PO from ME9F and print the document from ME22N by
selecting the document and pressing print button. You will only be able to see the screen linked documents when an item in the po (or position) has been selected.
Regards,
Similar Messages
-
Why can I not attach a document to an email? Every time I want to send an email with a document attached to it, an error notice pops out. It tells me that the file is being used even when iall other programs are closed. How can I fix this issue?
Thanks Jeff, I was not aware that a template could be multi-page. (All the existing templates were 1 page)
But it worked, saving me some steps. When I was finished I renamed the document, and locked it.
Then tried to save it but could not because it was locked. I closed it, went to my Spread Sheet Folder ,
to find it, it was not there. The Finder could not find it either.
So I start over again.
I opened up Numbers and it showed my personal Numbers template folder, it contained both my new
original 4 page template and the vanished saved document!
I tried to delete the template containing these document data and could not - I had to go to the Library/Application Support/Numbers to physically remove it from this folder. Then I started over again. I Finally found out how to make it work: I can now "save as", and then lock, and it will go to place where I want it to be saved and locked.
The secret is: Click on the document title in the menu bar, and it opens up "Save as...", which works the same as in OS 10.4.11, and you can pick the place you want for saving. Once done that, you can then lock the document in the same pull down menu, and then close it.
I also found later that I can delete a template from its folder, by letting Numbers open the templates,
clicking on the one I want to remove, then go to the "Numbers Menu/File/Move to...", select "Desktop"
and from there the selected template can then be thrown into the Trash from there.
It appears now that the real fault of the Numbers software is that the "Save as" command is not available in the "Edit" or "File" pull-down menus, but hidden behind the title of the document. -
New DMS document attachment to order header - can it also be done to a task list?
With business function LOG_EAM_CI_6, you can now attach DMS documents to the order header or operation level in the 'Additional Data' tab.
Since a lot of clients use documents to list complex preventive maintenance instructions, is it also possible to attach a DMS document to a task list header (or operation) and have it show up in the new 'Additional Data' screen area of the resulting order (using a maintenance item/plan to generate the order)? Or do we still have to use the task list operation PRT functionality and have it show up in the order's operation PRT?Hi Arthur,
I have configured Task list as per the SAP note 1821916 & activated DOC_TL_GUI. This allowed me to attach documents to the Operation &/or Header of the Task Lists. The problem I am facing is when I assign the task list to the work order the documents are not transferred . You have stated that they have transferred to the work order so I am wondering if there is something I missed.
Arthur Balajthy wrote:
And I checked that by adding documents to a task list header or operation, the work order generated from a maintenance plan/item referencing that task list does have those documents attached also.
I haven't tried from a Plan but will do that now.
I assumed if they were attached to the Task List Operation they would transfer to the Work Order like everything else on the Task List
Thanks in advance -
DMS document attachment with Incoming Invoice
Hi All,
We are creating one DMS document and want to attach it to an Incoming Invoice (MIRO).
We are using the bapi BAPI_DOCUMENT_CREATE. What are the fields to pass in Objectlink.
Please help us to achieving it.
ThanksWe have created an Incoming Invoice already using 'BAPI_INCOMINGINVOICE_CREATE'. We are now creating a DMS document using 'BAPI_DOCUMENT_CREATE' and want it to be linked to the existing Invoice. For this we are trying to use the 'OBJECTLINKS' table.
The linked document should be visible in T-Code FBL1N. Can you please throw some light on how to do this?
Edited by: Himansu.P on Jun 14, 2011 3:06 PM -
DMS document attachment to Service Entry sheet
Hi All,
One requirement, need to attach DMS document with Service entry sheet (t-code ML81N), any possibilites with object linking as in standard there is no object linking (ESSR object) available.
Thank You,
Manojhi,
1. I think u could use services for objects is the best way to fulfil requirement.
note: a. If u want to use ESSR as business document. u need to go for Archive linking and store document as business
document in Services for objects.
2. If u going to use standard object linking from DMS for 'ESSR' object so for not exist.
Note:reason is not required any DMS object linking here as i guess. Coz u will be creating Entry sheet agianst Purchase
orders and vendors too.
IN PLM, u can maintain DIR in purchase order or u can maintain in vendor masters. any how u r filling WBS nor also in
basic data sheeet of ML81N.
So datacan be easily tracable due to all are interconnected each other.
3. If u want to use ESSR as object link from DMS u need go for development. but this is not required as i guess.
Benakaraj
??P -
Hi,
DMS document is attached to PO .The requirement is that the attachment should be outputted with PO to the vendor.
Also ,I am able to see the attachment in ME 22/ME 23 but unable to see in ME22N/ ME23N.
Please advice.
Regards,
PratapHello,
In standard system, It is not possible to print attachment via the message output. Please refer Question 30 of attached
note 457497.
457497 FAQ: Message processing in purchasing
"Can documents that are linked to a purchase order also be output in the message output? " And the answer is: No."
There is no posibility to print attached documents from ME9F. Printing the PO from ME9F and print the document from ME22N by
selecting the document and pressing print button. You will only be able to see the screen linked documents when an item in the po (or position) has been selected.
Regards, -
DMS Document Attachment for Z Transactions
Dear All,
I have a Z transaction ( Module Pool ) , its getting used for some customer business process which is not mapped in sap. now my user requirement is that he wants to attach some documents ( diff types ) to that ztransaction like DMS functionality for normal business transactions.
Please help me to achieve this..
Regards
GeeWhat do you mean by DMS type document attachment to the t-code powered by a Z-program? Can you elaborate on the requirement?
What type of module pool is this? Are you trying to build a report using it? -
Hi,
I am new to DMS & I have to attached scanned images of invoices through MIRO transaction to SAP object. How should I go with it?
Anyone has worked on DMS???
kindly help...Hi,
Try using this function module mentioned below:
CALL FUNCTION 'CV120_KPRO_MASTER_DATA_GET' " Checking whether the document already have any originals
" attached on it or not
EXPORTING
pf_dokar = i_data_final-doc_type "document type uploaded into an internal table from the external file
pf_doknr = i_data_final-doc_no "document number uploaded into an internal table from the external file
pf_dokvr = i_data_final-doc_ver "document version uploaded into an internal table from the external file
pf_doktl = i_data_final-doc_part "document part uploaded into an internal table from the external file
pf_active_only = ' '
pf_comp_get = ' '
TABLES
ptx_data = i_data
EXCEPTIONS
not_found = 1
error = 2
OTHERS = 3.
if i_data[] is initial.
*- Documentdata
doc_data-documenttype = i_data_final1-doc_type.
doc_data-documentnumber = i_data_final1-doc_no.
doc_data-documentversion = i_data_final1-doc_ver.
doc_data-documentpart = i_data_final1-doc_part.
doc_data-statusintern = i_data_final1-doc_stat.
doc_data-username = i_data_final1-drwng_creator.
IF NOT i_data_final1-doc_desc IS INITIAL.
doc_data-description = i_data_final1-doc_desc.
ENDIF.
APPEND doc_data.
*- ClassAllocations
doc_class_alloc-classtype = c_classtype.
doc_class_alloc-classname = c_classname.
doc_class_alloc-standardclass = 'X'.
APPEND doc_class_alloc.
Adding Primary, SUBtye and Design Project Characteristics to the DRAWING Class
CLEAR it_char_val.
it_char_val-classtype = c_classtype.
it_char_val-classname = c_classname.
it_char_val-charname = 'PRIMARYTYPE' .
it_char_val-charvalue = i_data_final1-prim_type.
APPEND it_char_val.
CLEAR it_char_val.
it_char_val-classtype = c_classtype.
it_char_val-classname = c_classname.
it_char_val-charname = 'SUBTYPE' .
it_char_val-charvalue = i_data_final1-sub_type.
APPEND it_char_val.
CLEAR it_char_val.
it_char_val-classtype = c_classtype.
it_char_val-classname = c_classname.
it_char_val-charname = 'DESIGN_PROJECT' .
it_char_val-charvalue = i_data_final1-design_proj.
APPEND it_char_val.
CLEAR it_char_val.
*Bapi called to create the document using tcode CV01N
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = doc_data
hostname = gv_hostname
pf_http_dest = 'SAPHTTPA'
pf_ftp_dest = 'SAPFTPA'
IMPORTING
documenttype = i_data_final1-doc_type
documentnumber = i_data_final1-doc_no
documentpart = i_data_final1-doc_part
documentversion = i_data_final1-doc_ver
return = ls_return
TABLES
characteristicvalues = it_char_val
classallocations = doc_class_alloc
endif.
Hope it helps
Regards
Mansi
Edited by: MANSI ASNANI on Oct 15, 2009 7:09 AM -
DMS-Document attachment in MIRO
Dear All,
Can we attach documents in MIRO and FB60 transactions.
Regards,
Venkat.Hi Venkat,
From dms point of view,you want to display (attach)the documents to perticular screen means object link needs to be given.
In standard environment there is no MIRO or MIGO transaction as onject link.You can link to Material Master(MARA).I hope this you already know.
If you want to see dms screen in MIRO or MIGO transaction,you have to go for z-deveploment which can be programe writen by abap consultant.
I hope this will resolve the query.
Regards,
Ravindra -
Travel Management - List of scanned document attachment
Experts,
I have attached 100 scanned document in 100 claims in transaction PR05. Now, I want to check the same in the list. Is this possible through any transaction code.
Please advise if we can attach a scanned document to an Expense Type (means expense line item in a claim).
For example, If there are 5 expense in a claim and we want to attached 5 individual receipts(scanned copies) as a support to the line items. Please advice whether it is possible.
Thanks and RegardsThanks for your response... I had already mentioned that I am doing it through PR05. However, I want to run a report which will tell me that all the claims has supporting documents in one single file.
Hope this clarifies the requirement.
Regards,
Shiv -
I have seen other forms simply open the email client once the user has signed the form, but I am unable to figure out how to do this :/
Thanks,
WayneIf you set up a digital signature field, you can attach a script (e.g., doc.submitForm, doc.mailDoc) to the "Signed" event.
-
DMS Document is not opening in ITS screen
Hi All,
We are on EP 7. 0 SP 17 & ECC 6.0.
Our HODs are approving PO's and PR's through Portal through UWL. But when they are opening a PR or PO with DMS document
attachment, the attachment file is not opeing in ITS screen.
Thanks & Regards,
Bharat Mistry.Hi Bharat,
Have you tried to execute the same t-code in the WEBGUI directly? The result is the same? You can check SAP note 1058218 (ITS Up/Down: open document with application directly) too (I don't the SAP_BASIS version from your backend system).
You also need to be sure that the document you are trying to open is in the app server and not in a local PC (via network drive): this will not work.
Regards,
Cristiano -
Services for Object (GOS) Attachement List not showing after attachment
Hi All,
I have created a new entry for the Generic Object Service List and this links to a copy of the CL_GOS_SRV_ATTACHMENT_CREATE class (Create attachment) with some additional logic. However, after attaching a file, the "Attachment List" does not become available until after I re-enter the transaction. The attachment list is showing the correct attachments.
After some (understatement...) investigation, I found that even if I try and link the new service to a unchanged copy of the CL_GOS_SRV_ATTACHMENT_CREATE service in SGOSATTR, it is not working. It is attaching fine, but the "Attachment List" entry in the Services for Object Menu is still greyed out. If I attach the original class CL_GOS_SRV_ATTACHMENT_CREATE to the newly created entry it works fine. e.g. straight after I attach a file to the transaction, the menu entry becomes available.
I can't find where the re-draw of the GOS menu happens and hence can not determine what is going wrong. Does anybody know if this is part of the Kernel or is this actually done in ABAP ?
Am I missing something ? Debugging including system debugging for two days now and can't find it... very frustrating.
Any help would be appreciated.
Thanks,
Wouter.Hi Wouter,
I had originally posted to ask if you had resolved this since I was facing the same issue, but then deleted my post when I was able to get it working. Sorry, I didn't mean to initiate a flurry of activity in such an old thread.
My scenario is I created a new GOS service entry in table SGOSATTR using transaction SGOSM. My new service uploads attachments to an external document management system via a call to a RESTful web service. The class I use in the SGOSM entry is a custom subclass of CL_GOS_SRV_URL_CREATE.
I resolved this issue by taking a look at what CL_GOS_SRV_URL_CREATE does in its EXECUTE method. The key bits to refresh the GOS Attachment List with the new attachment are...
raise event commit_required. " if SGOSM has the commit flag checked
raise event service_succeeded
exporting eo_service = me.
These events tell any subscribers to go do their thing-- which in this case includes a refresh of the GOS Attachment List. So in the EXECUTE method of my custom subclass, after I call function BINARY_RELATION_CREATE, I raise these events...
CALL FUNCTION 'BINARY_RELATION_CREATE'
EXPORTING
obj_rolea = gs_object
obj_roleb = rel_doc
relationtype = 'URL'
EXCEPTIONS
OTHERS = 1.
CASE sy-subrc.
WHEN 0.
MESSAGE s043(sgos_msg). " The attachment was successfully created
RAISE EVENT commit_required.
RAISE EVENT service_succeeded
EXPORTING eo_service = me.
WHEN OTHERS.
MESSAGE s042(sgos_msg). " The attachment has not been created
ENDCASE.
I hope this is helpful to you even though your initial implementation was a while back. Thanks for replying to my question though!!
Cheers,
Amy -
Transport document attached to infoobject from development to qualification
Hi Experts,
I am facing issues with transporting document attached to one infoobject.
I tried to transport this by going into RSA1-documents-attributes and taking the logical and physical ID's. But it did not work.
I tried transnporting the table entries BDSCONT8 and BWCONTMAST, but of no use.
Could you please let me know the procedure to transport the document attached to the infoobject.
Could you please let me know how to check where these documents are stored. I have no Idea if these are stored in BDS.
Regards,
PurnimaUse program RSOD_CTO.
-
Sending DMS Document as Attachment thru e-mail
Hi,
I am attaching the DMS document in purchase order & I am sending the PO thru email to vendor.But while doing so the attached document shuld be sent as attachment But in my present config setting it is not doing so.
Pl suggest
RgdsHi,
With my solution you will be able to send the PO and all link document in a mail at the same time you print it.
First Step
Create a new message with transaction NACE , this message will use support 8 ( external program) . The print program should be a copy the same as for printing your PO but add a new form entry inside.
Second step .
In the print program , create the new form entry and add the code . bellow a sample code i wrote . Some object are specific so you have to create it . If you need i can give you te detail of thoses objects.
DATA : bin_file TYPE xstring ,
bin_filesize TYPE i ,
w_objky TYPE objky,
my_sender TYPE zcl_send_mail=>ty_sender,
mail_line TYPE LINE OF soli_tab,
w_attsub TYPE so_obj_des.
DATA: l_druvo TYPE t166k-druvo,
l_nast TYPE nast,
l_from_memory,
l_doc TYPE meein_purchase_doc_print.
DATA : v_parvw2 TYPE nast-parvw,
v_parnr2 TYPE nast-parnr,
v_lifnr TYPE konv-lifnr,
v_adrnr TYPE lfa1-adrnr,
st_address TYPE addr1_sel,
st_sadr TYPE sadr.
* definition des tables internes
DATA : it_otf TYPE STANDARD TABLE OF itcoo ,
it_line TYPE STANDARD TABLE OF tline ,
it_fill TYPE STANDARD TABLE OF drad,
it_new TYPE STANDARD TABLE OF drad ,
itb_xtkomv TYPE STANDARD TABLE OF komv WITH HEADER LINE,
itb_xekpo TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
it_ekpo TYPE HASHED TABLE OF ekpo WITH UNIQUE KEY ebeln ebelp ,
it_draw TYPE HASHED TABLE OF draw WITH UNIQUE KEY dokar
doknr
dokvr
doktl ,
it_drat TYPE HASHED TABLE OF drat WITH UNIQUE KEY dokar
doknr
dokvr
doktl
langu,
my_attachement_list TYPE zcl_send_mail=>attachement_list,
my_recipient_list TYPE zcl_send_mail=>recipient_list ,
it_hexa TYPE solix_tab ,
it_body TYPE soli_tab.
CONSTANTS : c_object TYPE dokob VALUE 'EKPO' .
FIELD-SYMBOLS : <ekpo> TYPE ekpo,
<drad> TYPE drad ,
<draw> TYPE draw,
<drat> TYPE drat .
DATA : my_mail TYPE REF TO zcl_send_mail . => Specific object
** Here write your own code like you print the PO form in order to be able to retrieve it from memory
** don't send it to the printer only in spool .
* Get OTF from Memory.
CALL FUNCTION 'READ_OTF_FROM_MEMORY'
EXPORTING
memory_key = nast-objky
TABLES
otf = it_otf
EXCEPTIONS
memory_empty = 1.
CHECK sy-subrc EQ 0.
* Transform OTF into PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = bin_filesize
bin_file = bin_file
TABLES
otf = it_otf
lines = it_line
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4.
* Transform PDF as Binary Table
it_hexa = cl_document_bcs=>xstring_to_solix( ip_xstring = bin_file ).
* Add PO as PDF file to the mail
zcl_send_mail=>add_attachement_to_list(
EXPORTING
type = 'PDF'
subject = 'PO'
content_hexa = it_hexa
CHANGING
attachement_list = my_attachement_list
EXCEPTIONS
no_content_for_attachement = 1
no_application_type = 2 ).
* Get PO Item because DIR are link to item only.
SELECT * FROM ekpo
APPENDING CORRESPONDING FIELDS OF TABLE it_ekpo
WHERE ebeln = nast-objky.
* Search for DIR .
FREE : it_draw , it_drat .
LOOP AT it_ekpo ASSIGNING <ekpo>.
FREE : it_fill , it_new.
CONCATENATE <ekpo>-ebeln <ekpo>-ebelp INTO w_objky.
CALL FUNCTION 'CV140_SELECT_DRAD_DOCUMENTS'
EXPORTING
pf_key = w_objky
pf_object = c_object
TABLES
pt_fill_drad = it_fill
pt_new_drad = it_new
EXCEPTIONS
no_document = 1.
* For each DIR , retrieve physical content
LOOP AT it_fill ASSIGNING <drad>.
IF <draw> IS ASSIGNED.
UNASSIGN <draw>.
ENDIF.
READ TABLE it_draw ASSIGNING <draw>
WITH TABLE KEY dokar = <drad>-dokar
doknr = <drad>-doknr
dokvr = <drad>-dokvr
doktl = <drad>-doktl.
IF NOT <draw> IS ASSIGNED.
SELECT * FROM draw
APPENDING CORRESPONDING FIELDS OF TABLE it_draw
WHERE dokar = <drad>-dokar
AND doknr = <drad>-doknr
AND dokvr = <drad>-dokvr
AND doktl = <drad>-doktl.
SELECT * FROM drat
APPENDING CORRESPONDING FIELDS OF TABLE it_drat
WHERE dokar = <drad>-dokar
AND doknr = <drad>-doknr
AND dokvr = <drad>-dokvr
AND doktl = <drad>-doktl
AND langu = sy-langu.
READ TABLE it_draw ASSIGNING <draw>
WITH TABLE KEY dokar = <drad>-dokar
doknr = <drad>-doknr
dokvr = <drad>-dokvr
doktl = <drad>-doktl.
ENDIF.
CHECK <draw> IS ASSIGNED.
READ TABLE it_drat ASSIGNING <drat>
WITH TABLE KEY dokar = <drad>-dokar
doknr = <drad>-doknr
dokvr = <drad>-dokvr
doktl = <drad>-doktl
langu = sy-langu.
IF <drat> IS ASSIGNED.
w_attsub = <drat>-dktxt.
ELSE.
CONCATENATE <drad>-dokar <drad>-doknr <drad>-dokvr <drad>-doktl
INTO w_attsub SEPARATED BY '/'.
ENDIF.
PERFORM add_fid_to_attachement USING <draw>
w_attsub
CHANGING my_attachement_list.
CHECK <drat> IS ASSIGNED.
UNASSIGN <drat>.
ENDLOOP.
LOOP AT it_new ASSIGNING <drad>.
IF <draw> IS ASSIGNED.
UNASSIGN <draw>.
ENDIF.
READ TABLE it_draw ASSIGNING <draw>
WITH TABLE KEY dokar = <drad>-dokar
doknr = <drad>-doknr
dokvr = <drad>-dokvr
doktl = <drad>-doktl.
IF NOT <draw> IS ASSIGNED.
SELECT * FROM draw
APPENDING CORRESPONDING FIELDS OF TABLE it_draw
WHERE dokar = <drad>-dokar
AND doknr = <drad>-doknr
AND dokvr = <drad>-dokvr
AND doktl = <drad>-doktl.
SELECT * FROM drat
APPENDING CORRESPONDING FIELDS OF TABLE it_drat
WHERE dokar = <drad>-dokar
AND doknr = <drad>-doknr
AND dokvr = <drad>-dokvr
AND doktl = <drad>-doktl
AND langu = sy-langu.
READ TABLE it_draw ASSIGNING <draw>
WITH TABLE KEY dokar = <drad>-dokar
doknr = <drad>-doknr
dokvr = <drad>-dokvr
doktl = <drad>-doktl.
ENDIF.
CHECK <draw> IS ASSIGNED.
READ TABLE it_drat ASSIGNING <drat>
WITH TABLE KEY dokar = <drad>-dokar
doknr = <drad>-doknr
dokvr = <drad>-dokvr
doktl = <drad>-doktl
langu = sy-langu.
IF <drat> IS ASSIGNED.
w_attsub = <drat>-dktxt.
ELSE.
CONCATENATE <drad>-dokar <drad>-doknr <drad>-dokvr <drad>-doktl
INTO w_attsub SEPARATED BY '/'.
ENDIF.
PERFORM add_fid_to_attachement USING <draw>
w_attsub
CHANGING my_attachement_list.
CHECK <drat> IS ASSIGNED.
UNASSIGN <drat>.
ENDLOOP.
ENDLOOP.
* Send mail to PO creator
* Sender
my_sender-mail = '****' . => Set the sender mail adress
* Add Recipient
zcl_send_mail=>add_recipient_to_list(
EXPORTING
uname = sy-uname
CHANGING
recipient_list = my_recipient_list
EXCEPTIONS
no_recipient_to_add = 1 ).
* Mail body
mail_line = 'PO by mail with Attachment'.
APPEND mail_line TO it_body.
* Create send request
CREATE OBJECT my_mail.
* Send Mail
my_mail->send_mail(
sender = my_sender
mail_subject = 'E-mail PO'
mail_body = it_body
recipient_list = my_recipient_list
attachement_list = my_attachement_list ).
Bellow the code for the routine ADD_FID_TO_ATTACHEMENT
DATA : w_cout TYPE dms_checkout_def,
w_dttrg TYPE dttrg, "Name of data carrier
w_docfile TYPE dms_doc_file,
w_dappl TYPE dappl, "Application
w_tabix TYPE i ,
w_tdwa TYPE tdwa ,
w_phio TYPE dms_phio,
w_frontend TYPE dms_frontend_data.
DATA : it_drao TYPE STANDARD TABLE OF drao WITH HEADER LINE,
it_kpro TYPE dms_tbl_file .
CONSTANTS : "c_print_option TYPE apptp VALUE '3', "Print option
c_hostname TYPE ntadr VALUE 'DEFAULT', "Hostname
c_type TYPE typdt VALUE 'PC', "Type
c_system TYPE char4 VALUE 'WN32'. "System
FIELD-SYMBOLS : <kpro> TYPE LINE OF dms_tbl_file,
<phio> TYPE LINE OF dms_tbl_phio .
CLEAR : w_tdwa .
* Check if for DIR type KPRO is used
CALL FUNCTION 'CV200_DB_TDWA_SELECT'
EXPORTING
pf_dokar = in_draw-dokar
IMPORTING
psx_tdwa = w_tdwa
EXCEPTIONS
not_found = 1.
w_frontend-frontend_type = c_type. "'PC'.
w_frontend-hostname = c_hostname. "'DEFAULT'.
w_frontend-winsys = c_system. "'WN32'.
w_frontend-platform = 0.
w_cout-comp_get = abap_true.
w_cout-kpro_use = w_tdwa-kpro_use.
w_cout-batchmode = abap_true.
w_cout-content_provide = 'TBL'.
CALL FUNCTION 'CV120_KPRO_MASTER_DATA_GET'
EXPORTING
pf_dokar = in_draw-dokar
pf_doknr = in_draw-doknr
pf_dokvr = in_draw-dokvr
pf_doktl = in_draw-doktl
TABLES
ptx_data = it_kpro
EXCEPTIONS
not_found = 1
error = 2.
CASE w_tdwa-kpro_use.
WHEN abap_true.
CALL FUNCTION 'CV120_KPRO_MASTER_DATA_GET'
EXPORTING
pf_dokar = in_draw-dokar
pf_doknr = in_draw-doknr
pf_dokvr = in_draw-dokvr
pf_doktl = in_draw-doktl
TABLES
ptx_data = it_kpro
EXCEPTIONS
not_found = 1
error = 2.
w_frontend-frontend_type = 'KP'.
LOOP AT it_kpro ASSIGNING <kpro>.
FREE it_drao.
LOOP AT <kpro>-tbl_phios ASSIGNING <phio>.
MOVE-CORRESPONDING <phio> TO w_phio.
CALL FUNCTION 'CV120_DOC_CHECKOUT_VIEW'
EXPORTING
ps_cout_def = w_cout
ps_doc_file = w_docfile
ps_draw = in_draw
ps_phio = w_phio
ps_frontend = w_frontend
TABLES
ptx_content = it_drao
EXCEPTIONS
error = 1.
PERFORM transform_fid_to_binary TABLES it_drao
USING <kpro>-dappl
in_attsub
CHANGING attachement_list .
ENDLOOP.
ENDLOOP.
WHEN abap_false.
DO 2 TIMES.
CLEAR : w_docfile .
FREE : it_drao.
w_tabix = sy-index.
w_docfile-fileno = w_tabix.
CASE w_tabix.
WHEN 1.
w_dappl = in_draw-dappl.
w_dttrg = in_draw-dttrg.
WHEN 2.
w_dappl = in_draw-dappl1.
w_dttrg = in_draw-dttrg1.
ENDCASE.
w_docfile-dappl = w_dappl.
w_docfile-dttrg = w_dttrg.
CALL FUNCTION 'CV120_DOC_CHECKOUT'
EXPORTING
ps_cout_def = w_cout
ps_draw = in_draw
ps_doc_file = w_docfile
TABLES
ptx_drao = it_drao
EXCEPTIONS
error = 1
OTHERS = 2.
PERFORM transform_fid_to_binary TABLES it_drao
USING w_dappl
in_attsub
CHANGING attachement_list .
ENDDO.
ENDCASE.
Bellow the code for routine TRANSFORM_FID_TO_BINARY
FIELD-SYMBOLS : <drao> TYPE drao ,
<source> TYPE x ,
<dest> TYPE x,
<hexa> TYPE solix .
DATA : w_filelong TYPE i ,
w_long TYPE i,
w_longdes TYPE i .
DATA : it_hexa TYPE solix_tab .
CHECK it_drao[] IS NOT INITIAL.
* Transform Physical document into Binary
LOOP AT it_drao ASSIGNING <drao>.
IF w_filelong IS INITIAL.
w_filelong = <drao>-orln.
ENDIF.
ASSIGN <drao>-orblk TO <source>.
DESCRIBE FIELD <source> LENGTH w_long IN BYTE MODE.
CLEAR w_longdes.
WHILE w_long GT 0.
ASSIGN <source>+w_longdes(w_long) TO <source>.
APPEND INITIAL LINE TO it_hexa ASSIGNING <hexa>.
ASSIGN <hexa>-line TO <dest>.
DESCRIBE FIELD <dest> LENGTH w_longdes IN BYTE MODE.
MOVE <source> TO <dest>.
w_filelong = w_filelong - w_longdes.
w_long = w_long - w_longdes.
CHECK w_filelong LE w_longdes.
IF w_long NE 0.
w_long = w_filelong.
ENDIF.
CHECK w_long LE 0.
w_long = 0.
ENDWHILE.
ENDLOOP.
* Add file to list of attachment
CHECK NOT it_hexa[] IS INITIAL.
zcl_send_mail=>add_attachement_to_list(
EXPORTING
type = w_dappl
subject = in_attsub
content_hexa = it_hexa
CHANGING
attachement_list = attachement_list
EXCEPTIONS
no_content_for_attachement = 1
no_application_type = 2 ).
In my complete solution, an additionnal screen have been define in the header of PO to allow user managing recipient list . If you need so i can give you the code also .
Let me know.
Best regards
Maybe you are looking for
-
Retrieving data into internal table
Hi, I am struck at a point where i have to retrieve data from 4 database table to a single internal table with some conditions. can anyone please help me in resolving this issue. your help will be highly appreciated. some details are: tables use
-
No clarity on location of archive logs in Oracle 11g database
I have this query which I am not able to resolve. There is one location of archive log mentioned as /oraarch/app/oracle/oradata/snlprod/archive_logs/ in the parameter log_archive_dest_1. But the archive logs are showing in another location /orabackup
-
OUTPUT CONTORL /Type COnfiguration
Hi, Please guide me step by step, how to configure output control. I have created a z print program for a z print form..which should be triggered from MIGO. I guess I have to create a Z output type also (say ZMGO) ..Please advice how to proceed. Rewa
-
HibernateAssembler problem loading object
I'm using LCDS (LiveCycle Data Services) 2.5.1 and I am trying to load a Java object using hibernate and have it given to my flex client. I followed this tutorial: http://blog.comtaste.com/2007/07/livecycle_data_services_and_hi.html Only issue is tha
-
Hi all, I need to send a video to a remote computer through the internet. I am using RTPSockets for this transmit ion. But I need to convert the data source to an array of bytes. Is there a way to do it? But even if I convert it I am not sure this wi