Você está na página 1de 2

Como fazer download de arquivo do DMS via BAPI

https://www.sdn.sap.om/ir!/sn/thread"messa#eID$%&'()')
Please follow the steps to Download a file from DMS or Displa* in Browser.
%. Call BAPI +BAPI,D-C.M/01,2/1D/1AI3(4
all funtion +BAPI,D-C.M/01,2/1D/1AI3(4
e5portin#
doumentt*pe $ doument,6e*7dot*pe
doumentnum8er $ doument,6e*7donum8er
doumentpart $ doument,6e*7dopart
doumentversion $ doument,6e*7doversion
#etomponents $ +9:
#etdodesriptions $ +9:
#etdofiles $ +9:
#etlassifiation $ +9:
importin#
doumentdata $ doumentdata
return $ lv,return
ta8les
doumentdesriptions $ it,doumentdesriptions
doumentfiles $ it,doumentfiles
harateristivalues $ it,harateristivalues
lassalloations $ it,lassalloations.
(. 1hen all BAPI,D-C.M/01,C;/C<-.1=I/>(
doumentfile7wsappliation $ it,doumentfiles7wsappliation.
all funtion +BAPI,D-C.M/01,C;/C<-.1=I/>(4
e5portin#
doumentt*pe $ doument,6e*7dot*pe
doumentnum8er $ doument,6e*7donum8er
doumentpart $ doument,6e*7dopart
doumentversion $ doument,6e*7doversion
doumentfile $ doumentfile
#etstruture $ +%4
#etheader $ +9:
pf,ftp,dest $ +?SAP@1PA?:
importin#
return $ lv,return
ta8les
doumentfiles $ it,o,doumentfiles.
Aou need to pass P@,@1P,D/S1 as SAP@1PA as we are allin# this @M from Browser
not SAP 2.I and if *ou dont pass this value then the @M errors out 8eause it doesn:t
find SAP 2.I.
B. 0ow all SCMS,D-C,C/AD to #et the Binar* Data of the @ile.
all funtion +SCMS,D-C,C/AD:
e5portin#
mandt $ s*7mandt
stor,at $ ,stora#e
do,id $ it,o,doumentfiles7file,id
ta8les
aess,info $ lt,aess
ontent,8in $ lt,sdo6nt8in.
I1,SD-<C01BI0 is the Binar* Data 1a8le of the file *ou want to download.
0ow *ou have the 8inar* file data whih *ou an write on Appliation Server or Convert
it to 9S1CI02 and show in a we8 d*npro appliation. I am not sure how to displa* in
BSP.

Você também pode gostar