2007 Apr 13 2:51 PM
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = 'fpt_pwd'
sourcelen = len_pwd
key =
* IMPORTING
* DESTINATION =
<b>What does key stand for?</b>
2007 Apr 13 3:06 PM
Hi,
Please try this.
DATA: BEGIN OF itab OCCURS 0,
line(132) TYPE c,
END OF itab.
DATA: ftp_pwd(20) TYPE c lower case, "<--- change here
len_pwd TYPE i,
pwd_key TYPE i value '5',
ihdl TYPE i.
ftp_pwd = 'password'.
*DESCRIBE FIELD ftp_pwd LENGTH len_pwd IN CHARACTER MODE. "<--- remove here
SET EXTENDED CHECK OFF. "<--- add here
len_pwd = STRLEN( ftp_pwd ). "<--- add here
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = fpt_pwd "<--- change here
sourcelen = len_pwd
key = pwd_key
IMPORTING "<--- change here
DESTINATION = fpt_pwd. "<--- change here
Regards,
Ferry Lianto
2007 Apr 13 2:57 PM
Hi,
The key is used to 'scramble' the password by the c routine that you are calling in your code.
The destination server does not need to know how to unscramble the password-technically the password goes across the wire unencrypted and in free text (bit of a security issue). The RFC server program provided by SAP which performs the actual issuing of the commands unscrambles the password. For example, the password is only 'scrambled' between the parent abap process and the hand-off to the RFC server program.
Regards,
Ferry Lianto
2007 Apr 13 2:58 PM
2007 Apr 13 2:59 PM
2007 Apr 13 3:01 PM
2007 Apr 13 2:58 PM
2007 Apr 13 3:00 PM
every where i see the key value as 26101957
I think this is related to the number of bytes occupied
chk this program <b>RSFTP004</b>
2007 Apr 13 3:02 PM
2007 Apr 13 3:03 PM
DATA: BEGIN OF itab OCCURS 0,
line(132) TYPE c,
END OF itab.
DATA: ftp_pwd(20) TYPE c,
len_pwd TYPE i,
pwd_key TYPE i value '5',
ihdl TYPE i.
ftp_pwd = 'password'.
DESCRIBE FIELD ftp_pwd LENGTH len_pwd IN CHARACTER MODE.
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = 'fpt_pwd'
sourcelen = len_pwd
key = pwd_key
* IMPORTING
* DESTINATION =
I am getting an exception error in "HTTP_SCRAMBLE"
The current program "SAPLSFTP" tried to access a part of a string using
an explicit offset specification.
However, the offset (7) was grater than the length of the string
(7).
This is not allowed.
What could be wrong with my code
2007 Apr 13 3:07 PM
2007 Apr 13 3:09 PM
DATA: BEGIN OF itab OCCURS 0,
line(132) TYPE c,
END OF itab.
DATA: ftp_pwd(20) TYPE c,
len_pwd TYPE i,
pwd_key TYPE i value 26101957,
ihdl TYPE i.
ftp_pwd = 'password'.
len_pwd = strlen( ftp_pwd ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = ftp_pwd
sourcelen = len_pwd
key = pwd_key
IMPORTING
DESTINATION = ftp_pwd
2007 Apr 13 3:06 PM
Hi,
Please try this.
DATA: BEGIN OF itab OCCURS 0,
line(132) TYPE c,
END OF itab.
DATA: ftp_pwd(20) TYPE c lower case, "<--- change here
len_pwd TYPE i,
pwd_key TYPE i value '5',
ihdl TYPE i.
ftp_pwd = 'password'.
*DESCRIBE FIELD ftp_pwd LENGTH len_pwd IN CHARACTER MODE. "<--- remove here
SET EXTENDED CHECK OFF. "<--- add here
len_pwd = STRLEN( ftp_pwd ). "<--- add here
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = fpt_pwd "<--- change here
sourcelen = len_pwd
key = pwd_key
IMPORTING "<--- change here
DESTINATION = fpt_pwd. "<--- change here
Regards,
Ferry Lianto
2007 Apr 13 3:10 PM