Nullable fields in a View

I am having issues trying to get the nullable attribute of a view to be "No". I created a very simple view to test, and the issue I am running into is anytime I specify a Union in the query every field in the view is set to nullable. In this very simple example I am querying 3 columns from a table, none of which are nullable. If I do not include a union then the view fields fields are not nullable as expected, however as soon as I introduce the union (even though no possiblity of null values are introduced) the columns change to being nullable. In this simple example it isn't such a big deal, but this is causing significant performance implications using LINQ to query more complex views. Any help would be much appreciated.
Example 1:
SELECT comp_id, comp_typ_id
from component
where comp_id = 1
--Columns of resulting View
Column_name: comp_id      
Data_Type: NUMBER(5,0)
Nullable: No
Column_name: comp_typ_id      
Data_Type: NUMBER(5,0)
Nullable: No
Example 2:
SELECT comp_id, comp_typ_id
from component
where comp_id = 1
UNION
SELECT comp_id, comp_typ_id
from component
where comp_id = 2
--Columns of resulting View
Column_name: comp_id      
Data_Type: NUMBER(5,0)
Nullable: Yes
Column_name: comp_typ_id      
Data_Type: NUMBER(5,0)
Nullable: Yes
Edited by: 916327 on Feb 22, 2012 12:15 PM
Edited by: 916327 on Feb 22, 2012 12:21 PM
Edited by: 916327 on Feb 22, 2012 12:42 PM
Edited by: 916327 on Feb 22, 2012 12:48 PM

916327 wrote:
I am having issues trying to get the nullable attribute of a view to be "No". I created a very simple view to test, and the issue I am running into is anytime I specify a Union in the query every field in the view is set to nullable. In this very simple example I am querying 3 columns from a table, none of which are nullable. If I do not include a union then the view fields fields are not nullable as expected, however as soon as I introduce the union (even though no possiblity of null values are introduced) the columns change to being nullable.
Example 1:
SELECT week_nbr,
period_nbr,
year_nbr
FROM time_hierarchy
WHERE d_date = '03-JAN-99';HUH?
The purpose of TO_DATE is to convert string datatype to DATE datatype.
With Oracle characters between single quote marks are STRINGS!
'This is a string, 2009-12-31, not a date'
When a DATE datatype is desired, then use TO_DATE() function including format.
'10-11-12'
Which is correct DATE below for string above?
Oct. 11 2012
Nov. 10 2012
Nov. 12 2010
Dec. 11 2010
Oct. 12 2011
Dec. 10 2011
I'll give you 6 guesses, since the first 5 will be incorrect.

Similar Messages

  • How can I pass field value betwen view in ICWC?

    Hi experts,
    I am new to this BSP programming. I have some requirements to modify standard ICWC in CRM 5.0
    Hope can get some advices and helps here.
    I have added a new field called <status> to context note SEARCHCUSTOMER in BupaSearchB2B view and also the same field name to context note CUSTOMER in BupaCreate view.
    I have added the field into both the HTM views and able to execute thru WebClient. However, I have one problem in passing the <status> value from BupaSearchB2B view  to the BupaCreate view when I click on the 'create' button.
    I do search and saw this thread How can I pass field value beetwen view in IC Web Client? , but i cant figure out how it works.
    Do I need to create the field <status> to context note CUSTOMER in BupaSearchB2B? Currently the context note does not have any attributes.
    Really appreciate for any help.
    Edited by: mervyn tay on Apr 7, 2009 11:42 AM

    solved by myself...
    code in the CREATE_ACCOUNT method.
            ev_entity->set_property( iv_attr_name = 'ZZICNO'
                                     iv_value = lv_icnum1 ).

  • Adding fields in costing view of material master

    Hi gurus,
    I need to add 4 fields in costing view of material master. I have followed the steps in SPRO, for configuring customized screen in material master.
    1) Created a function group YMMCO and copied the screen 2904 from program SAPLMGD1.
    2) Added 4 fields in my customized screen.
    3) Created copy of 01 ( Screen reference ) to z1 in OMT3B.
    Since 2904 is not there in the sequence . I changed one 0001 sequence at the end to 2904 . I also assigned my program
    SAPLYMMCO to it. I can see the changed fields in data screen and subscreen.
    4) Then I assigned the SSq to z1 in transaction OMT3E.
    But unfortunately, when I go to MM01 to create a material , I am not able to view the fields I added in costing view.
    I have checked the screen for the previous field, it shows 2904 only.
    Two days back, I did the same thing in basic data view 1 , it was working properly. As per client's suggestion I put it in
    costing view, it is not working . Please give me suitable suggestions.
    Thanks in advance.
    D. Mallick

    Hi,
    I also need to add custom fields to Basic data view. After copying & changing the screen sequence in Config, I could able to see the custom fields in Basic Data view.
    I have appended structure with custom fields to MARA table.
    But the values I enter in the screen is not getting updated to the table MARA.
    Can you please let me know the code, I should have have in PAI (Process After Input) module in the Sub Screen to update the values?
    Thanks,
    Dasa

  • Missing fields in Purchasing View

    Dear all,
    We have got an issue like this.For our client we are using Workflow to
    create a material.For this we made a process like this .
    User1-Basic Data1&2
    User2-Sales Views
    User3 or User4-Purchasing Views.Both are having same roles in workflow.
    User5- MRP1,2,3&4 Views
    User6- Finance&Costing Views
    When we create a material,we are getting an issue in Purchasing View.
    In Purchasing View User 3 able to see all fields in Purchasing view.
    If User 4 tried to fill the data for this Purchasing View some fields
    are hidden,which we are not able to see.The missing fields are as
    follows.
    Purchasing Group,Plant-sp.matl status,Tax ind. f.
    material,Qual.f.FreeGoodsDis,Autom.PO,but both user3 and user4 share
    same roles in workflow.
    After that we had given SAP_ALL to User4 and tried to create a material
    using standard MM01,then also we are not able to see all fields in
    Purchasing View.But User 3 is able to see those fields through MM01 too.I have attached a document,please go through it.
    What would be the reason for this?Please suggest us possible
    solution,as soon as possible.
    Regards
    Ganesh.

    Hi,
    Option:1=>For user 3 and user 4 , problems in cretaion of material difference, Consult your Basis  Consultant.
    Option:2=>For hidden field,follow below steps( in user 3 , check and correct for user 4)
    1. Just click the tab ,(Which is hidden for user 4, in user 3 )and get the field name
    2.Go to T.Code: OMSR and enter that field name and get Selection Group in user 
    3.In USER 4,Go to T.code: OMS9 and select your material type and go to "overviews" .In the next screen, you can see your field selection Group, click that and you can make that field  required entry for User4 and save.
    Now try to create material in USER 4.
    Hope helpful to you and then reward.
    Regards,
    Biju K

  • SRM 7.0 New custom fields added to view do not appear in the component conf

    Hi
    I added two custom fields to the view V_QTE_DOFC_I_DESC of the WD componenet /SAPSRM/WDC_DODC_QTE_I_DS. This view gets called when bidder is trying to create a bid and clicks on add Substitute Item in the Item tab. This view is simply a popup window where we can enter ther substitute item.
    I added two custom fields to the context of the above view and placed on the layout of the view as input fields. Then I tried to modify the component configuration /SAPSRM/WDCC_DODC_QTE_I_DS_SUB. When I look in t he web dynrpo built-in for the view V_QTE_DOFC_I_DESC, I don't see the custom fields that I just added. As a result, these custom fields are not displayed when I try to substitute an item. Could anyone tell me how to brining in these two custom fields into the component configuration.
    Any help is greatly appreciated.

    Hi Prasuna,
    Sorry ..You are right..I was looking at some other WDC related to contract data..It you map the CUFs to /SAPSRM/S_CLL_CTR_ITEM which has the include structure INCL_EEW_PD_ITEM_CSF_CTR then it should work fine.
    If you do this, are you able to view the new fields on the screen?
    you mentioned that you are not able to save the data to the table.
    Include your fields in INCL_EEW_PD_ITEM_CSF as well because if you add CUF to any of those doc types, you also have to add those CUF to the global structure for CUF documents.
    Also Check if you fields are there in structures BBPS_CTR_CUF_ITEM,BBPS_CTR_UI_ITEM and BBPS_CTR_ITEM.
    Check whether you have implemented the BADI's like BBP_DOC_CHECK_BADI ,BBP_DOC_CHANGE_BADI and BBP_DOC_SAVE_BADI . check out the structures (whether they having the CUFS) used in those if you have implemented any of them .
    Regards
    Lavanya
    Edited by: LAVANYA CHAVA on Aug 25, 2010 10:10 AM

  • How can we change the input field on a view stop showing zeros

    Hello,
           To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
    Edited by: sap_learner on Mar 25, 2010 5:44 PM
    Edited by: sap_learner on Mar 25, 2010 5:49 PM
    Edited by: sap_learner on Mar 25, 2010 5:55 PM

    hello Manas Dua,
                           Thanks for your help. I am able to resolve my problem.
    My code will help  the future comers to resolve this kind of issues.
    *The code is applied to method WDDOINIT of the default view.
      DATA lo_nd_terms_input    TYPE REF TO if_wd_context_node.
      DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
      DATA lv_zeros             TYPE wdy_attribute_format_prop.
      lv_zeros-null_as_blank = 'X'.
      lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
      lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
      lo_nd_terms_input_i->set_attribute_format_props(
        EXPORTING
          name              = `ENTER THE ATTRIBUTE NAME`
          format_properties = lv_zeros     ).
    Edited by: sap_learner on Mar 26, 2010 5:02 PM

  • HOW to include a reference currency fields in a view ?

    Hello Experts,
    <b>I am having Currency fields error in generic extraction</b>
    I have table where I am trying to extract data to BW via generic extraction. When I tried
    to extract with the TABLE its giving me an error
    <b>Invalid extract structure template RPSCO of DataSource ZBW_REP3_TEST
    You tried to generate an extract structure with the template structure RPSCO. This operation failed, because the template structure quantityfields or currency fields, for example, field WLP00 refer to a differenttable</b>.
    Now I created a view with all the fields same as my table.
    But its still giving me the same error and taking all the fields as a primary keys. I have over 12 currency fields in the table. I am confused how to fix this issue and add a currency field to my view?
    hOW to include a reference currency fields in a view ?
    All inputs are much appreciated.
    Thanks and Regards,
    Harish

    Thank you for your responce,
    Can you please check my view and let me know where I am going wrong     
    View    Table   Field  Dataele  Data
    field                    type                                            0                                                                
    WLP01     RPSCO     WLP01     BP_WPL     CURR     15     Period value in ledger currency
    WLP02     RPSCO     WLP02     BP_WPL     CURR     15     Period value in ledger currency
    WLP03     RPSCO     WLP03     BP_WPL     CURR     15     Period value in ledger currency
    WLP04     RPSCO     WLP04     BP_WPL     CURR     15     Period value in ledger currency
    WLP05     RPSCO     WLP05     BP_WPL     CURR     15     Period value in ledger currency
    WLP06     RPSCO     WLP06     BP_WPL     CURR     15     Period value in ledger currency
    WLP07     RPSCO     WLP07     BP_WPL     CURR     15     Period value in ledger currency
    WLP08     RPSCO     WLP08     BP_WPL     CURR     15     Period value in ledger currency
    WLP09     RPSCO     WLP09     BP_WPL     CURR     15     Period value in ledger currency
    If I add a
    Table TCURC against any field what would be the view field and data element
    Do I need to tick MOD?
    Please suggest.
    Kapadia,
    If I do that its still taking all the fields are a primary keys and bringing 6 lakh records to where I originally have 49 records in a table
    Thanks and Regards,
    Harish

  • Enable input fields in a view container

    Hi,
    I have inserted a view in another view's view container.
    But the input fields are disabled.
    can anybody tell me how to enable them?
    readonly property is set to false...

    Hi..
    This situation may arise when the attributes (mapped to the input field in the view) are mapped to the interface controller via the component controler and the IsInputElement property of the node in the interface controller is set to True.
    In this case you cannot change the cardinality of the node from the component controller also.
    If this is the case, try by removing the interface controller and component controller binding.
    Regards,
    Sayan Ghosh

  • Manipulating fields in a view

    I have a table with a date and a time and I really need that data in a datetimestamp format.  I'm trying to avoid creating a custom table and a custom program to get this information that already exists in this table.
    If I put the data in a view, is there any way to perform calculations on the fields and show that as another field in the view?
    I've got a view partially set up, but I just don't see a way to manipulate the fields to that degree?
    Or any other way to do this without creating a custom table with the right field type and a program that converts the data from one to the other?
    Thanks for any help.

    Within the view?
    Let me restate my question, because I think we're all confused.
    I am looking at the table PEVSH.
    I need to use a few fields from this table, including the date and time, but I need that together in a timestamp format, not in two seperate date and time fields.
    Is there a way to create a view of PEVSH that displays those two fields together into a timestamp field?
    I'm not seeing how I can use a maintenace generator to do that if I don't have the field.  The same with the edit mask, there's no field to put the edit mask on.
    If I can't do it in a view, is there a way, if I create a custom table, to have lines inserted into it everytime PEVSH is updated?
    I'm happy to award points for helpful answers, but please consider my total problem when answering.  Thanks.

  • Add field to a view

    HI All,
    I need add the field IDTYPE to view BP_EMPL_SEARCH.
    WHAT ARE THE STEPS TO DO SO?
    well as possible detailing the steps because I'm new to crm
    Thank you very much

    Hi,
    Can you please explain your requirement, do you want to search contact's by identification types?
    If that's the requirement let me know will explain in detail how to enhance contact search by bp identification number's..
    Cheers,
    Sumit Mittal

  • Not able to display the values in the input fields of the view

    Hi All.
    I am facing an unique issue.
    My custom element created in my custom node getting a null value
    from a Get Vendor Details RFC written in RFC.
    The values are getting populated in the custom element but not coming in the
    input field of the corresponding view.
    Then, I wrote this code
    wdContext.nodeCustom.setLeadSelection(1);
    and all the output came in the input field.
    Now, after a build it is not coming in the input fields of the view.
    All my custom nodes are Singleton and values are coming in the custom elements
    as I can print them by wdComponentApi.getMessageManager.reportSuccess(""+customnode.getField());
    All my nodes are Singleton.
    Please give your valuable inputs.
    Regards
    Kaushik Banerjee

    Hi
    Check the node property
    initializeLeadSelection     true
    if not make it true , I would suggest to make a value node of the same structure as in RFC after execuation of the RFC populate the value manually.Dont bind it directly to the UI element.
    BR
    Satish Kumar

  • How to hide fields in table view

    Hi,
    I'm populating the contents of an internal table in a table view. I want to know how to hide few fields in table view. I'm working on classical BSPs.. no MVC and I have not used iterator.
    Thank you
    Sreesanth.

    just to hide certain fields (columns) you dont need iterator. you could use columnDefinition attribute of htmlb:tableView tag.
    to do this declare two page attributes as below
    col_control_tab     TYPE     TABLEVIEWCONTROLTAB
    col_wa     TYPE     TABLEVIEWCONTROL
    now in the oninitialization event. fill col_control_tab with the required column details.
    suppose the itab has columns 1 to 10 and you want to display only column 1 and 8 then the coding would be.
    clear col_wa .
      move: '1' to col_wa-columnname , " field name of column1 in itab
      'This is the title of column1' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment  .
      append col_wa to col_control_tab .
    clear col_wa .
      move: '8' to col_wa-columnname , " field name of column8 in itab
      'This is the title of column8' to col_wa-title ,
      'LEFT' to col_wa-horizontalalignment  .
      append col_wa to col_control_tab .
    the finally
    <htmlb:tableView id                  = "tv1"
                           design              = "ALTERNATING"
                           selectionMode       = "MULTISELECT"
                           onRowSelection      = "MYROWSELECTION"
                           table               = "<%= flights %>"
                         columnDefinitions   = "<%= col_control_tab %>"
    Regards
    Raja

  • How to populate read only input field or text view form value help only

    Hi experts,
    I have one requirement to populate a read-only field or text view from value help.
    User cant put any value there.value comes only from the value help.
    For example,
    when we read context using Code Wizard,we cant type any value there.value only comes from value help.
    How to implement that functionality?
    Please reply.
    Thanks in advance,
    Subhasis.

    Yes it is possible.
    1.Create a context Attribute and then bind this attribute to the Text view UI element.
    2. read context attribute and then set value to the context attribute like this way.
    DATA:
        elem_context1                        TYPE REF TO if_wd_context_element,
        stru_context1                        TYPE if_first=>element_context ,
        item_potxt                          LIKE stru_context-potxt.
    get element via lead selection
      elem_context1 = wd_context->get_element(  ).
    stru_context1-potxt = 'PO'.
    elem_context1->set_attribute(
        VALUE  = stru_context1
        name   = 'POTXT'
    thanks
    Suman
    Edited by: suman kumar chinnam on Sep 9, 2008 12:12 PM

  • MM - Material master data - move standard field to another view

    Hi everyone,
    ÉCC 6.0 - release 7.0.
    I've been adding many custom fields in Material master data MM01/02/03. Now I got a problem because we have to use a standard field in another view.
    The field MARA-HERKL is set up to 'SV'(attribute V_130F-PSTAT):
    Warehouse management = S
    Sales = V
    I want to add 'K - Basic data' in this field's attribute at OSMR Tcode , but this attribute is disactivated. I can not change this value.
    I've check this note 306966 that mention: You cannot create new entries and delete entries in client 000. This client contains only the entries delivered by SAP which are used for distinguishing customer-specific fields and SAP standard during the maintenance of the other clients.
    Is there any problem whether I delete this field and afterwards create it with the new values?
    I'm not in client 000. So, I want to just make sure I will do a legal change.
    thank you in advance,
    Alexandre

    None tips, Closed.

  • Adding field in Maintenance view of table

    Hi,
    I am trying to create a custom maintanable table.  Now the requirement is I need to add one more extra  field in the maintenace view of the table which should not be in the table fields and is for display only in the maintencae view.
    I tried adding a cloumn by editing the screen program generated by the table maintenance generator. I get the the display in the maintenance view of that extra field. But I dont get the values populated.
    Can you please let me know in which PBO or PAI i should write the module programe ..
    Help will be rewarded with points.

    Hello Bluesh
    Normally the extra field should be from a table that has a foreign-key relationship to your main table. Thus, add this additional table to the list of tables for the view. If it does not have a suitable relationship you cannot add it to the list of tables.
    Afterwards add the required field to the list of view fields and set its property to 'R' = read-only.
    If correctly defined there is no need at all to modify the screen(s) or the coding of the PBO/PAI modules.
    Example: your z-table contains field KUNNR (value table KNA1) and you want to add the NAME1 field to your maintenance view
    add table KNA1 to the list of tables
    add field NAME1 to view fields
    set its property to 'R'
    regenerate function modules and screens
    Regards
      Uwe

Maybe you are looking for

  • How to pass a Variable value into an ODI Scenario from ODI Package

    I have created an Interface that uses the variable #ENTITY_ID for retrieving entity data from the DWH; now I have generated a Scenario from the interface and placed the Scenario in an ODI Package; am not sure how to pass the #ENTITY_ID variable to th

  • LaCie D2 Firewire 800 drives not mounting.

    Hi guys, After an OS upgrade to 10.5 I can't mount any Firewire drives to desktop. In fact, they're not even listed in System profiler, the message "*Warning:Unable to list FireWire devices*" comes up in Firewire bus section. They worked fine under 1

  • Need to reinstall mountain lion from snow leopard

    i was using mountain lion before my hard drive went bad and had to replace it. however, snow leopard is the only OS disc i have so that's what i used to reboot the computer once i replaced it. how do i now reinstall mountain lion back to this compute

  • How to convert Infopath forms into pdf or word ?

    I have an urgent requirement. I need to covert approx 50k infopath forms into pdf/word. Is there any way to convert it without using a third party software? Is this possible via Powershell script ? 

  • Airport way better on Powerbook than on G5

    I am using the Airport for both my G5 (new) and my Powerbook G4 (couple years old). The G4 is so slow at loading that often the page load times out. I have gotten to the point of using my laptop for internet use. I am so frustrated with the new syste