05-19-2009 6:21 AM
Hi,
I want to encrypt the bank data in SAP system and transfer this encrypted file to legacy system ... in legacy sytem file should be decrypted. Please help me how to do the procedure for this.
Thanks ,
reddy,
05-19-2009 6:27 AM
u need to encryprt or decrypt the file using C programming or java.
first it will encrpt the file and then the decrypter will decrypt the file and save on the local machine or on the application server.
all the payment extracter work in this mechanism only.
05-19-2009 7:13 AM
may be you can do some Encryption in the source and use the same logic at the non SAP systewm also..
05-19-2009 11:53 AM
Hi,
You can encrypt using a third party encryption software
1) Make a Z copy of the RSEOUT00 program (To be able to encrpyt file before writing to application server)
2) Ask the basis to create a command for calling the third party application
3) Use a file port in your partner profile
4) Call the command created in step 2 using function module SXPG_COMMAND_EXECUTE from your ZRSEOUTOO program
5) Take the output and write it the required application folder path as similar to the outbound process.
6) Check the application folder file and it should have the encrypted file.
If you are not having any encryption system, then we have to do it on our own.
Regards,
Yogesh
05-19-2009 12:08 PM
06-03-2009 5:06 AM
Hi Yogesh,
Thanks for your reply... it is very useful.. could you please give code if you have..
or do you tell me where should write or call the encryption function modules..
Thanks,
reddy
06-03-2009 12:32 PM
Hi,
In your Z copy code of RSEOUT00, call a perform to do the encryption
START-OF-SELECTION.
* Selection of all important EDIDC-set
* and collect in internal table
PERFORM select_all_edidc.
Inside the routine, select the file name to be encrypted from the EDIDS table and call the SXPG_COMMAND_EXECUTE FM inside this perform
PERFORM encrypt_file.
06-03-2009 1:11 PM
Hi,
Sorry for breaking up the code in 2 posts. Had some problem in posting in earlier and now too. Thanks!
Form ENCRYPT_FILE
DATA: l_ipfile TYPE sxpgcolist-parameters
l_status TYPE extcmdexex-status
l_excode TYPE extcmdexex-exitcode
l_host TYPE rfcdisplay-rfchost
CONSTANTS: c_aix TYPE sxpgcolist-opsystem VALUE 'AIX'
* Select file name from EDIDS to be processed
DATA: lt_btcxpm TYPE TABLE OF btcxpm
READ TABLE int_edidc INTO lw_edidc INDEX 1.
IF sy-subrc IS INITIAL.
SELECT stapa1 stapa2
FROM edids
UP TO 1 ROWS
INTO (l_stapa1,l_stapa2)
WHERE docnum = lw_edidc-docnum
AND status = '03'.
ENDSELECT.
IF sy-subrc IS INITIAL.
CONCATENATE l_stapa1 l_stapa2 INTO l_fname.
SPLIT l_fname AT c_slash INTO l_str1 l_str2 l_str3 l_str4 l_str5 l_str6 .
l_ipfile = l_str6.
l_host = sy-host.
* Execute the Unix command , it will sign and exctrypt the document
* and place the file in Out folder of application server
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = c_commant
"Command to call your encrytping system, created by BASIS
additional_parameters = l_ipfile
operatingsystem = c_aix
targetsystem = l_host
stdout = c_x
stderr = c_x
terminationwait = c_x
IMPORTING
status = l_status
exitcode = l_excode
TABLES
exec_protocol = lt_btcxpm
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
IF NOT sy-subrc IS INITIAL.
ENDIF.
Edited by: Yogesh Surender on Jun 3, 2009 2:14 PM
06-04-2009 5:05 AM