BEAS Script To Open Drawings Attached With Items In SAP Attachments

Abdul Mannan
  • Editado

Hi Folks,  

I've wrintten below script and deployed in work order macro for printing for below process

1- User selects work order in the work orders screen

2- User click on print preview

3- The script opens a file attached in the item master data of work order item

Issue: If user selects multiple work orders then it works only for 1st work order. It looks like I am missing some kind of loop, any help would be apperciated. 

setvar=belnr_ID=$[BEAS_FTH1.BELNR_ID]

sql=SELECT Concat(a.[trgtPath], '', a.[FileName], '.', a.[FileExt])   FROM OITM T0  Inner Join BEAS_FTPOS T1 on T1.ItemCode = T0.ItemCode inner join  ATC1 a on  a.AbsEntry = T0.[AtcEntry] where T1.BELNR_ID =  'belnr_ID'

setvar=mypdfpath=wert1

if mypdfpath   then
        file.shell=mypdfpath
    else
        beas.messagebox=No PDF file found for this item. It may have been deleted or moved.
    end if

 

Comentarios

0 comentarios

Iniciar sesión para dejar un comentario.