How to hide columns in the output table in webdynpro based on input

Hi Experts,
   I have 2 inputs and 1 input is optional.If both inputs are given proper table output is displayed,but if only 1 input is given a column is empty in the output table  so i want to hide this column dynamically at runtime based on my inputs.And i want to hide some empty rows also at runtime based on inputs.
Can anyone help me out to solve this.
Thanks in advance.
Regards,
Anita.

Hi Anitha,
What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
Any how i am giving solution in this way.
If both inputs are given proper table output is displayed
Write your below logic in the WDDOMODIFYVIEW )
Here i am assuming that you already have a table element in the view.
Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
data:lr_table type ref to cl_wd_table,
       lr_column type ref to L_WD_TABLE_COLUMN.
lr_table ?= view->get_element( 'TABLE1' ).
CALL METHOD LR_TABLE->REMOVE_COLUMN
    EXPORTING
      ID          = 'TABLE1_color'
     INDEX      =
    RECEIVING
      THE_COLUMN = lr_column.
i want to hide some empty rows also at runtime based on inputs.
Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
delete itab from wa where key1= "12" and key2="abd".
Now bind the internal table to context node.
LO_ND_hcm->BIND_TABLE(
      NEW_ITEMS            = it_final
      SET_INITIAL_ELEMENTS = ABAP_TRUE ).

Similar Messages

  • How to sort columns in the target table

    I have a simple mapping which I am trying to design. There's only one table on the source and one in the target . There are no filter conditions, only thing is I want the target table to be sorted.
    Literally, say
    Src is source table has 3 columns x,y,z
    Trg is dest table and has 3 columns a,b,c
    x--->a
    y---->b
    z---->c
    The SQL should be
    select x,y,z from src order by x,y.
    I could do the mapping but the order by ..I could not do it .
    IKM used: IKM BIAPPS Oracle Incremental Update

    Why can't you use simple UPDATE command in EXECUTE SQL Task as below,
    DROP TABLE SSN
    DROP TABLE STAGING
    DROP TABLE STUDENT
    CREATE TABLE SSN(pn_id VARCHAR(100),ssn BIGINT)
    INSERT INTO SSN VALUES('000616850',288258466)
    INSERT INTO SSN VALUES('002160790',176268917)
    CREATE TABLE Staging (ssn BIGINT, id INT, pn_id BIGINT, name VARCHAR(100), subject VARCHAR(100),grade VARCHAR(10), [academic year] INT, comments VARCHAR(100))
    INSERT INTO Staging VALUES(288258466, 1001, '770616858','Sally Johnson', 'English','A', 2005,'great student')
    INSERT INTO Staging VALUES(176268917, 1002, '192160792','Will Smith', 'Math','C', 2014,'no comments')
    INSERT INTO Staging VALUES(444718562, 1003, '260518681','Mike Lira', 'Math','B', 2013,'no comments')
    CREATE TABLE Student(id INT,pn_id BIGINT,subject VARCHAR(100), [academic year] INT, grade VARCHAR(10), comments VARCHAR(100) )
    INSERT INTO Student VALUES(1001, '000616850', NULL,NULL,NULL ,NULL)
    INSERT INTO Student VALUES(1002, '002160790', NULL,NULL,NULL ,NULL)
    UPDATE Student SET Subject = C.Subject, [academic year]=C.[academic year], grade=C.grade,comments=C.comments
    FROM SSN A INNER JOIN Student B
    ON A.pn_id=B.pn_id INNER JOIN Staging C
    ON A.ssn = C.ssn
    SELECT * FROM Student
    Regards, RSingh

  • How to hide zeroes in the output

    I need to suppress zeroes in the output. I have a Data template which selects the data from a view. The original view fields are showing 0's if the underlying value is null.( eg. create view v1 as select nvl(field1,0),nvl(field2,0)... from table1
    I tried the following ways to fix the issue. But no success.
    1. Changed the view and removed the NVL function on the view
    create view v1 as select field1,field2,... from table1
    After this the xml output is generated and shows nulls for these fields. But OPP is failing with 'Cannot convert to number' Here is the snapshot of the error.
    Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert to number.
    at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1526)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:517)
    at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
    at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
    ... 17 more
    2. Using the xpath expression
    <?format-number(field1[.!=0],"####", "")?>
    This way I am seeing a square symbol for the fields having zeroes
    I am sure there will be simpler way of hiding zeroes in the output. But I am not getting any clues. Any ideas.
    Thanks

    Hi,
    I may have misunderstood something. In the option 1 you mention that by removing the nvl you were getting nulls?
    If you are getting zeros then you should be able to use <?if:field1!=0?>...<?end if?>. It's possible you might need to put '0' around the value if it thinks it is text.
    Also I'm not sure your format-number syntax is correct. It looks like you are mixing the Oracle formatting and the Microsoft formatting (ie when you set the form field type to number) together. I've used the following successfully:
    <?format-number:FIELD1;'PT9G990D00'?>
    Hope this helps.
    Paul

  • How to hide columns that are getting added dynamically to UI Element 'Table

    In SRM 7.0 while displaying a RFx, click on "responses and awards" button.
    In the response comparision tab once the user selects response number and clicks on "compare all responses".
    Item details table is displayed with fields item number,internal number,item description,........,Price etc.
    Requirement is  to hide the price column from the table.
    The UI element type is 'Table'.
    But the catch is there is no column price visible at layout design level.
    This field is getting added dynamically at run time.
    When i right click and see the 'more field help' at the front end i get the field id as 'GRP_1_COL_3_TXTV'.
    lo_table ?= view->get_element( id = 'ITEMS_TABLE' ).
    lo_column = lo_table->get_column( id = 'GRP_1_COL_3_TXTV').
    ASSERT lo_column IS NOT INITIAL.
    lo_column->set_visible( EXPORTING value = '01' ).
    I had written the above code in the pre-exit of WDDOMODIFYVIEW.
    But i am getting dump as assertion failed.it says no column by name 'GRP_1_COL_3_TXTV'.
    Please help me inhow to hide fields or buttons getting generated dynmically.
    Regards,
    Venkat Raghavan.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • How do I change the order of columns in the responses table?

    How do i change the order of columns in the responses table in FormsCentral?  The default setting puts them in reverse order!

    Hi,
    The issue with the default ordering of columns in the response table is something that we hope to address in the next update to FormsCentral. In the meantime, you can reorder the columns by selecting them then click/drag using the gray area above the column name. As shown below, an orange marker will show you where the columns will be placed when you release the mouse button.
    Sorry for the inconvenience.
    Regards,
    Brian

  • How to sum different column in the same table

    Hi everyone
    I would like to know how can I make the sum of different column in the same table using apex
    exple:
    TR_PROJ_BIL_TRIM.ENTPIDFISC as ENTPIDFISC,
        TR_PROJ_BIL_TRIM.EXEANNEE as EXEANNEE,
        TR_PROJ_BIL_TRIM.PROJBILTRIMT1PREV as PROJBILTRIMT1PREV,
        TR_PROJ_BIL_TRIM.PROJBILTRIMT2PREV as PROJBILTRIMT2PREV,
        trunc( TR_PROJ_BIL_TRIM.PROJBILTRIMT1PREV)+(TR_PROJ_BIL_TRIM.PROJBILTRIMT2PREV)
    from TR_PROJ_BIL_TRIM TR_PROJ_BIL_TRIM
    group by TR_PROJ_BIL_TRIM.ENTPIDFISC,TR_PROJ_BIL_TRIM.EXEANNEE
    but while trying to run this script i get this error message:"ORA-00979: not a GROUP BY expression"
    thanks for reading me and I hope to hear from you soon

    Hi,
    Your question do not have anything do with APEX.
    It is pure SQL question and you will get better answer this kind questions from SQL and PL/SQL forum
    You need have GROUP BY when you use aggregate functions like SUM.
    I assume you like just add two columns.
    Try
    SELECT ENTPIDFISC
        ,EXEANNEE
        ,PROJBILTRIMT1PREV
        ,PROJBILTRIMT2PREV
        ,trunc(PROJBILTRIMT1PREV) + (PROJBILTRIMT2PREV)
    FROM TR_PROJ_BIL_TRIM
    Regards,
    Jari

  • How to insert a button on the column header of a table in webdynpro java

    Hi
    Can anyone tell me how to insert a button on the column header of a table in webdynpro java?
    regards
    sunit

    Hi sunit,
    Instead of adding button in the column header , in the column
    add a fixed top cell.
        right click on the column
        Insert FixedTopCell
        Right click on the fixedTopCell
        insert Editor.
       select button.
    then button will be only in the top most row.
    Hope it will satisfy ur requirement
    Regards
    Smitha

  • Hiding a column in the quote table

    Hello,
    Please i need to hide a column in the quote table (Oracle quoting: Quotes ). How can this be done ? I am not able to get the JSP pages to do the customization ? how to get the name of the JSP in order to get it from the server and modify it?
    Please reply ,
    Thanks,

    easiest way to find out the jsp to be modified.
    do the view source of the page, search for the item you want to hide and go back upwards in the file, you will find the jsp that renders the field.
    customize that jsp.
    Thanks
    Tapash

  • How can I change column name in ALV table in WebDynpro ABAP?

    Hi Everyone,
    I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
    Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
    Please let me know how can I change the name of the column.
    Regards

    Hi,
    This may help you to define your own column text in the ALV Table of webdynpro.
    see the below code.
    Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
    "change the label of the report.
    DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
    CALL METHOD l_value->if_salv_wd_column_settings~get_column
    EXPORTING
    id = 'STATUS_ICON'
    RECEIVING
    value = lr_weeknum.
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    regarads,
    balu

  • Column width in output table cannot be changed

    Hi All,
    I have a visual composer model with an input form used to display variables to call a BW query. The query result is displayed in an output table.
    Multiple fields are displayed in the output table.
    On the layout tab of the visual composer model, I have changed the column width of the different output fields.
    After initial execution, the column widths of the different columns correspond to the settings in the layout tab. When I submit the query, example after entering the selection variables in the input screen and pressing submit, all columns widths change to 1 width. All columns now have the same width.
    We installed the latest VC version and hotpackages but this does not help.
    How can I change the column width of an output table?
    Best Regards,
    Filip

    Hi All,
    this column problem I know really good and there is a solution:
    Click on the Output-Port of your Query and then click on Configure. You will see on the right side the property "Dynamic Port". Uncheck that and you will see that the column width is like in the layout tab.
    This is only in Queries. In Function Modules you dont have to do this.
    Best Regards,
    Murat Yurtoglu

  • Need to add 2 new columns to the existing table control of C223 transaction

    Hi ABAP Gurus,
    I have to do a screen enhancement for transaction C223.
    Below is the requirement:
    need to add 2 new columns to the existing table control of C223 transaction.
    there is no customer exits, screen exit or user exit present for this transaction C223, i have found one enhancement spot for this transaction.
    i dont have any idea how to do this in standard transaction C223, the table control in C223 saves the data to MKAL table and the table control uses the structure MKAL_EXPAND in the screen program.
    i have created an append structure for  the 2 fields to the standard table MKAL.
    Can anyone please suggest me how this can be done in standard screen C223, will the enhancement spot can be used to do this....
    please sugest...
    Thanks & Regards

    Hi Santosh,
    Thanks for the reply. I have looked into this Enhancement Spot CPFX_SCREEN_SET , inside this there is only one method INPUT_DISABLED having below parameters
    IM_MKAL     Importing     Type     MKAL                                                                                Production Version
    EX_MSGID     Exporting     Type     SY-MSGID                                                                                Messages, Message
    EX_MSGTY     Exporting     Type     SY-MSGTY                                                                                Messages, Message
    EX_MSGNO     Exporting     Type     SY-MSGNO                                                                                Messages, Message
    EX_MSGV1     Exporting     Type     SY-MSGV1                                                                                Messages, Message
    EX_MSGV2     Exporting     Type     SY-MSGV2                                                                                Messages, Message
    EX_MSGV3     Exporting     Type     SY-MSGV3                                                                                Messages, Message
    EX_MSGV4     Exporting     Type     SY-MSGV4                                                                                Messages, Message
    EX_INPUT_DISABLE     Exporting     Type     CHAR1                                                                                Display Only if X Was Set
    the BADI definition present here is a SAP internal so we cant implement the BADI , but we can created a enhancement spot implementation for this. as per my understanding on this the enhancement spot is only for making the table control fields display / change .  i dont think this can be used to add two new coloumns to C223 table control.
    I am not sure thats why seeking your help/valuable sugestion on this.
    Please provide your sugestion on this , so that i can come to conclusion on this issue.
    Thanks & Regards
    Siddhartha Mishra

  • Refreshing the Output Table in ALV

    Hi All,
    Please let me know how to refresh the output table using refresh button in ALV.
    Thanks & Regards,
    Priya.
    Edited by: SathyaPriya Neelagaru on Jun 26, 2008 7:00 AM

    Hi,
    We can refresh the output table for ALV by below code :
    CLEAR  : g_wa_outtab.
    REFRESH: g_t_outtab.
    When we append something to output table of ALV we need to clear the workarea for that table.
    APPEND g_wa_outtab TO g_t_outtab.
    CLEAR g_wa_outtab.
    If you are using object oreinted concept we have
    CALL METHOD g_alv_grid_9001->refresh_table_display.
    In case you have to use your own PF Status - Always copy the standard GUI status
    (Program : SAPLSLVC_FULLSCREEN,
    Status : STANDARD_FULLSCREEN )
    For REFRESH - Include parameter for "USER_COMMAND" in the Function module interface.
    Inside the User command subroutine - set
    "RS_SELFIELD-REFRESH" = "X".
    It will automatically refresh the ALV and there is no requirement to call ALV again.
    Or else if u have a Refresh button on screen.
    we can have
    WHEN 'REFRESH'.
          CLEAR : g_wa_outtab.         
          REFRESH : g_t_outtab.
    Hope this helps you.
    Plz reward if useful.
    Thanks,
    Dhanashri
    Edited by: Dhanashri Pawar on Jun 26, 2008 7:08 AM
    Edited by: Dhanashri Pawar on Jun 26, 2008 7:14 AM
    Edited by: Dhanashri Pawar on Jun 26, 2008 7:15 AM

  • Knowing the primary key columns of the given table

    Hi,
    How can I get the primary key columns of the given table?
    Regards,
    Sachin R.K.

    You can find the constraint_name from all_constraints/user_constraints for constraint_type = 'P' (which is the primary key constraint).
    And then see which columns are in for the constriant_name
    in all_cons_columns/user_cons_columns view.
    Below is the example
    select acc.column_name from
    all_cons_columns acc, all_constraints ac
    where acc.constraint_name = ac.constraint_name
    and acc.table_name = 'DEPT' AND acc.owner = 'SCOTT'
    and ac.constraint_type = 'P'
    Hope this helps
    Srinivasa Medam

  • How to insert data into the mysql table by giving as a text file

    Hi,
    Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
    Thanks:)

    At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).

  • Two columns in the same table that are foreign keys to the same master key

    i want to create a table let say X, which have two columns that are foreign key that reference the same column in the master table, so does this count as bad database design.

    here is the full ddl for the two table, where in the second table there are two columns that represent the primary key and they are also two foreign keys to the same columns in the master table (items)
    Desc item table;
    Item_id
    Item_name
    Item_price
    Item_quantitiy
    Create table item_recommendation ( item_id varchar(20), recommended_item varchar(20),
    CONSTRAINT recom_primary PRIMARY KEY (item_id, recommended_item),
    CONSTRAINT F1 FOREIGN KEY (item_id) REFERENCES items(item_id), ),
    CONSTRAINT F2 FOREIGN KEY (recommended_item) REFERENCES items(item_id));

Maybe you are looking for