Skip to Content
0

Attach JPEG to service order - IW33

Aug 04, 2017 at 04:07 PM

135

avatar image
Former Member

Hello,

Could someone please suggest an FM to upload a JPEG document to service order (IW33)? I did go through available stuff here but none seems to be very clear .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Sandra Rossi Aug 05, 2017 at 09:48 AM
2

Here is how you can search for answers more efficiently.

You should not search for "how to attach a JPEG" but for "how to attach a file", as the question and the answer is the same for any file format.

Most of master data in ABAP-hased systems are defined as "Business Objects", and files can be attached to business objects by first loading the file as a "SAPoffice document", and attaching it to the "business object" through the "Object Relationship Service".

To know how to attach a file to a business object, please search for "business object" attachment. Note that there are several ways of performing the task, so just try the first provided solution which is the most clear to you.

You should also identify which type of business object is a service order (search for "service order" "business object"), so that you can adapt the code for your requirement.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 15, 2017 at 03:04 PM
-1

Anyone has any idea about this error ? This is triggered only in background.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 15, 2017 at 03:04 PM
-1

Anyone has any idea about this error ? This is triggered only in background.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 15, 2017 at 03:04 PM
-1

Anyone has any idea about this error ? This is triggered only in background.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 04, 2017 at 08:25 PM
-2

Hi Ankit - Can you try this one SAP_WAPI_ATTACHMENT_ADD

Show 1 Share
10 |10000 characters needed characters left characters exceeded

The function module SAP_WAPI_ATTACHMENT_ADD attaches a file to a workitem (of application SAP Business Workflow), not to a business object.

0
avatar image
Former Member Aug 10, 2017 at 08:34 PM
-2

Thanks for your response. I was able to attach documents to service order in foreground using FM BDS_BUSINESSDOCUMENT_CREATEF. However when I try to run my program in backf=ground it gives me an error : sap Knowledge Provider: Error in opening a file.

Any insight ?

Thanks,

AM

Show 2 Share
10 |10000 characters needed characters left characters exceeded
(sorry, didn't see your message; if you don't use "comment on this answer", the guy providing "this" answer is not informed of your message)

BDS_BUSINESSDOCUMENT_CREATEF is for uploading a file via the SAPFTP RFC destination used for communication with the frontend. The quickest way to finish your code is to read the file from the application server, and call BDS_BUSINESSDOCUMENT_CREA_TAB (instead of ...CREATEF).

0
Former Member

Thanks Sandra. i will try it out!

0