How To select maximum Value in a specifieid field in internal table.

How To select maximum Value in a specifieid field in internal table?

Step : 1
Sort itab by <Field1> descending.
Just sort the internal table by the field.
STEP: 2
Then read the table at index 1.
Read table itab index 1.               
ITAB-FIELD = MAX .                  " Max field will come in the first row of the internal table.
Regards,
Gurpreet

Similar Messages

  • How can i assign value to the certain field in dynmic table ?

    i have created a dynmic table .now i want to assign value to the certain field,how can i do that?
    for eg,
    <dyn_table> contains fields of  name age ,now i want assign 'jack' to this internal talbe's field name ,

    Hi,
    try this:
    FIELD-SYMBOLS: <GT_ITAB>      TYPE TABLE,
                   <GS_ITAB>,
                   <FS>, <FS1>.
    DATA: GT_DATA   TYPE REF TO DATA.
    DATA: GS_DATA   TYPE REF TO DATA.
    START-OF-SELECTION.
      CREATE DATA GT_DATA TYPE TABLE OF PA0002.
      ASSIGN GT_DATA->*   TO <GT_ITAB>.
      CREATE DATA GS_DATA    LIKE LINE OF <GT_ITAB>.
      ASSIGN GS_DATA->*      TO <GS_ITAB>.
      ASSIGN COMPONENT 'NACHN' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Smith'.
      ASSIGN COMPONENT 'VORNA' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Paul'.
      APPEND <GS_ITAB> TO <GT_ITAB>.
      ASSIGN COMPONENT 'NACHN' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Jones'.
      ASSIGN COMPONENT 'VORNA' OF STRUCTURE <GS_ITAB> TO <FS>.
      <FS> = 'Martin'.
      APPEND <GS_ITAB> TO <GT_ITAB>.
      LOOP AT <GT_ITAB> INTO <GS_ITAB>.
        ASSIGN COMPONENT 'NACHN' OF STRUCTURE <GS_ITAB> TO <FS>.
        ASSIGN COMPONENT 'VORNA' OF STRUCTURE <GS_ITAB> TO <FS1>.
        WRITE: / <FS>, <FS1>.
      ENDLOOP.
    Regards, Dieter

  • How to get the values from the input field of a table

    Hello Friends
    I am having table having one column as InputField and rest are the textview fields
    I input the data and click the button that will add them to a node.
    But what is happening is it is adding the current value to all the fields replacing other filelds.
    Like suppose I am having 3 rows
    In column I input 10
    In column 2 input 20
    In column 3 input 30
    Now it is setting the value 30 to all the 3 fields.
    Can any one tell me the code to set 10, 20 and 30 as different value in a node as entered by me.
    Thanks

    Hi
    i am your scernario as follows
    Context
    TN_node (value node of cardinality 0:N)
                 val1 (value attribute under value node)
                 val2 (value attribute under value node)          
    i have binded Tn_node to table and val1 is textview and val2 is inputfield
    public void wdDoInit()
        //@@begin wdDoInit()
        for(int i=0;i<5;i++)
        IPrivateTestView.ITN_nodeElement ele=wdContext.nodeTN_node().createTN_nodeElement();
        wdContext.nodeTN_node().addElement(ele);
        ele.setVa1("val"+i);
        //@@end
    i have a button go in which printing all the values
    public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGo(ServerEvent)
        for(int j=0;j<wdContext.nodeTN_node().size();j++)
        //IPrivateTestView.ITN_nodeElement
        IPrivateTestView.ITN_nodeElement ele=wdContext.nodeTN_node().getTN_nodeElementAt(j);
    wdComponentAPI.getMessageManager().reportSuccess("-----"+ele.getVa1());
    wdComponentAPI.getMessageManager().reportSuccess("-----"+ele.getVa2());
    Hope this helps,
    If your problem is not solved please post your code like this
    Thanks and Regards,
    Arun

  • How to get the value from the Input field of the Table view.

    Hi Experts,
    I have created a table view with 10 rows and each rows contains input fields in it.Can you please help me getting the values that are entered in all 10 rows.
    Currently I am using the below code,but using the below I am able to get only the first row details of the table.
      lo_el_table->get_static_attributes(
        IMPORTING
          static_attributes = ls_table).
    Please let me know you suggestions on this.Thanks in advance.
    Regards,
    Arun

    Hi Arun,
    You should use this method:
    lo_nd_table->get_static_attributes_table(
    IMPORTING
    table = lt_table).
    Cheers,
    Roelof
    http://www.nl4b.com

  • How to select multiple values from a listbox

    Hi,
    I have a list box on my UI which is not allowing me to select multiple values
    I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving error
    When i drag & drop the component i am unable to drop it as a multi select list box that option is not coming.
    I am working on Jdev 11.1.1.3 and I am using ADF/BC components
    How to select multiple values from a listbox ?
    Thanks,

    Hi,
    I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving errorank
    And what is the error ?
    Frank

  • How to select multiple values from the parameters in BI Publisher report

    How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...

    Hi kishore,
    I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
    Iam able to get the results when I am selecting one value..
    and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
    ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
    1.Single selection.
    2.Multiple selection.
    3.'ALL' Values.
    4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
    Ex:
    Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
    Expected Output on the report:ACCOUNT,HR,SALES
    reply to this would be much appreciated....
    thanks,
    manoj

  • How to select multiple values from the Parameters in the concurrent program

    How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?

    I think there's no way to do that using standard feature.
    Some workaround I use :
    1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
    Selection1 : <choose first selection>
    Selection2: <choose 2nd selection>
    ..etc.
    If you don't use it then leave it empty.
    2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc.

  • How to Select a value from DropDownByIndex -Urgent

    Hi All,
    I have dropdownbyindex UI elements in my Views, I get values from BAPI. When click records in a table, It goes to another view to display full record. Here i have dropdownbyIndexes So it should select one of appropriate value in dropdownbyindex based on record(Value) in table.
    Example:
    <u><i><b>In Table View</b></i></u>
    id                  title                 status          priority
    10000      webDynPro            New              Low
    <i><u><b>Detail View:</b></u></i>
    id                   10000
    title                 webDynPro
    Status             New                  [New,Old,Open,Closed]---DropDownbyIndex
    Priority            Low                   [High,Low,Medium]---DropDownByIndex..4m BAPI
    How to select Appropriate Values from DropdownbyIndex. if any one has sample code, that will be helpful.
    Note: I am using Model Nodes
    Thanks and Regards
    Ravi Golla

    Hi Ravi,
    In details view, you will have corresponding context node created for Status and priority dropdown fields.
    Let suppose, context node for Status is, StatusNode.
    value attribute inside this is,
    StatusNode
      |_ StatusAttrib
    Now, you need to write following code to set l_status ="LOW" value in it.
    wdContext.nodeStatusNode().moveFirst();
    for(int i=0; i<wdContext.nodeStatusNode().size(); i++)
        if(wdcontext.currentStatusNodeElement().getStatusAttrib().equals(l_status)
              wdContext.nodeStatusNode().setLeadselection(i);
              break;
    wdContext.nodeStatusNode().moveNext();
    write same code for priority also.
    Let me know if it is not working with you.
    regards,
    Bhavik

  • How to pass selection screen value to LDB dynamic field.

    Hello everybody,
    In my program, I am using standard LDB(PSJ) for getting data. And there is a requirement that I have to display some dynamic fields on my selection screen like plant , person responsible ( which are mandatory also ) etc. and inside the program I have to fill those dynamic fields for which the user has entered the value in selection screen.
    Could you please tell me how to pass some of selection screen values to ldb dynamic fields before GET statement.
    Thanks !!!
    Regards,
    Mitra

    >
    Pavan Bhamidipati wrote:
    > Hi,
    >
    >
    I have to fill those dynamic fields for which the user has entered the value in selection screen.
    >
    >
    > This means that the user is going to enter the values in the selection screen for the dynamic field values so
    >
    > SET PARAMETERID 'XYZ' FIELD p_field.
    >
    > where p_field is a parameter on the selection screen
    >
    > Regards
    > Pavan
    You can capture the values selected through the dynamic selections using some of the functions modules below, just search the forum for the below FM's, perhaps you can find some sample code
    FREE_SELECTIONS_EX_2_RANGE
    FREE_SELECTIONS_EX_2_WHERE
    FREE_SELECTIONS_RANGE_2_EX
    FREE_SELECTIONS_RANGE_2_WHERE
    FREE_SELECTIONS_WHERE_2_EX
    FREE_SELECTIONS_WHERE_2_RANGE

  • How to select XML value for a namespace when multiple namespaces

    Hi,
    I'm a beginner with this, but I'm doing well with your help from this forum in a recent post selecting out all the detail from my xml
    out into my oracle relational tables. Stumped, though, on how to select a value for xml tag value referenced by a defined namespace.
    Version, XML, what I want to select, and attempted sql is below. Thanks in advance!
    select * from V$VERSION
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    drop table TRANSCRIPT;
    create table TRANSCRIPT (
    CONTENT xmltype
    <?xml version="1.0" encoding="UTF-8"?>
    <arb:AcademicRecordBatch xmlns:arb="urn:org:pesc:message:AcademicRecordBatch:v1.0.0">
      <hst:HighSchoolTranscript xmlns:hst="urn:org:pesc:message:HighSchoolTranscript:v1.0.0" xmlns:ct="http://ct.transcriptcenter.com">
       <TransmissionData>
          <DocumentID>2013-01-02T09:06:15|D123456789</DocumentID>
       </TransmissionData>
       <Student>
                <Person>
                    <Name>
                        <FirstName>John</FirstName>
                        <LastName>Doe</LastName>                   
                    </Name>
                </Person>
                <AcademicRecord> 
                    <AcademicSession>
                        <Course>
                            <CourseTitle>KEYBOARD 101</CourseTitle>
                            <UserDefinedExtensions>
                              <ct:TranscriptExtensions>
                                 <NCESCode>01001E010456</NCESCode>
                                 <CourseRigor>1</CourseRigor>
                              </ct:TranscriptExtensions>
                          </UserDefinedExtensions>
                        </Course>
                        <Course>
                            <CourseTitle>SCIENCE 101</CourseTitle>
                            <UserDefinedExtensions>
                              <ct:TranscriptExtensions>
                                 <NCESCode>01001E010457</NCESCode>
                                 <CourseRigor>2</CourseRigor>
                              </ct:TranscriptExtensions>
                          </UserDefinedExtensions>                       
                        </Course>
                    </AcademicSession>
                    <AcademicSession>
                        <Course>
                            <CourseTitle>MATH 201</CourseTitle>
                            <UserDefinedExtensions>
                              <ct:TranscriptExtensions>
                                 <NCESCode>01001E010458</NCESCode>
                                 <CourseRigor>2</CourseRigor>
                              </ct:TranscriptExtensions>
                          </UserDefinedExtensions>                                 
                        </Course>
                    </AcademicSession>
             </AcademicRecord>
       </Student>
      </hst:HighSchoolTranscript>
    </arb:AcademicRecordBatch>I want to be able to select the NESCODE associated to each coursetitle (01001E010456, 01001E010457, 01001E010458), with NESCode defined by namespace, but getting out NULL.
    DOCUMENTID     LASTNAME     COURSETITLE     NCESCODE
    2013-01-02T09:06:15|D123456789     Doe     KEYBOARD 101     
    2013-01-02T09:06:15|D123456789     Doe     SCIENCE 101     
    2013-01-02T09:06:15|D123456789     Doe     MATH 201     
    My SQL is below. You'll see where I commented out a couple failed alternatives too. Thanks again in advance for any guidance.
       select x0.DocumentID
             ,x1.LastName
             , x3.CourseTitle
             ,x3.NCESCode
      from TRANSCRIPT t
         , xmltable(                                                                                   
             xmlnamespaces(
               'urn:org:pesc:message:AcademicRecordBatch:v1.0.0' as "ns0"
             , 'urn:org:pesc:message:HighSchoolTranscript:v1.0.0' as "ns1"
            --, 'http://ct.transcriptcenter.com'                               as "ns1b" 
          , '/ns0:AcademicRecordBatch/ns1:HighSchoolTranscript' 
            passing t.content
            columns DocumentID       varchar2(40) path 'TransmissionData/DocumentID'
                       , Student xmltype      path 'Student'     
          ) x0
       , xmltable(
            '/Student'
            passing x0.Student
            columns LastName varchar2(20) path 'Person/Name/LastName'                       
                        ,AcademicRecord   xmltype      path 'AcademicRecord' 
          ) x1          
       , xmltable(
            '/AcademicRecord/AcademicSession' 
            passing x1.AcademicRecord
            columns GradeLevel varchar2(20) path 'StudentLevel/StudentLevelCode'
                  , Courses      xmltype      path 'Course'
          ) x2
              , xmltable(
              xmlnamespaces('http://ct.transcriptcenter.com'  as "ns2b")
              , '/Course'
            passing x2.Courses
            columns CourseTitle varchar2(40) path 'CourseTitle'
                         ,NCESCode  varchar2(20) path 'UserDefinedExtensions/ns2b:ct/NCESCode'
                         --,NCESCode  varchar2(20) path 'UserDefinedExtensions/ns2b:ct/TranscriptExtensions/NCESCode'                     
          ) x3
               

    <<I'm assuming there is more to your XML than you showed, since
    StudentLevel/StudentLevelCode
    is not in the XML, but is in your query. >>
    Yes, to simplify, I left out some of the additional XML data, which is typically present, sorry for any confusion. I should have removed those references to that data in my example which was failing to retrieve the NCESCode data which was denoted by that namespace.
    Thank you very much! Your correction worked. I was not understanding until your correction how to properly reference in the XPATH for that namespace value. I'm a newbie at this, and this is my second post. But I've been able to populate quite a few relational tables and that was the first of several namespace tags I will have to deal with next, and with that help, I should be good with that syntax now.
    Thanks again for your help on this.

  • How to move the value from a character field to numeric or packed decimal

    Hi,
    can anyone explain me on how to move the value from a character field to numeric or packed decimal.
    Please help me on this. Thanks...
    Regards,
    Rose.

    Hi ,
    if you use keyword MOVE u may loose the decimal and thoussan separator and if u don't want to loose them just call the FM ..HRCM_STRING_AMOUNT_CONVERT.
    i doubt wherther it is HRCM or HCRM just try using *
    this will suit ur requirement.
    Regards,
    KK

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working 10g

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks to do the needfull
    Best Regards,
    R.Devarasu

    Hi,
    Null value in database displaying as 0 in report, I need to keep value as in database, and I have one calculated row which is based on null values should also null in report.
    but it showing 0 for null values also so, my calculated row showing wrong result.
    my report is like
    col1 col2
    ABC 0
    BCD 12
    DEF -12 --this is calculated row.
    I require result like:
    col1 col2
    ABC null
    BCD 12
    DEF null --this is calculated row.
    Please let me know how I can achieve this.
    Thanks,
    Rahul

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table?

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks in advance...
    Best Regards,
    R.Devarasu

    Hi Amith,
    I have update your suggested one,but it's working few of the rows only..remainings rows some of cells still NULL only
    Measure colmns is : Nom_SGD
    IFNULL(Nom_SGD,0.00)
    Movment : dynamic date calc by using $2-$1 oracle formula's
    Actually i am doing below things only,
    31/12/2011 31/03/2011 Movment
    Country
    India 100 -50 -150
    Singapore 200 200
    UK 1200 -1200
    USA 0.00 0.00 0.00 (here changed null as 0)
    Helpmeon this...

  • How to set a value to a disabled field in an B1 screen ?

    Hi,
    Can anyone tell me how to set a value to a disabled field in an existing screen.
    For example , I want to set a value to the Paid/Credited field in the Sales - A/R Invoice screen, which is a disabled field.
    I tried setting the field as enabled but it throws an error.
    Thanks in advance
    Mina

    It depends on the business process required for generating the invoice.  (What is this process just now?)
    I can think on quite a few ideas, but can't be sure if any of them will match your specific requirements.  I'll list a few here and see if any of them might work, or at least generate some new ideas for you. (Unfortunately you can't change an existing payment object to add an invoice to it at a later date, nor is the reconciliation process exposed through the SDK.  This limits your options a bit.)
    1) Is there a need for a separate delivery and invoice?  Would skipping the delivery process and using the standard Invoice + Payment screen work for you?  Stock would be issued, invoice created and payment matched directly to invoice without any work.
    2) This might apply if the invoice is simply a one for one match with the delivery.  Rather than just generate a payment in the delivery screen, generate the invoice and a payment at the same time.  The standard invoice screen will then show it as paid.  You can control the dates on the invoice raised through DI code.
    3) Where do you write the Paid Amount to?  How is it not available in the invoice screen?  Put it somewhere accessible and write it to the user field.
    John.

  • How to display negative values in a screen field of a screen

    Hi All,
    Please let me know how to display negative values in a screen field of a screen.
    thanks

    Hi Kishore,
    You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
    I have created a field of CHAR of name say TEXT.
    In the main program,
    declare a variable of the same name ie. TEXT.
    data: TEXT(5) TYPE C.
    In PBO, just assign the negative values.
    It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
    Regards,
    Sylendra.

Maybe you are looking for