2008 Nov 27 2:22 AM
I have the following code to test this BAPI. When I execute it I get a document number returned and the return structure is initial. This tells me that a document was sucessfully created. However, when I try to view the document, it doesn't exist. Any ideas?
I know this is "bare-bones" but that is by design.
Regards,
Davis
DATA: documentdata TYPE bapi_doc_draw2.
DATA: documenttype TYPE bapi_doc_aux-doctype,
documentnumber TYPE bapi_doc_aux-docnumber,
documentpart TYPE bapi_doc_aux-docpart,
documentversion TYPE bapi_doc_aux-docversion,
return TYPE bapiret2.
documentdata-documenttype = 'ABC'.
documentdata-description = 'Test'.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = documentdata
* HOSTNAME =
* DOCBOMCHANGENUMBER =
* DOCBOMVALIDFROM =
* DOCBOMREVISIONLEVEL =
* CAD_MODE = ' '
* PF_FTP_DEST = ' '
* PF_HTTP_DEST = ' '
IMPORTING
DOCUMENTTYPE = DOCUMENTTYPE
DOCUMENTNUMBER = DOCUMENTNUMBER
DOCUMENTPART = DOCUMENTPART
DOCUMENTVERSION = DOCUMENTVERSION
RETURN = RETURN
* TABLES
* CHARACTERISTICVALUES =
* CLASSALLOCATIONS =
* DOCUMENTDESCRIPTIONS =
* OBJECTLINKS =
* DOCUMENTSTRUCTURE =
* DOCUMENTFILES =
* LONGTEXTS =
* COMPONENTS =
.
2008 Nov 27 2:41 AM
hi ,
use a Transaction Commit (Copy the Below Code and paste right after Execute BAPI )
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Br,
Dilum Alawatte
2008 Nov 27 2:41 AM
hi ,
use a Transaction Commit (Copy the Below Code and paste right after Execute BAPI )
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Br,
Dilum Alawatte
2008 Nov 27 2:43 AM
I tried that in the test tool but not in the program. Good idea; it was an oversight by me. That corrected the problem.
Thanks!
Davis