on 12-18-2018 4:43 AM
Hello,
We have created action buttons using BOPF in CDS and we are able to perform action using our Fiori custom app to change the status in backend. Below are the steps :
Now the issue is :
The input field area is very small, and we want to increase the area to enter the text so that user can see the text properly. (Similar to text area in UI5, scrollable).
Thanks, let us know in comments below.
(Update) : Action method works fine as expected. Comment is properly updated in long text.
/BOBF/IF_FRW_ACTION~EXECUTE
oliverjaegle shux alfred.barzewski jocelyn.dart Request your assistance here.
Hi Tejas
If you want to annotate a function import parameter you will have to describe the target as follows:
<Annotations Target="{AppNamespace}.{AppNamespace}_Entities/{FunctionImport}/{Parameter}">
<Annotation Term="com.sap.vocabularies.UI.v1.MultiLineText"/>
</Annotations>
For example, if you have an application generated by a CDS consumption view named Z_C_MyView and a BOPF action ADD_COMMENT for the corresponding node with a parameter structure that holds the field COMMENT, the generated application namespace will be Z_C_MYVIEW_CDS and the name of the function import will be Z_C_MyViewAdd_comment.
Then the target will be as follows: Z_C_MYVIEW_CDS.Z_C_MYVIEW_CDS_Entities/Z_C_MyViewAdd_comment/Comment
In the annotation modeler you will have to switch to the code editor in order to add such an annotation. The better way to achieve this is by the MPC (for the above example SADL would have generated a class named ZCL_Z_C_MYVIEW):
DATA(lo_ann_target) = vocab_anno_model->create_annotations_target( iv_target = 'Z_C_MYVIEW_CDS.Z_C_MYVIEW_CDS_Entities/Z_C_MyViewAdd_comment/Comment' ).
lo_annotation = lo_ann_target->create_annotation( iv_term = 'com.sap.vocabularies.UI.v1.MultiLineText' ).
Regards
Gabriel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
you can try the following:
When you add the multiline annotation to the function import's parameter, the corresponding UI control should be rendered as multiline text area.
The annotation looks as follows:
<Annotations Target="Description">
<Annotation Term="com.sap.vocabularies.UI.v1.MultiLineText"/>
</Annotations>
The target of the annotation is - as said - the path the the function import's parameter.
This is now the "OData-only way" of defining it.
I unfortunately have no idea how that needs to be annotated on CDS level.
Somebody out there who can help out?
BR
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Alex, That's great solution, though i achieved this using custom ui5 code of disabling the function import dialog and overriding it with ui5 dialog (sap.m.dialog).
I tried this in my annotation modeler to attach this to my action coming from CDS BOPF. But I still see the string input. May be i am missing something ? Added MultiLineText = true
Will update if this works out.
Regards,
Tejas
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.