2012 May 28 10:10 AM
Hi Experts
I am using BAPI_DOCUMENT_CREATE2 to upload attachments against the employee in CV01N.
But I dont know where to specify employee no in the BAPI.
Please advise me the same.
Thanks in advance.
Regards
Rajaram
2012 May 28 10:57 AM
HR_MAINTAIN_MASTERDATA bapi has the employee number pernr in it.I dont think tat it is available in the bapi you have mentioned
2012 May 28 10:57 AM
HR_MAINTAIN_MASTERDATA bapi has the employee number pernr in it.I dont think tat it is available in the bapi you have mentioned
2012 May 28 11:46 AM
BAPI_DOCUMENT_CREATE2 contains following structure, and tables
Structures
DOCUMENTDATA
HOSTNAME
DOCBOMCHANGENUMBER
DOCBOMVALIDFROM
DOCBOMREVISIONLEVEL
CAD_MODE
PF_FTP_DEST
PF_HTTP_DEST
DEFAULTCLASS
Tables
CHARACTERISTICVALUES
CLASSALLOCATIONS
DOCUMENTDESCRIPTIONS
OBJECTLINKS
DOCUMENTSTRUCTURE
DOCUMENTFILES
LONGTEXTS
COMPONENTS
Inwhich can anyone tell me can we mention employee number means can we upload attachment against a particular employee, if so how can we do pls advise.
Regards
Rajaram
2012 May 28 12:14 PM
Hi ABAP Experts
Please anyone can help me on this issue.
Regards
Rajaram
2012 May 28 12:49 PM
Hello Rajaram,
Database table DRAW correlates document number and the person responsible, field is DWNAM.
In the bapi BAPI_DOCUMENT_CREATE2, importing parameter DOCUMENTDATA is of type BAPI_DOC_DRAW2. This structure contains a field USERNAME (of type DWNAM) which contains the person responsible. This field contains the user name (PA0105-USRID with subty 0001). You may add it there.
Do let know in case of any doubt?
Regards,
Kumud
2012 May 28 1:51 PM
Hello,
I don't have this kind of data in our system but I think that you must use table OBJECTLINKS.
This table holds the links between the document and the SAP Object. Try to find the correct OBJECTTYPE and OBJECTKEY and I believe that this will work.
Regards.
2012 May 28 2:00 PM
Can you share some sample code for for this, it would be helpful to me.
Thanks.
2012 May 28 2:08 PM
Did you get chance to send the username via structure DOCUMENTDATA-USERNAME in the BAPI?
2012 May 28 2:18 PM
I don't have any sample code since I haven't used this function in the past.
Try creating an entry in table OBJECTLINKS with OBJECTTYPE & OBJECTKEY.
OBJECTKEY must sure contains the personel number. I don't know the correct value for OBJECTTYPE. Take a look on table TDWO that contains the available types on your system.
Regards.