Supress authentication check from within ABAP code

Hi,
we want all users to update their email-address in their own sap profile. (a self service)
By default, in the screen "System"->"User Profile"->"Own Data", he can update all except his email-id.
For this, we have written an abap report.
DATA: p_smtp TYPE TABLE OF bapiadsmtp WITH HEADER LINE,
      p_return TYPE TABLE OF bapiret2 WITH HEADER LINE,
      p_addressx TYPE bapiaddr3x.
data: p_uname TYPE xubname.
PARAMETERS:   p_email TYPE ad_smtpadr OBLIGATORY.
      p_uname = sy-uname. "logged in user
      p_smtp-e_mail = p_email.
      p_smtp-std_no = 'X'.
      p_smtp-home_flag = 'X'.
      p_smtp-consnumber = '001'.
    p_addressx-e_mail = 'X'.
    CALL FUNCTION 'BAPI_USER_CHANGE'
      EXPORTING
        username = p_uname
        addressx = p_addressx
      TABLES
        return   = p_return
        addsmtp  = p_smtp.
when we execute this report, with all rights, it works fine.
but a normal user when he executes, he is getting this error:
"You are not authorized to change users in group"
the su53 screen shows:
   Authorization check failed
  Object Class BC_A Basis: Administration
    Authorization Obj. S_USER_GRP User Master Maintenance: User Groups
      Authorization Field ACTVT Activity
                                                                                02
      Authorization Field CLASS User group in user master maintenance
                                                                                <Dummy>
the point here is we cannot add User Maintenance rights to all our normal users.
is there any way, within the report (code) we can suppress the authentication check, programatically just while calling 'BAPI_USER_CHANGE', so that the user will be able to update his email-id.
thanks in advance,
Madhu_1980

Here are 2 useful links:
http://www.sapdev.co.uk/fmodules/fms_updateaddress.htm
Updating email address in SU1/SU3
If these don't help the noly thing I can suggest is that you write your own bdc program.
Regards,
Warren.

Similar Messages

  • Need to start JINI registrar instance from within the code

    HI All,
    I need to write JUnits for our app using JINI for which we need to start JINI registrar from within the code and then publish some services to it.
    Any idea how we could be starting the JINI registrar from Java Code ? Any thoughts/suggestions/pointers would be highly appreciated.
    Thanks in advance
    Vikram

    Hi Senthil,
    You can directly call the outer class method. Otherwise use the following way MyDialog.this.close(); (But there is no close() method in Dialog!!)
    If this is not you expected, give me more details about problem.
    (Siva E.)

  • Is it possible, when i call a vi from within my code, to pass to it parameters as input and to return some values too?

    Hi There!
    I am currently calling a vi from within my code. However, what i would like to do, is to pass it 2 int values when i call it and for it to return 2 int values when it is done!
    Any advice on how i can do this please.
    Thanks.
    Regards,

    Hi Matrix,
    is there a reason you do it this way? By Ref (it is called dynamically loading)
    If you place the VI directly on the BD of a VI you can just wire things up.
    Now if you need dynamically loading. hoover the open VI-ref function and right click on the type specifier and select create constant. Then right click browse, browse to your VI. Now you have the connector pane.
    But if I were you I just use VI directly, because you'll keep connections active between the two VI's
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to get the Weblogic Server Id from within java code

    I would like to log which server (among a cluster) a certain job is running on. Is there a way to get the server id from within Java code (this code is in a session bean if that is relevant.)
    By server id I mean the "Name" column in the summary of servers on the weblogic console.
    Thanks,
    ken

    Use the two entries close to the bottom of the page: "list WebLogic
    MBeans:listMBeans.jsp
    display MBean attributes and operations:showMBean.jsp"
    Nils
    Anatoly wrote:
    >
    Cameron,
    That page has these items on it:
    which one do you think helps with my issue?
    Misc WebLogic examples
    LongRunningTask
    Execute tasks in parallel using WebLogic Execute Threads
    Weblogic stats (5.1)
    Reload Servlet(s) programmatically (5.1)
    Network classload from WebLogic:using reflection,or the launcher
    Weblogic 5.1 debugging properties
    Seppuku pattern readme
    Using dynamic proxies to intercept EJB invocations (6.1)
    list WebLogic MBeans:listMBeans.jsp
    display MBean attributes and operations:showMBean
    Thanks to Marcelo Caldas for filter by type option and nice UI!
    Using com.sun.jdmk.comm.HtmlAdaptorServer with WebLogic 6.1
    Cool
    EJBGen
    Dimitri
    back
    "Cameron Purdy" <[email protected]> wrote in message news:<3c7a745d$[email protected]>...
    JMX ... see http://dima.dhs.org/misc/ for some info on JMX in Weblogic.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Anatoly" <[email protected]> wrote in message
    news:[email protected]..
    Does anyone know who to get the managing server URL's port
    from within the EJB code running on Weblogic 6.1?
    The URL port is not default (not 7001), but when creating
    initial context, I am not specifying the URL in properties.
    Due to that, trying to the the PROVIDER_URL property from
    environment does not return anything.
    Appreciate any responses.
    -Anatoly
    ============================
    [email protected]

  • Reading UME attributes from Webdynpro ABAP code

    Hi,
    We have a requirement in our project where we need to read the UME attributes for a logged in user in the webdynpro ABAP code. The attribute in question is "SAP Vendor Number" which is maintained as UME attribute for each user.
    Is there any standard FM or BAPI or webservice which we can leverage for this requirement?
    Else, any pointers regarding how to achieve this functionality would be helpful.
    Thanks.

    Hi kartik,
    BAPI_USER_GET_DETAIL Function module to get all the required details of the system user in one go. Here you need to give the SAP Logon Name (USerID) of the person to the function module.
    Or check if this are helpful.
    BBP_PARTNER_GET_DATA
    BAPI_PARTNER_GET_BY_IDNUMBER
    BUPA_PARTNER_GET_BY_IDNUMBER 
    BBP_PDH_GET_PARTNERS_FROM_USER

  • Check from the ABAP backend whether the URL is available

    I need to check whether the  portal(any web page) is available or not. to do this I must check whether the corresponding URL is available.
    I need the corresponding ABAP code to do so. can anybody please help me out.
    Thanks,
    Ashutosh Shukla

    Have a look am FM GRMG_SEND_HTTP_PING

  • Execute shell command from within pascal code

    Hello there,
    I am trying to execute a shell command from within my pascal code. I use XCode together with FreePascal. I have tried something like:
    exec ('program', 'options');
    adding the 'Dos' unit to the Uses clause of my program.
    Thus, e.g.,
    exec ('mkdir', '/A')
    to create a directory with the name 'A'.
    However, my attempts so far were unsuccessful. Can anyone help me on this, and perhaps provide a simple example of how to do it right?
    Thank you in advance,
    Shane

    In the mean time, I found the problem myself. I am just posting the solution here for anyone that is interested. My original solution was correct, in that the 'Dos' Unit must be added, and that the right command is 'exec'. There was however a problem with the correct path to the program that I wanted to invoke. In the shell, this program was accessible from anywhere. However, in the 'exec' command, the full path to the program must be given. Since I am not a Unix expert, I don't know the reason for this.
    So, in summary, the solution is:
    Uses Dos;
    begin
    exec ('full path to program', 'program options');
    e.g.: exec ('/bin/sh', '/run.sh') to process the commands in the file /run.sh
    end
    Hope this may be of help to anyone else.
    Shane
    Mac OS X (10.3.9)
    Mac OS X (10.3.9)
    Mac OS X (10.3.9)

  • Creating a Step for Background Job from within ABAP Program

    Step-1: I have a Report in ECC, which is scheduled as Background Job, which writes the file to the Application Server(UNIX)
    Step-2:  Trigger a Unix Command to ftp the file to other server.
    Both Step-1 & Step-2 can be done from SM36. 
    Another Scenario:
    Users can run the report in background from SE38 or using the transaction code for the report, In this case we want to call the external command.
    Instead of calling the External Command as below in the report, I want to create a Step from within the program when it is scheduled in background mode.
    CALL 'SYSTEM' ID 'COMMAND' FIELD lc_unixcom.    [ Here lc_unixcom has the External Command ].
    Any ideas??? Appreciate help.

    Hi,
    For submitting a report step, you may use either SUBMIT ... VIA JOB ... or JOB_SUBMIT function module.
    For external commands, this should be done only by calling JOB_SUBMIT function module.
    Sandra

  • Help needed with process to call an external web service from within ABAP

    Hello,
    I have an understanding of how I can provision web service from within SAP so that it can be consumed by external apps.
    Now, I am in need to know the, how I can call an external non-sap web service (let's say a java application) or even a public domain web service for that matter:
    Is there any lay man's guide out there? which will list following step:
    A sample ABAP program calling an external web service
    List of all the configurations needed within SAP to make this happen (calling an external web service).
    Any help will be greatly appreciated.

    Hi Matesh,
    Please use the following command in Google : site:sdn.sap.com abap consuming web service
    There is many samples of your needs on SDN.
    Like this one :
    http://wiki.sdn.sap.com/wiki/display/Snippets/WebServiceconsumerusingABAP-PROXY
    Regards, Gilles.

  • Check-Out by ABAP-Code

    Hi all,
    I need to check-out objects of the solution directory to the maintenance project  by ABAP code.
    What classes or function modules can I use?
    And can I use the same classes or function modules to check-in these objects later?
    Thank's for your help,
    Urs

    Hi,
    WebDynpro should automatically check-out source files if you want to modify something.
    If you are not asked for an activity: Or you logged on? You didn't accitdentally check the checkbox "keep local for now" when creating a new DC? Or do you have an activity that is marked as default activity so the NWDS automatically added the files to that activity without an explicit dialog?
    Making changes, activating them later and deploying locally built (inactive) deployables into a local/test J2EE engine does make perfect sense to me. You are testing before you commit your changes and publish them to you colleagues (to switch language a bit). Sounds OK to me.
    Regards,
    Marc

  • Signing Jars from within Java Code

    Hi,
    I would like to sign a jar file from within my Java code. Reason for this is that I wish to update a jar file at runtime, throw away the class loader that loaded the jar, and load the updated code inside a new classloader.
    One problem, however: The jar file has to be signed before loading it. How can I do this from my Java program? Or do I need to have the jarsigner tool available at the location where I resign the jar?
    Thanks in advance,
    Ronald.

    Hi,
    In the meantime I found an answer to my problem. In rt.jar there exists a class sun.security.tools.JarSigner, which can be used for exactly this purpose. Not completely portable, but it'll do the trick.
    Ronald.

  • Execute PL/SQL block with named binds from within java code?

    Hi guys,
    Is there any good way to execute my PL/SQL code, for example
    BEGIN         :x := :x+1; END;
    from my Java code? I need nothing complicated, just static code block with named binds.
    I have tried the Oracle exetnded JDBC (setXXXbyName methods):
      public static void main(String[] args){     try {     Class.forName("oracle.jdbc.driver.OracleConnection");     Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","user","password"); String SQL="begin :x:=:x+1; end;"; OracleCallableStatement stmt; stmt=(OracleCallableStatement)conn.prepareCall(SQL); stmt.setIntAtName("x", 5); stmt.registerOutParameter("x", Types.INTEGER); stmt.execute(); System.out.println(stmt.getInt("x"));     } catch (Exception x) { x.printStackTrace();    }   }
    And get the java.sql.SQLException: operation not allowed: Ordinal binding and Named binding cannot be combined!
    Then i've tried SQLJ appoach:
      public static void main(String[] args){     try {     Class.forName("oracle.jdbc.driver.OracleConnection");     Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","user","password");       Oracle.connect(conn);       System.out.println("Connected!");           int x=3;       #sql { BEGIN         :x := :x+1;       END; };           System.out.println("x=" + x);     } catch (Exception x) { x.printStackTrace();    }   }
    And x=3 had retuned... Although 4 expected.
    Then, I've set parameter sqlj.bind-by-identifier=true
    And result is another exception! java.sql.SQLException: Missing IN or OUT parameter at index:: 2
    Can you please mark my mistakes/point to correct solution?
    Thanks in advance,
    Alexey

    Found another solution, this time working at least...
      public void testPLSQL() {
           String dynamicSQL=
                "declare\n" +
                "  v_CursorID  INTEGER;\n" +
                "  v_BlockStr  VARCHAR2(500);\n" +
                "  v_Dummy     INTEGER;\n" +
                "  v_x         String(18);\n" +
                "BEGIN\n" +
                "  v_CursorID := DBMS_SQL.OPEN_CURSOR;\n" +
                "  v_BlockStr :=?;" +
                "  DBMS_SQL.PARSE(v_CursorID, v_BlockStr, DBMS_SQL.V7);\n" +
                "  v_x:=?;"+
                "  DBMS_SQL.BIND_VARIABLE(v_CursorID, ':x', v_x,18);\n" +
                "  v_Dummy := DBMS_SQL.EXECUTE(v_CursorID);\n" +
                "  DBMS_SQL.VARIABLE_VALUE(v_CursorID, ':x', v_x);\n" +
                "  DBMS_SQL.CLOSE_CURSOR(v_CursorID);\n" +
                "  ?:=v_x;"+
                "  COMMIT;\n" +
                "EXCEPTION\n" +
                "  WHEN OTHERS THEN\n" +
                "    DBMS_SQL.CLOSE_CURSOR(v_CursorID);\n" +
                "    RAISE;\n" +
                "END DynamicPLSQL;";
             try {
                   Class.forName("oracle.jdbc.driver.OracleConnection");
                   Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","user", "password");
                   System.out.println("Profit");
         String SQL="begin :x:=:x+1; end;";
         OracleCallableStatement stmt;
         stmt=(OracleCallableStatement)conn.prepareCall(dynamicSQL);
         stmt.setString(1, SQL);
         int x=3;
         stmt.setInt(2, x);
         stmt.registerOutParameter(3,     Types.INTEGER);
         stmt.execute();
         x=stmt.getInt(3);
         System.out.println(x);
         assertEquals(4, x);
             } catch (Exception ex) {
                  ex.printStackTrace();
                  assertTrue(false);
      }Now the only thing I need is to code some kind of preprocessor of SQL block, to prepare the dynamicSQL lair for SQL critter...
    Please please please show me something less complicated! :8}

  • Execute ABAP code from within SAPScript code

    http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm

    Hi
    Do u have any question??? or are you trying to give suggestion???
    If u have query how to call a report in script here is ur answer
    The Form :
    /:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    ZKRPMM_PERFORM_Z1MEDRUCK.
    DATA : BEGIN OF it_input_table OCCURS 10.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    * déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
    INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
    * w_vbeln LIKE vbak-vbeln,
    w_zcdffa LIKE vbak-zcdffa.
    * FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = w_ebeln
    IMPORTING
    output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.
    Reward all helpfull anwers
    Regards
    Pavan

  • Custom authorisation checks from within actions

    Does anyone have any experience of using authorisation object /DBM/ORDER to control field entry from actions in DBM 6.0? We wish to control entry of certain fields such as pricing data between different levels of the business such as a parts manager, supervisor or counter assistant and are wondering if this object could be used or whether we should develop additional objects?
    In this scenario would it be necessary to create an action for every business role, call the same execution code from each action and then assign the OE_ACTION (field /DBM/ORDAC in object /DBM/ORDER) to each user profile? If this is the case then I'm not quite sure how x number of actions (and corresponding event(s)) for each role should be configured however!

    Hi David,
    It is true that you will need a custom authorization object for your requirement with all the fields as per  your requirement into it.
    Ex: ZDBM_FLDCHK with fields
            PRSDT and so on.
    Now you need to create a BADI Implementation for /DBM/BADI_OE_ACTION_PREPARE. Create this implementation without filter action so that this could be executed at every action. Within this BADI implementation you can write your code for checking whether the user has changed the values on screen by comparing the HEADER_DETAIL corresponding values in VBAK_COM.
    I hope this helps.
    Give points if useful.
    Regards,
    Prakash

  • Access Portal Parameter from within ABAP-Web Dynpro

    Hi all,
    I have an ABAP Web Dynpro which is executed via an Web Dynpro iView in Enterprise Portal.
    How can I read the UserID of the portal user within the web dynpro? (the portal user will not be the user who called the Web Dynpro)
    Any suggestions on this?
    Thanks in advance.
    Kind Regards,
    Martina
    ~~~~~~~~~~~~~~~~
    ABAP Web Dynpro developed within CRM 5.0 system
    Enterprise Portal 6.0

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

Maybe you are looking for

  • Upgrade R12.0.4 DB 10.2.0.3 to 11.1.0.7

    Hi All, I have followed the below steps to upgrade R12 DB on SLES 10 SP2 from 10g to 11g 3- Perform pre-requsites for patch 6928236 4- Apply INTEROPERABILITY PATCH 6928236 5- Apply TXK - 12.0.4 Consolidated Patch 1 7207440 6- Perform patch 7207440 po

  • NAS Storage Suggestion

    I've got a small networked office (with a laptop and a desktop) and am hoping for suggestions for a reliable long term solution for an NAS storage device that I can connect to my Time Capsule via ethernet connection. I will be using this device to Ti

  • Several different equals methods

    Hi, I want to compare two different sets with eachother. The Set contains objects with a number of strings and Integers, and some of these need to be equal in order to find a match between the two different Sets. This differs from the "natural order"

  • Refreshing a UI field on Button click.

    I have and input text and a search icon next to in on UI. On click on search icon I show a popup and on click of OK button on popup I set a value in pageFlowScope and tries to refresh input text. Input text value is same pageFlowScope variable so I w

  • How do I post podcast #2?

    I have the Silvio Brothers podcast and managed to get #1 up. We have recorded #2 but I have no idea how to post it. Do I add it to the same xml page as the first one? If so, how? Or, do I create a new page? I can not believe other people have not had