report zvvvbanksimp.
include zbdcrecxx.
tables bnka.
types: begin of tabstruct,
vkey(8) type c ,
real(4) type c ,
pzn(2) type c ,
uer(1) type c ,
rgn(2) type c ,
ind(6) type c ,
tnp(1) type c ,
nnp(25) type c ,
adr(30) type c ,
rkc(9) type c ,
namep(40) type c ,
namen(18) type c ,
newnum(9) type c ,
newks(9) type c ,
permfo(6) type c ,
srok(2) type c ,
at1(7) type c ,
at2(7) type c ,
telef(25) type c ,
regn(9) type c ,
okpo(8) type c ,
dt_izm(8) type c ,
p(1) type c ,
cks(6) type c ,
ksnp(20) type c ,
end of tabstruct.
types: begin of nstr,
bankl like bnka-bankl,
banka like bnka-banka,
provz like bnka-provz,
stras like bnka-stras,
ort01 like bnka-ort01,
brnch like bnka-brnch,
end of nstr.
data nstru type nstr.
data extable type tabstruct occurs 100
with header line.
start-of-selection.
call function 'RFC_GetTableRecords'
destination 'VVV'
exporting
basepath = 'D:\Work\ABAP\mandt20\clients.mdb'
tablename = 'BNKSEEK2'
username = 'Admin'
userpass = ''
tables
tablerecords = extable.
data zzz(5) type n value 1.
uline.
write: / '| N п/п | Статус | БИК |',
(60)' Наименование', '|'.
uline.
loop at extable.
compute nstru-bankl = extable-newnum.
compute nstru-banka = extable-namep.
compute nstru-provz = extable-rgn.
compute nstru-stras = extable-adr.
compute nstru-ort01 = extable-nnp.
compute nstru-brnch = extable-ksnp.
write: / '|', zzz, '|'.
perform mtran using nstru.
write: '|', (9)nstru-bankl, '|', (60)nstru-banka, '|'.
zzz = zzz + 1.
endloop.
uline.
form mtran using nstru type nstr.
select single * from bnka where banks = 'RU' and bankl = nstru-bankl.
if sy-subrc = 0.
write (7)' '.
exit.
endif.
refresh bdcdata.
perform bdc_dynpro using 'SAPMF02B' '0100'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' 'BNKA-BANKL'.
perform bdc_field using 'BNKA-BANKS' 'ru'.
perform bdc_field using 'BNKA-BANKL' nstru-bankl.
perform bdc_dynpro using 'SAPMF02B' '0110'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' 'BNKA-BRNCH'.
perform bdc_field using 'BNKA-BANKA' nstru-banka.
perform bdc_field using 'BNKA-PROVZ' nstru-provz.
perform bdc_field using 'BNKA-STRAS' nstru-stras.
perform bdc_field using 'BNKA-ORT01' nstru-ort01.
perform bdc_field using 'BNKA-BRNCH' nstru-brnch.
perform bdc_dynpro using 'SAPMF02B' '0110'.
perform bdc_field using 'BDC_OKCODE' '=ADDR'.
perform bdc_field using 'BDC_CURSOR' 'BNKA-BANKA'.
perform bdc_dynpro using 'SAPLSAD0' '0110'.
perform bdc_field using 'BDC_OKCODE' '/EEXIT'.
perform bdc_field using 'BDC_CURSOR' 'SAD0S-TXT_NAME2'.
perform bdc_dynpro using 'SAPMF02B' '0110'.
perform bdc_field using 'BDC_OKCODE' '=UPDA'.
perform bdc_field using 'BDC_CURSOR' 'BNKA-BANKA'.
call transaction 'FI01' using bdcdata mode 'E'.
if sy-subrc ne 0.
write (7)'Ошибка'.
else.
write (7)'Успешно'.
endif.
endform.
_________________ Ex ipso fonte bibere
Цитата: Abyssus abyssum invocat Dies diem docet Ducunt volentem fata, nolentem trahunt
Estote prudentes sicut serpentes
|