on 04-23-2014 12:02 AM
I have a requirement to add a few notes fields - as a xBO. It seems I will have to define them as TextCollection datatypes.
These notes fields have to be displayed as multiple-line control in a facet (Accounts).
1. Any pointers on using associated TextCollection datatypes ?
2. How to add to a new facet and display as multi-line control field ?
Thanks ahead for your help !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Point 4: bind the custom EC with the public outport, and import the ID and UUID parameters
next step 1: in the beforesave event of the appointment xbo, if not existing, create an instance of the BO Pall_AppointmentNotes.
next step 2: use these parameters to load an existing instance of your BO Pall_AppointmentNotes, in the Embedded component initialize event (that is binded with the inport)
Hi Alessandro,
I did Bind with Custom EC with public outport and import the ID. Cannot link UUID for some reason
I have completed step 2 as well.
Step 1: Do not know exactly how the coding will be. pls help. I am very near.
Text Note area is now available for edition but cannot save data.
Note: I have followed video from Stefan Krauth. (http://scn.sap.com/community/business-bydesign/studio/blog/2014/04/02/sap-application-studio-1402-ad...)
Alim
//Get old quote data
qryQuote_QueryByElements = CustomerQuote.QueryByElements;
selParamsQuote_QueryByElements = qryQuote_QueryByElements.CreateSelectionParams();
selParamsQuote_QueryByElements.Add(qryQuote_QueryByElements.ID.content, "I","EQ", this.ID.content);
qryQuote_Result = qryQuote_QueryByElements.Execute(selParamsQuote_QueryByElements);
var cont = qryQuote_Result.Count();
if (cont == 0) { //creation phase -> create custom bo instance
var vQuoteParty = QuoteParty.Retrieve(this.ID);
if(!vQuoteParty.IsSet())
{
vQuoteParty = QuoteParty.Create();
vQuoteParty.quoteID = this.ID;
vQuoteParty.load_parties();
}
return;
}
qryApp_QueryByElements = Activity.QueryByElements;
selParamsApp_QueryByElements = qryApp_QueryByElements.CreateSelectionParams();
selParamsApp_QueryByElements.Add(qryApp_QueryByElements.ID, "I","EQ", this.ID.content);
selParamsApp_QueryByElements.Add(qryApp_QueryByElements.TypeCode, "I","EQ", "12");
qryApp_Result = qryApp_QueryByElements.Execute(selParamsApp_QueryByElements);
var cont = qryApp_Result.Count();
Hi Alessandro,
You have been great help so far. I finally understood what you meant in your ealier replies and I found that I made silly mistake in binding i.e. in Inport I should give Bind Parameter same as AppointmentID. Finally Text Note can be saved now.
Now, when I am trying add one more dependent Object with same type for second Note, it is not allowing me. Please advice how can I add one more Text Note.
[AlternativeKey] element ZappID: BusinessTransactionDocumentID;
[DependentObject(TextCollection)] node TextCollectionSingleText;
[DependentObject(TextCollection)] node TextCollectionSingleText;
I just found in doc that MULTITEXT key word will help to get more than one TEXT Notes areas.
Alim
Hi Alim,
I circumvented the problem with multiple entries by having multiple references to TextCollection and binding the Embedded Component to the subnodes:
node Notice1[1,1] {
element ID : ID;
[DependentObject(TextCollection)] node FinalNoticeContent;
}
node Notice2 [1,1] {
element ID : ID;
[DependentObject(TextCollection)] node NotesContent;
}
Hi Ludger,
Still no success. Notes are still in display mode.
I will explain you here how it is developed so far.
1. Custom BO with Notice definition what you gave.
2. Custom EC with singletextedit ui and binded to Notice - Text.
3. Data Model Bindings
4. In Custom BO - Root - After Modify Event, code as you mentioned.
I have followed video for binding https://www.youtube.com/watch?v=kGxEjTWAEsM
Alim
Hello Alim,
could you explain how have you binded TextEdit with the node text?
I've created a Stucture, binded it to the node "Text" of the TextCollectionSingleText and used it as a Value for the TextEdit element.
When I'm doing this, i'm getting a message in the text field, and this field is not editable
Regards,
Leonid.
Hi Gerhard/Leonid
Did you set the associaton filters for the text collection?
If not, here is what you need to do:
In UI-Designer, DataModel-View:
Hi Gerhard / Ludger,
Actually when you use code 10006, then you can only have one Text Node per Custom BO.
I used same earlier but it was not working because I required 3 similar Text Note fields.
If you drag drop Text edit field, then no need of any code and all.
You can follow video for ID binding to save Text data. Cloud Application Studio: Add Facet (Embedded Component) based on BO Extensions - YouTube
Let me explain you steps I followed.
1. Declare Text Collection Type element inside Node, this will enable to have multiple Text fields within one BO.
node Note1[1,1]
{
element ID:ID;
[DependentObject(TextCollection)] node FIELD1;
}
node Note2[1,1]
{
element ID:ID;
[DependentObject(TextCollection)] node FIELD2;
}
2. On UI Screen of Embedded Component of Custom BO, drag and drop TextEdit box from Toolbox to the screen - Pane Container.
3. In Data Model view, bind left side text field TEXTEDIT1 (just dragged dropped earlier) to BO declaration right side field NOTE1 - FIELD1 - TEXT - TEXTCONTENT - TEXT.
Hope this helps.
Alim
Hi Gerhard / Ludger,
Actually when you use code 10006, then you can only have one Text Node per Custom BO.
I used same earlier but it was not working because I required 3 similar Text Note fields.
If you drag drop Text edit field, then no need of any code and all.
You can follow video for ID binding to save Text data. Cloud Application Studio: Add Facet (Embedded Component) based on BO Extensions - YouTube
Let me explain you steps I followed.
1. Declare Text Collection Type element inside Node, this will enable to have multiple Text fields within one BO.
node Note1[1,1]
{
element ID:ID;
[DependentObject(TextCollection)] node FIELD1;
}
node Note2[1,1]
{
element ID:ID;
[DependentObject(TextCollection)] node FIELD2;
}
2. On UI Screen of Embedded Component of Custom BO, drag and drop TextEdit box from Toolbox to the screen - Pane Container.
3. In Data Model view, bind left side text field TEXTEDIT1 (just dragged dropped earlier) to BO declaration right side field NOTE1 - FIELD1 - TEXT - TEXTCONTENT - TEXT.
Hope this helps.
Alim
Hi Ludger,
Yes, I had tried that and it works with filter i.e. 10006 code. Here, no need to declare as multiple nodes in Custom BO and also no need to use Text Edit from toolbox.
But you need to drag drop Single Text Edit from Configuration Explorer - SAP_BYD_APPLICATION_UI - REUSE - NOTES - SINGLETEXTEDIT.
Then do binding there itself.
Alim
Hi Ludger,
what do you mean by "Right-Click on the Bound Text Feld"?
Whatever field I click on (on the top of the textcollection, or on the text, or whatever on every hierachy level) I get the message "The BO Association to which this data model is associated do not have any filter parameters specified":
In the BO I use the following definition:
node Comment {
DependentObject(TextCollection) node TextCollectionComment;
....
Hello Tim,
Could you please let me know on steps you followed to add Notes field as type TEXT. I have similar requirement to add 2 TEXT areas similar to Notes in Overview section of Appointment on C4C.
Alim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.