11-06-2013 1:36 PM
Hello,
i opened a thread here.
But maybe, it could be more relevant in this forum...
Does anybody have an idea on how to make a field mandatory?
Regards.
Laurent.
11-07-2013 7:51 AM
Hi Laurant,
I understand, that you want to mark a field which was added as an extension to a node to mandatory. This could be achieved by creating an enhancement BO, having a determination for calculating the properties. For further details please check the help portal documenation for Business Object Builder:
BO Builder in general: http://help.sap.com/erp2005_ehp_05/helpdata/en/2f/e689105fc6487c89b084d1ffd24678/content.htm?framese...
Determinations in general:
http://help.sap.com/erp2005_ehp_05/helpdata/en/be/bbf0e6c29d42d3bed9865be5597018/content.htm
Determinations for calculating dynamic properties:
Best regards,
Carsten
11-07-2013 7:51 AM
Hi Laurant,
I understand, that you want to mark a field which was added as an extension to a node to mandatory. This could be achieved by creating an enhancement BO, having a determination for calculating the properties. For further details please check the help portal documenation for Business Object Builder:
BO Builder in general: http://help.sap.com/erp2005_ehp_05/helpdata/en/2f/e689105fc6487c89b084d1ffd24678/content.htm?framese...
Determinations in general:
http://help.sap.com/erp2005_ehp_05/helpdata/en/be/bbf0e6c29d42d3bed9865be5597018/content.htm
Determinations for calculating dynamic properties:
Best regards,
Carsten
11-07-2013 9:53 AM
Hi Laurent,
let me share some experience one of our customers has made in this context, maybe it is also interesting for you:
As the determination Carsten is suggesting (of course) is attached to some node, by consequence it will only run for existing node instances. Sounds trivial but might have some impact in this context:
If you have some mandatory field on the screen, for which an instance of the underlying node is created if (and only if) the user enters something, she/he most probably will not get an error message if he does not fill the field - as there is no node instance which the determination could be run for.
Not sure if this is something which could happen in your situation
By the way: If you have an FPM based UI there is also a way to do mandatory field checks on the UI layer (unfortunately having other limitations )
Best regards,
Andreas
11-07-2013 3:51 PM
Hello,
thank you Carsten and Andreas for the information.
I will check this in the beginning of next week: i will let you inform about it !
Regards.
Laurent.
11-13-2013 4:15 PM
Hello all,
i read sap.help regarding my issue but i still do not understand how to make my fields mandatory
Inside BOBF transaction (Business Object Configuration), i do not know what i have to do.
I found class to check mandatory fields, but i do not understand how property field is managed:
Any advises?
Regards.
Laurent.
11-14-2013 5:32 AM
Hi Laurent,
We can set the mandatory fields in the Node Categories of node.
Thanks,
Dhivya.
11-15-2013 9:47 AM
Dear Andreas,
I didn't fully get your example but it seems to me you are messing up properties and validations. As this is a common misunderstandind, let me try to clarify:
A property of a note attribute defines how the consumer shall interpret some aspect of the attribute, e. g. whether it's mandatory or not, whether it's changeable and so on. The properties however need to be explicitly requested by the consumer (via core-service retrieve_properties).
But the consumer is not forced to do this, properties have only an informative-role.
So this is not automatically an information of which the adherence to it is ensured by this! If you want a property being validated, there are different ways of doing that:
Hope this clarified the responsibilities a bit. If not, just ask
Cheers, Oliver
11-15-2013 2:20 PM
Dear Laurent,
apart from the so-called staic properties which Dhivya has described where do apply at designtime, there is the opportunity to derive a mandatory property at runtime. As these "dynamic properties" are calculated implicitly, they have to be created / changed by a determination. These "property-determinations" need to be triggered at the node before retrieve.
How to create them programatically is described in Carsten's links.
Sample:
DATA lo_property_helper TYPE REF TO /bobf/cl_lib_h_set_property.
* updating property nodes is done using the property helper
CREATE OBJECT lo_property_helper
EXPORTING
is_context = is_ctx
io_modify = io_modify.
lo_property_helper->set_attribute_mandatory(
iv_attribute_name = lv_fieldname
iv_key = lr_acc_data->key
iv_value = lv_mand_check
).
Cheers,
Oliver
11-21-2013 12:03 PM
Hello Dhivya,
thanks for the answer...
I enhanced Business Object /SRMERP/CO_SC_ESS using BOB transaction: i see my enhancement in BOBF transaction as Sub Business Objects.
But for Node Element i want to modify its Node Category, i am not able to be in change (button to be in modification is not active).
How can i be in modification in my enhancement?
Regards.
Laurent.
11-21-2013 1:38 PM
Dear Laurent,
transaction /bobf/conf_ui is not released for customers. I do not know whether the BOB allows modelling of static properties as it's functionality is very limited.
The "expert mode" which is delivered as transaction BOBX is just getting created (note 1939016 is just bein revised, afaik). This modeling environment will surely feature the modeling of of static properties.
Cheers, Oliver
11-21-2013 3:41 PM
Hello Oliver,
OK, thank you regarding BOBF transaction: i did not see it is for 'Internal use only'...
You talk about BOBX transaction. This transaction does not exist in my system.
But my software component WEBCUIF has a 7.31 release for NW (SP SAPK-73105INWEBCUIF).
Is it link to OSS note 1939016 which is not yet released.
Regards.
Laurent.
11-21-2013 4:36 PM
Hi Laurent,
as already supposed by Oliver we are currently revisting the BOBX note. I expect that the note will be available for customers at the beginning of next week.
BOBX is a design-time for customers to build new applications with BOPF and will complete our tooling together with BOB which stays the design-time for enhancement scenarios.
Best regards,
Carsten
12-02-2013 3:59 PM
Hello Carsten,
OSS note 1939016 - Neue Transaktion BOBX is now available.
Nevertheless, this note exists only in german langage.
When this note will be released in english?
Regards.
Laurent.
12-02-2013 4:26 PM
Hi Laurent,
the translation should be provided automatically after the release. I expect that this will happen within the next days. If not or if you face other problems please don't hesitate to contact me.
Best regards,
Carsten
12-03-2013 8:55 AM
Hi Laurent,
today the note is also available in english. Could you please try again from your side?
Regards,
Carsten
12-04-2013 11:37 AM
Hello Carsten,
yes, it is OK: english translation is done
I have to check now with the customer if we use or not this transaction.
I will let you informed.
Regards.
Laurent.
02-12-2014 2:30 PM
Hello,
before implementation of OSS note 1939016 - New transaction BOBX, we tried to manage field properties through dynamic method (runtime property).
For this, we tried with a PostExit method for /BOFU/IF_FBI_VIEW_EXITINTF_RUN~ADAPT_FIELD_PROPERTIES method
from /SRMERP/CL_FBI_VIEW_EXIT_BASE class.
Unfortunately, it does not work. I think problem comes from ABAP code.
I found below OSS notes:
o 1766463 - Not able to make fields read only
o 1776231 - Not able to make fields read only - continue
o 1781859 - Not able to make fields read only - continue 2
o 1935790 - Feature request: provide current usage values to ADAPT*
o 1952642 - Field Usages set only for the first view
Last OSS note is not released yet (due to rework i guess).
After implentation of above OSS notes, i will check if it is finally possible to manage field properties.
Regards.
Laurent.
02-16-2014 2:34 PM
Dear Laurent,
Note 1952642 is not released since it has side effects that are still pending for correction.
Therefore I would suggest to implements the other notes and do the checks.
Best regards,
Tami
02-18-2014 2:30 PM
Dear Laurent,
Note 1952642 is now ready and released.
But you should implement also note 1974627 which is a followup note.
Best regards,
Tami
02-20-2014 11:28 AM
Hello Tami,
we applied OSS notes:
1952642 - Field Usages set only for the first view
1974627 - Follow-up: Field Usages set only for the first view
Inside /BOFU/IF_FBI_VIEW_INSTANCE_NEW~GET_FIELD_PROPERTIES method (row 14 for OSS note 1952642 and row 13 for OSS note 1974627), there is this declaration:
ls_header TYPE /bofu/if_uicfg_c=>ts_fbi_data
This is not correct as interface /bofu/if_uicfg_c does not exist. As a consequence, when launching the “Shop” transaction, we have a DUMP.
We opened an OSS message for this point.
Regards.
Laurent.
02-20-2014 1:40 PM
Dear Laurent,
We are handling the issue.
We will update you as soon as possible via OSS.
Thank you and best regards,
Tami
02-20-2014 1:44 PM
03-06-2014 6:14 PM
Hello Tami,
currently, i do not work for customer concerned by OSS message you answered to.
I will be able to check OSS note 1981947 (which is not released yet) only by the end of next week.
Regards.
Laurent.
03-10-2014 11:53 AM
Dear Laurent,
Note 1981947 is now released.
Thank you and best regards,
Tami
03-13-2014 11:39 AM
Hello Tami,
we applied OSS notes:
1952642 - Field Usages set only for the first view
1974627 - Follow-up: Field Usages set only for the first view
1981947 - Fail to implement notes 1952642 and 1974627
Currently, we do not have any DUMP: thank you
Nevertheless, initial problem remains: it is not possible to manage field property using
/BOFU/IF_FBI_VIEW_EXITINTF_RUN~ADAPT_FIELD_PROPERTIES method
from /SRMERP/CL_FBI_VIEW_EXIT_BASE class.
Indeed, this does not change field properties:
1) CUF we created remain not mandatory,
2) Internal note we added to the User Interface remains not changeable.
Here below is code i implemented in a Post-Exit for concerned method:
DATA: lt_field_usage TYPE fpmgb_t_fieldusage,
ls_field_usage LIKE LINE OF it_field_usage,
ls_field_properties LIKE LINE OF ct_field_properties.
lt_field_usage[] = it_field_usage[].
SORT lt_field_usage BY name.
LOOP AT lt_field_usage INTO ls_field_usage.
MOVE-CORRESPONDING ls_field_usage TO ls_field_properties.
CASE ls_field_properties-name.
WHEN 'INTERNAL_NOTE'.
* Internal note
ls_field_properties-enabled = '1'. "enabled field: true (1), false (0)
WHEN 'ZZEKGRP'.
* Purchasing Group
ls_field_properties-mandatory = '1'. "mandatory field : true (1), false (0)
WHEN 'ZZEKNAM'.
* Purchasing Group name
* ls_field_properties-mandatory = '1'. "mandatory field : true (1), false (0)
WHEN 'ZZAFNAM'.
* Requester code
ls_field_properties-mandatory = '1'. "mandatory field : true (1), false (0)
WHEN OTHERS.
ENDCASE.
APPEND ls_field_properties TO ct_field_properties.
CLEAR ls_field_properties.
ENDLOOP.
* Field properties changed
cv_field_properties_changed = abap_true.
What am i missing?
Regards.
Laurent.
04-03-2014 6:23 PM
Hello,
new OSS note 1997049 - Issues with field properties of FBI related views was created.
I will try with implementation of this note.
Regards.
Laurent.
07-11-2014 7:30 AM