Storing Passwords in custom tables

Hi,
We are developing a tool, that needs userID and pssword to access it.
So we want to store the information in a custom table. The maximum length of the password is 10 characters.
I used the function module to scrammble the password, but when I put this hexa value in a raw field defined in the custom table, then it adds Zero's at the end based on the length of the password. When I want to use this for checking the access I am facing the problem due to the Zero's at the end.
For example:
Passowrd : test@123
Scramble String: A3ED2E10FF13695E
When I store this in table it will be A3ED2E10FF13695E0000
I used a domain with data type RAW 10 for the password field. SAP USR02 table uses RAW 08.
Q1: How can I eliminate zero's at the end while storing it? I didn't wan to manually remove the trialing zero's while checking the access. This might cause problems becuase if the string it self contains a last character as zero.
Q2. Is there is a way to get back the original string from the scramble string.
Appreicate your ideas on this.
Thanks

Hi,
You can use the Function Modules 'FIEB_PASSWORD_ENCRYPT'  and 'FIEB_PASSWORD_ENCRYPT' .
http://www.sap-img.com/abap/function-module-for-encryption-and-decryption.htm
Reward Points if useful.
Regards,
Abhishek

Similar Messages

  • Is Custom_authentication blocking me to retrieve password from custom tabl

    Hi
    All i am using custom authentication function which i got in forum and is as below:
    /* Formatted on 2007/02/28 16:54 (Formatter Plus v4.8.0) */
    CREATE OR REPLACE FUNCTION custom_auth (
    p_username IN VARCHAR2,
    p_password IN VARCHAR2
    RETURN BOOLEAN
    IS
    l_password VARCHAR2 (4000);
    l_stored_password VARCHAR2 (4000);
    l_expires_on DATE;
    l_count NUMBER;
    BEGIN
    -- First, check to see if the user is in the user table
    --select count(*) into l_count from ap_users where login_id like p_username;
    SELECT COUNT (*)
    INTO l_count
    FROM my_table
    WHERE UPPER (user_name) = UPPER (p_username);
    IF l_count > 0
    THEN
    -- First, we fetch the stored hashed password & expire date
    SELECT PASSWORD, expires_on
    INTO l_stored_password, l_expires_on
    FROM my_table
    WHERE UPPER (user_name) = UPPER (p_username);
    -- Next, we check to see if the user's account is expired
    -- If it is, return FALSE
    IF l_expires_on > SYSDATE OR l_expires_on IS NULL
    THEN
    -- If the account is not expired, we have to apply the custom hash
    -- function to the password
    -- l_password := custom_hash (p_username, p_password);
    -- Finally, we compare them to see if they are the same and return
    -- either TRUE or FALSE
    IF p_password = l_stored_password
    THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    ELSE
    RETURN FALSE;
    END IF;
    ELSE
    -- The username provided is not in the DEMO_USERS table
    RETURN FALSE;
    END IF;
    END;
    I have created a user table my_table for managing user . I have created a from on table with report for creating,updating,deleting users .
    Whenever i am trying to update the first name which is one column of my custom table then for each update asking for password but my client want that once he login as an employee without asking password he should update any column.
    If he desire he can change the password also .
    but when i am enetring as an employee and trying to update any user each time asking password . So is it due to Custom_Auth function or any other problem.
    Please can any one tell me the reason.
    Thanks in advance,
    Amit

    Hi all my problem get solved thanks i am allowing this report to admin so making password as text field working fine thanks

  • How to enable the DFF in OAF page(where Dff is based on the custom table).

    Hi Experts!!
    I am in the process of enabling the dff in OAF page. I am not able to enable the dff if am using the Custom table.
    Ex:
    Assume that my DFF XX_DFF is using the custom table XX_TABLE of att1,att2..
    I am able to enable the dff in OAF page but not able to make those values entered to get stored in the custom table.
    I need helping hands to help me out to get the entered dff values stored in my custom table.
    Kindly provide me the steps so that I can follow up..
    Best wishes,
    Thiru.

    Hi,
    thiru_apps wrote:
    I need to store the captured values of Dff(which was enabled in the seeded page based on the custom table XX_Table) and the same needs to be stored into the custom table xx_Table.
    Basically the entered values for the DFF enabled should have to be get stored in the XX_TABLE(Custom TAble).As per my understands in Standard page u want create some extra fields and those should be save in custom table...is it ...
    For that u r going create stack layout region in standard page via personalization and extend with custom region.
    IF im geting u correctly u need to write code in co and am.
    ---U had already created the components eo vo AM co...
    ---For the custom region in Jdev do the mapping of viewInstacne and view attribute properties for the fields.
    ---In AM:
    public void CreateVo(OAPageContext pageContext, OAWebBean webBean)
    Row hrow;
    OADBTransaction tr=getOADBTransaction();
    EOVOImpl vo=getEOVO1();
    if(!vo.isPreparedForExecution())
    vo. executeQuery();
    hrow=vo.createRow();
    vo.insertRow(hrow);
    hrow.setNewRowState(Row.STATUS_INITIALIZED);
    public void savetr()
    OADBTransaction tr=getOADBTransaction();
    tr.commit();
    In Co ProcessREq:
    AMImpl AM=(AMImpl)pageContext.getApplicationModule(webBean);
    AM.CreateVo(pageContext, webBean);
    In Co ProcessFormREq:
    ---GEt the event of the save button of the standard page
    if(pageContext.getParameter("save")!= null)---DI of the standard page
    AM.savetr(pageContext, webBean);
    Regards
    Meher Irk

  • Syncronize Groups in Custom Table to OID

    Has any one implemented a solution to integrate Group data ( multiple rows of data to represent group membership) which is stored in a custom table to OID?
    The current DIP table sync profile seems to support only users which does not have multi-valued attribute like " group members"
    Is LDAPADD/LDAPMODIFY an option? I would appreciate sharing any ideas on how this sync could be implemented.
    Thanks

    Is there a sample of such pl/sql package you can share ? Pl. email to [email protected]
    For the initial boot strapping would it be better to generate the users and group in form a ldif file and upload it to OID. Moving forward you can use DBMS_LDAP package for adds and modficatiions ?
    Thanks

  • Storing the output of a function module into a custom table

    Hi Gurus,
    Is it possible to store the output of a function module into a custom table.How can this be done?Is it complex?

    hi,
    After u execute the FM and get values in the internal table ITAB_RESULT. Create a custom table having structure same as ITAB_RESULT call it ZRESULT.
    data :wa type ITAB_RESULT.
    call FM and get result it ITAB_RESULT
    loop at itab_result.
    move-corresponding itab_result to wa.
    insert wa to ZRESULT.
    endloop.
    Regards,
    Mansi.

  • Authorization scheme for users stored in a database table?

    Hello!
    I'm trying to find out how to make an authorization scheme for database users.
    I first made an authentication scheme for my current application, I named it "Authentication for database accounts", and the scheme type is "Database Accounts".
    A word of explanation:_
    I have a table in my database, named "USERS". Inside this table, I have the following columns:
    - USERID (NUMBER)
    - USERNAME (VARCHAR2(50))
    - PASSWORD (VARCHAR2(50))
    - EMAIL (VARCHAR2(200))
    For this question, I'll take an example user. The username is USER and the password is USER. Email and UserID don't matter here, but let's just say the UserID is 1.
    What I want:_
    When you go to the application, and you are requested to log in (page 101), then I want a user to be able to log in with the data that has been stored in the USERS table.
    So, on the login page, the user will enter USER as username, and USER as password. The authorization scheme then needs to check whether or not this username and password match the data in the USERS table. If it does, then it must sign the user in with the credentials the user entered (those being USER and USER).
    I also want the UserID to be stored somewhere in the application (if possible, in an application item).
    How do I do this? I've never made an authorization scheme before... I'm not too good with PL/SQL either, but I'm working on that part.
    Any help is greatly appreciated.

    I'm trying to find out how to make an authorization scheme for database users. I think there may be some confusion here. An authorization scheme gives the user access to different parts of an Apex Application. Database users are the users that you use to login to the database, for example with sqlplus.
    From the rest of your post it sounds like you need a custom authentication scheme to validate users against a custom table. For this you need to create a custom authentication scheme and select use my custom function to authenticate. Exactly how you set up the authentication scheme depends on the version of Apex you are using. But an example of validate user function you could use is given below:
    function validate_login (
       p_username   in   varchar2
    , p_password   in   varchar2) return boolean
    is
    v_result varchar2(1);
    begin
    select null into v_result
    from USERS
    where userid = p_username
    and password = p_password;
    return true;
    when no_data_found then return false;
    end validate_login;Once the user has successfully logged on the userid will be in the APP_USER apex substitution string.
    And for Application Express Account Credentials, does this mean an admin must make each new user by hand?If you using Apex account credentials the user details are stored within the Apex tables. You can create users using the Apex admin application or by using the APEX_UTIL.create_user api.
    Rod West

  • Update real time account general data into a custom table

    Hi,
    I have created a z table for storing account general data for some business requirement. I have created a program and executing batch job to update this z table on periodic basis. Can anyone suggest some other alternative solution to update this z table whenever an account gets created/modified in CRM system? Instead of running a batch job periodically, I need a real time replication of the account data in this custom table.
    Thanks and Regards,
    Sneha.

    Hi,
    Thanks for your reply.
    But, Can you elaborate the solution, Can we use Business Transaction Events(BTEs) for updating Partner data? Will these be triggered for Account Creation/Modification. If so, Can u suggest any BTE which can be used for my requirement?
    Thanks and Regards,
    Sneha.

  • Problem while downloading file from custom table

    Hi All,
    Im trying to download the file from the custom table where i have stored the uploaded files through apex.
    I have created the download procedure as mentioned in the oracle docs ,
    And given the execute grant for public user.
    and calling that procedure by calling the URL -- #OWNER#.download_my_file?p_file=#ID#
    But im getting the below error
    Forbidden
    You don't have permission to access /pls/apex/owner.download_my_file on this server.
    Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Server at servername Port number
    Can any one tell whats the problem here.
    Thanks in advance
    regards,
    Arumugam KR

    Your function apex_util.get_blob_file_src under region, the first argument must be the name of page item anywhere in your application that is of type "file browse." So if your form for uploading the blob content is on page 11 and the file browse item is "P11_FILE_NAME" then your query would look like below:
    SELECT FILE_ID
         , FILE_NAME
          , CASE WHEN NVL(dbms_lob.getlength(BLOB_CONTENT),0) = 0
           THEN NULL
            ELSE
                  CASE WHEN attach_mimetype like 'image%'
                THEN '<img src="'||apex_util.get_blob_file_src('P11_FILE_NAME',id)||'" />'
                ELSE
                     '<a href="'||apex_util.get_blob_file_src('P11_FILE_NAME',id)||'">Download</a>'
               end
           END new_img
        FROM TABLE_NAME
    GET_BLOB_FILE_SRC FunctionAs an alternative to using the built-in methods of providing a download link, you can use the APEX_UTIL.GET_BLOB_FILE_SRC function. One advantage of this approach, is the ability to more specifically format the display of the image (with height and width tags). Please note that this approach is only valid if called from a valid Oracle Application Express session. Also, this method requires that the parameters that describe the BLOB to be listed as the format of a valid item within the application. That item is then referenced by the function.>
    [url http://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_util.htm]GET_BLOB_FILE_SRC

  • Workflow attchment data stored in which SAP Tables

    Hi,
    In Leave workflow when approver rejects it the approver(Agent) provide the reason for rejection as an attachment.
    I have to send the external mail to the employee.
    I am able to send the mail with fixed information, however unable to extract the information from attachment ( want to know in which SAP Tables say SW* this information is stored) or any other solution.
    Help Please.
    Praveen Jain

    You really shouldn't worry about that. Use the access functions instead.
    If you are thinking about the e-mail address for a user, use the function module BAPI_USER_GET_DETAIL.
    If you are thinking about the e-mail address for an employee (which is not stored in the same table), one solution is to use BAPI_EMPLCOMM_GETLIST and look for an entry with subtype 10 (this one is SAP standard I believe) or any custom subtype which should hold e-mail address.

  • Custom table - delivery class?

    I need to create a z-table to list the email-ids that I want to notify to, in case of program errors. Should I make the delivery class of this table 'C'? And is best practise to make the data transportable? Or should my users just enter data in each system.
    I am kind of confused...Could any of you please clear me on this concept of Deliver class please. Your help is very much appreciated.
    thanks!

    Vishnu,
    Did you try? I tried these things long back and documented the behavior
    May be you tried it very long back, indeed. Atleast for releases > ECC6.0 EhP3 client-independent customizing tables prompt for WB requests.
    ... C, G, and E will only trigger customizing requests ....
    Unfortunately you're wrong! Did you check the transaction FILE? All the tables involved are of Delv. Class 'G'; but still when you try to save a logical file it asks for a WB request, ever wondered why?
    Still not convinced, check [this|https://picasaweb.google.com/lh/photo/kBwoENEIkUTsGuJUTn9Q5tMTjNZETYmyPJy0liipFm0?feat=directlink]!
    Suhas Saha wrote. "Customizing TRs are raised for client-dependent tables & workbench for client-independent ones!"
    This was w.r.t customizing tables & not application tables, as you were talking about customizing tables in your previous response.
    I can create a table with MANDT assign delivery class A or S and can trigger workbench requests on it.
    I know it does. IMHO type 'A' tables are for storing master and/or transational data & it does not make sense to transport these data.  For e.g., BKPF is type 'A' & not transportable, but T001 is type 'C' & transportable.
    If i want to transport the data across my landscape i would make it 'C' & not 'A'.
    BR,
    Suhas

  • For custom tables should we use UTC for date/time fields

    A general question.
    Can anyone confirm that SAP does seem to be moving towards storing date/time in UTC format?
    We're building custom tables and we're making it a standard to store date/time fields in UTC format.
    Regards,
    Lavaughn

    Hello Lavaughn,
    I can not speak for SAP, but from my personal experience TimeStamps are the state of the art to store time date info in db tables. Even with date/Time fields a conversion to the local timezone is necessary. Of course you can reuse your db definition on dynpros. But since UI and business logic will be divided anyway this is also not really a valid point.
    Best Regards
    Klaus

  • Trapping the error records in a custom Table

    Hi,
    I am executing a report program. It is extracting different types of files - Invoice Header, Invoice line items, Customers, Master data attributes, Sales representative, Branch location data. Each file from different tables. In the selection screen we will be having check boxes for each file. The output is stored either on desktop or on application server in a file format.
    Here there are some mandatory fields for each file which should not be blank.
    For example there is one custom field for Sales Invoice header BUILDER which is mandatory. If it is blank then it will be an error record.
    We need to create a custom table with all these mandatory fields.
    Kindly pls help.

    Hi Abdul,
    this is a consulting issue, not an allowed question.
    Regards,
    Clemens

  • Copying the error records in a custom table

    Hi,
    I  have a report program which is fetching Invoice header and line items . I need to copy the error records (records having a custom field ZZKUNNR as blank) in a custom table . I am executing this report in background daily .
    The records in the custom table can be corrected by functional guys
    Daily the report should fetch the data from SAP and also it should check whether there are correct records in the custom table .
    If the records are found from custom table then those records also must be fetched.
    Finally the output is stored in an application server .
    Kindly help how to write the code for error records.

    Hang on a moment here... I am sure we deleted your user ID a few months ago for ponits gaming!
    Did it "pay off" somehow and now you have a "real job" but don't have a clue what you are doing?
    Doesn't that make you feel just a little bit unconfident about life, the universe and ABAP?
    Cheers,
    Julius

  • Currency field in customized table

    Hi Frnds,
         I have created a customized Table with a currency type field and generated a table maintenance view.While creating a entry for 'JPY' currency key (which has no decimals) the enterd value in currency field gets multiplied by 100. Eg: if the amount value is 1111, instead of 1,111 its displaying as 111,100.
         But this happens only on creating the entries through New Entries Tab. If I changed the enterded value in amount field to 1111 again its displaying correctly as 1,111.
        How can I correct the entries in New Entries Tab too??.
       Please help me.
    Thanks in Advance

    Hi
    I am facing the same kind of problem, but in my case if the PO value is 12345, in table it is stored as 123.45 instaed of 12345
    that means system is putting in decimal point before 2 digits.
    and this is applicable only in case of JPY Currency.
    kindly sugguest the solution
    Thanks and Regards
    Dnyanesh

  • Fail to open report - Custom table prefix specified in the InfoStore error

    The version is BOXI3
    The open report method as
    IInfoObject  report = this.openManagedReportAsIInfoObject(reportName, parentFolderID, iStore, reportAppFactory);
    reportClientDocument = reportAppFactory.openDocument(report, OpenReportOptions._openAsReadOnly, java.util.Locale.US); // exception here
    Exception :
    com.crystaldecisions.sdk.occa.managedreports.ras.internal.ManagedRASException: Cannot open report document. --- Custom table prefix specified in the InfoStore does not exist.  This is a configuration problem. Please contact your system administrator.
    cause:com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Custom table prefix specified in the InfoStore does not exist.  This is a configuration problem. Please contact your system administrator.---- Error code:-2147467259 Error code name:failed
    detail: Custom table prefix specified in the InfoStore does not exist.  This is a configuration problem. Please contact your system administrator.
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
    Any one knows why and how to config propertly ?
    Thanks.
    Forest

    Hello Forest,
    Please try using following code :
    ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
    IEnterpriseSession enterpriseSession = sessionMgr.logon("username", "password", "hostname:port", "secEnterprise");
    IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
    IInfoObjects infoObjects = iStore.query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME='World Sales Report' And SI_INSTANCE=0");
    IInfoObject infoObject = (IInfoObject)infoObjects.get(0);    
    IReportAppFactory reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportFactory");
    ReportClientDocument rcd = new ReportClientDocument();
    rcd = reportAppFactory.openDocument(infoObject,0, java.util.Locale.US);
    Thanks,
    Chinmay

Maybe you are looking for