Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create PO with Attachment

Former Member
0 Likes
3,619

Hi all,

I have a requirement to

1. Upload all PO with BAPI - BAPI_PO_CREATE1 WITH attachments.

I have already used the BAPI to create the Po's. Now Attachment part is left.

Anyone having suggestions please reply.

Thanks

Varun

9 REPLIES 9
Read only

Former Member
0 Likes
1,611

HI Varun,

try to use below FM's,

SO_ATTACHMENT_LIST_READ - Gets the list of all attachments in the

system.

SO_ATTACHMENT_READ - Retrieves attachment data.

SO_ATTACHMENT_INSERT - Saves an attachment to SAP.

Thanks!

Read only

0 Likes
1,611

thanks prasanth for your reply.

Yes SO_ATTACHMENT_INSERT can bve used. but i want to use it for uploading multiple attachments.

Lets say i first run the BAPI to create then what information will be input into this function module and how do get this information.

varun

Read only

Former Member
0 Likes
1,611

hi

you can attach manually any document to PO without using Document Management System ( DMS ).

Save you PO in ME21N and again open with change ( ME22N ) then you can attach document through

Service for Object button. Service for Object button available down side of Command screen.

just click your service object button -> create -> create attachment

then select your window directory ( which file you need to attach) select your file Now your system shows message service "Create attachment" is started.

save again your po. You can seeyour attachment in same field ( Service for Object ) select and create and check attachment list. You can attach as many document in your PO.

hope this helps

regards

Aakash Banga

Read only

0 Likes
1,611

yes aakash but i want it like bulk upload to all corresponding PO's. manually yes i know.

Read only

Former Member
Read only

0 Likes
1,611

I'm looking at function module SO_ATTACHMENT_INSERT.

Can anyone explain me how to use it.

Read only

Former Member
0 Likes
1,611

hi,

check this .....very useful

http://michaelxuhan.spaces.live.com/blog/cns!C6A105EFC55AE48F!233.entry

hd_dat-objdes = header_mail.

CALL FUNCTION 'SO_ATTACHMENT_INSERT'

EXPORTING

object_id = object_id

attach_type = attach_type

object_hd_change = hd_dat

owner = sy-uname

TABLES

objcont = l_objcont

objhead = l_objhead

EXCEPTIONS

active_user_not_exist = 35

communication_failure = 71

object_type_not_exist = 17

operation_no_authorization = 21

owner_not_exist = 22

parameter_error = 23

substitute_not_active = 31

substitute_not_defined = 32

system_failure = 72

x_error = 1000.

IF sy-subrc > 0.

ENDIF.

/people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii

check this blog

Read only

0 Likes
1,611

Hi Rimpa,

thanks a lot for your post.

can you provide the content of MSN spaces site here. (just copy paste it), as i cannot access this site from my office . its blocked.

varun

Read only

Former Member
0 Likes
1,611

answerd