on 10-14-2010 5:44 PM
Hi All,
I'm new to ABAP and I have a requirement to print a Sales Order Confirmation Slip. Both the Sales Order Form and associated FAX Cover sheet are non standard and I've developed them as separate forms. The user will go to VA02/VA03 to either print, fax or email the output. Only if the user selects fax will a cover sheet be added to the request.
I tried controlling this via the form, but there is no way to conditionally print a master page.
So, I need to be able to submit both the cover sheet and Sales Order Confirmation in the same job.
Currently the SO print program uses the SD_PDF_SEND_DATA function module which creates a CL_BCS object to send faxes.
Is there a way to assign multiple documents to CL_BCS object? (I don't see one).
How can meet this requirement?
You could use the same spool request for your two different forms. Check the input parameters of the form function.
cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not exactly sure how that would work. I tried something like what is below. I had to debug to reset the state of the print object, but I was only trying to prove your concept. When I tried this, it created two entries in SOST. I'm trying to create one entry that has both documents, so that the fax will always arrive at the customer as one document.
lv_cover_pdf_size = XSTRLEN( is_cover_main_data-pdf ).
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = is_cover_main_data-pdf
TABLES
binary_tab = lt_cover_bcs_pdf.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'PDF'
i_subject = iv_email_subject
i_length = lv_cover_pdf_size
i_language = iv_language
i_hex = lt_cover_bcs_pdf
RECEIVING
result = lo_cover_bcs_document.
CALL METHOD cl_document_bcs=>create_document
EXPORTING
i_type = 'PDF'
i_subject = iv_email_subject
i_length = lv_pdf_size
i_language = iv_language
i_hex = lt_bcs_pdf
RECEIVING
result = lo_bcs_document.
CALL METHOD lo_bcs_document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_size = lv_pdf_size
i_attachment_subject = iv_email_subject
i_attachment_language = iv_language
i_att_content_hex = lt_bcs_pdf.
*--- Set the fax address of the recipient
CALL METHOD cl_cam_address_bcs=>create_fax_address
EXPORTING
i_country = is_address-recip_fax_country
i_number = is_address-recip_fax_number
RECEIVING
result = lo_recipient.
*--- Set the fax address of the sender
IF NOT is_address-sender_fax_number IS INITIAL.
CALL METHOD cl_cam_address_bcs=>create_fax_address
EXPORTING
i_country = is_address-sender_fax_country
i_number = is_address-sender_fax_number
RECEIVING
result = lo_sender.
ELSE.
lo_sender = cl_sapuser_bcs=>create( sy-uname ).
ENDIF.
I'm trying to create one entry that has both documents, so that the fax will always arrive at the customer as one document.
I don't think you'll be able to do that. CL_BCS is intended for communications, not for form joining. What you can do is sent the documents as two different attachments.
So, you have two different forms. When FAX is selected both forms are printed one after the other. You want to merge them as one document.
Important question: Are you using Sapscript, Smartforms or Adobe Forms?
HI Andres,
Can you please suggest if we can select multiple attachments in one shot on same screen of services for objects and upload multiple documents in the services for objects in one single step?
Now I have to select one document then attach and then again goto services for object and select 2nd document and attach. I need to do repeatedly multiple times.
Please advise.
Thanks in advance
Akhilesh
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.