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

PO Document attachment

Former Member
0 Likes
840

hi friends,

Is there a class/object method or function module to read the attachments with a PO Doc (attached using services for object)? I need to download the attachments attached to the PO.

thanks much in advance,

Soumya.

5 REPLIES 5
Read only

former_member480923
Active Contributor
0 Likes
689

You can use the class: CL_ATTACHMENT_LIST for doing that here is the sample code for that. The application will BUS2012.



    TRY.
    CREATE OBJECT GO_ATTALIST
      EXPORTING
        IO_OBJECT       = bo_applicant
        IP_CHECK_ARL    = ' '
*        IP_CHECK_BDS    = 'X'
        IO_CONTAINER    = go_container_al
*        IP_MODE         = GC_MOD_EDIT
*        IP_NOTES        = 'X'
*        IP_ATTACHMENTS  = 'X'
*        IP_URLS         = 'X'
        .
    CATCH CX_SOBL_BROWSER .
    ENDTRY.
    TRY.
    CALL METHOD GO_ATTALIST->DISPLAY
        .
     CATCH CX_SOBL_BROWSER .
    ENDTRY.

Also have a look at the FM: RH_APPLICANT_ATTA_IN_POPUP

Hope That Helps

Anirban M.

Read only

0 Likes
689

Thank so much for the reply, Anirban. Does this bring up any dialog box? I need to do this in background.

And what I intend to do is download the attachment that are attached to the POs (and may be save it as a PDF file to my PC).

Could you please explain to me a bit more detailed.

I would appreciate it much.

Read only

0 Likes
689

If you use the FM it will give you a popup. To do this in background you need to use the mentioned class methods.

Hope That Helps

Anirban M.

Read only

0 Likes
689

Hi!

Could anybody tell me, please, how can i toggle attachment list mode between display and edit.

The only way to do this i've thaught is to free attachment list object and to create it again with new IP_MODE value. But at least, i suppose there is actually another one method to switch edit mode.

Thanks.

Read only

Former Member
0 Likes
689

thanks!