How to add one column value with grand total

hi,
this is my perform.i am just here multipling  menge and gpres value and stores into G_total variable and displing into output.
this is my output in main window.
ex:mat. 1           77.00(g_total value)
    mat  2             55.00(g_total value)
now the requirement is to add the column and display the output as grand total ex: 77.00 +55.00 = 132.00
how to do the syntax please help me......???
FORM get_total  TABLES   in_tab STRUCTURE itcsy
                          out_tab STRUCTURE itcsy.
  DATA: lv_menge(20),
        lv_gpreis(20),
        g_total(20),
        g_total1(20).
  DATA:lc1 TYPE string,
       lc2 TYPE string,
      ls_tab      TYPE itcsy,
     l_tabix        TYPE sy-tabix.
  READ TABLE in_tab WITH KEY name = 'RESBD-MENGE'.
  IF sy-subrc EQ 0.
    lv_menge = in_tab-value.
  ENDIF.
  READ TABLE in_tab WITH KEY name = 'RESBD-GPREIS'.
  IF sy-subrc EQ 0.
    lv_gpreis = in_tab-value.
  ENDIF.
  REPLACE  ',' INTO  lv_gpreis WITH ''.
  CONDENSE lv_gpreis NO-GAPS.
  READ TABLE out_tab WITH KEY name = 'G_TOTAL'.
  IF sy-subrc EQ 0.
    g_total = lv_menge * lv_gpreis.
    out_tab-value = g_total.
    CONDENSE g_total.
    lc1 = g_total+0(2).
    lc2 = g_total+2(3).
    CONCATENATE lc1  lc2  INTO g_total SEPARATED BY ','.
    out_tab-value = g_total.
CLEAR ls_tab.
    LOOP AT out_tab INTO ls_tab.
      l_tabix = sy-tabix.
      CASE ls_tab-name.
        WHEN 'G_TOTAL'.
          ls_tab-value = G_TOTAL.
      MODIFY out_tab FROM ls_tab INDEX l_tabix.
ENDCASE.
    ENDLOOP.

>
asissahu wrote:
> hi.
>
> nobody is replying my question???
>
> please help me
Hi, Asissahu
Because may be some one have problem to read your code
Please have a look at the following link and past code this way.
[How to post code in SCN|How to post code in SCN, and some things NOT to do...;
@Naga Please you too
Regards,
Faisal

Similar Messages

  • How to add one column in existing search help.

    Hi Folks,
    My quesion is
    How to add one column in existing search help and also Now search help on that field is not an explicit search help. It should be implement using check table.
    Shivam

    Hi,
    If you want to add a field in Elementary search help, get the search help name for the and go to change mode and add the field in it.
    If you want to add a field in collective search help, go to included search helps tab and a new search help name and add the fields to it.
    I think this should help you to certain extent.
    Regards,
    Kranthi
    Edited by: Kranthi on Jan 14, 2010 11:15 AM

  • How to add one column to the standard t.code : CAT2.

    Hi,
    How to add one column to the standard t.code : CAT2.
    thanks

    Hi Chinna
    see the  enhancements by using SMOD <b>CATS0007</b> , or <b>CATS0012</b> and create a project using CMOD and you can implement your requirement.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • How to get one column value from a DOCUMENT TYPE attribute

    Hi,
    I have created a DOCUMENT TYPE attribute which queries from a table and all the column values( For Ex: Customer Name, Contact Name and Address) are displayed in the message body.
    I want one column value(For Ex: Customer Name) to be displayed in the SUBJECT of the message.
    How can this be done? Please let me know.
    Thanks in advance.

    Thanks Matt. I have used SETITEMATTRTEXT to get a single column value into an ITEM ATTRIBUTE.
    Please see the following procedure...
    ==========================================================
    PROCEDURE MisNotifyDataDesk(
         itemtype IN VARCHAR2
         , itemkey IN VARCHAR2
         , actid IN NUMBER
         , funcmode IN VARCHAR2
         , resultout OUT VARCHAR2
         ) IS
    p_Cart_Id               VARCHAR2(30);
    p_ORG_NAME                     VARCHAR2(360);
    BEGIN
         IF funcmode != WF_ENGINE.ENG_RUN THEN
              wf_log_pkg.string(5,'Notify_Cust_Data_Desk','Not in RUN mode');
         RETURN;
         END IF;
    p_Cart_Id := WF_ENGINE.GetItemAttrText ( itemtype => itemtype
    , itemkey => itemkey
    , aname => 'CART_ID' );
    p_code_position := 10;
         SELECT
              ORG_NAME
         INTO
              p_ORG_NAME                     
         FROM
              MISIBE_END_CUST_DETAILS
         WHERE
              QUOTE_HEADER_ID = p_Cart_Id;
    -- For TEXT BODY
    WF_ENGINE.SETITEMATTRTEXT(itemtype => itemtype , itemkey => itemkey , aname => 'ORG_NAME',avalue => p_ORG_NAME);
    resultout := WF_ENGINE.ENG_COMPLETED||':'||CUST_DATA_CHECK(p_Cart_Id);
    EXCEPTION
         WHEN OTHERS THEN
              WF_CORE.context (
              'WFCustCheck',
              'MisNotifyDataDesk',
              itemtype,
              itemkey,
              TO_CHAR(actid),
              funcmode,
              SQLERRM
    RAISE_APPLICATION_ERROR (-20005, SQLERRM);
    ===========================================================
    I am using &ORG_NAME in the body and subject of my message. But the value is
    not retrieved into the ITEM ATTRIBUTE when I run my process. It is just displaying in the message and the subject of hte message as "&ORG_NAME"
    CUST_DATA_CHECK used in the resultout, is a function which returns 'T' or 'F'. That part is working fine. Just retrieving the ORG_NAME in the ITEM ATTRIBUTE is not working.
    Am I going wrong somewhere? Please let me know.
    Thanks,

  • How to add one more values in Search Criteria,

    Hi All,
    OAF page Search Criteria :
    Search By "name"only Available already have in the search criteria .we are need to add Description in search criteria .How to add one more filed “Description” in Search Criteria,
    Please Help Me
    Thanks
    Rajavel

    "Set the Search Allowed property to True for any LOV result items you want to present to the user as searchable values. These items are listed in the search poplist the user sees in the LOV window.
    At a minimum you must set the Search Allowed property to True for the the result table item corresponding to the LOV field on the base page.
    This is from the devguide, I suggest you read it once at least if you have started work on the framework.
    Tapash

  • How to add one column into the t.code: cat2

    Hi
    I am userexits
    here i want to add one column into the t.code: cat2 at particular location, and that added field have to display the data what i am selcting in that transaction.
    how to do this...
    thankx

    hi,
        CATS0005           
        CATS0007           
        CATS0009        
        CATS0010        
        CATS0012.
        Go through the documentations of above Enhancements to solve ur problem. I am not able to understand ur exact requirement. that is y i gave some more Enhancements.

  • How can I replace column value with a particular value in SQL

    Hi All,
    Can anyone please tell me how can I format my output with replacing a column value with a specific value which actually depends on the present value of the column
    I am executing the following SQL statement
    select state,count(id) from <table_name> where composite_dn= <composite_dn_name> group by state;
    My Present output is:
    State No.Of Instance
    1 3
    3 28
    I want to replace the value in the column state as follows
    State No.OfInstances
    Completed 3
    Faulted 28
    I want "1" to be reppaced by "Completed" and "3" to be replaced by "Faulted"
    Is is possible with SQL or PL/SQL , if it is then how can I achieve this required result. Please help!!
    Thanks in Advance!!
    Edited by: Roshni Shankar on Oct 27, 2012 12:38 AM

    Hi Roshni,
    I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
    Refer -- http://www.techonthenet.com/oracle/functions/decode.php
    select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
    from <table_2> t2, (select state,count(id) count_id
    from <table_name>
    where composite_dn= <composite_dn_name>
    group by state) t1
    where t1.state = t2.state_id;HTH
    Ranit B.
    Edited by: ranit B on Oct 27, 2012 2:02 PM
    -- link added
    Edited by: ranit B on Oct 27, 2012 2:19 PM
    -- sample code added

  • How to add one default value in table type value set?

    Hi All
    I have the below requirement:
    Need to display all the organization ids in the parameter for one concurrent program along with one default value of 'ALL'.
    I have created a table value set which picks up the organization name from hr_all_organization_units. But while submitting the program I should also be able to give 'ALL'.
    Any pointer/idea how to achieve this will be highly appreciated!!
    Thanks in Advance!!
    Regards,
    Shashank Mishra

    HI
    i get below error when i change the script 
    PS C:\scripts> C:\Scripts\updatedefaultvalue.ps1
    Cannot index into a null array.
    At C:\Scripts\updatedefaultvalue.ps1:8 char:7
    + IF($i[ <<<< "Title"] -eq $null)
        + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeExce
       ption
        + FullyQualifiedErrorId : NullArray
    $web = Get-SPWeb http://tspmcwfe:89/
    $list = $web.Lists["test"]
    $item = $list.Items | Where { $_["Name"] -eq "Emc" }
    foreach($i in $items)
    IF($i["Title"] -eq $null)
             $i["Title"] = "test"
           $i.Update()
    adil
    Why are you piping a where in the items? Do you only want to add the "test" to ones matching
    a name?
    If you have ISE installed on your server I recommend you put your code in there and debug it. 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • How to add one column for entry in the TLB screen?

    Hi all,
    Does anybody know how to add a customised column for free text in the TLB header screen? The reason is user needs to add ship or container no. This info will be later on interfaced via CIF exit to R/3.
    I think many of you have the same requirement.
    Thanks heaps!

    Thanks Digambar,
    Can you help to work out more detail on how to customize the code in the TLB screen?
    Are you thinking of adding one field in the table and making the ALV grid control editable? If you have any reference doc/link to do it, it would great!
    Cheers,

  • I want to display one column values with multiple symbols

    i am created one report.
    my column name is offshore  & on shore i want display 3  values with % symbol, then i want show 4 th  value as $ 2000,
    but it was allowing only one format $ or % but i need to display  symbols with my values.

    Try the following :
    give a name to the following formula like @getvalue
    Numbervar x;
    if
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) = 0 and
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) = 0 and
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)= 0 and
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) = 0 and
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) = 0 and
    //(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) = 0 and
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) = 0 and
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex) = 0
    then
    x:=0
    else
    x:=(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex))
    (GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)+
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) +
    //GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) +
    GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex)
    ) * 100
    Now create a new formula and check the value of the above formula :
    if {@getvalue} > 50 Then
    "$"&{@getvalue}
    else
    {@getvalue}&"%"
    Hope this will resove the issue.
    Thanks,
    Sastry

  • Crystal Reports XI - How to pull same column value with different select...

    I have a report with many (around 30) sub reports and it is giving serious performance issue. I am currently finding out a strategy to improve the performance. I see that most of the sub reports are taking same parameters from main report except for one parameter which is different for each sub report and hard coded in them and pulling up the same column value from a oracle database with a different select criterion. I am trying to find out a way using either of command/crystal formula/SQL expression which can do the same job for me and give me performance improvement. I tried to take the parameters from the main report in one sub report and mapped them to parameters being transferred to the command and then drag and drop the field for which I need to display the value but due to some reason it is not returning values when I am trying multiple commands...I need some help in selecting a strategy for this issue resolution and some guidance....Any help would be highly appreciated....

    My version is 11.5.8.826. First of all I need to make it clear that I have 6 set of sub reports and each set has 5 sub reports. So if I can resolve the issue for one set, I resolve it for all. The sub reports are doing nothing but fetching a column value using a simple SQL SELECT query and appending to the right of a box in main report. The issue is that all these queries embedded into the sub reports are using same SQL except for one parameter in the "where" clause and they are fetching same column value from the database and fortunately all of them are returning same number of results. So at the end these results create a table when run. The only way I can stop using sub reports is by creating a table in the main report and use some object(formula/command/SQL expression or whatever) to fetch that column value using the same filter conditions. But please take a note that I need to use and append the same column value from a database table and use different filter conditions and append them to the right so that at the end they create a table...as long as I get the table in the output with a decent performance , anyone will be least bothered about what I used inside the report.....please ask me as many questions to get more lights on the issue....

  • How to add one textbox value into another textbox value every month in a list of infopath 2013

    InfoPath 2013.
    I have created a list in which I placed 2 textboxes.
    I have one textbox named Paid Amount:
    Second textbox named Invoice Amount:
    I want when I add any amount in Invoice Amount textbox in every month it Add into
    Paid Amount textbox
    How I can do this ?
    for e.g:
    Paid Amount : 2
    Invoice Amount: 3
    Paid Amount = 5
    When enter next month 6 in Invoice Amount the
    Paid Amount turn into 11.

    You can apply formula using a rule by creating a hidden field and calculate the values. Refer to the following posts for more information
    http://office.microsoft.com/en-in/infopath-help/add-subtract-multiply-and-divide-values-HP001096532.aspx
    https://support.office.com/en-us/article/Add-rules-for-performing-other-actions-5322d726-b787-4e5f-8d37-ba6db68b451d?ui=en-US&rs=en-US&ad=US
    and for complex calculations using code, refer to the following posts
    http://www.infopathdev.com/forums/p/21500/74297.aspx
    http://drekendrop.blogspot.in/2011/03/infopath-2010-get-and-set-value-of.html
    Cheers,

  • How to display a column value with in string?

    Hai all,
    Select name from TAB1;
    output:  JAGAN
                RAMU
                SIVA
                Sanjay
    So my requirement is to display these data in string(With in single Quotes) like below.
               ' JAGAN'
                'RAMU'
               ' SIVA'
                'Sanjay'
    Let me know if it is possible.......
    Thanks in Advance.....
    Jagadekara Reddy

    Like this ,
    SELECT ''''||ENAME||'''' FROM TAB1;
    Cheers!

  • Column values with invalid characters

    How to find the column values with invalid chararcters
    meaning value upper(col) not in ('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
    For ex.
    1. CDAssyKit,DragonNaturallySpeaking�Preferred7.0,USEnglish
    2. CDAssyKit,DragonNaturallySpeaking Preferred7.0,USEnglish
    Query should retrieve only the first row, since it has extra � character in the column value.
    Thanks for your help.

    Convert all letters and numbers to an arbitrary letter and then remove that letter. If there are any characters left, they are invalid according to your rules.
    select *
      from t
    where replace(translate(lower(column_name), 'abcdefghijklmnopqrstuvwxyz0123456789', 'a'), 'a') is not null;

  • How to add a default value in a site column for every item in a document library

    HI
    i created a content type with some site columns ,
    and included in a Document library.
    Process ( content type)
    -ProcessNo
    -ProcessName
    after that i uploaded 100 Documents but not  added value in a site column process name.
    now  how i add a default value in a site column for every document in a document library 
    adil

    HI
    i get below error when i change the script 
    PS C:\scripts> C:\Scripts\updatedefaultvalue.ps1
    Cannot index into a null array.
    At C:\Scripts\updatedefaultvalue.ps1:8 char:7
    + IF($i[ <<<< "Title"] -eq $null)
        + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeExce
       ption
        + FullyQualifiedErrorId : NullArray
    $web = Get-SPWeb http://tspmcwfe:89/
    $list = $web.Lists["test"]
    $item = $list.Items | Where { $_["Name"] -eq "Emc" }
    foreach($i in $items)
    IF($i["Title"] -eq $null)
             $i["Title"] = "test"
           $i.Update()
    adil
    Why are you piping a where in the items? Do you only want to add the "test" to ones matching
    a name?
    If you have ISE installed on your server I recommend you put your code in there and debug it. 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

Maybe you are looking for

  • XML publisher - page number not displaying

    Hi, I am creating a report using xml publisher rtf template ,The result is being displayed in a table if the no of rows are more the table may extend to several pages, I want to display page numbers like 1 of 5 on First page,2 of 5 on 2nd page and so

  • Unable to launch PS CC Mac OSX 10.9

    I have installed PS CC on 2 Max's with the same result on both The splash screen shows, the app opens for a couple of seconds then closes There is no error reported and I can not find an issue in a log. I have followed a multitude of information on d

  • Messages In Mobile Simulator

    Hi, I am developng an application in Netweaer Mobile .I am Using NWDS 7.1 CE SP07. The application I am developing requires some validation. How could I use the message pool in the IDE and also how to trigger the same out of it. Regards, Muhammed Nis

  • Camera Raw (Adjustment Brush - How do you select NO color?)

    With the Adjustment Brush selected, there are six control channel parameters listed: Exposure Brightness Contrast Saturation Clarity Sharpness Color The Color control channel shows a color swatch, which displays the current color parameter setting: W

  • Adding fields to Org Hierarchy

    Hello everyone - Our client is using the standard HR-OCI and I am working on getting fields added to the HR Org view. The standard fields available in the General settings are very limited. Were you able to add fields if so can you please share how y