MVC Tableview Data Entry

Hello,
I am using mvc design pattern for my bsp application.
Could you please provide me some direction as to how to create a view that will allow the user to maintain master data (insert, update, delete, select) using htmlb extension table view?
Thanks,
Partho

Hi Partho,
Here is the flow...
1. User clicks on the insert radio button.
2. The control goes to the controller from the view.
3. In the controller you will call insert view page.
Now...
Insert View has an internal table as a page attribute which will hold the database records.
In <b>DO_REQUEST method</b> method...
append a blank line into the internal table.
<i>(This will be used by the user to insert the values into the internal table.)</i>
Populate the internal table from the database...
Now the internal table has a blank line followed by records that are already present in the internal table.
Now the user sees a page containing the table view along with the save button.
Now when the user clicks the blank line then in the <b>iterator</b> use the below code
when 'REVW_CODE'.
IF p_edit_mode IS INITIAL.
p_edit_mode is not initial if the user selects a row from the table view.
First you have to indentify that user has clicked the blank line. For this you can use
if c_row_ref->REVW_CODE is initial
or alreay generated value, etc.,
Now you have two options...Since this is a primary key you can automatically
generate a primary key or leave it to the user. If your table is a foreign key table then you can
replace this cell to a drop down list box. the drop down list box contains the values from
the primary key table
endcase.
After user enters all the values....
He clicks Save button.
Now in <b>DO_HANDLE_EVENT</b> method
1. Catch this button event...
2. In the controller you can get the values that are present in the table view using the method...
GET_CELL_VALUE of cl_htmlb_event_tableview Class.
3. Check if the primary key value already exists in the database.
4. If yes. Show the user an error page with a back button. when he clicks it he will again reach the insert view page.
5.If no. Populate the user values into a work area.
6.Modify the internal table at index 1 from the work area.
7.modify the database table from the internal table.
8.Show a success page with a back button which will go to the main page with the radio buttons...
Hope it helps.
Regards,
Maheswaran.B
Message was edited by: Maheswaran B
Message was edited by: Maheswaran B

Similar Messages

  • Upload data from excel file to "Fast Data Entry" in FB60

    Hi,
    I have a requirement from users, they want to load data of G/L accounts items in FB60 using "Fast Data Entry" from an excel file.
    I did some research and found out that the framework to transfer clipboard data into an SAP table(http://www.synactive.com/examples/example0016.html) seems to be the suitable solution.
    However, I still cannot make it work.
    Do you have any suggestion for my case ? How can I load data from an excel file to the transaction FB60?
    Thanks in advance,
    Hung

    Dear Hung,
    You can upload data through LSMW (Batch Input).
    But you need to convert your excel sheet into CSV format or txt format.
    Please take help of your ABAP team if required.
    This will accommodate your requirement.
    Regards
    Saurabh

  • How to select a single row in a report for data entry?

    Hello All, and Greetings.
    I am a newcomer, with no experience in Apex, and in need of help.
    I have to generate a report with some read-only columns and two write columns. These will be the result of a SQL query.
    For the sake of robustness in data entry, a row has to be selected prior to data update. The document specifies that a radiobutton for each row be present, and the corresponding row selected accordingly by clicking its radiobutton. There could be any number of rows returned in the report, which means that the number of radiobuttons will vary dynamically according to the number of returned rows.
    1. So my question is, how do I construct the page to do this? Please remember I am a newbie, so detail will be appreciated.
    2. Another question is, how do I change the fonts and colours of the names displayed along with the listboxes?
    Thank you very much for your attention. Any help will be warmly received.
    With regards,
    Arindam.

    You may find this article useful: http://balusc.blogspot.com/2006/06/using-datatables.html
    P.S: please don't reply with "but I cannot read and write code, I can only drag'n'drop!".

  • Open data slice for data entry and close afterwards

    Dear all,
    I have created one data slice for a characteristic combination country xy in order to prevent the data entry within the data entry query for the user. But for some reason I have to run a planning function in order to summarize some values and write a total value in the characteristic e.g. country xy.
    The planning function brings out an error message because this can not be executed due to the fact that this combination is protected.
    Is there a way to open the data slice before the planning function is writing the data in the cube? I have tried to to this in the Data slice exit, but I do not have an idea how to open the DS, save the data and close the DS again.
    We are running NW BI 7.0. Any ideas would be great.
    Best regards,
    Stefan from Munich/Germany

    I did something like this by creating an FM and calling that FM from a FOX function. I think you will have to use three commands to execute three functions one after the other (and not combine them in one planning sequence) - first one will switch off the data slice, next will be your planning function containing the logic, and the last will switch it back on.
    The FM would be something like below:
    FUNCTION Z_SWITCH_DSLICE.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_INFOPROV) TYPE  RSINFOPROV
    *"     REFERENCE(I_DSNR) TYPE  RSPLS_DSNR
    *"     REFERENCE(I_STATUS) TYPE  I
    *** This function imports the name of a real-time Infoprovider and a Data Slice number
    ***        and a parameter I_STATUS. If I_STATUS is 1, data slice is activated
    ***        If I_STATUS is -1, data slice is de-activated
    data wa_ds type rspls_ds.
    select single * from rspls_ds
            into wa_ds
            where infoprov = I_INFOPROV
              AND objvers = 'A'
              AND dsnr = I_DSNR.
    if I_status = 1.
       wa_ds-used = 'X'.
    elseif I_status = -1.
       wa_ds-used = ''.
    endif.
    update rspls_ds from wa_ds.
    ENDFUNCTION.
    The Fox code will be like below -
    CALL FUNCTION Z_SWITCH_DSLICE
        EXPORTING
           I_INFOPROV = <infoprov name>
           I_DSNR = <Data Slice Number>
           I_STATUS = <0 or 1>.

  • How to use the same variable value for data entry and the planning sequence

    Hi,
    the scenario is the following:
    Using the WAD template a user enters cost center plan data. The cost center is selected by the chosen value for the variable "V1".
    Afterwards he shall push a button which starts a planning sequence (including saving the data and further functions). This planning sequence uses a filter that also contains the variable "V1".
    What or where has it to be defined that the planning sequence uses automatically the same value for the variable "V1" as selected for the data entry?

    You have to define in the planning function. The planning sequence is only a sequence and it read the planning functions underneath it.
    Ravi Thothadri

  • First Day of Week in Data Entry Profile

    Does anyone know if there is a standard SAP RFC i can use in my Web Dynpro application to get the First Day of Week entry in a user's Data Entry Profile?
    Thanks,
    -Kevin

    Hello Kevin,
    Function Module returns the System Date from that SAP System(R/3). I have checked this BAPI with '200743 - current week' GET_WEEK_INFO_BASED_ON_DATE, it returns proper data like Start Date and End Date.
    I Assume, you are using this in your Java WD. You can write your own function for this. This will return the day of the week.
    Calendar xmas = new GregorianCalendar(2007, Calendar.SEPTEMBER, 23);
    int dayOfWeek = xmas.get(Calendar.DAY_OF_WEEK);
    wdComponentAPI.getMessageManager().reportSuccess("Day : "+dayOfWeek);
    Note : - week starts with 0 . 0 - Monday 6 -Saturday.
    Regards,
    Sridhar

  • Data entry form problem - form in query-only mode

    Hi there,
    I am trying to create an data entry form to insert recordacross 2 out of 3 tables. The last of the four tables already have details and does not need to have record inserted into.
    This is the scenario, my four tables are Factory, Employee, Works_in. Works_in resolves a many to many relationship between Factory and Employee
    Now for a person to be employed in a factory, he must be assigned to a factory.
    I have a list of factories already in the database. After choosing a factory from the database, I want to insert records to do with his Fname, Lname, Hiredate bla, bla, bla to the Employee table.
    I have a single form with Factory as the master, and 2 tabs each for Employee and Works_in.
    After linking all my tables with the ability to choose a factory first on the master form from a combo box and after inserting records into the other forms, it says form running in query-only mode.
    What do you think?
    Many thanks in advance.
    Cube60

    I think that's too much of the wrong information.
    It sounds like you have multiple forms. Are they Modal or Non-Modal?
    What code do you use to call the form that's not working?
    Does it work initially and then stop working?
    James.

  • Restricting data entry to a particular language in the form

    Hi,
    I created a multilingual form in which all the fields of the form are in a particular language . Now am trying to restrict data entry in the form to that language at the client side only . Say if it is a form in french, can we restrict the data entry to french only .  The approach i was trying to implement was adding a script against the change event of all data fields and see if the characters lie in the range of  the language unicode character set . But have not been successful in it yet . Can anybody help me find some way or provide any sample for it ?
    Thanks

    Hello, I'm German
    Probably you can restrict the characters used for text entry, so for example ü is allowed in the German form but not in French.
    But you will NEVER be able to restrict the users staying only writing French in French forms 100%.
    1) You sometimes, not often, do encounter letters that are not typical for the language. (Though it can appear in any kind of word, it's quite regular for names.)
    2) Let's say I fill the French form. I encounter a problem when I type in the word "Müller". This word wouldn't be French at all. The text will be delted and probably given an error message. Well... I learn out of this error message. Next time I'll type Mueller. ^^
    (I knew several pages were people were restricted to talk English by forbidding letters that were not used in English very often... That didn't stop us violating that rule. The only error that really bugged us wasn't the restriction in not using letters that don't exist in English but the "please don't swear or insult so." error that kept appearing for ex. when we used the German word for "that" (= "dass"). They just didn't like the last 3 letters.)
    3) Many countries have the same or include other countries unicodes. For example English could be written in the German form or in the French form.
    4) You can't get out the syslanguage as far as I know. This would be a great hint which language the person is using.
    5) I don't think you can use the spellcheck in any way... great violation against spellchecking could also be a hint for another language.
    I know a quite big internetcommunity which did try to accomplish the same as you do. After about 2 years and a lot of experiments they stopped their efforts and were content by popping up the random error-messages warning that you don't have to insult, just like those other communities mentioned above. ^^ (Though they tried to restrict the insulting parts to the language used that didn't work out. Too many people knew how to insult in other languages ;D or which words were similar to insults.)
    People just never do what they are supposed to do and are quite nasty finding workarounds...
    My advice to you would be:
    Don't make the effort.
    Sorry for not being able to provide you with a solution, but the opposite.
    Lisa

  • How to add a new filed of Personnel number in FB60 data entry screen

    Hello SAP Gurus,
    We want to have a field to populate the Personnel number in all of the posting document entries via FB60. Besides the existing fields such as the "Doc.header text", "reference", "short text", "text" and "assignment" fields etc, are there any other fields that can be used to enter the Personnel number in the document entries? Maybe there're some fields are ready but the fields have been hidden on the data entry screen currently?
    Personnel number is there in the Vendor master data in CoCd data, Accounting Info.
    I checked the Field status group of the Vendor Recon A/c in OBC4 and made the personnel number as Optional from suppressed mode in FSG BS41 under Additional Account Assignment.
    After doing the above, I am still not able to see the personnel number filed in FB60.
    Am I missing anything else due to which I am not able to get the additional filed of personnel number in FB60 screen.
    Any help would be greatly appreciated.

    Hello Dear
    Look FB60 screen has two parts :
    The one in which you enter information related to vendor is Header Level, in this case you already assign Personnel No. in Vendor Master so no field is required as Personnel no. will be picked up from Vendor Master level.
    The Other is line item level is bottom half part, if you want to assign personnel no. at Expense G/L level then if you scroll right you will find a field for Personnel no. If you can't see the field check your setting at OBVV for the field status group you assign to particular Expense G/L.
    Hope you Understood
    Cheers
    IMK

  • Looking for a browser or app with one click data entry

    One thing I miss on the iPad is the ability to quickly enter information in web sites like my name, e-mail, etc. For example, Firefox for windows has an add-on called "InFormEnter" which places a check box next to each data entry block. Clicking on it allows entry of the information with one additional click. I know that some iPad password managers will remember this info, but most seem to require entering a password each time you use it.
    Mercury browser for the iPad remembers data for visited sites but seems to require manual input for every new site.
    Is there an app or browser for iPad that will work without entering a password or requiring manual input for every new site?

    The subscription version of LastPass has formfill capability and syncs information from your LastPass account that works on multiple platforms/OSs.

  • Error in receiving tableview data for selected row

    Hi Collegues ,
    We plan to realize an application for the maintanance of  planning data . In the first step we created a value help page by using a tableview with iterator class ( 1 of the 3 methods of the Interface was filled with logic ) . We don't use any controller for that application  .
    A global internal table with the relevant help value data ( fgrvalues ) is used for the tableview and the call is :
    TYPE I .
    +CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    CLEAR ONCLICKEVENT.
    IF EVENT_ID = CL_HTMLB_MANAGER=>EVENT_ID.
        EVENT_DATA = CL_HTMLB_MANAGER=>GET_EVENT( REQUEST ).
        IF ( EVENT_DATA IS NOT INITIAL ) AND
                ( EVENT_DATA->EVENT_TYPE = 'click' ) .
                ONCLICKEVENT = EVENT_DATA->SERVER_EVENT .
        ENDIF.
    ENDIF.+
    CASE ONCLICKEVENT.
    WHEN 'take' .
       TABLE ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
       NAME = 'tableView'
       ID = 'fgr1_vhelp' ) .
       TABLE_EVENT = TABLE->DATA.
       IF TABLE_EVENT->SELECTEDROWINDEX IS NOT INITIAL.
          ROWSELECTION = TABLE_EVENT->SELECTEDROWINDEX.  
    -> ROWSELECTION - Content is now the index of the selected tableview row
    We always get the selected row in TABLE_EVENT->SELECTEDROWINDEX and the table TABLE_EVENT->ALLCOLUMNNAMES filled ( column ZX_FGR1 is the 2nd column ) 
    but we never got the tableview data for that tableview row no matter what we tried . We tried it with a tableview-event fired on 'rowselection' by user line-selection . We have deactivated the iterator or changed the BPS design value . With the same result - nothing was given back .
    We found that the System-Call Return value of :
    +system-call ict
    did
    ihttp_scid_get_form_field
    parameters
    m_c_msg " > c handle
    name " > form field name                value " < form field value
                    m_last_error. " < return code+
    in the method IF_HTTP_ENTITY~GET_FORM_FIELD is empty .  M_LAST_ERROR occurs with value '20' .
      + ASSIGN ROWSELECTION TO .
    COLUMN_VALUE = TABLE_EVENT->GET_CELL_VALUE( ROW_INDEX =
    COLUMN_INDEX = '2' ). -> Column Value is empty !!+
       +CALL METHOD TABLE_EVENT->GET_CELL_VALUE
          EXPORTING
            ROW_INDEX = TABLE_EVENT->SELECTEDROWINDEX
            COLUMN_INDEX = '2'
          RECEIVING
            VALUE = COLUMN_VALUE -> Column Value is empty !!+
       +CALL METHOD TABLE_EVENT->GET_SIMPLE_DATA ....
             -> Column Value is empty !!+ *----
    What could be the reason for that problem ? In generally it must be possible somehow to read the tableview data for one or all rows of the mentioned tableview .
    We hope that someone can help and are very thankful for a hint or solution . If you need more details please let us know .
    Please Remark: It's no solution for us to read the data by using the created internal table fgrvalues and the selectedrowindex cause in a later step we plan to update an ODS table with the manual modified planning data of an editable tableview .
    Thanks a lot in advance
    Dirk Läufer

    Hi collegues ,
    It's done .
    After we've got a very helpful little hint from Brian :
    The <htmlb:tableView> renders a table to the browser. It does not keep a copy of the table. The browser will also never return the table. Never. What it can return are inputfields for each cell. But then only if each cell is custom rendered as an inputfield.
    we could certainly solve the problem .
    We set the field we want to get back from table view on not editable inputfield via the tableview-iterator method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START :
    DATA: LCL_TABLE       TYPE REF TO CL_BSP_BEE_TABLE   ,
          LCL_INPUTFIELD2 TYPE REF TO CL_HTMLB_INPUTFIELD .
    CASE P_COLUMN_KEY .
    WHEN 'ZX_FGR1'.
    *    Field Firm Group
         CREATE OBJECT LCL_INPUTFIELD2.
         LCL_INPUTFIELD2->ID        = P_CELL_ID.
         LCL_INPUTFIELD2->WIDTH     = '100%'.
         LCL_INPUTFIELD2->MAXLENGTH = 4.
         LCL_INPUTFIELD2->TYPE      = 'STRING'.
         LCL_INPUTFIELD2->DESIGN    = 'STANDARD'.
         LCL_INPUTFIELD2->DISABLED  = 'TRUE'.
         LCL_INPUTFIELD2->VALUE =
             GET_COLUMN_VALUE( COLUMN_NAME = 'ZX_FGR1').
         P_REPLACEMENT_BEE     = LCL_INPUTFIELD2 .
    Now the method in OnInputPorcessing:
    TRY.
          CALL METHOD CL_HTMLB_MANAGER=>GET_SIMPLE_DATA
              EXPORTING
                REQUEST       = RUNTIME->SERVER->REQUEST
                ID            = 'fgr1_vhelp'
                ROW_IDX       = TABLE_EVENT->SELECTEDROWINDEX
                COL_NAME      = 'ZX_FGR1'
              CHANGING
                DATA          = FGRVALUES_LINE-ZX_FGR1 .
             IF NOT FGRVALUES_LINE-ZX_FGR1  IS INITIAL.
    *                 selektierte Firmengruppe übernehmen
                      ZX_FGR1     = FGRVALUES_LINE-ZX_FGR1   .
                      CALL METHOD NAVIGATION->SET_PARAMETER
                            EXPORTING NAME  = 'ZX_FGR1'
                                      VALUE = ZX_FGR1.
             ENDIF.
          CATCH CX_SY_CONVERSION_ERROR .
       ENDTRY.
    works properly as it should be ...
    An enormous Thanksgiving to you , Brian !!!!

  • Creation Of Custom Transaction For RF enabled devices "mobile data entry"

    Hello Everyone,
    i need some information, or some material or some example's for creating custom transactions that will invoke the standard good issue transaction of sap from the handled device using the RF , so can anybody give some reference which will help me in creating custom transaction for a RF enabled handled device, which will invoke the standard sap goods issue transaction( mb1a) ,, there are some LM-transaction which do goods issue from the RF enabled handled device, but in my case i want to do goods issue using reservation as my input, so can anybody guide me or send some reference material matching to my problem, i would really appreciate it..
    thanks in advance...
    sapient2006

    Hi Hussaini,
    Here are the steps.
    1> Customization needs to be completed in SPRO. Logistics Execution -> Mobile Data entry section. Also compare entries with LM01 for understanding.
    2> In the 'Define menu management', you can create dynamic menus. For Menu or transaction type, if you enter "1", a menu appears; if you enter "2", a transaction appears. Custom transactions can be created and assigned here.
    Once that is done, when you execute LM01 you will see your custom transactions come up. Make sure that these are created keeping in mind the RF device screen size and limitations.
    Regards,
    Anand.

  • How to populate new record on data entry form based on search results?

    Hello,
    I'm new to jdeveloper im using version 11.1.2.1.0.
    Usually Im using forms 10g.
    I created search panel with table and its working but problem is how to transfer/populate all the field value according to that search result to New data Entry Form
    by clicking the table record or a button.
    Given :
    TABLES,EO
    1. PatientMasterIndex
    2. PatientTransactionMaster <<---- master
    3. PatientTransactionDetail <<-- detail relation
    Here the scenario,
    After Search of any patient, when i clicked one or more patient (which Jdeveloper allow multi select on jtable) on the table record it should automatically transfer or copied to the text field, i want to show on the form of PatientTransactionMaster like PatientNumber,PatientInsuranceNumber etc. to be save on db as new record, also non database field for view only like patient Name,address,age.
    IN forms i can do that by :PatientTransactionMaster.PatientNumber := :blocksearch.PatientSearchNumber ,etc.....
    or an item trigger to populate the said PatientTransactionMaster block. ( select .... into :PatientTransactionMaster.PatientNumber,etc....)
    Any suggestion,links,sample is highly appreciated.
    Sorry for my english.
    Thank you very much

    Hi,
    Do you want to create a detail record that will include some values from your master record??
    Or do you want to create a record with values from your Search criteria, only in the case you do not have any results?
    if it is the second case.
    When do you want to do that? After a press of button? or immediately?
    In general you have to handle the values from search criteria.
    Additionally, if you use ViewCriteria, you have to have bind variables for your search criteria that you will want to use.
    So in general, you have to know the values by using bind variables, understand that the query has no results (This can be done in many ways, depending on your implementation. if you are using a button, you could make a disable condition with iterator.estimatedRowCount property.)
    Perform the insert operation with the values from the bind variables.
    Regards,
    Dimitris.

  • HT1692 I use an iPhone 5, and want to sync my phone calendar and contacts with Outlook 7 calendar and contacts; twpo problems--I now get dozens of new calendars every time, and my calendar will not syncd at all.; meaning that date entries on Outlook do no

    I use an iPhone 5, and want to sync my phone calendar and contacts with Outlook 7 calendar and contacts; two problems--I now get dozens of new calendars every time, and my outlook calendar will not sync at all.; meaning that date entries on Outlook do not come across ot iPhone.

    It is unusual for the calendar to sync and not the contacts in Outlook. I've worked with Outlook for years. You didn't answer what computer OS you are using. If it is Windows, have you tried to reset the sync history in iTunes? Do that by opening iTunes, go to Edit>Preferences>Devices and click on reset sync history. If you have done this and it doesn't help, then we can try and run scanpst.exe on your Outlook file and see if there are any errors. Search your computer for that file, however it normally resides in one of the Microsoft Office folders in the folder Program files. After that, you can see if it will sync.

  • Converted XML not showing multiple data entries correctly

    Hello
    I am creating a PDF Form from a xsd scheme but when I have data that could require multiple entries the converted xml is a mess. I am curently trying to create a way to add fields for multiple children. I created an expanding table and the fields are automatically copied when I click on „+“ or are deleted when I click on „-“ . If I have multiple rows for children then the converted xml looks like this :
    The correct xml for multiple data entries should look like this (this is from a xml scheme not made in LiveCycle) :
    Even if I copy the fields without creating a table, the converted xml is still a mess just like on the first image. Is there a way to show the xml from the PDF from correctly. I linked the xsd scheme that I am using for the PDF form: https://drive.google.com/file/d/0B30LkLSwYgB4SFN5bTkyLW1fOVU/edit?usp=sharing
    Best regards
    Ivica

    Hello
    I am creating a PDF Form from a xsd scheme but when I have data that could require multiple entries the converted xml is a mess. I am curently trying to create a way to add fields for multiple children. I created an expanding table and the fields are automatically copied when I click on „+“ or are deleted when I click on „-“ . If I have multiple rows for children then the converted xml looks like this :
    The correct xml for multiple data entries should look like this (this is from a xml scheme not made in LiveCycle) :
    Even if I copy the fields without creating a table, the converted xml is still a mess just like on the first image. Is there a way to show the xml from the PDF from correctly. I linked the xsd scheme that I am using for the PDF form: https://drive.google.com/file/d/0B30LkLSwYgB4SFN5bTkyLW1fOVU/edit?usp=sharing
    Best regards
    Ivica

Maybe you are looking for