How to obtain the integer and fractional parts of a number ?

Good morning,
given the value:
5433.43567
I'd like to know if there is a function such that
f(5433.43567) = 5433
and another such that
f2(5433.43567) = 0.43567Without any rounding, truncation or other "special effects" ;). I can synthesize those functions using to_char, string manipulation and to_number but I'd like to make sure that I didn't miss a simpler way or, a combination of those functions that is really simple (the stuff I've come up with is hardly simple :( )
Thank you for your help,
John.

440bx - 11gR2 wrote:
Good morning BluShadow, Afternoon! :)
select regexp_substr(.43567, '[^.]+', 1, 1) as whole_part
,regexp_replace(5433, '[^.]+\.(.*)$', '0.\1') as fract_part
from dual;
The result should be 0 (or blank).
SQL> ed
Wrote file afiedt.buf
  1  with t as (select 5433.43567 as num from dual union all
  2             select 0.43567 from dual union all
  3             select 5433 from dual)
  4  select num
  5        ,regexp_substr(num, '^[^.]+') as whole_part_string
  6        ,regexp_substr(num, '\.[^.]+$') as fract_part_string
  7        ,trunc(num) as whole_part_number
  8        ,num-trunc(num) as fract_part_number
  9* from t
SQL> /
       NUM WHOLE_PART_STRING                        FRACT_PART_STRING                        WHOLE_PART_NUMBER FRACT_PART_NUMBER
5433.43567 5433                                     .43567                                             5433               .43567
    .43567                                          .43567                                                0               .43567
      5433 5433                                                                                        5433                    0
SQL>Personally, I'd just stick with the number variants using trunc. Far simpler to use and you're still dealing with numbers.

Similar Messages

  • Integer and fractional part of the number

    Hello everybody,
    I want to divide the floating point number to 2 integer words, first will receive the interger part of number, and the second will receive the fractional part of the number.
    For example: I have number 751.98 in DBL, then I create two integer fields: first has value 751, second has value 98.
    I have tried simple conversion from DBL to I16, but it always rounded me to higher interger. I don't want to round it. And I just don't know how to transform the fractional part to integer. Are there any specialized functions for this? Maybe should I use log10 or similar?
    TIA,
    Jacek.

    The place to start with this problem is the IEEE-754 numerical
    representations:
    32 bit floating point is internally:
    highest order bit is the sign bit.
    the next 8 bits are the exponent bits
    the last 23 bits are the mantissa bits
    the mantissas and exponents are binary.
    the mantissa value in a 1.22 fixed point binary number, i.e. the most
    significant binary bit is equal to 1, the next most is equal to 1/2,
    the next most is equal to 1/4, etc., etc.
    The exponent part can go between 2^-127 and 2^128
    You should be able to cast your 32 bit float to a 32 bit unsigned
    integer, separate it into sign, mantissa and exponent parts, use the
    exponent to rotate left or right your mantissa decimal point by the
    exponent value and then separate the whole part from the fractional
    part and then put each into the I16's or U16's as you want.
    Douglas De Clue
    LabVIEW programmer
    [email protected]
    [email protected] (Michael Ross) wrote in message news:...
    > This problem needs some limits. Like: only return the decimal portion
    > out to 6 places.
    >
    > First run the number through Remainder and Quotient (divisor of 1).
    >
    > 751.98743674645641000000 gets remainder of
    >
    > 0.98743674645641021900
    >
    > "floor" is 751
    >
    > Take the remainder and send through Decimal to Fractional String (this
    > is where you set your number of decimal places [default is 6]).
    >
    > returns 0.987437
    >
    > Then use String Subset and set it to an offset of 2 (cleans off the
    > leading zero and decimal point) with the "length" input left at the
    > default of "rest" (of string).
    >
    > 987437 (in string form)
    >
    > Now use String to Decimal Number
    >
    > returns 987437 (as a decimal number)
    > ====================================
    > I think if you don't limit the number of places it is ugly. It is
    > ugly going from numbers to strings and then back. But all numbers is a
    > bad thing.
    >
    > The alogirithm for finding the answer mathematically is nasty.
    > Especially without a limit on decimal places. You have to figure out
    > the number of decimal places and multiply by the inverse of the last
    > decimal place. Sounds easy.
    > =============================
    > Try this: New number: 751.98652
    >
    > Truncate out the remainder (Remainder and Quotient (divisor of 1)):
    >
    > 751.98652 ---> 0.98652
    >
    > Mult by 10 ----> 9.8652
    >
    > Take the floor (9) and divide by 10 ----> 0.9
    >
    > subtract the new number from the old. Is the answer non-zero? Not,
    > then keep on
    >
    > 0.98652 - 0.9 = .08652 which not equal to 0
    >
    > If it is zero, the floor is the answer.
    >
    > Continue - Not:
    >
    > This time multiply by 100 ----> 98.652
    >
    > floor is 98, divide by 100 ----> 0.98
    >
    > Subtract 0.98 from 0.98652 = .00652 still non zero.
    >
    > Keep on. 1,000, 10,000...When you get to 100,000
    >
    > 0.98652 x 100,000 = 98652.00
    >
    > Get the floor
    >
    > divide the floor by 100,000 to get the original number (remainder is
    > now 0.000), compare to original remainder
    >
    > 0.98652 - 0.98652 = 0. Yay.
    >
    > Take the 98652 and go with it. The last place was the one hundred
    > thousandth.
    >
    > I can't take credit for the last, I had uglier stuff going on. I did
    > do the string thing.
    >
    > I swear this is just like some sorry homework problem.
    >
    > Mike

  • How to obtain the license for the mentioned products.

    Hi All,
    Please help me in below licensing issues.
    1) Our functional team got the below error while accessing "Job Scheduling Workbench".
    Error: The Workbench is inaccessible because Oracle Manufacturing Scheduling has not been licensed. Please work with your Account Manger to purchase the license.
    2) Another error message while accessing the navigation Flow Manufacturing --> Product Sync --> Flow Routings
    Error: APP-BOM 20972: You cannot access this form
    Cause: You do not have a license for Oracle Flow Manufacturing.
    Action: Obtain a license for Oracle Flow Manufacturing.
    Please guide me how to obtain the license for the above products.
    Environment: eBS R12.1.3 on Linux 5.8
    Regards,
    Siva

    Thanks for providing the document. I follow the document and get back to you for any issues.
    Regards,
    Siva.

  • How can I extract high and low parts of a string that represents a 64bits decimal number?

    I want to extract the high and low parts to interpret it and convert to binary code, but such a hugh number (represented by a string) isn't easy to extract from the string directly its high and low parts.

    LabVIEW can't handle a 64-bit integer. You will have to store it as two 32-bit integers. If you need exact math on those 64-bit intergers you will have to make up your own routines to handle the carries and what not. If you just need pretty good accuracy, covert both 32-bit integers to double, multiply the upper 32-bit number by 2*32 (also a double) and then add the lower 32-bit number to it.
    Good luck.

  • How to make the dblink and what is the use of this

    plz any body tell me "how to make the dblink and what is the use of this"
    sujit

    Do you understand how to make the Slider work using code to read its value?  You will need to look into that in order to do this.
    What you can do is have the yello rectangle be a movieclip that sits over the red rectangle and use the Slider to control the yellow rectangle's alpha property from 0 to 1.  That way the yellow will gradually fade as you slide.
    What you will then need  to do is figure out how to make the number of dots that appear reduce from 15 to 8 over the same range of the slider.  You need to use the fractional value from the slider to decide how many dots either appear or do not appear.
    You should not start new postings for the same topics that you arlready have postings for.  Doing so in the future might result in them being removed.

  • How to add the Note board web part to a page with powershell

    Hi everyone,
    I've been looking around everywhere but haven't seen it explicitly mentioned. 
    Does anyone know how to add the Note Board web part to a Team Site page, e.g. Non-publishing site, Left Zone, First webpart in the zone in powershell?
    Examples like this one http://adicodes.com/adding-web-part-to-page-with-powershell/ only talk about custom web parts uploaded from a local drive.
    The example here looks good - http://spcrew.com/blogs/lists/posts/post.aspx?id=21 but is it for the Page Viewer Web Part. How would you go about getting the correct name for the note board web part and configuring it? 
    Many Thanks,
    Ashley
    function main(){
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $url = "http://sp2010dev1/sites/test1"
    $OpenWeb = Get-SPWeb $url
    $OpenWeb
    $OpenSite = Get-SPSite $url
    $file = $OpenWeb.GetFile("http://sp2010dev1/sites/test1/SitePages/test1.aspx")
    $WebPartManager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    Add-PageViewerWebPart "http://sp2010dev1/sites/test1" "http://sp2010dev1/sites/test1/SitePages/test1.aspx" "Body" 0 "SPCrew Site" "sp2010dev"
    $OpenWeb.Dispose()
    function Add-PageViewerWebPart($SiteURL, $pageUrl, $webpartzone, $index, $title, $content)
        $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
        $web=$site.OpenWeb()
        $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
        $webpart = new-object Microsoft.SharePoint.WebPartPages.PageViewerWebPart
        $webpart.ChromeType = [System.Web.UI.WebControls.WebParts.PartChromeType]::TitleOnly;
        $webpart.Title = $title
        $webpart.ContentLink = "http://www.spcrew.com";
        $webpartmanager.AddWebPart($webpart, $webpartzone, $index);    
        $web.Close()
        $site.Close()
    function Get-SPSite([string]$url) {
        New-Object Microsoft.SharePoint.SPSite($url)
    function Get-SPWeb([string]$url) {
        $SPSite = Get-SPSite $url
        return $SPSite.OpenWeb()
        $SPSite.Dispose()

    Hi,
    According to your post, my understanding is that you wanted to add the Note board web part to a page with PowerShell.
    The name of the Note Board web part is SocialCommentWebPart.
    I recommend to use the powershell code below:
    $pageUrl="http://sitename/SitePages/test.aspx"
    $SiteURL="http://sitename"
    $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
    $web=$site.OpenWeb()
    $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    $webpart = new-object Microsoft.SharePoint.Portal.WebControls.SocialCommentWebPart
    $webpart.title="Note Board"
    $webpartmanager.AddWebPart($webpart, "MiddleZone", 0);
    $web.Close()
    Then the Note board web part will be added to the page.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Gantt chart: Don't know how to use the tooltipkeys and toolkeylabel

    I have a problem. Don't know how to use the tooltipkeys and toolkeylabel. I used jquery to select the gantt bars and on mouse over i was getting the task id "tid" then passing it to adf bean with serverlistener and showing a popup that is adf component with javascript. For positioning of the popup I used a button that has width and height 0 and has position absolute and gets the coordinates of the mouse.
    "div[et]" is a jquery selector that selects all the elements that have attribute et. I noticed that all the bars have that attribute as a few other attributes as well "part"...
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
            xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
        <af:document title="untitled1.jsf" id="d1">
            <af:resource type="javascript" source="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"/>
            <af:resource type="javascript" source="resources/js/home.js"/>
            <af:messages id="m1"/>
            <af:form id="f1">
               <af:commandButton text="commandButton 1" id="cb1" inlineStyle="visibility:hidden; width:0; height:0" />
                <af:popup id="noteWindow" contentDelivery="lazyUncached" binding="#{homeBean.popup}">
                    <af:noteWindow id="popupWindow">
                        <af:panelFormLayout id="pfl2">
                            <af:panelLabelAndMessage label="Task id" id="plam5">
                                <af:outputText value="#{homeBean.taskId1}" id="ot64"/>
                            </af:panelLabelAndMessage>
                            <af:panelLabelAndMessage label="Start Location Name" id="plam6">
                                <af:outputText value="#{homeBean.startLocation}" id="ot7"/>
                            </af:panelLabelAndMessage>
                            <af:panelLabelAndMessage label="Stop Location Name" id="plam7">
                                <af:outputText value="#{homeBean.stopLocation}" id="ot8"/>
                            </af:panelLabelAndMessage>
                            <af:panelLabelAndMessage label="tasktype" id="pla2m7">
                                <af:outputText value="#{homeBean.taskType}" id="ot9"/>
                            </af:panelLabelAndMessage>
                        </af:panelFormLayout>
                    </af:noteWindow>
                </af:popup>
                <af:serverListener type="jsServerListener" method="#{homeBean.serverEventHandler}"/>
                <dvt:schedulingGantt id="gantt1" value="#{bindings.PersonView1.schedulingGanttModel}" var="row"
                                     startTime="2011-07-04 00:00:00" endTime="2011-07-04 23:00:00" summary="gsg"
                                     showMenuBar="false" showToolbar="false" iconPlacement="left"
                                     showTasksAsDailyBar="false">
                    <f:facet name="major">
                        <dvt:timeAxis scale="days" id="ta1"/>
                    </f:facet>
                    <f:facet name="minor">
                        <dvt:timeAxis scale="hours" id="ta2"/>
                    </f:facet>
                    <f:facet name="nodeStamp">
                        <af:column sortProperty="#{bindings.PersonView1.hints.PersonId.name}" sortable="false"
                                   headerText="#{bindings.PersonView1.hints.PersonId.label}" id="c1">
                            <af:outputText value="#{row.PersonId}" id="ot1">
                                <af:convertNumber groupingUsed="false"
                                                  pattern="#{bindings.PersonView1.hints.PersonId.format}"/>
                            </af:outputText>
                        </af:column>
                    </f:facet>
                </dvt:schedulingGantt>            
            </af:form>
        </af:document>
    </f:view>javascript:
    $(document).ready(bindEvents());
    function bindEvents() {
        $("div[et]").live('mouseover', function (e) {
             $('#cb1').css("position", 'absolute');
             $('#cb1').css("top", e.pageY-4);
             $('#cb1').css("left", e.pageX);
            var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
            var element = AdfPage.PAGE.findComponent("f1");
            var taskIdToPass = null;
            if ($(this).attr("tid") !=undefined) {
                 taskIdToPass = $(this).attr('tid').toString();
            } else {
                taskIdToPass = $(this).parent().attr('tid').toString();
            var param = {            taskId : taskIdToPass        };
            AdfCustomEvent.queue(element, "jsServerListener", param, true);
            if (!popup.isPopupVisible()) {
                var hints = {};
                hints[AdfRichPopup.HINT_LAUNCH_ID] = "cb1";
                hints[AdfRichPopup.HINT_ALIGN_ID] =  "cb1";
                hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START;
                popup.show(hints);
        }).live("mouseout", function () {
            var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
            popup.hide();
    };My bean that is session bean:
    package view;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCDataControl;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.render.ClientEvent;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import oracle.jbo.ViewObject;
    public class HomeBean {
        private RichPopup popup;
        private String taskId1;
        private String startLocation;
        private String stopLocation;
        private long taskId;
        private String taskType;
        public HomeBean() {
            super();
        public void serverEventHandler(ClientEvent clientEvent) {    
            String taskIdString = clientEvent.getParameters().get("taskId").toString();
            this.taskId = Long.parseLong(taskIdString);
            DCDataControl dc1 = BindingContext.getCurrent().findDataControl("AppModuleDataControl");
            ApplicationModule am = dc1.getApplicationModule();
            ViewObject vo = am.findViewObject("PdTrfDayView1");  
            RowSetIterator rowSetIterator = vo.createRowSetIterator(null);
            Row[] rows = rowSetIterator.findByKey(new Key(new Object[] {taskId}), 1);
            Row row = rows[0];
           this.taskId1 =  row.getAttribute("PdTrfDayId").toString();
           this.startLocation = row.getAttribute("StartLocation").toString();
           this.stopLocation = row.getAttribute("StopLocation").toString();
           this.taskType = row.getAttribute ("PdTrfTypeId").toString();
            RichPopup.PopupHints ph = new RichPopup.PopupHints();
            vo.closeRowSetIterator();
        public long getTaskId() {
            return taskId;
        public void setPopup(RichPopup popup) {
            this.popup = popup;
        public RichPopup getPopup() {
            return popup;
        public String getTaskId1() {
            return taskId1;
        public String getStartLocation() {
            return startLocation;
        public String getStopLocation() {
            return stopLocation;
        public String getTaskType() {
            return taskType;
    }I am wondering If i can use setCurrentRow on the iterator that i create and use it for displaying on the popup instead of binding startLocation and stopLocation to the bean and if there is any benefit of that at all...
    Edited by: 897833 on Nov 24, 2011 11:37 AM

    Hi,
    To use tooltipkeys and tooltiplabel in gantt, you can add following code in managed bean
    public String[] getTooltipKeys()
    return new String[]{"columnA", "columnB", "StartDate", "EndDate"};
    public String[] getTooltipLabels()
    return new String[]{"A", "B", "Start Date", "End Date"};
    where , the string array in the ToolTipKeys represents the columns, of the table you have in the gantt component , and the string array in TooltipLabels displays the label you want to display for the table columns.
    In the jsff, you could call the bean methods as follows:
    tooltipKeys="#{GanttBean.tooltipKeys}"
    tooltipKeyLabels="#{GanttBean.tooltipLabels}"

  • How to obtain the row data in the component datatable?

    if I want to edit a row data, and then know which row is edited in the component datatable, and how to do?
    How to obtain the row data in the component datatable, and update it to database, not simplely edit a simple table
    Any ideas? Thanks

    Thank you very much for your help Alexander !
    It's quite confusing when you leave Struts and try to adapt your projects for JSF for the first time...
    I wanted to click on a row with a "onMouseClick" on the TR tag like I used to do in Struts/JSTL. But it seems to be impossible in a dataTable.
    Ok then. I've added a column at the end of the row with an icon.
    But eventually I didn't need to declare link parameters.
    In my BackingBean I did like this :
    public String selectEventForUpdate() throws IllegalAccessException, InvocationTargetException {
            PortletAgenda event = (PortletAgenda) JSFUtils.getInRequestMap("event");
            BeanUtils.copyProperties(this, event);
            return null;
       }JSFUtils.getInRequestMap(...) is a method I wrote in a util object :
    public static Object getInRequestMap(String name) {
            Object res = null;
            Map requestMap=FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
            if (requestMap!=null) {
                res=requestMap.get(name);
            return res;
    }  " event " is the name of the item in my dataTable list.
    My backingBean has the same attributes as "event".
    So when the page is reloaded I have a backingBean full with the selected properties to edit/update.
    Thanks to your reply I realized that putting this form in the middle of the dataTable seems to be impossible.
    So I put this form in a floating DIV in front of the table with a shadow.
    It works :o) !
    But I'm a little bit disapointed to be honest...
    I used to build my web applications with Struts and JSTL and doing this kind of interface was really easy.
    I've decided 3 days ago to convert into JSF because the "GUI Layer" seemed to be improved.
    But now I realize that I cannot put a onMouseOver and onMouseClick on a row and I cannot display a different row in the middle of a table....
    I think it's a shame because there is a facet for header and footer.
    And it would be great if we could create our own personal facet that appears only if a condition is true.
    For exemple " if the current item id is the same as the request parameter id then display the following facet content ....... (with a panel group and a form inside to update the row) "
    It's easy to do that with JSTL thanks to c:forEach and c:if but it seems to be impossible to use JSTL tags like this during the dataTable iteration.
    And JSF tags seems to have no logical tags like " if " or loops that can be nested in dataTable.
    I really need to realize this interface (you click on a row then an edit form appears where you clicked).
    Do I have to write a component myself that extends dataTable?
    Do you know if writing such a component is hard to do for a beginner like me?
    (I've juste discovered JSF 3 days ago and I've used Struts/JSTL for 2 years til now)
    I'd be glad to have much advices from you about that.
    Regards

  • How to obtain the updated column name in a trigger?

    Hello everyone,
    I need to know for audit propose the updated column name in a After Update Trigger on a Table.
    The table have more than 20 columns, and i think that do more than 20 conditions asking for the difference between the :new value and the :old value is not the best way.
    Thanks for the help!
    LCJ

    Hi,
    Thanks to all for the replays.
    I didn't know that i can pass the column name to the UPDATING. This is only possible on 10g??
    Any way, i pass the column name and works fine, but i have another issue because of that.
    I obtain the column name from a cursor that query user_tab_columns view, when i try to obtain the value of the :old or :new, i can't because i don't know how to obtain the value of the value.
    This example show better:
    DECLARE
    vOldValue Varchar2(50);
    Cursor cur_Column_Names Is
    Select COLUMN_NAME
    From User_Tab_Columns
    Where TABLE_NAME = 'table_name';
    BEGIN
    For var_cursor In cur_Column_Names Loop
    If Updating(var_cursor.COLUMN_NAME) Then
    vOldValue := '?'; -- How obtain the value of the :old. + >var_cursor.COLUMN_NAME??
    End If;
    End Loop;
    END;Thanks to all for the help.
    LCJ

  • How to obtain a Question and Answer DB from Solution manager.

    Dear Gurus,
    How to obtain a Question and Answer DB from Solution manager for HCM.
    Regards,
    Rajasekar.

    http://saphrexpert.blogspot.com/2008/12/questionairre-to-be-used-during.html
    Check this link
    this is not the answer to your question but it  will helpful

  • A very simple question: how to obtain the mail server name?

    In our JSP application, at one point an email will be sent to notify one event. Currently, that is done by using the html tag: mailto. To have more control on the email in tems of context format (a bad layout right now) and others. I would like to have it processed at servlet by using the JavaMail API, so that it have a nice format and have the sender's email address right in case email client is not installed in the machine where the browser in. The JavaMail API is straight forward. The question is how to obtain the mail server name, and the sender's email address if there is one?
    Thanks.
    v.

    How to obtain the mail server's name? It's your server, you should know its name. Or if it isn't your server, you should ask the administrator for its name. Point is, you need to decide in advance what server you are going to use and hard-code its name into the program or into a properties file.
    And how to obtain the client's e-mail address? You have to ask the client, probably by putting a box in the HTML and asking them to type it.

  • How to obtain JNIEnv pointer and jobject reference in arbitrary contexts?

    Hi,
    I need your hand. How to obtain JNIEnv pointer and jobject reference in arbitrary contexts? (See below source codes for details)
    I made some tries according to JNI spec, but still failed to get it work. Could you please provide your solutions? Better show me some source codes.
    Thank you very much !!!
    #include <jni.h>
    #include "MessageThread.h"
    #include "MyServer.h"
    // this is callback function called by the native C++ library
    void processEvent(int progress)
       in this function, i want to get "env", "obj" ( HOW? ),
       then i can do below to invoke Java function "updateUI":
       cls = env->GetObjectClass(obj);
       mid = env->GetMethodID(cls, "updateUI", "(I)V");
       env->CallVoidMethod(obj, mid, progress); 
    JNIEXPORT void JNICALL
    Java_MessageThread_handleMessageQ(JNIEnv *env, jobject obj)
      MyServer* server = MTMServer::Instance();
      if (server != NULL)
        // must register a callback function before "QueryProgress"
        server->RegisterCallback(processEvent);
        // query message within a loop, and callback "processEvent" frequently
        server->QueryProgress();
      return; 
    }

    jschell, thanks for your suggestions.
    And caching the second is definitely wrong. Arguments are passed as local references. The reference lifetime is only guaranteed for the lifetime of the method call.In my case, it just works, because my "callback" is only called before the "handleMessageQ" returns, which means it's within the lifetime of "jobject", etc.
    Use GetEnv to get the environment.Could you please provide some sample codes?
    Create a static java method which returns the object reference. In your callback call that method to get the reference that you want to work with. I didn't really understand. Could you please show me some sample codes?
    Thanks a lot!

  • How to padding the zeroes and space befoer sending from XI to R3 system.

    Hi Experts,
       How to padding the zeroes and space befoer sending any data from XI to R3 during mapping, how to write a java code to implement this logic, please help me with the coding or any other alternative.
    thanks
    dhanush

    to pad spaces you need to write a simple UDF
    for right padding use the following
    while( inputField.length() < Integer.parseInt(totalLength))
    inputField = inputField + " ";
    return inputField;
    for left padding use the following
    while( inputField.length() < Integer.parseInt(totalLength))
    inputField = " " + inputField ;
    return inputField;
    Note:in the above examples <i>inputField</i> will be the input to UDF i.e. the sender field which you need to pad and send to receiver , and <i>totalLength</i> will be a constant i.e length of the field you want on receiver side after padding.
    also i m not a Java expert so please check for syntax and semantics for code:) to me it looks correct
    Thanx
    Aamir
    Message was edited by:
            Aamir Suhail

  • How to obtain the alv reports in the dilog programing.

    how to obtain the alv reports in the dialog programming, that is when the push button in the screen in clicked it must be directed to the report, where to write the code for the report.

    Hi
    Use LEAVE TO LIST PROCESSING and develop your normal ALV dispaly as usual. System automatically takes care of this.
    I tried for normal report but try above even in the case of ALV reports
    Cheerz
    Ram

  • Problems about How to Merge the Masthead and the Tool Area?

    I have been struggling for many weeks  about how to add  the ToolArea into the Masthead. Can someone please help me?
    I followed with the tutorial :[How to Merge the Masthead and the Tool Area|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f058ef9c-b211-2a10-4fad-8b88d5a1fe74?QuickLink=index&overridelayout=true]
    I followed every steps mentioned in the tutorial but end up with these:
    1.  In this tutorial there is a word:Just before the link table is ended, add another row for the tool area. Unfortunately I am not familiar with JSP so can anybody please tell me the accurate inserting location of this code.
    2. Besides I find there are some faults in this tutorial and It is non't very complete.
        For example the author have non't refer to two jar:
        I have copyed  the (com.sap.portal.navigation.masthead_core.jar, com.sap.portal.navigation.toolarea_core.jar).from the     standard par files and paste these JAR files in the PORTAL-INF / lib folder in the NWDS.
       who can tell me there are additional faults or complements about this tutorial?
    Please suggest.
    Best Regards
    lexian

    Hello Prashant:
       I have imported  the par file which you just send for me, Fortunately It is running OK!
       I am very happy,thank you very much,you give me a great help.
          I hope obtain you help for the future,you are a goo person.
         Thanks a lot!
         Best Wishes for you!
         lexian.
    Edited by: le xian on Apr 22, 2011 10:43 AM

Maybe you are looking for

  • How do I add Adobe Creative Suite to my MacBook Pro...?

    @Forgive me for asking what may be a really silly question.... but here goes..! I currently have the Adobe Creative Suite on my Mac desktop and now I'm wanting to add it to my new MacBook Pro.  How do I install all the apps without having to purchase

  • Solution for viewing AR credit memo relevant to AP invoice

    In R12, we no longer have the functionality of applying miscellaneous receipts to credit memos. Using this functionality in 11i, we were able to make payments through AR. In 11i, we were using API (AR_CM_APPLICATION_PUB.activity_application) for crea

  • What email address should I use to sign into BTOpe...

    Hi everyone, I have my BTID already setup by BT, they used my personal email account not my BT one.  I can login and view bills etc.  However - when I try and connect to the BT WiFI App on iPhone, or via PC on BTOpenzone I have tried both email accou

  • Year wise No.ranges for Export Commercial Invoice.

    Hi All, My client requirement is that for Export commercial Invoice the no. ranges should start from 1 for every year. As per my knowledge, in SAP year wise no. ranges we can't maintain, apart for Excise no.ranges. So plz suggest me how to solve this

  • Lightroom to elements

    I am wondering if anyone else has had this problem: When I edit a photo in lightroom and then edit it in elements, my changes from elements are not included back into lightroom.  I hope this is making sense, but has this happened to anyone else?