How to display total in alv only for single row

Hello,
I wish to replace VAT field in my ALV OUTPUT from another ITAB using READ TABLE. But in ALV output I have multiple rows for one document number.
So the value is assigning to all the rows in output, is it possible to assign that VAT value to only one row ( to any one record from output with corresponding document number) .
Thanks in advance.
Regards,
Ritesh Inamdar

Hi Sudeesh,
I am fetching data for PO details, GR details along with condition types of PO.
All data is collected in ALV OUTPUT itab, after this I am trying to assign the values of VAT from another itab in ALV OUTPUT LOOP using READ TABLE with reference to PO-PO_ITEM-CONDITION_TYPE.
Now, when the alv loop is getting executed and in that I am fetching data for VAT using READ statement, the program is assigning VAT to all records of output alv with comparison of PO-PO_ITEM-CONDITION_TYPE.
see:
LOOP AT it_alv ASSIGNING <fs-alv>.
     READ TABLE it_vat ASSIGNING <fs-vat>
          WITH KEY ebeln = <fs-alv>-ebeln
                           posnr = <fs-alv>-posnr
                            kschl = 'JVCS'.
     IF sy-subrc = 0.
          <fs-alv>-vat = <fs-vat>-kbetr / 10.
  <fs-alv>-vat_val = <<fs-alv>-vat * it_alv-menge.
     END IF.
END LOOP.
Please refer above.
Thanks.
Ritesh

Similar Messages

  • How to display total in ALV Header

    How to display total in ALV Header?

    Hi Venkey,
    As far as your issue is concerned I would like to quote my perception.
    Create a header internal table with title and number of records.
    At the later part of your program you should have found the total number of records ,now assign it to the header internal table and print it.
    For further clarification you can go check this link:
    http://wiki.sdn.sap.com/wiki/display/ABAP/AddHeadertoALVreport
    Thanks
    P.Srikanth

  • How to display the selection screen fields for selected checkboxes

    Hi all,
             I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
    and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
    Thanks
    sriman.

    hi,
    Try this code
    report z_13317_sdn2.
    tables : mara, marc, dd03l.
    parameters : p_chk1 as checkbox user-command ABC,
                 p_chk2 as checkbox user-command PQR,
                 p_chk3 as checkbox user-command XYZ.
    select-options : s_matnr for mara-matnr modif id A,
                     s_ersda for mara-ersda modif id A,
                     s_werks for marc-werks modif id B,
                     s_lvorm for marc-lvorm modif id B,
                     s_tab for dd03l-tabname modif id C.
    data: v_chk1,
          v_chk2,
          v_chk3.
    at selection-screen output.
      loop at screen.
        if screen-group1 = 'A' or
           screen-group1 = 'B' or
           screen-group1 = 'C'.
            screen-input = 0.
           modify screen.
        endif.
      endloop.
      loop at screen.
        if v_chk1 = 'X'.
          if screen-group1 = 'A'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk2 = 'X'.
          if screen-group1 = 'B'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk3 = 'X'.
          if screen-group1 = 'C'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
      endloop.
    at selection-screen.
      if sy-ucomm = 'ABC'.
        if v_chk1 = ' '.
          v_chk1 = 'X'.
        else.
          v_chk1 = ' '.
        endif.
      endif.
      if sy-ucomm = 'PQR'.
        if v_chk2 = ' '.
          v_chk2 = 'X'.
        else.
          v_chk2 = ' '.
        endif.
      endif.
      if sy-ucomm = 'XYZ'.
        if v_chk3 = ' '.
          v_chk3 = 'X'.
        else.
          v_chk3 = ' '.
        endif.
      endif.
    Regards,
    Sailaja.

  • SCCM 2012- How to limit a collection membership only for specific count of machines

    How to limit a collection membership only for specific count of machines

    As I said you can use where SMS ID like %1 and see how many machines that gets you. If it's not enough do where SMS ID like %1 or SMS ID like %2. Keep adding a digit until you get ~5000. It won't be perfect though.
    John Marcum | http://myitforum.com/myitforumwp/author/johnmarcum/

  • How to refer a column value of a single row in conditional column display?

    Hello,
    does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
    So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
    I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
    But I do not know how to refer the column value of each single row!
    Thank you,
    Tim

    Here's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
    Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
    select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
    etc.
    Test this out. You'll see that it works just like making a column a link using the column attributes.
    Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
    select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
    etc.
    This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
    -Joe

  • How can I use table headers only without using rows.

    how can I use table headers only, without using rows and without leaving the space.
    If anyone could say me how to paste the pic in this questions, I would have shown it.
    The flow of view is in this way
    {Table header(table on top of table)
    column header1___|| column header2__ || column header3__ ||}
    <b>Here is the blank space I am getting, How to avoid this space?this space is of one table row height</b>
    {Contents column1 || Contents column2 || Contents column3 || (This is of other table below the uper table)}
    I am using scroll for the content part of table only.
    So I am using two tables.
    I am using NW04.

    I did the possibles you explained, but couldn't get rid off the space.
    Any other solutions?
    I am keeping the header static and the content columns scrollable.
    I have used two tables one to display header above and the other to display only the contents.
    I have put the contents table in scroll container.
    And the header table in transperent container.
    Thanks and Regards,
    Hanif Kukkalli

  • Checkboxes only for particular rows.

    Hi frends..
    Here my requirement can we keep checkboxes only for particular in the alv using oops..
    I need to display a report showing first column as checkbox.But I need to display checkbox only
    for particular rows which satifies the condition.
    pls reply me
    Thanks

    Hi,
    Refer these threads for editing fields for certain rows only:-
    Re: Making selected alv rows editable
    Re: selective edit in ALV grid
    Locking Row in ALV
    And refer this wiki for code for using checkbox with alv grid:-
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir
    Edited by: Tarun Gambhir on Feb 10, 2009 10:31 AM

  • In Table Control How to get only a single row .

    Hi
    In Table Control How to get only a single row .I am able to decrease it its height to 4 but then 2 rows is getting dsplayed .I want only one row to be display and 2nd row should be deactivated or not visible.
    regards
    Avik
    Edited by: Julius Bussche on Jan 30, 2009 1:10 PM
    Removed friendly greeting from the subject title

    Hi Avik
    use this code it will help you.
    MODULE passdata OUTPUT.
      READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
      IF sy-subrc = 0.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.      " 111 IS THE GROUP NAME
            screen-input = 1.          " input mode
            screen-active = 1.         " input mode.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.       "GROUP NAME
            screen-input = 0.           " display mode
            screen-active = 1.          " DISPLAY MODE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " PASSDATA  OUTPUT
    Make sure in group tou are passing the field name that you want in input mode on the base of other field
    Hope it will help you.
    Thanks
    Arun Kayal.

  • Is xmlgen.insertxml used only for single table

    Is xmlgen.insertxml used only for single table or can be used to insert the xmldata into xle tables
    Thanks,
    Sudheer

    Hi Sudeesh,
    I am fetching data for PO details, GR details along with condition types of PO.
    All data is collected in ALV OUTPUT itab, after this I am trying to assign the values of VAT from another itab in ALV OUTPUT LOOP using READ TABLE with reference to PO-PO_ITEM-CONDITION_TYPE.
    Now, when the alv loop is getting executed and in that I am fetching data for VAT using READ statement, the program is assigning VAT to all records of output alv with comparison of PO-PO_ITEM-CONDITION_TYPE.
    see:
    LOOP AT it_alv ASSIGNING <fs-alv>.
         READ TABLE it_vat ASSIGNING <fs-vat>
              WITH KEY ebeln = <fs-alv>-ebeln
                               posnr = <fs-alv>-posnr
                                kschl = 'JVCS'.
         IF sy-subrc = 0.
              <fs-alv>-vat = <fs-vat>-kbetr / 10.
      <fs-alv>-vat_val = <<fs-alv>-vat * it_alv-menge.
         END IF.
    END LOOP.
    Please refer above.
    Thanks.
    Ritesh

  • In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    In OBIEE mobile apps designer there is no option for multi select prompts?The navigation page gives option only for single select?Is there a work around for this?

    Nic, for me the iTunes window looks like this, when I connect my iPad 3:
    I select the iPad in the "devices" section of the Sidebar (use: "View > Show Sidebar" if the sidebar is hidden).
    Click the "Apps" tab in the "Devices" pane.
    Scroll all the way down in the Devices pane to "File Sharing" "Apps" section.
    Then do I click "GarageBand" to select the documents in the right panel.
    Which part is different for you? Perhaps you could post a screenshot?
    Regards
    Léonie

  • How can i get all these values in single row with comma separated?

    I have a table "abxx" with column "absg" Number(3)
    which is having following rows
    absg
    1
    3
    56
    232
    43
    436
    23
    677
    545
    367
    xxxxxx No of rows
    How can i get all these values in single row with comma separated?
    Like
    output_absg
    1,3,56,232,43,436,23,677,545,367,..,..,...............
    Can you send the query Plz!

    These all will do the same
    create or replace type string_agg_type as object
    2 (
    3 total varchar2(4000),
    4
    5 static function
    6 ODCIAggregateInitialize(sctx IN OUT string_agg_type )
    7 return number,
    8
    9 member function
    10 ODCIAggregateIterate(self IN OUT string_agg_type ,
    11 value IN varchar2 )
    12 return number,
    13
    14 member function
    15 ODCIAggregateTerminate(self IN string_agg_type,
    16 returnValue OUT varchar2,
    17 flags IN number)
    18 return number,
    19
    20 member function
    21 ODCIAggregateMerge(self IN OUT string_agg_type,
    22 ctx2 IN string_agg_type)
    23 return number
    24 );
    25 /
    create or replace type body string_agg_type
    2 is
    3
    4 static function ODCIAggregateInitialize(sctx IN OUT string_agg_type)
    5 return number
    6 is
    7 begin
    8 sctx := string_agg_type( null );
    9 return ODCIConst.Success;
    10 end;
    11
    12 member function ODCIAggregateIterate(self IN OUT string_agg_type,
    13 value IN varchar2 )
    14 return number
    15 is
    16 begin
    17 self.total := self.total || ',' || value;
    18 return ODCIConst.Success;
    19 end;
    20
    21 member function ODCIAggregateTerminate(self IN string_agg_type,
    22 returnValue OUT varchar2,
    23 flags IN number)
    24 return number
    25 is
    26 begin
    27 returnValue := ltrim(self.total,',');
    28 return ODCIConst.Success;
    29 end;
    30
    31 member function ODCIAggregateMerge(self IN OUT string_agg_type,
    32 ctx2 IN string_agg_type)
    33 return number
    34 is
    35 begin
    36 self.total := self.total || ctx2.total;
    37 return ODCIConst.Success;
    38 end;
    39
    40
    41 end;
    42 /
    Type body created.
    [email protected]>
    [email protected]> CREATE or replace
    2 FUNCTION stragg(input varchar2 )
    3 RETURN varchar2
    4 PARALLEL_ENABLE AGGREGATE USING string_agg_type;
    5 /
    CREATE OR REPLACE FUNCTION get_employees (p_deptno in emp.deptno%TYPE)
    RETURN VARCHAR2
    IS
    l_text VARCHAR2(32767) := NULL;
    BEGIN
    FOR cur_rec IN (SELECT ename FROM emp WHERE deptno = p_deptno) LOOP
    l_text := l_text || ',' || cur_rec.ename;
    END LOOP;
    RETURN LTRIM(l_text, ',');
    END;
    SHOW ERRORS
    The function can then be incorporated into a query as follows.
    COLUMN employees FORMAT A50
    SELECT deptno,
    get_employees(deptno) AS employees
    FROM emp
    GROUP by deptno;
    ###########################################3
    SELECT SUBSTR(STR,2) FROM
    (SELECT SYS_CONNECT_BY_PATH(n,',')
    STR ,LENGTH(SYS_CONNECT_BY_PATH(n,',')) LN
    FROM
    SELECT N,rownum rn from t )
    CONNECT BY rn = PRIOR RN+1
    ORDER BY LN desc )
    WHERE ROWNUM=1
    declare
    str varchar2(32767);
    begin
    for i in (select sal from emp) loop
    str:= str || i.sal ||',' ;
    end loop;
    dbms_output.put_line(str);
    end;
    COLUMN employees FORMAT A50
    SELECT e.deptno,
    get_employees(e.deptno) AS employees
    FROM (SELECT DISTINCT deptno
    FROM emp) e;
    DEPTNO EMPLOYEES
    10 CLARK,KING,MILLER
    20 SMITH,JONES,SCOTT,ADAMS,FORD
    30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
    CREATE OR REPLACE FUNCTION concatenate_list (p_cursor IN SYS_REFCURSOR)
    RETURN VARCHAR2
    IS
    l_return VARCHAR2(32767);
    l_temp VARCHAR2(32767);
    BEGIN
    LOOP
    FETCH p_cursor
    INTO l_temp;
    EXIT WHEN p_cursor%NOTFOUND;
    l_return := l_return || ',' || l_temp;
    END LOOP;
    RETURN LTRIM(l_return, ',');
    END;
    COLUMN employees FORMAT A50
    SELECT e1.deptno,
    concatenate_list(CURSOR(SELECT e2.ename FROM emp e2 WHERE e2.deptno = e1.deptno)) employees
    FROM emp e1
    GROUP BY e1.deptno;
    DEPTNO EMPLOYEES
    10 CLARK,KING,MILLER
    20 SMITH,JONES,SCOTT,ADAMS,FORD
    30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
    CREATE OR REPLACE TYPE t_string_agg AS OBJECT
    g_string VARCHAR2(32767),
    STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
    RETURN NUMBER,
    MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
    value IN VARCHAR2 )
    RETURN NUMBER,
    MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
    returnValue OUT VARCHAR2,
    flags IN NUMBER)
    RETURN NUMBER,
    MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
    ctx2 IN t_string_agg)
    RETURN NUMBER
    SHOW ERRORS
    CREATE OR REPLACE TYPE BODY t_string_agg IS
    STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
    RETURN NUMBER IS
    BEGIN
    sctx := t_string_agg(NULL);
    RETURN ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
    value IN VARCHAR2 )
    RETURN NUMBER IS
    BEGIN
    SELF.g_string := self.g_string || ',' || value;
    RETURN ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
    returnValue OUT VARCHAR2,
    flags IN NUMBER)
    RETURN NUMBER IS
    BEGIN
    returnValue := RTRIM(LTRIM(SELF.g_string, ','), ',');
    RETURN ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
    ctx2 IN t_string_agg)
    RETURN NUMBER IS
    BEGIN
    SELF.g_string := SELF.g_string || ',' || ctx2.g_string;
    RETURN ODCIConst.Success;
    END;
    END;
    SHOW ERRORS
    CREATE OR REPLACE FUNCTION string_agg (p_input VARCHAR2)
    RETURN VARCHAR2
    PARALLEL_ENABLE AGGREGATE USING t_string_agg;
    /

  • Display spool output i.e a single row in a single line

    hello All,
    I have report that outputs many columns  is single row , when run in the background.
    The problem that I am facing that the the single row of columns is wrapped into second line when certain limit of chararcters is reached. That is the single row of data is placed into two lines.
    While running the job in the background I choose the LOCL or LP01 printer with format X_65_255.
    Also note that I have other SAP systems but in that systems when I use the same procedure(printer and format also the same) for the same report the outputf for single row is not warpped into 2 lines but appears in the same line.
    Please provide your input. Points will be rewrded for helpful answers
    regards
    Sachin

    Note that this solution is for downloading wide formats only - not printing...
    Here is what I did:
    To create format Y_1024_1023 (New name!)
    1) Transaction SPAD
    2) Click "Full Administration" button
    3) Click on "Device Types" tab
    4) Click "Display" button next to "Format Types" field
    5) Place cursor on X_65_255
    6) Click in menu Format --> Create using template (F5)
    7) Change Number of rows to 1023 (if set to 65, you will have more pages and hence more headers)
    9) Change Number of Columns to 1023 (as wide as can be displayed in SP01)
    8)Give new name to format e.g. Y_1023_1023
    To create spool device YSPOOL:
    1) Transaction SPAD
    2) Click on "Device/Servers" tab (first tab!)
    3) Click 'Display" button next to Output Devices field
    4) Click "Create" button (Shift-F1)
    5) Give output device long name (e.g.YSPOOL) and short name (e.g.YSPO)
    6) Device attributes tab --> Device type = ASCIIPRI (Some generic ASCII printer) - I actually used a ZU_ASCII created in our system but ASCIIPRI should also work.
    7) Access method tab --> Host printer = some value (e.g. outfile2)
    8) Save
    Now assign Y_1024_1023 to Device type:
    1) Transaction SPAD
    2) Click on Device types tab
    3) Enter "ASCIIPRI" in "Device types" field and click display button
    4) Click on "Formats" button (F6)
    5) Click on "Create' button (Shift-F1)
    6) In popup, type Y_1023_1023 (or use drop-down to choose from)
    7) Save
    Per OSS Note 186603 --> Call SPAD and choose Settings -> Spool System -> Other. Select 'SP01: Number of Lines for List Display from Format'. You may have to clear cache via SPAD->Goto->Cache control -->Click "Reset Cache Settings".
    Now, when you schedule your background job, choose YSPOOL as your output device and choose the format as Y_1024_1023.  The spool generated from this job will be 1023 columns wide and 1024 lines long (less headers!).  Note that opening such a large spool (long & wide) will consume lots of app server memory so exit out as soon as download to presentation server is complete.

  • How to change the background color of a single row

    Hi OTN,
    I am using JDeveloper 11.1.1.2 with ADF faces in view layer.My issue is How to change the background color of a single row in af:table ?.

    How to highlight ADF table row based on column value?
    Found by searching

  • Refreshing only the single row of  ADF Table

    Hi All,
    I have a webcenter application where the ADF Applications has been deployed.Now the Data is coming onto the ADF Tables from a webservice.In that particular table i need to refresh only the single row(whichever selected by the user to edit ) or even a particular field with the updated values as well as need to validate and to create a message box saying about the errors if the validation goes wrong.
    Please suggest!!

    Hi,
    if "updated value" mean that the value got changed on the middle tier (not the browser client) then the update requires the table to be partially refreshed. If the user edits a row and in this row has dependent fields, then this can be achieved by partially refreshing the column. Note that ADF Faces tables don't refresh just one cell
    Frank

  • How to display total for a column in updateble report

    How can I display total on a report column?
    the query is
    select htmldb_item.checkbox(1,invoice_id) invoice_id,
    htmldb_item.DISPLAY_AND_SAVE(2,invoice_no,15)invoice_no,
    htmldb_item.DISPLAY_AND_SAVE(3,to_char(invoice_date, 'DD-MON-YYYY'),20) invoice_date,
    htmldb_item.DISPLAY_AND_SAVE(4,net_amount,15) NET_AMOUNT,
    htmldb_item.text(5,net_amount,null,10) amount_adj,
    htmldb_item.text(6,net_amount,null,10) actual_amt
    from INVOICE
    where OWNER_TYPE = 'CUSTOMER'
    and OWNER_ID = :P57_CUSTOMER_NAME
    group by invoice_id,invoice_no, invoice_date,net_amount
    In the report column attributes the sum column is checked for the sal field
    When I run the report, I get a Sub-total of 0 and a Report Total of 0. What am I doing wrong?
    thanks

    Sunil,
    Which column is the sal column? I can’t see any numeric columns in your query. If you use htmldb_item calls in your query column, then this makes them strings and you can’t build sums on string columns. If you want to build sums in an updateable report / tabular form, then don’t use the htmldb_item API. Instead use the built-in display types on the report column attributes page. Using the built-in display types is the better options in most cases anyway and they do allow you to calculate sums even if the column is a text field or display and save type field.
    Regards,
    Marc

Maybe you are looking for

  • How to get a line break

    Hi All, How do I get a line break within a particular field? My DB structure is that I have 4 columns address_line_1, address_line_2 and so on. I cannot select them as different fields because all of them can be null, in which case i pick it from int

  • Subcontracting GR.

    Hi Gurus, The requirement is that if there is not enough stock, of child item then transaction MIGO or MIGO_GR should fail. Means suppose we have FG of 100 quantity for which we need 100 qty of raw material and current stock of raw material is 80 the

  • Customised standard copy package

    Hi, I've followed the HTG (http://scn.sap.com/docs/DOC-34892#comment-503686) to create a custom package. The idea is to select a category and entity (one each), a source and a target period and have certain other dimension members hardcoded. My model

  • How to Make dialog as full screen

    Dear All, Here I am opening the dialog by using below coding. i want the dialog as full screen or i have to hide the address bar and status bar etc. HashMap props = new HashMap(); HashMap params = new HashMap(); props.put("width", new Integer(1000));

  • Is there search function just limit itself to just the bookmarks section only

    Is there a search function just limit itself to just the bookmarks section only and not search through the entire document?