2011 Sep 28 11:48 AM
hi,
Our client is using 4.6c system.
I want to download PO attachment with GOS functionality. I tried using FM BDS_GOS_CONNECTIONS_GET in 4.6c system. But this FM is not present in 4.6c System. Is there any other way of downloading PO attachment without using above Fm.
Thanks
hi,
Our client is using 4.6c system.
I want to download PO attachment with GOS functionality. I tried using FM BDS_GOS_CONNECTIONS_GET in 4.6c system. But this FM is not present in 4.6c System. Is there any other way of downloading PO attachment without using above Fm.
Thanks
2011 Sep 28 12:24 PM
Hi,
Please use the below code to get attachment from GOS for Pur Order .
w_bo_id = w_ebeln.
lo_is_object_a-instid = w_bo_id.
lo_is_object_a-typeid = ' '. "Please find the BOR for Por Order Using Trace
lo_is_object_a-catid = 'BO'.
wa_rel-sign = 'I'.
wa_rel-option = 'EQ'.
wa_rel-low = 'ATTA'.
APPEND wa_rel TO t_rel.
CALL METHOD cl_binary_relation=>read_links
EXPORTING
is_object = lo_is_object_a
it_relation_options = t_rel
IMPORTING
et_links = t_links.
LOOP AT t_links INTO wa_links WHERE typeid_b = 'MESSAGE'.
CLEAR : w_doc_name,w_doc_type,t_content.
MOVE wa_links-instid_b TO wa_document_id.
CALL FUNCTION 'SO_DOCUMENT_READ_API1'
EXPORTING
document_id = wa_document_id
TABLES
object_header = t_header
contents_hex = t_content
EXCEPTIONS
document_id_not_exist = 1
operation_no_authorization = 2
x_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2011 Sep 28 1:29 PM
hi Balaji,
Thanks for your reply.
Can you please tell me if i can get all kind of attachment(like .JPEG, .PDF, .txt, .doc) with your method and can we save these files to application server.
My requirement is something like this.
Selection screen will ask for purchase order numbers in bulk lets say 100 POs.
after executing the program i should be able to download the PO output to application server in PDF format.
along with this i need all the attachment to all the POs to be saved in application server.
Please tell me whether this is possible in 4.6c. Thanks a lot in advance!
2011 Sep 28 1:56 PM
Hi,
I haven't worked on 4.6C. Please check.
At the end of FM SO_DOCUMENT_READ_API1, your attachemnt data will be filled in the internal table t_content for any type of file.
Just try to Play with that internal table data!
Good luck!
Regards
Balaji R
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |