Application Development 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: 

Printing associated document in PRT within Work Order

Former Member
0 Kudos
2,768

Hi,

I have requirement like below:

1) Go to IW32/33 (Maintenance Order)

2) Go to Enhancement tab

3) From Table control select document and then print all attachments which are available in those Documents by hitting Print Button.

-


I have done some development using enhancement IWO10018:

1) I have fetched Routing number of operations in the order (AUFPL), Item counter for PRT (PZLFH), Object ID of the resource (OBJID), Object types of the CIM resource (OBJTY) from AFFH where AUFPL = SAP_CAUFVD_IMP-AUFPL

2) Then in loop I have called Function Module: CF_RF_ROUT_FHM_MASTER_READ and read entire structure which contains Document No.

3) Using document No. I have fetched all document related into from DRAW table which contains Document Info Record.

4) Then I have selected some fields and shown them on Table Control which is available in Enhancement Tab.

5) Now I want to print then as per users choice.

Here I stuck, how to download all those attachments which are available at local PC or on internet and print them?

Thanks,

Jay.

Edited by: jaykrishna007 on Jun 24, 2011 7:30 AM

1 ACCEPTED SOLUTION

madhu_vadlamani
Active Contributor
799

Hi Jay,

Do you want to print all attachments in iw32. If this is the requirement please post . I will give step by step how to do.

Regards,

Madhu.

9 REPLIES 9

madhu_vadlamani
Active Contributor
800

Hi Jay,

Do you want to print all attachments in iw32. If this is the requirement please post . I will give step by step how to do.

Regards,

Madhu.

0 Kudos
799

Hi Madhu,

Thanks for your reply.

Yes I want to print all attachments of all PRT Documents in all Operations in Maintenance Order (IW32). I will highly appreciate you if you give me the step by step procedure for the above problem.

Thanks a lot,

Jay.

0 Kudos
799

Hi Jay,

1) IW010018 use exit

2) SAPLXWOCu2019 to create the custom Subscreen

3)ZTOPu2019 must be used for data declaration.

4)ZXWOCZZZ to write pbo and pai

5)EXIT_SAPLCOIH_018

6)Create a function module and you have to get data inside it.

7) In program SAPLXWOCu2019, which is called in the program u2018SAPLCOIHu2019 and screen no 900.

8)create layout with fileds like attachment,attachment type ,origin,number

9) in pbo of this screen make a loop of attachments

10)We need to pass the unique identification number for the attachment (I_WORK-INSTID_B) to the FM and fetch the contents of the attachment into internal table u2018I_TAB_OBJCONTXu2019.

11) use class u2018CL_GUI_FRONTEND_SERVICESu2019 to get the attachment path and to print them.

If it is not clear i will send you the screen shots. but to which i have to send.

Regards,

Madhu.

0 Kudos
799

Hi Madhu,

Thanks for your quick reply.

I just wanted to tell you that the steps you have mentioned here, i had followed each and every step.But it was all related to "Services for Object"

and the client's requirement is that to take Print out of Original: Attachment Documents in PRT documents not the attachments which are "Services for object" attachment.

Thanks,

Jay.

0 Kudos
799

Hi

0 Kudos
799

Hi Andrew,

Please start from the above thread.if you struck some where post it.if still there is any issue i will give you the screen shots.

http://wiki.sdn.sap.com/wiki/display/Community/Printing+attachments+of+Work+order+via+IW32

0 Kudos
799

Hi We have activated Content server and attached document to Work order in Operation tab. Our ABAPer did some development based on

http://wiki.sdn.sap.com/wiki/display/Community/Printing+attachments+of+Work+order+via+IW32

Still we are unable to trigger print of all attached documents which is appearing in PRT.

Another issue is in CV01N, when i am attaching PDF document and checking in with content server , Secure storage area is locked, Is this creating any problem?

May i request you to please advise if anything is missing.

Thanks

Sudip

Former Member
0 Kudos
799

I have used below method to print document.

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = w_string

operation = 'PRINT'.

I am able to take print out of all documents except JPEG.

Could any one help me out to do the same?

Thanks,

Jay.

Former Member
0 Kudos
799

Hi Jayesh,

Have you solved the requirement?

Please help me on the same problem.

Thanks!