Printing Attachments Of Work Order Via IW32

...Previous

Data declaration for the exits:

We are using function pool ‘SAPLXWOC’ to create the custom Subscreen and to write logic for populating the table control and printing the attachments.

Include ‘ZXWOCTOP’ must be used for data declaration.

The internal tables being used in the function exit as well as in the screen exit must be declared in this include.

Include ‘ZXWOCZZZ’ must be used to write any logic in the PBO and PAI of the screen.

Coding for Function exit:

We need to start with the function exit ‘EXIT_SAPLCOIH_018’.

1.             Double click on include ‘ZXWOCU15’ and create it.

2.             Create a function module and call it in this include.

Ø We have CAUFVD structure available in this Function exit. Based on the work order number (CAUFVD-AUFNR), Equipment number (CAUFVD-EQUNR), functional location (CAUFVD-TPLNR), task lists (CAUFVD-PLNTY, CAUFVD-PLNNR, CAUFVD-PLNAL) we can fetch the related attachment names.

Ø For that we need to use 2 tables, ‘SRGBTBREL’ and ‘SOOD’.

Ø Table SRGBTBREL will fetch the unique identification number for each attachment (INSTID_B). Using this number, we can fetch attachment name and its details.

Ø Below is the screenshot of the data fetching from these 2 tables. Internal table I_OBJECTS, will be populated with the attachment details. We can take the desired fields from the internal table into new internal table I_WORK and pass it to screen exit.

So, I_WORK will be populated with the details of the attachments of the work order.

Click here to continue..

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image