1- My requirement is to create a DIR in DMS.
2- We have a .net person he will write a piece of code and call the bapi from his system and will create a DIR.
3- As in my system some mandatory customize and additional fields are there to create a DIR, I created a customize bapi similar to bapi_document_create2. Following are the parameters and the values I passed in the importing parameter of zbapi_document.
DOCUMENT TYPE SPE
DOCUMENT NUMBER "IT WILL BE GENERATED BY THE SYSTEM"
DOCUMENT PART 000
DOCUMENT VERSION A
LABORATORY SCC
USERNAME Z0033B4V
DESCRIPTION TEST
LANGUAGE EN
TECHNICAL CLASSIFICATION " DECONTROLLED" ( NOT PRESENT IN STANDARD BAPI_DOCUMENT_CREATE2)
USCONTENT "NO" (NOT PRESENT IN STANDARD BAPI_DOCUMENT_CREATE2)
PRODUCT LINE 01 (NOT PRESENT IN STANDARD BAPI_DOCUMENT_CREATE2)
BUSINESS DOCUMENT NAME QD (NOT PRESENT IN STANDARD BAPI_DOCUMENT_CREATE2).
Only MWERT, MWERT1, BDN, PRODUCT LINE ,these four fields are added in addition to bapi_document_create2 fields. Out of these four BDN and product line are customizing.
IMPORTING PARAMETER
DOCUMENTDATA1 TYPE ZBAPI_ONEP1
STRUCTURE ZBAPI_ONEP1
COMPONENT COMPONENTTYPE
DOCUMENTYPE DOKAR
DOCUMENTNUMBER DOKNR
DOCUMNNTPART DOKTL_D
DOCUMENTVERSION DOKVR
DOCUMENT DISCRIPTION DKTXT
USERNAME DWNAM
LABORATORY LABOR
LANGUAGE STABK
MWERT(TECHNICAL CLASSIFICATION) AWERT
MWERT1(US CONTENT) AWERT1
PL(PRODUCT LINE) ZCPDM_PL
BDNABBR(BUSINESS DOCUMENT NAME) ZCPDM_BDNABBR
I created a customize bapi with these fields and when I test it, I gave me error as import from memory id not successful . when i checked the message in se91 .They have used enhance the document creation program and the method “AFTER_CHANGE_STATUS” for class ZCL_IM_DOCUMENT_STATUS01.
I am attaching the code for the enhancement. Can anyone please tell me how I can successfully create a DIR as I am new to this and what code should I write in FM source code.
Shilpa