09-25-2013 8:56 AM
Dear Friends,
We have one Developing requirement. In that we have to move files(attachmnets like .doc,.pdf etc) from SAP application server to content server.
Please suggest any solution for this issue.
Regrards,
Vigneshwar.D
10-09-2013 10:35 AM
Thank You all for your valuable inputs.
Now i have found the solution for the requiremnet in after searching in google and other help.
actually our requirement is need to create Candidtae and attach recume /CV in the E-rec system,and data candidtae in formation and CV are present in applictaion server of the E-Rec system
we have achived this functionality using below Fm and Class methids.
For creating Candidateinformation:
BAPI_ERC_APPL_CREATE_EXT and HR_ERC_GET_CANDIDATE.
For moving attchment from application to content server and also create linkage in table HRP5134.
CL_HRRCF_APP_E_EXT_APPL_DATA_M->SAVE_ATTACHMENTS
Please let us know if any wants more details.
Regards,
Vigneshwar.D
10-02-2013 4:02 PM
Hi Friends,
How to move files from SAP Application server to SAP content server.please help me on this issue.
Regards,
Vigneshwar.D
10-02-2013 4:07 PM
10-02-2013 4:19 PM
Thanks Max for your reply.
We have some CV files(like .doc and .pdf) in the application server.we need to move this content server.how is possible.here we no need to read infromation from the files just we have to place files from Application server to Content server.
now we are trying with method CL_HRRCF_M_ATTACHMENTS=>SC_CREATE_ATTACHMNET but we are unable to achive the requirement.
please specify any mthods or FM to fill our requirement.
Thanks in Advance!!
Regards,
Vigneshwar.D
10-02-2013 4:39 PM
Hi
It's not clear (for me) what you mean with Contenent Server, if it's for Archivelink I use the fm SCMS_AO_FILE_CREATE_PATH
Max
10-03-2013 8:32 AM
So you mean something like an initial load in content server. My suggestion is to get the files from application server to a local folder in a PC (via FTP or mapping to a nfs or network drive) and then run a program to do the load. A demo program is released for this. RSCMSTSM.
Maybe your load program should be more sophisticated if you need your CVs to be attached to some business object, for instance, candidates or employee data.
Best regards
10-02-2013 4:53 PM
If you use doc. categories and repositories (OACT transaction), then you can use report RSCMSCPY to move a category from a source to a destination repository.
Also you can compare two repositories with RSCMSTHC. dump a complete repository with RSCMSTRD or export and import with RSCMSEX/RSCMSIM
Best regards
10-02-2013 5:00 PM
Let me try to understand you first. I gonna give a example then I have did once.
I made a java program to download every file in a account email direct to the paste in the SAP Server. In this directory, I just had the files and another paste called BACKUP.
To ABAP programs, do the process necessary with these files, until now I believe you don't need anything than I said, because you already have files in the server, am I right?
After I do the process of my requirement with these files (by the way, it's XML files), I have to move to BACKUP paste.
Any similarity with your requirement, reply me and I gonna try to help you.
Sorry about the english, I have not been practicing too much.
10-02-2013 8:30 PM
Thanks to Max,Alejandro and Janderson for your valuable opinions.
1.Using FM SCMS_AO_FILE _CREATE _PATH iam able store any type of file in content server from Presentation server but unable to store file from Application server directory.
2.Using Program RSCMSCPY we can copy files from one reposiary to another within the content server.
My requirement is iam having couple of CV's(like .doc or .pdf format) in Application server i need move those files from Application server to Content server.and moving those files from application server i will archive those files.How can i achive this requirement.
Thanks in Advance!!
Regards,
Vigneshwar.D
10-02-2013 9:44 PM
Very well, that's what I think you wanna do.
Try the code below.
Example:
********************************************************************************************************
TYPES: BEGIN OF ty_line,
data(1024) TYPE x,
END OF ty_line.
DATA: lt_table TYPE TABLE OF ty_line INITIAL SIZE 0,
ls_line TYPE ty_line VALUE IS INITIAL,
l_dir_orig_arq TYPE localfile, " Source Dir
l_dir_dest_arq TYPE localfile, " Destiny Dir
l_nome_arq TYPE string,
l_destiny TYPE string.
* Source directory - L_DIR_ORIG_ARQ should have the source directory and the file name with
* extension (that's really important, don't forget the extensions) and the DATASET commands are
* case sensitive, so the extension should be LOWER CASE.
OPEN DATASET l_dir_orig_arq FOR INPUT IN BINARY MODE.
IF sy-subrc NE 0.
CLEAR w_dir_orig_arq.
EXIT.
ENDIF.
* At this moment, the ABAP programm is processing the file
DO.
CLEAR ls_line.
READ DATASET l_dir_orig_arq INTO ls_line.
IF sy-subrc NE 0.
APPEND ls_line TO lt_table.
EXIT.
ENDIF.
APPEND ls_line TO lt_table.
ENDDO.
* Closing the source directory
CLOSE DATASET l_dir_orig_arq.
CHECK lt_table[] IS NOT INITIAL.
* L_NOME_ARQ - this is the name of the file (with extension)
* L_DESTINY - this is the destiny directory
* Destiny directory - now it's necessary to concatenate the destiny directory and the file name into
* auxiliar variable to use next.
CLEAR l_dir_dest_arq.
CONCATENATE l_destiny '\' l_nome_arq INTO l_dir_dest_arq.
* With that variable you can open the destiny directory
OPEN DATASET l_dir_dest_arq FOR OUTPUT IN BINARY MODE.
IF sy-subrc NE 0.
CLEAR l_dir_dest_arq.
EXIT.
ENDIF.
* Downloading the file into the another directory
CLEAR ls_line.
LOOP AT lt_table INTO ls_line.
TRANSFER ls_line TO l_dir_dest_arq.
ENDLOOP.
* Deleting the file of the source directory
DELETE DATASET l_dir_orig_arq.
IF sy-subrc = 0.
CLOSE DATASET l_dir_dest_arq. "If everything is OK, close the destiny directory
ENDIF.
********************************************************************************************************
I expect this be helpful.
Regards.
10-03-2013 9:19 AM
Hi
SCMS_AO_FILE_CREATE_PATH can be used for presentation and application server
Max
10-03-2013 5:47 AM
I would suggest you to read the file from the application server.
Convert it to XSTRIng and upload it to content reposirtory using FM 'ARCHIV_CREATE_TABLE'
10-09-2013 10:35 AM
Thank You all for your valuable inputs.
Now i have found the solution for the requiremnet in after searching in google and other help.
actually our requirement is need to create Candidtae and attach recume /CV in the E-rec system,and data candidtae in formation and CV are present in applictaion server of the E-Rec system
we have achived this functionality using below Fm and Class methids.
For creating Candidateinformation:
BAPI_ERC_APPL_CREATE_EXT and HR_ERC_GET_CANDIDATE.
For moving attchment from application to content server and also create linkage in table HRP5134.
CL_HRRCF_APP_E_EXT_APPL_DATA_M->SAVE_ATTACHMENTS
Please let us know if any wants more details.
Regards,
Vigneshwar.D