on 05-19-2008 12:54 PM
Hello, experts.
I've got issue with checking in files. I use BAPI_DOCUMENT_CHECKIN2 to attach several files to the document. But when i try to open any of these files in transaction cv03n the first one in the list always openes.
When i attach these files manually everything works properlly.
I also tried to use BAPI_DOCUMENT_CHANGE2 but the result is the same.
Here is the simple code i use:
REPORT Z_TEST_92CUST_24.
**DATA DEFINITION
data: dokar like draw-dokar,
doknr like draw-doknr,
dokvr like draw-dokvr,
doktl like draw-doktl,
lt_files like bapi_doc_files2 occurs 0 with header line,
ls_return like bapiret2.
define mac_conv_input.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = &1
importing
output = &2.
end-of-definition.
mac_conv_input '10000000097' doknr.
mac_conv_input '000' doktl.
mac_conv_input 'ZCV' dokar.
mac_conv_input '00' dokvr.
CHECK IN ORIGINAL 1 INTO R/3 DATABASE
clear lt_files[].
clear lt_files.
lt_files-storagecategory = 'DMS_C1_ST'. " storage
lt_files-wsapplication = 'TXT'.
lt_files-docpath = 'C:\Documents and Settings\alex\Desktop\'.
lt_files-docfile = 'test.txt'. " Original file
append lt_files.
clear lt_files.
lt_files-storagecategory = 'DMS_C1_ST'. " storage
lt_files-wsapplication = 'PDF'.
lt_files-docpath = 'C:\Documents and Settings\alex\Desktop\'.
lt_files-docfile = 'Real Estate Flexible Delta ERP2005.pdf'. " Original file
append lt_files.
clear lt_files.
lt_files-storagecategory = 'DMS_C1_ST'. " storage
lt_files-wsapplication = 'PDF'.
lt_files-docpath = 'C:\Documents and Settings\alex\Desktop\'.
lt_files-docfile = 'BAPI_DMS.pdf'. " Original file
append lt_files.
call function 'BAPI_DOCUMENT_CHECKIN2'
exporting:
documenttype = dokar
documentnumber = doknr
documentpart = doktl
documentversion = dokvr
importing:
return = ls_return
tables:
documentfiles = lt_files.
*ERROR OCCURED ??
if ls_return-type ca 'EA'.
rollback work.
message id '26' TYPE 'I' number '000' with ls_return-message.
else.
commit work.
endif.
In this case the "test.txt" always opens instead of "BAPI_DMS.pdf" or "Real Estate.... pdf".
Please help. Points will be awarded.
regards,
alex karpo.
Hi
Is it checking in all files.. i.e for 1 DIR three files as you mentioned..
Is it giving any error or it only checks in TXT.
Try to execute the report using breakpoints...
try to debug.
Assumed: you have created WS applications TXT and PDF
Seema
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.