Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Employee No in BAPI_DOCUMENT_CREATE2

Former Member
0 Kudos
164

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
131

HR_MAINTAIN_MASTERDATA bapi has the employee number pernr in it.I dont think tat it is available in the bapi you have mentioned

8 REPLIES 8

Former Member
0 Kudos
132

HR_MAINTAIN_MASTERDATA bapi has the employee number pernr in it.I dont think tat it is available in the bapi you have mentioned

0 Kudos
131

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

0 Kudos
131

Hi ABAP Experts

Please anyone can help me on this issue.

Regards

Rajaram

kumud
Active Contributor
0 Kudos
131

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

0 Kudos
131

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.

0 Kudos
131

Can you share some sample code for for this, it would be helpful to me.

Thanks.

kumud
Active Contributor
0 Kudos
131

Did you get chance to send the username via structure DOCUMENTDATA-USERNAME in the BAPI?

0 Kudos
131

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.