How to merge new entry into json model?
Hi guys,
I have a json model, and I want to use the merge param of method setData. But I just can't achieve what I want.
var model = new sap.ui.model.json.JSONModel([]);
var aPerson = {name: "Aaron"};
model.setData(aPerson, true);
this model is bound to a table. When I add the new person, table is still empty.
Does anybody has experience? What am I doing wrong?
Hi Aaron,
1) I cannot say anything without looking at your code.
2) you cannot find getData from ui5 documentation at least at SAPUI5 SDK - Demo Kit you can type oModel on console screen and see the available methods. you will find oModel.getData() available. you can get all methods for an object by typing oModel.getMetadata()
there is sap.ui.model.ClientModel associated with this jsonmodel and you will find the method getData documented at SAPUI5 SDK - Demo Kit
I hope this will clear your question.
Regards,
Chandra
P.S - you can call me as Chandra or Chandrashekhar
Similar Messages
-
Manage a new entry into V_T020R table for RFEBBECODA00 program
Hello SDN,
For the bank statement integration with the Belgium format Coda 2.1, I need to use a new conversion program so called RFEBBECODA00. This program is an update of RFEBBE00.
The customizing table V_T020R (OT61 transaction) allows to manage a dedicated variant for FEBC user transaction and the program used for file conversion to Multicash.
I do not need to use anymore RFEBBE00 program, but I am not able to manage a new entry into V_T020R for the new program RFEBBECODA00.
Any idea on how too update V_T020R in order to keep using FEBC transaction ?
Many thx for your help.
Regards,
AurelienGuess you have completed all the manual activities specified in the attachmet to the following SAP Note.
https://service.sap.com/sap/support/notes/1035142
In the attachment titled "Manual_Activities_Required_FI.doc" to the above SAP Note, the last step to add an entry to table T020R. I was just wondering if completing the manual activities is a prerequisite to add a new entry to the table T020R. As such, if you go to OT61 transaction, you don't see the 'New Entries' button.
The attachment to the above SAP Note has the following text as a last step.
Also maintain the following entry in Table T020R:
MANDT TCODE REPID VARIANT NSHOW
000 FEBC RFEBBECODA00
Activate the table. Now run transaction FEBC and check if the program RFEBBECODA00 is being displayed.
As per the Note, complete the manual activities, then apply the correction instruction in the Note, activate the program and then maintain the text symbols and selection text a shown in the document. Just check the note in the above link and follow the instructions. Let me know if you finally succeed in maintaining this entry in table T020R. I'll be happy to hear a 'yes' from you! -
How to add new field into dynamic internal table
Hello Expert.
how to add new field into dynamic internal table.
PARAMETERS: P_TABLE(30). "table name
DATA: I_TAB TYPE REF TO DATA.
FIELD-SYMBOLS: <TAB> TYPE standard TABLE.
*Create dynamic FS
create DATA I_TAB TYPE TABLE OF (p_table).
ASSIGN I_TAB->* TO <TAB>.
SELECT * FROM (p_table) INTO TABLE <TAB>.
here i want to add one more field into <TAB> at LAST position and my
Field name = field_stype and
Field type = 'LVC_T_STYL'
could you please helpme out .Hi,
Please find the code below.You can add the field acc to your requirement.
Creating Dynamic internal table
TYPE-POOLS: slis.
FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE, u201C Dynamic internal table name
<fs_dyntable>, u201C Field symbol to create work area
<fs_fldval> type any. u201C Field symbol to assign values
PARAMETERS: p_cols(5) TYPE c. u201C Input number of columns
DATA: t_newtable TYPE REF TO data,
t_newline TYPE REF TO data,
t_fldcat TYPE slis_t_fldcat_alv,
t_fldcat TYPE lvc_t_fcat,
wa_it_fldcat TYPE lvc_s_fcat,
wa_colno(2) TYPE n,
wa_flname(5) TYPE c.
Create fields .
DO p_cols TIMES.
CLEAR wa_it_fldcat.
move sy-index to wa_colno.
concatenate 'COL'
wa_colno
into wa_flname.
wa_it_fldcat-fieldname = wa_flname.
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 10.
APPEND wa_it_fldcat TO t_fldcat.
ENDDO.
Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fldcat
IMPORTING
ep_table = t_newtable.
ASSIGN t_newtable->* TO <t_dyntable>.
Create dynamic work area and assign to FS
CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
ASSIGN t_newline->* TO <fs_dyntable>.
Populating Dynamic internal table
DATA: fieldname(20) TYPE c.
DATA: fieldvalue(10) TYPE c.
DATA: index(3) TYPE c.
DO p_cols TIMES.
index = sy-index.
MOVE sy-index TO wa_colno.
CONCATENATE 'COL'
wa_colno
INTO wa_flname.
Set up fieldvalue
CONCATENATE 'VALUE' index INTO
fieldvalue.
CONDENSE fieldvalue NO-GAPS.
ASSIGN COMPONENT wa_flname
OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
<fs_fldval> = fieldvalue.
ENDDO.
Append to the dynamic internal table
APPEND <fs_dyntable> TO <t_dyntable>.
Displaying dynamic internal table using Grid.
DATA: wa_cat LIKE LINE OF fs_fldcat.
DO p_cols TIMES.
CLEAR wa_cat.
MOVE sy-index TO wa_colno.
CONCATENATE 'COL'
wa_colno
INTO wa_flname.
wa_cat-fieldname = wa_flname.
wa_cat-seltext_s = wa_flname.
wa_cat-outputlen = '10'.
APPEND wa_cat TO fs_fldcat.
ENDDO.
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = fs_fldcat
TABLES
t_outtab = <t_dyntable>. -
How to Create new entry, while keeping CoS and nsRoles in tact...
Hi,
Here's the short version:
How can one create a new entry/context in DS, copy the attributes from an existing entry (using JNDI) and save them in the new entry/context WITHOUT duplicating CoS or nsRole/DN info.
Long version of the question:
We are using DS 5.2 and Portal 6 (and messenger/calendar etc). We have our employees saved in DS. What I want to do is change a user's name/uid by copying the user's attributes (in JNDI) and create a New entry with the New uid, with all the other attributes the same. Then deleting the original entry.
This is what I have done...
1. Get all the employee's attributes... (abriviated)(ctx is the DirContext)
NamingEnumeration answer = ctx.search(searchBase, filter, ctls);
SearchResult sr = (SearchResult)answer.next();
Attributes attrs = sr.getAttributes();
2. Create a new employee with the same attributes (assume I use a different uid in the dn)
ctx.createSubcontext(dn, attrs);
This works...it copies all the attributes to the new entry -BUT- when you look at the LDIF file, it ADDS several more attributes to the new entry.
Example: it adds the following...
sunPortalNetletRules
sunPortalGatewayEnableSSO
sunPortalDesktopDpDocument
sunPortalDesktopDpLastModifiedUser
iplanet-am-user-auth-modules
And about 20 others...
Now if I am not mistaken, these are the CoS and roles that the DS uses and propagates down to the entry. But when I copy the attributes over, (using JNDI) I get these attributes too but I want to copy only the attributes that are unique and have DS handle the roles and CoS like it does for the original entry.
Is there a way to tell the DS to just use the CoS or roles instead of duplicating all these attributes in this individual entry??? (and do it using JNDI)
(sorry this question is sooooo long.)
Thanks!
EricHello Viji,
I am extremely thank ful for the document.
Kindly help me with below points of possible
1) if it is standard table (LFBK) , even then shall we will need to do the generate program
step in SCDO ?
2) does it generate Z-function module ?
3) do we need to call this function module at appropriate places to update the CDPOS and CDHDR
for changes in the standard table ?
4) I have already created custom business object for LFBK so that Iu2019ll be able to create entry
in SWEC (fyi)
5) how and when are the method used in the table maintenance generator called ?
6) Page 14 point 3 says that "Add a new entry to link the Change Document Object ZPRPS_CD and
table ZPRPS so that changes are recorded when table entries change."
Does this mean that once we create SCDO and generate program, these two steps are enough
for the SWED entry to create change log in CDPOS and CDHDR ?
7) It is understood that it is necessary that the change object in SWEC should be logged in
CDPOS and CDHDR only then the event would be created for the SWEC entry. is this correct ?
in order to create change log for the change object in CDHDR and CDPOS, is the SCDO entry
and generate program steps enough or the methods of table maintenance generator are also
required ?
thank you very much for your time
B -
How to add new entry, in table on button click.
i have 2 input ,witch i am taking from numeric controls. this 2 input are use to calculat my output.
on button click i want these 4 things should go in the table.
now my problem is when i click the button previous entry in the table get lost...
plz help me to slove this problem.When you want to preserve the existing values in a table or array, you need to use "Array -> Build Array". Wire the local variable of the table or array to top entry, and wire your new entry to the bottom. Depends on the dimension of the array and the postion you want to add. You might need to some array manupilations. Try out some of the array VIs to see how they work.
Joe -
How to add new codes into SAP Query/Infoset
Hi Experts,
First time working with SAP Query.
I need to enhance an existing Query to add a new field into a report. I have added new tables into this Infoset and joined my new tables with existing tables and able to extract the new fields out on the report. But here are my problems:
Example of original output:
X88888 500000
X99999 400000
Example of new output after adding my 2 new tables to get 1 new field to output:
X88888 50000 01/08/2009
X88888 50000 01/25/2009 <--- for X88888 customer, I want only this record w/ latest date to be output
X88888 50000 01/22/2009
X99999 40000 03/09/2009
X99999 40000 04/18/2009
X99999 40000 04/19/2009 < -- for X99999, I want only this record w/ latest date to be output
Where/How i can add the code to control this logic so that only 1 record per customer with the highest date can be output. I looked at the query program and it looks very confusing and hard to understand.
Please advise,
Thanks,
SamHi Sam,
Instead on adding new table/tables , better way to use Direct Read from your single table.
Please read the below steps to suffice your requirement.
Assumption: Let your original table be A and second table is B.
Tables A and B are having field X1 and X respectively, using these fields, they can be joined.
You want field date1 of table B.
Infoset Changes:
1. Go to SQ02 (Enter Infoset name, click on Change button)
2. Create an extra field E_date of type date (Sy-datum), by clicking on 'Extras' (F5) button.
3. Select that field in one of the field group of your Infoset.
4. Click on Code Icon (Shift+F8) displayed on application bar, you will be getting lists events in 'Code section'.
5. In Data Section , declare an internal table like below code (here pseudo code)
data: begin of itab_date occurs 0,
date1 like B-date1,
end of itab_date.
6. In Recod processing Event write the following code.
CLEAR itab_date.
CLEAR E_date.
SELECT date1 FROM B into table itab_date " Retrieving date field from table B
WHERE X = A-X1.
Sort itab_date by itab_date-date1 DESCENDING. "Sort internal table B in decendind order on date1
READ TABLE itab_date index 1. "Read first record of interanal table
E_date = itab_date-date1 "Assigning top most date of internal table into field E_date.
7. Generate the Infoset
Query changes
1.Go To SQ01 (in a new session),
2.Give your Query name, click on change button, and select that field group in which you have added extra field.
3.Select extra field.
4.Go to basic list to select that field in your O/p list.
5.Click on Test button, and see if you are getting desired result.
Please let me know if you need further details.
Regards,
Dinesh -
How to merge another doc into pages
does anyone know how to merge or add another document in pages into another research documents in Pages?
You can insert sections from one Pages document into another. Open your files & show thumbnails. Sections have a yellow border around all of the pages in that section. Now click on the page in the thumbnail pane & copy. If the file is more than one page & you only want one, you'll need to insert a section break to separate the pages. Then go to your other file, click in the thumbnail pane & paste. If you want to insert the other content into the middle of a section in the receiving document, you will need to insert section breaks at the point you want to insert. The whole copied page will be pasted in. Repeat with another section. Styles will copy over with the sections but headers & footers will not.
-
Trying to Writing (update) New Entries into CSV files
Hello, I'm trying to write (update) entries to a csv file. I have been able to write to the csv file using the following code;
String stest1 = "hello2", stest2="no1";
//Open Connection
FileWriter fw = new FileWriter("c:/test2.csv", true);
FileOutputStream fileOut = new FileOutputStream("c:/test2.csv");
fw.write(stest1+",");
fw.write(stest2 + ",");
fw.write("\n");
fw.flush();
fw.close();
This overwrites the previous content with the new entries.
Does anyone know how I would be able to update the csv file?
ThanksHello, I'm trying to write (update) entries to a csv
file. I have been able to write to the csv file using
the following code;
String stest1 = "hello2", stest2="no1";
//Open Connection
FileWriter fw = new FileWriter("c:/test2.csv",
", true);
FileOutputStream fileOut = new
ew FileOutputStream("c:/test2.csv");
fw.write(stest1+",");
fw.write(stest2 + ",");
fw.write("\n");
fw.flush();
fw.close();
This overwrites the previous content with the new
entries.
Does anyone know how I would be able to update the
csv file?
ThanksModify your code with following (add true param in constructor)
FileOutputStream fileOut = new FileOutputStream("c:/test2.csv", true); -
How to merge one library into another library?
In iPhoto 9.6, is it possible to merge one library into another library? Or otherwise, import individual pictures, from one library into the other library? All of this happening on the same computer.I understand that this feature was covered by Aperture but that this is no longer supported under Yasemite?
No
The current version of Aperture can merge libraries (I have no idea where you got the incorrect information that it can not)
The paid version of iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - can
Those are you only two choices
LN -
How to put new bookmark into folder
If I try to add a new bookmark to existing folder, it simply moves out of the way.
Ditto if I try in sidebar.
On previous OS, pausing the new bookmark over a folder was all it would take to add it to previous folder. Now that doesn't happen.
Clicking "Share" icon in tool bar does not list the folder (Favorites) I wish to place the new bookmark into.
As usual "Help" is no help.Hello Amy. Maybe I'm being dense but when I click on Show All Bookmarks I am presented with a new screen. It has a sidebar like the old Firefox but the folders are shown but none of the new bookmarks i want to organize. I must be doing something wrong
OK Amy. I got it. In the center panel there is a choise of "Bookmark Menu". When I click on that all my unorganized bookmarks appear and I can sort them. Thanks very much for your help. -
How to merge a song into its new album
I bought the song "Royals" by Lorde a while ago when it was still in The Love Club EP. Today I completed my album and bought Pure Heroine by Lorde. How do I get "Royals" to be included in the Pure Heroine album? I have tried editing it in Get Info but it doesn't seem to be effective.
Hello JannaLulu,
The following article proivides information that can help get these tracks grouped properly.
Why aren't songs with the same album art grouped together?
http://support.apple.com/kb/TS1468
Cheers,
Allen -
How to merge PDF docs into one?
How can I merge several individual PDF documents into one? Can I use preview for this?
Thanks
aIf this is a repetitive task, use Automator. Set up a workflow. First use Files & Folders to Get Selected / Specified Finder Items. Then use PDFs Combine PDF Pages (alternatively just drag selected files to the work area rather than use the Files & Folders step). Display the results from this combinng operation, click on it to display it and verify, and then rename it as desired. The operation New PDF from Images should do that last step, but it appears to not work.
-
How to merge pdf files into one pdf file?
In E-Rec we need the capability to mass printing for correspondance. There i want to merge pdf files for candidates into one pdf file. I am doing the following:
Data: lv_document1 TYPE rcf_s_cs_document_content.
LOOP AT activity_object_tab INTO ls_activity_object.
lo_act_corr ?= ls_activity_object-activity.
CALL METHOD lo_act_corr->process_document
EXPORTING
channel = 'FRONTEND'
IMPORTING
document = lv_document1.
ENDLOOP.
Now lv_document1 contains the pdf file in lv_document1-DOCUMENT_X which is of type RAWSTRING.
This works for one candidate, in this case the pdf for last candidate will be displayed.
But how would i append in the loop or what would i need to do display all candidates in one pdf.
Any help will be appreciated.
ThanksFile>Create PDF>From File.
Please post followups in the Acrobat forum.
Bob -
How to merge 3 slideshows into one
I have 3 slideshows (projects) and I want to make them into one slideshow. How do I do that?
You can't aggregate the slideshow projects. But you can export each slide show to a windows media file and then create a new slideshow from the resultant three videos. Bu you won't be able to edit the transitions and pans/zooms. If that's what you want then you'll need Premiere Elements as you can export each slideshow to the same PRE project and, once in PRE, use the break-apart feature for full slide show editing features.
Cheers,
Neale
Insanity is hereditary, you get it from your children
If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks. -
How to merge blog pages into one?
I used iWeb and created three sites within one Domain file; each of these sites has its own blog page.
But I haven't touched it for quite some time and would like to pick it up again. I'm at a point where I would like to simplify things: only to have one site and one blog and...
How do I, or is there a way to, merge these blog pages into one? Consolidating these posts and comments into one single blog page?
Your advice would be very much appreciated. (At present I'm so torn between picking up using iWeb or just start with blogger.com; the ability to preserve these messages would be key to the decision.)
Thank you.You can either use <PageOverlay> to overlay the Header PDF page onto the PDF with the Body, or you could turn the Header PDF page into a <Header> DDX element. It depends on the page size of the Header PDF.
Please be aware that if you use <Header>, the default margins for positioning the header are 1/2 inch all around. You can set this to 0 or whatever you want using the <PageMargins> element.
An example of using PageOverlay:
<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/" >
<PDF result="result1">
<PDF source="PDF2"/>
<PageOverlay>
<PDF source="PDF1"/>
</PageOverlay>
</PDF>
<PDF result="result2">
<PDF source="PDF3"/>
<PageOverlay>
<PDF source="PDF1"/>
</PageOverlay>
</PDF>
</DDX>
Maybe you are looking for
-
How to see if a program is running?
Hello, I need to implement a program that checks if a program called "Thing.exe" is runing. If it is not running it launches "Thing.exe" and if it is kills "Thing.exe". This is the first time I have to program something like this in java and I'm lost
-
Why am I getting the message "Project could not be prepared because an error occurred. (File already open with write permission.) when trying to share to the media browser? I have done this many times before and never got this message. This is ver
-
I have a problem with navigation four buttons
I have made four buttons. And they work, but when I click again on button 1 all tree animations are playing! When I click again on number on the start animation is displayed. In the buttons I have set the animations for 2, 3 and for to hide. How is
-
How can I import movies from iTunes to iMovie?
I download video lectures from iTunes University to iTunes 10 and need to export them to iMovie 11 for editing. How can I do this?
-
Cloud and PS Touch - longer than the free time?
Hi, i couldn´t find anything about it, so i just want to use PS Touch on my Nexus tablet. So i have to register to the cloud, but do i have to pay for it or can i use PS Touch longer than the 30-free days? thx for ur answers. Greetings