‎2007 Jul 31 10:26 AM
My objective is to transfer a file from Application layer to DMS. So i used the function module called 'BAPI_DOCUMENT_CREATE2'. But i get the error
"Error while checking and storing : /sapia/iface/in/comm/sapmas/WFDOC.PDF"
‎2008 Apr 19 4:34 AM
‎2008 Apr 19 4:34 AM
‎2008 Jul 09 10:22 AM
Hi,
I solved it by myself.
The problem may be because of the following reason.
1.) File name is not present in the folder.
2.) File donot have necessary authorization.
3.) WSapplication field may be wrong or empty.
4.) Storage category is missing
5.) KPro server connection problem.
6.) HTTP or FTP destination missing.
In my case,I miss the 6th point. After adding the HTTP export parameter as shown below,my Bapi creates the document with the attachment.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = wa_docdata
pf_http_dest = 'SAPHTTPA'
pf_ftp_dest = 'SAPFTPA'
...........
Thanks and Regards
Senthil Kumar Anantham
‎2009 Dec 08 2:39 PM
Hi,
I am getting an error "An error occured while creating the original attribute for PDF"
I tried with out file attachment, it works as you know it is simple....
I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing pf_ftp_dest = 'SAPFTPA' pf_http_dest = 'SAPHTTPA' )
Any idea on how to solve this?
All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?
ws_docdata-documenttype = 'ARE'.
ws_docdata-description = 'BAPI DMS'.
ws_docdata-statusextern = 'CR'.
ws_file-storagecategory = 'DMS_C1_ST'.
ws_file-wsapplication = 'PDF'.
ws_file-description = 'Job output'.
ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.
append ws_file to it_files.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ws_docdata
IMPORTING
return = v_ret
TABLES
documentfiles = it_files .
BREAK-POINT.
IF v_ret-type CA 'EA'.
ROLLBACK WORK.
WRITE : v_Ret-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = '5'.
ENDIF.
Thanks
Pavan
‎2009 Dec 08 2:39 PM
Hi,
I am getting an error "An error occured while creating the original attribute for PDF"
I tried with out file attachment, it works as you know it is simple....
I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing pf_ftp_dest = 'SAPFTPA' pf_http_dest = 'SAPHTTPA' )
Any idea on how to solve this?
All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?
ws_docdata-documenttype = 'ARE'.
ws_docdata-description = 'BAPI DMS'.
ws_docdata-statusextern = 'CR'.
ws_file-storagecategory = 'DMS_C1_ST'.
ws_file-wsapplication = 'PDF'.
ws_file-description = 'Job output'.
ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.
append ws_file to it_files.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ws_docdata
IMPORTING
return = v_ret
TABLES
documentfiles = it_files .
BREAK-POINT.
IF v_ret-type CA 'EA'.
ROLLBACK WORK.
WRITE : v_Ret-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = '5'.
ENDIF.
Thanks
Pavan
‎2015 Jul 16 7:50 AM
‎2013 Nov 22 3:53 PM
Hi,
I'm trying to achieve the same as the original poster but I'm having trouble with it.
I get the error "Original has already been checked in and stored".
Could you kindly post your code, please?
Thank you.
Best regards,
Bruno