Application Development and Automation 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: 
Read only

attaching a document from program running in batch

jrg_wulf
Active Contributor
0 Likes
924

Hi experts,

i need to find a way, to attach a document (e. G. a CV) to an applicant via object services. Problem is, the document will be provided by a program, running in batch-mode without front-end access. I tried to debug the manual action, but unsuccessful.

My initial idea was, to find out what happens directly after uploading and then using the same function modules in my prog.

Shed your light on me please.

regards

Jörg

4 REPLIES 4
Read only

former_member226519
Active Contributor
0 Likes
808

you could try to copy the document to a server that can be accessed by both, the SAP application and the Windows application.

e.g. with an operation system command in you report -> SM49

Read only

0 Likes
808

Hi Volker,

thanks for your answer, but this is not the point. The document is provided from another location and accessible for my abap. I don't want to involve any manual action in this. The report runs in regular intervals, polling the document. Now the document shall be stored and linked to the applicant, without anyone having to upload it manually. The program runs in bg-job, so there's no way for frontend interaction.

regards

Jörg

Read only

Former Member
0 Likes
808

Hi Jorg,

In a way when the batch job runs it polls that document and you need to attach that doc to an applicant. Firstly , I don't know whether debugging can help. But normally I had almost the same situation wherein I needed to change something to the file that was being used by the batch job and I didn't know where the file was.

There's a T-Code 'FILE' that I had used which gives you the location of all the files from where the batch job or the program picks them whenever they get executed.

But in my case even this didn't help. Then I had to ask the respective guys as to where it was stored. Maybe you could try the above t-code or if you do have time, again check using de-bugging for any logical path mentioned in the code.

Please let me know if this could help.

Read only

0 Likes
808

Hi Ramdas,

thanks for your input.

Transaction FILE leads to logical path and filenames. They won't help me whith this ince it is not the files that bother me, i fetch them at runtime. But the way documents are attached to an object is.

Usually this is done in dialog and the gui handles the storage and linking.

I have found a workaround that suits our request, but i'm still hoping that someone might give the crucial hint. I'm still curious as to how to do it, like the GUI does.

What we did basically, was using an archive repository and putting the document there using

FM SCMS_HTTP_CREATE_FILES

and then linking it to the applicant, using

FM  ARCHIV_CONNECTION_INSERT.

The mainload was with our repository guys. It works fine so far and noone complains.