Mandatory filling of BP Account table view

Hello everyone,
I'm an abaper but my CRM experience is next to nothing yet and I
could use some help with this:
On our business account information page for a business partner, besides showing his main info, name, telephone, group ,etc, you can see below a group of table views like addresses, oportunities, marketing atributes, etc,
one of which is their Tax Number information.
Our CRM consultant defined which views where to be shown, and everything works ok.
Now i've been asked to enhance this functionality when creating or editing the BP information:
The Tax Number View must have mandatory filling. If the table is empty, an error must be shown.
I've had a look at the controller class CL_BP_DATA_ACCOUNTTAXNUM1_IMPL, i've set breakpoints on the ON_PREPARE_OUTPUT and EH_ONINSERT methods, using an example where there's an actual tax number filled properly, but i can't figure out how to obtain it's values, nor if it is empty or not, for that matter.
I also figured i have to implement this validation by redefining the ON_SAVE method, without any certainty though.
Thanks in advance for any comments,
Duarte.

Duarte,
You are very right that you need to have code in the method EH_ONSAVE of the BPHeadOverview view controller.  Here you just need to find out that the relevent fields have been filled or not. To do this, you need to read the context nodes of the tax number view. It should be something like this
lr_entity type ref to cl_crm_bol_entity.
lr_entity = me->typed_context->CONTEXTNODE->get_current().
now the LR_ENTITY has the information about your tax no and we need to read this to see that the tax no is populated.
If it is not, we need to throw an error message using the method ADD_MESSAGE of class CL_CRM_GENIL_GLOBAL_MESS_CONT.
Let me know if that helps.
Regards
Prasenjit

Similar Messages

  • How to make a field Mandatory in a Table view?

    How to make a field Mandatory in a Table view?
    The requirement is, the user should not be able to append a new Row, unless and untill he enteres the data in the column SOLD-TO. Now how do i acheive making this field madatory. Normally in Edit form view, we can go in customizing and flag Mandatory, for table view we don't have this option.
    Please can anyone of you guide me in this approach?
    Jagadish.G

    Hi Jagadish,
    have a look in this thread, part of the code you can use in eh_insert method or logic to write enable/disable insert button.
    Re: Assignment Block Mandatory
    regards
    Ismail
    Edited by: Ismail Shaik on Oct 21, 2009 11:36 AM

  • How can I create a Table View in Cocoa Applescript?

    This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
    Perhaps something like:
    myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
    I would appretiate any responses and brief descriptions on the matter.

    You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
    Apple_For_The_Win wrote:
    At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
    I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
    I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
    open the applescript app delegate and add a new property called "tableController"
    select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
    select the array controller in the object list
    rename the array controller "table data"
    open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
    open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
    select the table view in the object list again, then go down a level and select each column in turn
    for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
    back in the applescript app delegate, add code like the following:
      -- create a list of records, where each record represents a row and the column name is the record key
      set myData to {{column_1_name:"hello"}}
      -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
      set my tableController to NSArray's arrayWithArray:myData
      -- may or may not be needed
      myTableView's reloadData()
    That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

  • Table view in EHP1 CRM 7.0

    How to create a table view in ehp1 CRM.
    Is it the same way by creating a view and adding value node /model node then selecting view as table view with congigurable mode?

    Hi Anita,
    As per your requirement, AET table enhancement will be best suited to it.
    Use the help.sap.com link i gave in earlier reply to know more about  AET table enhancements.
    Now to get on to this task ,
    1) Use transaction AXTSYS and create an entry for Z component, give a name say ZAET_TBLEXT.
    and Save. The AET Table extension, then will use this component by default( if you select the radio button there) to create the views. Remember, just give any name you desire for the component. You dont need to create this componenet. AET extension wizard will create the component automatically.
    2) Open the overview page on which you would like to have the tableview as an assignment block. Since its a compititor info, i assume you want to place it on a BP/Account/Prospect. Competitor Overview Page or Opportunity Overview Page. Now chose the config button and once the Assignment blocks are highlighted, select the Header View( Compititor header or Opportunity header view depending on the overview page you are in) and config tool will open. Use the Display Enhancement button or create enhancement button and another popup will open which display the enhancements if any,
    3) On this Pop up you will see the AET table extensions assignment block. Use the Add table button. Follow the wizard and create the table, mention fields, translations etc. Also mention it as 1:n relation and so the table view. Chose the Standard buttons so you get all action buttons as well as inser, editlist, delete buttons etc.
    Once done, save and generate. This creates the view and also adds the component usage on overviewpage.
    Now all you need to do is just configure the overviewpag to pull the new tableview assignment block from Available to Displayed blocks.
    Note :
    1) this creates a Ztable , name same as mentioned/defaulted while AET table enahncement
    2) this create Z BOL entity with 1:n relation with Access Entity of OverviewPage , for example, BuilHeader if account overview page or BTAdminH if Opportunity overview page.
    3) creates BOL strucutre, handler class etc on its own.
    4) You do not need to do any coding,
    Thus in half an hour, you are done with Table view enhancement with Z table based entities.
    Before EhP1, we had to extend the BT/BP model with ZBOL and had to do a lot of thigs on our own. Almost 2 days job for an advance developer which is reduced to 15-20 minutes with zero coding required.
    If you have a sandbox or IDES system, i would recommand you to try it there frst, get confident and then do development on your development system.
    Remember ->
    1) AET Enhancement tool has to be started from WEB UI - which is generally runs on Customizing client, but creating AET table and enhancements is Workbench task. So if your customizing client is locked for workbench developments, then You must run the WEBUI on your workbench client ( use transaction wui ). It does not make any difference as far as development is concerned because your development its pure Workbench activity. later, you configure the Overview Page to pull the AET table view on your customizing client.
    2) Be confident and have well determined about the table design & about your table view design like the fields you need etc. because once you add the fields and mention the field type like Numeric, indicator,text etc, you can not change it later once the Tableview is generated. You can add more fields later and you can delete fields too but you can not change their type later.
    All the best.
    Thanks & Regards
    Suchiita
    Edited by: Suchita Phulkar on Jul 30, 2011 12:16 AM

  • Add data to table view from input fields in a page

    Hi
            I am developing a BSP page which will be called from SRM shop transaction. After user enters the line item data, data will be passed back to shop transaction using OCI interface and the page attributes (URL).
       (1) How can I add data from input fields to table view on a page on a button click? I am able to add first line but I could not retain first line data when I try to add the second line.
          I am able to add multiple lines to table view if I use view and controller by adding to the line data to static attribute of the controller. I can’t use the controller and view because I can not set the attribute to Controller automatically.
       (2) Is there a way to pass an attribute (URL) to controller from SPRO? Like we pass an attribute to page automatically (Automatic page attribute).
       (3) How can I call a controller and view and pass the page attribute to the controller on a button click from a page with out controller?
    Thanks
    Sreenivas

    I'm trying to test the merge with the following data in a test.txt file:
    ZZZZZ114923000004
    1234Z400660000001
    ZZZZZ114923000010
    Getting an error:
    SQL> @C:\dataformats\sql\pc12seriesMerge.sql
    Directory created.
    SP2-0552: Bind variable "17" not declared.
    SQL>
    here it the pc12seriesMerge.sql file
    set serveroutput on
    create or replace directory user_dir as 'c:\dataformats\incoming\';
    DECLARE
    v_filename VARCHAR2(100); -- Data filename
    v_file_exists boolean;
    v_file_length number;
    v_block_size number;
    f utl_file.file_type;
    s varchar2(200);
    lineString varchar(200);
    v_account varchar(5);
    v_IDN varchar(6);
    v_quantity varchar(6);
    BEGIN
    v_filename := 'TEST.TXT';
    DBMS_OUTPUT.PUT_LINE(v_filename); --shows filename
    utl_file.fgetattr('USER_DIR', v_filename, v_file_exists, v_file_length ,v_block_size );
    IF v_file_exists THEN
    dbms_output.put_line('File Exists');
    create table ext_table (
    account varchar2(5),
    idn number(6),
    quantity varchar2(6)
    organization external (
    type oracle_loader
    default directory user_dir
    access parameters (
    records delimited by newline
    fields (
    account position(1:5) char(5),
    idn position(6:11) char(6),
    quantity position(12:17) char(6)
    location ('test.txt')
    reject limit unlimited;
    MERGE INTO id_req_stg t
    USING (
    SELECT account,
    idn,
    decode(quantity, '-', 0, to_number(quantity)) as quantity
    FROM ext_table
    ) v
    ON ( t.account = v.account AND t.idn = v.idn )
    WHEN MATCHED THEN
    UPDATE SET t.quantity = v.quantity
    DELETE WHERE t.quantity = 0
    WHEN NOT MATCHED THEN
    INSERT (account, idn, quantity)
    VALUES (v.account, v.idn, v.quantity);
    ELSE
    dbms_output.put_line('File Does Not Exist');
    END IF; -- file exists
    EXCEPTION
    WHEN UTL_FILE.ACCESS_DENIED THEN
    DBMS_OUTPUT.PUT_LINE('No Access!!!');
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE('PATH DOES NOT EXIST');
    WHEN others THEN
    DBMS_OUTPUT.PUT_LINE('SQLERRM: ' || SQLERRM);
    END;
    /

  • Edit mode in a table view with value node

    Hi experts.
    I'm trying to create a table view. This table is based on a structure that is filled with data with a RFC function module retrivening the data from another system.
    The problem is that i'm unable to set it editable. There is for exemple a check box that i need to check / uncheck, but the field is always read only. We don't even go through the method get_i_.
    In the do_prepare_output of the view, i have checked, as below, the view is in edit mode, but still i can't do anything.
    *DAtA lv_str type abap_bool.
    *lv_str = me->view_group_context->is_view_in_display_mode( me  ).
    Any ideas why ?
    Thanks for your time and help.
    Regards.
    AW

    Solved by sending X in IV_ALL_ROWS_EDITABLE.
    cl_thtmlb_util=>translate_selection_mode(
      exporting
      iv_selection_mode    = NODE->SELECTION_MODE
      iv_all_rows_editable = 'X'
      importing
      ev_selection_mode   = lv_cellerator_selectionmode
      ev_edit_mode        = lv_cellerator_editmode
      ev_selection_column = lv_cellerator_selectioncolumn ).
    Edited by: aw_crm on Jun 16, 2011 10:02 AM

  • How to create variant for table/view ?

    Hi,
    When I go through SM30, I find a radio button called variant. I don't know the effect.
    Can anyone tell me how to create variant for table / view ?
    I want to know when we need to create variant for table/view.
    Best regards,
    Chris Gu

    hi ,
    Whenever you start a program in which selection screens are defined, the system displays a set of input fields for database-specific and program-specific selections. To select a certain set of data, you enter an appropriate range of values.
    For further information about selection screens, refer to Selection Screens in the ABAP User's Guide.
    If you often run the same program with the same set of selections (for example, to create a monthly statistical report), you can save the values in a selection set called a variant
    Procedure
    To create a new variant:
           1.      On the ABAP Editor initial screen, enter the name of the program for which you want to create a variant, select Variants, and choose Change.
           2.      On the variant maintenance initial screen, enter the name of the variant to be created.
    Note the naming convention for variants (see below).
           3.      Choose Create.
    If the program has more than one selection screen, a dialog box for screen assignment appears. The dialog box does not appear if the program only has one selection screen. The selection screen appears in this case.
           4.      If there is more than one selection screen, select the screens for which you want to create the variant
    5.      Choose Continue.
    The (first) selection screen for the report appears.
    If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them and to fill the fields with values. If you keep scrolling forwards, the Continue button appears on the last selection screen.
           6.      Enter the desired selection values, including multiple selection and dynamic selection.
           7.      Choose Continue.

  • 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 color a table view header's text via css

    I have managed to change font-name, background and text alignment of my table view header, but the text-fill line is just ignored! What's the correct way to do this?
    Example:
    .table-view .column-header, .table-view .filler {
    -fx-text-fill: white;
    -fx-font-family: "Helvetica";
    -fx-font-size: 10px;
    -fx-font-weight: bold;
    -fx-size: 25;
    -fx-border-style: solid;
    -fx-border-insets: 0 1 1 0, 0 0 0 0;
    -fx-border-width: 0.083333em, 0.083333em;
    I also added:
    .table-view.column-header.label{
         -fx-text-fill: white;
    Wich was recommended on a site, but didn't work either..

    I think you need
    .table-view .column-header .label{
      -fx-text-fill: white;
    }(with spaces between the class selectors).

  • User Exit / BADI for MIRO in order to Fill G/L Account Automatically

    Hello!
    Recently I've got a request asking me to fill the G/L Account table control in MIRO transaction using an User Exit or BADI. I'm able to find all the information needed to complete this task, but can't seem to find a way to insert that data in the G/L table control. They want this data uploaded as soon the user inserts the PO number and loads everything. Is this possible?
    Thanks in Advance
    Regards,
    Moises Franco

    Hi.
    Find appropriate place in code to realize your task
    and insert GL data using corresponding BAPI.

  • Help needed in pushing data into Table view Popup

    Hi All,
    I am trying to create a custom pop up and populate this with Reason code and descriptions. For this, i have created a popup and placed a table view on the popup. But when i am stuck how to push data into the popup from an internal table.
    Any pointers on this will be really helpful.
    Regards,
    Udaya

    Hi,
    Even I am facing the similar issue.  I have created custom component with four views for my requirement and created one view set and displaying the viewset in the pop up screen.  I also created event handler and added required coding to open the pop up screen.
    I have added event handler in BT116H_SRVO component and now the pop up is opend with the required fields but the field is not having any data the value is empty in the pop up screen.  I also binded context node details in the standard component.
    While debugging I found that the collection wrapper is empty, so the data is not populated in the pop up screen.  So kindly hlep me how to fill the collection wrapper and populate data inside the pop up screen.
    kindly let me know how to overcome this issue. 
    Thanks and Regards,
    Kannan.

  • How to access tables/views of an external database provider..

    After much trouble I finally managed to setup a second Database Provider that doesn't display the "0 out of 0 connections are good" error by filling in the "Configuration Class" field with "intradoc.server.DbProviderConfig".
    But now the problem is actually accessing the tables/views in my newly configured external database provider...
    In the Configuration Manager applet when I try to add a new Table or View it only lists the tables contained in the schema of the SystemDatabase database provider (the original one), I've tried running Queries via components trying stuff like SELECT * FROM provider_name.table_name and other similar but obviously it doesn't work...
    So... with that said, I just want to know how I access tables or views in my "supposedly" well conected (15 out of 15 connections are good, no errors on the Test Query) Oracle external Database Provider - After searching I was unable to find any information regading any post-provider-setup actions in the Content Server documentation - Does anyone know how to do this?
    On a side note, if the database is SQLServer instead of Oracle, with the same configuration and apparently no errors on the database side (other clients access it well) the Query Test of the new database provider returns the following error:
    "The provider 'TestSqlSrv' is in error. Unable to create database connection for JDBC:ODBC:SqlSrv. Unable to create result set for query 'select * from dummy'. Invalid Fetch Size Unable to create result set for query 'select * from dummy'. Invalid Fetch Size java.sql.SQLException: Invalid Fetch Size".But I won't even go there yet.... for now I would settle with just knowing how to reference information in the Oracle external database provider...
    Message was edited by:
    user602700

    if you are able to, pick up Bex Huff's book the Definitive Guite to Stellent Content Server Development (amazon link: http://www.amazon.com/Definitive-Stellent-Content-Server-Development/dp/1590596846/ref=sr_1_1?ie=UTF8&s=books&qid=1196365101&sr=8-1)
    chapter 11 is all about this.

  • Modify a Table View Header

    I need to modify the header of a tableview and I've tried this:
    .table-view {
        -fx-background-color: rgb(70,70,70);
        -fx-text-fill: white;
        -fx-border-style: solid;
        -fx-border-color: transparent;
    /*    -fx-border-insets: 0 1 1 0, 0 0 0 0;*/
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header{
        -fx-border-style: solid;
        -fx-border-color: rgb(130, 130, 130);
        -fx-border-radius: 5px;
        -fx-background-radius: 5px;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header .label{
        -fx-font-size: 12px;
        -fx-text-fill: white;
    .table-view .column-header-background {
        -fx-background-radius: 5px;
        -fx-font-family: "Calibri";
        -fx-background-color:  rgb(50,50,50);
    }However, I can not edit any table header but only the headers of each column.
    Sorry for the English and grammatical errors. I am Spanish speaking
    I put an image to make it more clear
    http://img823.imageshack.us/img823/49/tableexample.png
    Edited by: biochemistry43 on 30-oct-2012 13:17

    It is there in the CSS documentation, though it's not really very easy to pick out. See http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tableview and look at the section called "Substructure".
    I'm not claiming that I get everything I need to know from the CSS docs, though. I often need to look at the default stylesheet, caspian.css, which you can extract from the jfxrt.jar file (it's at com/sun/javafx/scene/control/skin/caspian/caspian.css).
    Edited by: James_D on Nov 5, 2012 6:10 AM (fixed path for caspian.css)

  • Reg Issues in table View

    Hi Experts,
       I have few questations in tableView(not using MVC). I am using simple forms with flologic and iterators.
    1. In table View I have around 12 to 15 columns and occuping fill screen with scroll bars.

    Hi Ray,
    For your second question
    In one of my tableview I have a DDLB in a column,based on value selected in this DDLB , the next two columns that are inputfields are enabled and disabled.
    The code in render cell start is:
    when 'ZZREQUIRED'. <--DDLB
            if p_edit_mode is not initial.
              data: required type ref to cl_htmlb_dropdownlistbox.
              required = cl_htmlb_dropdownlistbox=>factory( id = p_cell_id
                                                         table = m_required_ref
                                                      selection = m_row_ref->zzrequired
                                                      ons elect = 'required'
                                                      nameofkeycolumn = 'NAME'
                                                      nameofvaluecolumn = 'VALUE' ).
              p_replacement_bee = required .
              reqtype = required->selection .<--Read the value selected in DDLB
            endif.
    when 'ZZENDDA'. <--Inputfield baesd on selection in DDLB
    data: obj_fr_zzendda type ref to cl_bsp_find_and_replace,
                  obj_zzendda type ref to cl_htmlb_inputfield,
                  obj_bee_zzendda  type ref to cl_bsp_bee_table.
    if p_edit_mode is not initial.
    if reqtype = 'FROM' or reqtype = 'ON'.
                clear : find , replace .
                concatenate '<input on Cha nge=isitToday(this.value,"' p_cell_id '");' into replace .
                find = '<input' .
                replace = replace.
                obj_fr_zzendda = cl_bsp_find_and_replace=>factory( find = find
                                                                    replace = replace
                                                                    mode =  `FIRST_OCCURRENCE` ).
                obj_zzendda = cl_htmlb_inputfield=>factory( id = p_cell_id type = 'date' showhelp = ' ' disabled = 'true' ).
                obj_zzendda->value = m_row_ref->zzendda.
                create object obj_bee_zzendda.
                obj_bee_zzendda->add( level = 1 element = obj_fr_zzendda ).
                obj_bee_zzendda->add( level = 2 element = obj_zzendda ).
                p_replacement_bee = obj_bee_zzendda.
              endif.
              clear reqtype.
            endif.
    Where reqtype is defined in attributes as Instance Public String
    Similarly you can read the value of one column in your tableview and enable or disable all other fields in that row depending on its value.
    Regards,
    Anubhav

  • XSD from Database table/view/procedure

    Hi all,
    Does anyone know of a tool or framework which enables generation of XSD's out of a Database table/view/procedure?

    Hi Naval,
    It depends on whether you created a BOL model for your Z-table or not. If you don't have a BOL model, then all you can do is use a value node. In that case, you need to add attribute that you want to show in the value node, read the values from the z-table and add them to the node. You can create method(s) in view implementation class to read values from database table and fill the context node. From where these methods should then be called will depend on your requirement.
    Regards,
    Shiromani

Maybe you are looking for

  • Processo de cancelamento de Nota Fiscal

    Pessoal , bom dia! Mais uma vez estou aqui solicitando um help. Estamos em produção e nos deparamos com uma situação inusitada de processo de negócio. Emitimos 2 notas fiscais de serviços e uma ORB indevidamente. As duas notas de serviço passaram par

  • Call Java in ABAP?

    Hi, When I want to call a function module in Java I use JCO. Is there also a way to "call Java code" in ABAP? Bye, Chris

  • Is my iphone is unlocked???

    i went to the apple store yesterday and i got a replacment iphone 4 and the man who helped me out just gave me the phone without setting it up or anything. okay so when i went through the set up is asked me to pick a carrier it listed verizon sprint

  • Looking to upgrade PowerBook G4 (15-inch 1.5 1.33GHz) Hard drive.

    The hard drive crashed it was an 80GB apple model that is the biggest that originally came with the. powerbook. I was wondering if it is wise to put a larger one and if so which type can I order IE... how big data storage and type IEE etc. Thanks

  • Convert colour images to grayscale images & get pixel data from them

    Is the code below correct to convert colour images to grayscale images in Java? public void convertToGrayscale (String sourceName,String destName) throws Exception { JPEGImageDecoder decoder=JPEGCodec.createJPEGDecoder(new FileInputStream(sourceName)