Crypto in ABAP

Hi,
I'm looking for a way of encrypt a file with some sort of cryptography (PGP, …) in ABAP. The file is created via a program with "OPEN DATASET XXX FOR OUTPUT" on the sap application server. Is there any ABAP library or function that allows me to encrypt this file?
Thnx for your help,

Hi
With OPEN dataset you can use addition FILTER and pass the OS command(only possible with OS Unix and WindowsNT).
Not sure if encrypt is a UNIX command !!
Regards
Kalidas

Similar Messages

  • Error while installing Java Add-Ins on ABAP

    Hi All,
    I am getting an error while doing installation of Jaba Add-Ins on existing ABAP.
    Iam doing installation on AS/400 server having operating system OS/400.
    Error appears at the end when instalaltion starts.
    Following is the error.
    ERROR 2006-07-20 11:49:49
    CJS-20032  Cannot create the secure store; see output of log file E:\usr\sap\SAPinst\NW04SR1\WEBAS_JAVA_DB4\ONE_HOST/SecureStoreCreate.log: Attaching Java program to /usr/sap/SAPinst/NW04SR1/WEBAS_JAVA_DB4/ONE_HOST/install/sharedlib/tc_sec_secstorefs.jar.Attaching Java program to /usr/sap/SAPinst/NW04SR1/WEBAS_JAVA_DB4/ONE_HOST/install/sharedlib/exception.jar.Attaching Java program to /usr/sap/SAPinst/NW04SR1/WEBAS_JAVA_DB4/ONE_HOST/install/sharedlib/logging.jar.SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    And the SecureStoreCreate.log content is as follow.
    Attaching Java program to /usr/sap/SAPinst/NW04SR1/WEBAS_JAVA_DB4/ONE_HOST/install/sharedlib/tc_sec_secstorefs.jar.
    Attaching Java program to /usr/sap/SAPinst/NW04SR1/WEBAS_JAVA_DB4/ONE_HOST/install/sharedlib/exception.jar.
    Attaching Java program to /usr/sap/SAPinst/NW04SR1/WEBAS_JAVA_DB4/ONE_HOST/install/sharedlib/logging.jar.
    SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    java.lang.ExceptionInInitializerError
         at java.lang.Error.<init>(Error.java:37)
         at java.lang.ExceptionInInitializerError.<init>(ExceptionInInitializerError.java:61)
         at javax.crypto.Cipher.a(Unknown Source)
         at javax.crypto.Cipher.getInstance(Unknown Source)
         at iaik.security.provider.IAIK.addAsProvider(IAIK.java:1655)
         at iaik.security.provider.IAIK.addAsJDK14Provider(IAIK.java:1612)
         at iaik.security.provider.IAIK.addAsJDK14Provider(IAIK.java:1623)
         at com.sap.security.core.server.secstorefs.Crypt.<clinit>(Crypt.java:82)
         at com.sap.security.core.server.secstorefs.SecStoreFS.setSID(SecStoreFS.java:158)
         at com.sap.security.core.server.secstorefs.SecStoreFS.handleCreate(SecStoreFS.java:804)
         at com.sap.security.core.server.secstorefs.SecStoreFS.main(SecStoreFS.java:1274)
    Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
         at java.lang.Throwable.<init>(Throwable.java:195)
         at java.lang.Exception.<init>(Exception.java:41)
         at java.lang.RuntimeException.<init>(RuntimeException.java:43)
         at java.lang.SecurityException.<init>(SecurityException.java:32)
         at javax.crypto.b.<clinit>(Unknown Source)
         ... 9 more
    Caused by: java.lang.SecurityException: Cannot locate policy or framework files|
         at java.lang.Throwable.<init>(Throwable.java:195)
         at java.lang.Exception.<init>(Exception.java:41)
         at java.lang.RuntimeException.<init>(RuntimeException.java:43)
         at java.lang.SecurityException.<init>(SecurityException.java:32)
         at javax.crypto.b.a(Unknown Source)
         at javax.crypto.b.g(Unknown Source)
         at javax.crypto.b$0.run(Unknown Source)
         ... 10 more
    I am not able to locate where the problem is.
    Can any one suggest me some solution to this problem.
    Regards,
    Rajesh Patel

    HI,
    Are you installing J2EE Add-in with SSL option activated ? If so, I think there is some IAIK/SSL libraries that have to presented on server to proceed with installation successfully. You can also try installing Add-in without SSL/https option activated and configure SSL afterwards.
    Regards,
    Mike

  • SSO on AS Abap/JAVA using Kerberos

    Hello,
    We have the following configuration:
    ECC system
    Setup of Microsoft UAG server for SSO using Kerberos W2008R2
    All the steps about SPN has been applied...
    We use Kerbtray to check the keys..
    But when using WEBGUI, we got error 401 http auth.
    Tried to trace but nothing. I've found nothing on those forum about the setup of service webgui..and tried the most combination without any success...now I've selected  in logn data procedure "Alternative logon procedure" and security standard-auth standard SAP user and keep all logon procedure.
    Have a idea how to fix this problem ? thanks in advance.
    Info: all the checks about IE8 or firefox setup has been applied and I've used SPNego Add-on setup and import the generated keytab ...with crypto RC4-HMAC-NT.
    Regards,
    Jade

    Hi Jade,
    I was in a same situation before. I have to configure SSO with Windows Authentication for IITS. I have configured Kerberos for SAP GUI for ABAP and SAP Negos only for JAVA stack (not for ABAP stack (IITS)). The Windows Authentication is possible with ABAP or JAVA individually. When I have opened a message with similar requirement SSO experts sugested me to use 3rd party products.
    So finally to achieve the requirement I have configured SSO with Logon Tickets. Even though you dont have Enterprise portal, you can configure SSO with Logon Tickets creating a PSE in ABAP stack and importing in other system. This worked fine with IITS. Only for the initial system we need to enter credentials remaining directly logs you in the system with the generated cookie/ Ticket.
    If you can try SAP negos then config. for ABAP to accept JAVA tickets (there is conf SSO from JAVA to ABAP) on the same system. This may enable Windows Authentication for IITS (I didnt try this)
    Refer: Need help in SNC configuration for ITS (IITS)
    If you come up with any Solution other than this to enable Windows Authentication, Please post. May be Olivier Solution Works here. Olivier could you please post about the SAP note info and the config steps?
    Thanks,
    Ajay.
    Edited by: Ajay_Basis on Jul 15, 2010 5:15 PM

  • SAP-ABAP Module

    Hi to All,
    I completed my B.E(Electronic and Commmunication Engineering).As I am having some doubt,Senior Consultant please give your opinion
    Do SAP ABAP Certification worth the money?
    Is it easy to crack the Certification?
    Which is good doing course in authorised centre or unauthorised centre?Because Investment is Huge!!
    Kindly reply and help me!
    Regards
    Sibi

    Hi,
    SSF uses [PKCS7|http://tools.ietf.org/html/rfc2315] format to encrypt data. This format generates a random content key which is used to encrypt content and then it encrypt this key using public key of recipient. The recipient decrypts content key using her private key and then uses this key to decrypt content. Therefore the answer for the first question is you can't specify keys used by symmetric cipher. You can't see from the encrypted text what algorithm was used but the default symmetric encryption algorithm used by SAP should be DES in CBC mode.
    I would suggest you to use PKCS#7. Implementing crypto is really hard so I don't suggest to simply use DES and encrypt content. One of the hardest part is key management. PKCS#7 solves this issue for you for free. So you need to find a Java library which can generate PKCS7 envelope (look for Bouncy Castle). The only input will be public key of your SAP system. How to decrypt PKCS7 in ABAP can be seen in FM CCARD_DEVELOPE.
    Cheers

  • ITAR - ABAP Secure Programming

    Hi Experts,
    I would like to know whether there is any information available on ABAP Secure programming to adhere to ITAR in SAP R/3 4.7.
    Would appreciate if you give any pointers.
    Thanks,
    Best regards,
    Prashant

    Hi Prashant
    ITAR deals with export regulations concerning also cryptographic products.
    In general there is (by default) no crypto contained in SAP R/3 4.7 that falls under ITAR. However, if you start to modify or add ABAP code and include any crypto functionality, you are responsible to adhere to ITAR yourself.
    Usually the SAP secure programming guide dictates to SAP programmers to include any cryptographic functionality (when needed) as a "pluggable function". This means that the code must be able to run without crypto, even if it is then not safe.
    I hope that this helps.
    Best regards, Kristian

  • Issue in Creation of XML file from ABAP data

    Hi,
    I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format.
    The required format is
    -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>
       - <Header2 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 10 fields>
              <Header3 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
              <Header4  1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 4 fields/.>
               <Header5 1st field= u201CValueu201D 2nd field= u201CValueu201Du2026u2026. Upto 6 fields/>
          </Header2>
       </Header1>
    Iu2019m using the call transformation to convert ABAP data to XML file.
    So please anybody can help how to define XML structure in transaction XSLT_TOOL.
    And one more thing, here I need to put the condition to display the Header 3, Header 4, Header 5 values. If there is no record for a particular line item in header 3, 4 & 5, I donu2019t want to display full line items; this is only for Header 3, 4 & 5.
    Please help me in this to get it resolved.

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • Logical command in ABAP.....Urgent

    Hi,
      i am pretty new using ABAP program so i neeed help urgently. i am trying to move a file on the application server from one directory to the other and i was using the open dataset function to do that. but the file i am trying to move is pretty big and because i am using internal table to store, it is causing problems with the space.
      i have consulted the basis guys and they have managed to create a logical file for copying from one directory to the other on the application server. to help you furthter. i am enclosing the mail sent to me.
    I have created a logical command which should copy the file from one location to the other but you need to pass it the source dir and file name and the destination dir and file name.
    The logical command is ZCOPY and uses cmd /c copy
    Copies one or more files to another location.
    COPY [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
         [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
      source       Specifies the file or files to be copied.
      /A           Indicates an ASCII text file.
      /B           Indicates a binary file.
      destination  Specifies the directory and/or filename for the new file(s).
      /V           Verifies that new files are written correctly.
      /N           Uses short filename, if available, when copying a file with a
                   non-8dot3 name.
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.
    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.  Default is
    to prompt on overwrites unless COPY command is being executed from
    within a batch script.
    the problem now is i have no idea about how to use the logical command. can any one help me.
    Thank you,
    Ravi.

    If memory is not an issue, then there should be no reason why this should not work.
    report zrich_0001.
    parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt',
                d2 type localfile default '/usr/sap/TST/SYS/Data2.txt'.
    data: itab type table of string with header line.
    start-of-selection.
    * Read old file
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into itab.
          if sy-subrc <> 0.
            exit.
          endif.
          append itab.
        enddo.
      endif.
      close dataset d1.
    * Write to new file
      open dataset d2 for output in text mode.
      loop at itab.
        transfer itab to d2.
      endloop.
      close dataset d2.
    * Delete the old file
      delete dataset d1.
    Regards,
    Rich Heilman

  • Logical Database in Abap Objects

    Hi to All
    I want do it a program report using a Logical Database.
    Is this possible ??? But when I make a GET <node>, occurs the following error:
             "" Statement "ENDMETHOD" missing.  ""
    I'm doing the following:
    CLASS MONFIN IMPLEMENTATION.
           METHOD TRAER_DATOS.
                   GET VBRK.
           ENDMETHOD.
    ENDCLASS.
    Please, somebody tell me how I use the logical database in Abap Objects.
    Thank you very much
    Regards
    Dario R.

    Hi there
    Logical databases whilst of "some use" are not really part of OO.
    If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
    Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
    As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
    Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc)  then there is still some limited life in this stuff but for OO try and solve it by another method.
    If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
    You can't issue a GET command directly in a method.
    Cheers
    Jimbo

  • LOGICAL DATABASE IN HR ABAP PRPGRAMMING

    Hi Friends,
    what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
    AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
    regards,
    vijay.

    hi
    HR Logical Databases
    In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
    PNP (PNPCE)
    PAP
    PCH
    By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
    Logical Database PCH
    This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
    Logical Database PNP (or PNPCE)
    Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
    Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
    Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
    Reporting on working time and planned compensation for a position that an employee occupies
    Reporting on the validity and proficiency of a qualification that an employee fulfils
    From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
    The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
    You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
    Logical Database PAP
    Logical database PAP enables you to access data from Recruitment.
    regards
    navjot
    reward if helpfull

  • FileName in ABAP XSLT Mapping

    Dear SDN,
    In an integration scenario we are using sender File Adapter and a  ABAP XSLT Mapping.
    Is there any way to get the source FileName from such mapping.  Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.
    regards,
    GP

    Thank you for your help,
    I just try to access the adapter-specific attibutes using:
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:variable name="filename"  select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
    </xsl:stylesheet>
    but the following error raised:
    <SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
    have you had this situation?

  • ABAP-- diff between sy-sy-tabix and sy-index

    Hi Guru's,
    Pleae can anybody expalins me what is the difference between sy-tabix and sy-index(Loop Index) ?
    Because in one case i am Modifyimg the internal table inside the do loop by giving sy-index ((Index of Internal Tables)(MODIFY scarr_tab INDEX sy-index FROM scarr_wa TRANSPORTING currcode. )  in the syntax and in other case inside loop statement i am modifyng same record by giving sy-tabix MODIFY scarr_tab INDEX  sy-tabix FROM scarr_wa TRANSPORTING currcode.) in the syntax.
    in both cases its working fine but i am not getting which one i have to use  where to modify the internal table?
    regards
    SATYA

    Hi Henry,
    SY-INDEX is the value of the current iteration. It is applicable for the following programming constructs in ABAP -
    DO...ENDDO.
    WHILE...ENDWHILE.
    SY-TABIX (TABle IndeX) is applicable to internal tables. If you scroll down in the link which Eddie has given, you will find a more detailed explanation for sy-tabix and which statements affect its value.
    Regards,
    Anand Mandalika.

  • Comas(,) are not getting displayed in the output while using OO ABAP

    Hi All,
    I am using ABAP objects to display the ALV report in which there is a requirement to output Quantity fields. The Quantity fields are getting displayed without comas ','. Please help me in getting back the comas in the output.
    Eg:
    Below logic is used in my program.
    Class name: cl_salv_form_layout_grid
    Code:
      obj_footer->create_text(
            row    = v_row_cnt
            column = v_col_cnt
            text   = Quantity).
    Expected output:
    39,545.000
    Current Output:
    39545.000
    Thanks in advance for your help.
    Thanks & Regards,
    Siva.

    Hi,
    Please check if the images are in the server and in the /images alias path.
    thanks,
    Sharmila

  • NULL and Space value in ABAP

    Hi All,
           I like to know, is it NULL and Space value is same in ABAP, if it is not how to check null value.
    Thank you.
    Senthil

    everything is correct though some answers are not correct.
    A Database NULL value represents a field that has never been stored to database - this saving space, potentially.
    Usually all SAP tables are stored with all fields, empty fields are stored with their initial value.
    But: If a new table append is created and the newly-added fields do not have the 'initial value' marked in table definition, Oracle will just set NULL values for them.
    as mentioned: There is no NULL value to be stored in an ABAP field. The IS NULL comparison is valid only for WHERE clause in SELECT statement. WHERE field = space is different from WHERE field IS NULL. That's why you should check for both specially for appended table fields.
    If a record is selected (fulfilling another WHERE condition) into an internal table or work area, NULL values are convertted to their initial values anyway.
    Hope that sheds some light on the subject!
    regards,
    Clemens

  • Sale order before the regeneration of ABAP report: RSM13000

    Hi there,
    I am just wondering about something.
    After we installed support packages, users could not get any sales order without to get any error message and I we could only see  an error message via SM21 which says:
    Run-time error "LOAD_TYPEPOOL_VERSION_MISMATCH" occurred.
    So after we regenerated the ABAP report: RSM13000 after that everythings seems to be ok.
    Now the question is: When we try to find the order numbers which the users created  before the regeneration we find nothing.
    What about this numbers? Did they have not been created at all or what hapened? They customer is asking now.
    Thanks in advance
    Hanseatik

    I still do not know. We created them again

  • Report J_1IEWT_CERT getting cancelled, generating ABAP dump!

    A long running report J_1IEWT_CERT in background mode is getting cancelled after running for a while and generating the following dump :
    Error analysis
        When changing or deleting one or more lines of the internal table
        "\PROGRAM=J_1IEWT_CERT\DATA=PRINTTAB[]" or when inserting in the table
         "\PROGRAM=J_1IEWT_CERT\DATA=PRINTTAB[]", 0 was used as
        the line index. An index less than or equal to zero is not
        allowed.
        The error can occur when using the following options:
        1. "INDEX idx" for specifying the line number in the table
         "\PROGRAM=J_1IEWT_CERT\DATA=PRINTTAB[]"
           where you want to change, insert or delete.
        2. "FROM idx" for specifying the start index when deleting a line
           area from or inserting a line area into the table
         "\PROGRAM=J_1IEWT_CERT\DATA=PRINTTAB[]".
        3. "TO idx" for specifying the end index when deleting a line
           area from or inserting a line area into the table
         "\PROGRAM=J_1IEWT_CERT\DATA=PRINTTAB[]".
        At the time of the termination, the table contained 17008 lines.
    How to correct the error
        If the error occurred in your own ABAP program or in an SAP
        program you modified, try to remove the error.
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "TABLE_INVALID_INDEX" " "
        "J_1IEWT_CERT" or "J_1IEWT_CERT_F01"
        "FILTER_DATA"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
    Tried searching for some SAP Notes to fix the issue, no success as of now, Please help me out...

    Have you checked these notes ?
    363107 Short dump occurs during TDS certificate printing.
      803806  Error while genrating TDS certificate 03.01.2005
      1066049  J1INCERT - Error while generating TDS certificate
    Regards,
    Subhash

Maybe you are looking for

  • Availibility of ADOBE forms in IDES

    Hey Gurus, SAP implementation is in progress in my group, mostly all the members are kinda freshers in this project from both the sides, So kindly suggest me how to do practice on ADOBE form as i have been told that ADLC can not be installed in IDES.

  • Spaces is not shown in Dock

    I'm using Spaces en selected "Visuable in Dock", but the Spaces icon isn't shown in the Dock. Also in the Application folder Spaces isn't shown. Can somebody help/advice?

  • 23" Display did not come on after disconnecting

    Recently powered down Mac Pro (2007) and relocated to another room along with 23" Cinema display. Powered on and display did not come back on. Checked connection to computer. Only other connection to display is USB from Apple keyboard. Any suggestion

  • Lost my Final Cut Pro disc, but I have the serial/license number

    So basically I want to take my final cut pro off of one computer and put it on another. But I don't have my disc, I do have the serial/license number so is there anyway I can install it on my other computer without the disc? Or is there anyway to get

  • LSMW error no authorisation "ZSDTEXT_DELIVERY_TEXT_DEL_UPDATE.lsmw.read ".

    I am using LSMW to upload Header Text data In Delivery (VL02N).while running LSMW system giving an error "No Authorisation to open the file "ZSDTEXT_DELIVERY_TEXT_DEL_UPDATE.lsmw.read ".As per company policy they dont want to give authorisation for t