Limiting the accessibility of a field ...
A private field is inaccessible from anywhere outside the class and a protected field is accessible from anywhere in the same package.
Is there a way of making a field accessible to just the class and its derivatives? That is, can I get the behaviour of protected in C++?
Hi,
In the JDK 1.0, there was a "private method" modifier which allowed you to make the field accessible to only the class and its derivates. This was however considered a bug and is removed.
What you could do -and I don't recommand this- is declare your field as private and create a protected getter method in which you pass a reference from the calling object. You can then check wether this calling object is an instance of "this" (with "instanceof").
If you don't want to pass a reference in the getter method, you could pass a reference in the object constructor and assign this to a private object.
A last possible solution I can think of is create an Exception in your getter method (create one, not throw one), print and parse it's stack trace yourself to determine wether the calling object is an instance of "this".
I think you should first determine wether you absolutely need this.
Regards,
Kurt.
Similar Messages
-
Limiting the Report Layout access other than Authorization Object S_ALV_LAYO
Dear Experts,
We have an issue of Layout Access limit to Users coz unwittingly these are being deleted.
(Example: IW39 à after F8 à Settings à Layout.)
The Authorization object S_ALV_LAYO which limits the access, has been defined in the multiple Roles, where every User been assigned with these Roles across Three Continents.
Instead of hampering the existing Streamlined Roles, looking for other Options since if it may give odd behaviour after modifying the Roles then all the Users across the continents will be effected.
It will be grateful if we get other options to limit the Layout access instead of controlling through Authorization Object.
Thank you & Have a Great Day!Thank you Sebastian & Terence,
The Global Roles has maintained with Authorization Object (S_LAYO_ALV) and these are been assigned to Every User coz all Users should access these reports.
So now every User has maintained with the Authorization Object to access.
Now we are trying to Control the Access to limited Users through without hampering the well maintained/streamlined Roles, since if any adverse effects on the modified roles may impact to all the Users across the continents.
Looking for other options.
Thanks, I appreciate your time and efforts on this. -
How to restrict AS02 access to certain fields only
How to restrict AS02 (Asset Master Record) access to certain fields only. Currently when you assigned AS02 to a certain user, this will enable the user to change all the fields in the asset master record. Suppose i want only the user to restrict the access to certain field eg.NDJAR (Life in Yrs).
Thanks for your inputs.
Regards,
Roberthello,
basis has to assign the proper activity with object A_S_ANLKL. in this case they have to allow activity 03 only with combination of Cocode,asset class. see some more details below.
This authorization object is the first part of the object "asset master record."
The definition at this level determines whether the user is authorized to process data in a given company code. The activity type for the transaction is also defined here. This authorization object is used for master data transactions, for the display of value fields, and for reporting.
Defined Fields
The following fields are assigned to the authorization object
Asset class (specified by entering a value in the pop-up window)
Company code (specified by entering a value in the pop-up window)
Activity type - there are three different activity types:
01 = Create
02 = Change (including blocking and deleting)
03 = Display -
How to get the table of value field? and can we expand the technical limits
Dear
I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
We have a note for R.4.x Please see below:
OSS note 160892
You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
David Sun
Regards!how to extend the limit of value numbers? please see the original question.
-
I received a text today while at work about iCloud keychain verification code. I have not signed up for it or anything that uses it. I work out of the city with limited internet access so not sure why I would be getting this. I only got this number about a month ago. Apparently someone else had the number before because I get texts from his family members wondering whats going on. I got one yesterday and the person didn't seem to thrilled that the number was cutoff and today I got 2 texts about iCloud Keychain which I don't even know what it is. Seems suspicious to me. If the person who use to own the number is doing it he should know it is not his number anymore because he obviously didn't pay his bills. I'm not too sure about iCloud Keychain so just want to know my info safe?? It says it can store credit card numbers which is what gets me worried. Frankly I think it's pretty stupid to save that kind if information with any kind of app. But I don't want some random person trying to access my personal information because they are bitter they lost their number. Please let me know as soon as possible so I can change passwords or anything that is needed.
thanksIf it were me, I would go to my carrier and get a new number. Since you have only had it for a month, the inconvenience would be minimal.
Barry -
How to access the value of a field of a field symbol.
Hello All,
i need to access the value of a field in a field symbol. But when i am trying to get the value like <FS>-POSNR, it's showing that that the <FS> has no structure.
In my program, the field itself that i need to check should be dynamic. ie i'll get the field in a variable and i need to find the value of that field.
Am pasting my code below, please tell me what needs to be done.
here in my sample code i am moving the entry of the <FS> into a work area structure. But in my actual program, i gets the structure as a parameter. So is there any way i can declare a work area dynamically...
FUNCTION z_39181_dyn_fs_60758.
""Local interface:
*" IMPORTING
*" REFERENCE(PARAMETER) TYPE VBELN
*" TABLES
*" DATA_TAB
BREAK-POINT.
FIELD-SYMBOLS <fs> TYPE ANY.
FIELD-SYMBOLS <fs1> TYPE ANY.
FIELD-SYMBOLS <fstab> TYPE ANY TABLE.
DATA name(5) VALUE 'POSNR'.
FIELD-SYMBOLS <f> TYPE ANY.
DATA: dref TYPE REF TO data,
dref1 TYPE REF TO data,
dref2 TYPE REF TO data.
DATA: lv_lips TYPE string.
DATA: lv_lipsfld TYPE string,
lv_fld TYPE string,
lw_lips TYPE lips.
lv_lips = 'LIPS'.
lv_fld = 'LW_lips-POSNR'.
CREATE DATA dref1 TYPE (lv_lips).
CREATE DATA dref TYPE STANDARD TABLE OF (lv_lips).
CREATE DATA dref2 LIKE LINE OF data_tab.
ASSIGN dref->* TO <fstab>.
ASSIGN dref1->* TO <fs>.
assign dref2->* to <fs
<fstab> = data_tab[].
LOOP AT <fstab> INTO <fs>.
lw_lips = <fs>.
WRITE lw_lips-vbeln.
ASSIGN (lv_fld) TO <fs1>.
write <fs>
ENDLOOP.
Helpful answers will be rewarded...Use syntax
ASSIGN COMPONENT name OF STRUCTURE struc TO <fs>. -
Getting the 'Description' of a field from an Access DB
Hi,
How can we get rhe contents of the 'Description' of a field in an Access DB?For instance,
DatabaseMetaData dbmd = con.getMetaData();
ResultSet rs=dbmd.getColumns(null,null,"%","%");
You should read JDK API about DatabaseMetaData.getColumns to know more about what in that rs object:) -
Automatic tab when reaching the end of a field with limited character number
Hello!
Is there a way of activating an automatic tab behaviour when the user reaches the end of a field with limited character number?
I'd like the cursor to jump to the next field in tab order automatically.
Possible?
Thank you for any hints!
MarcosHi,
What if you tried something like the following example? This works using formCalc on the change event for the field the user is currently typing into:
var fullCount = 3
var currentString = xfa.event.newText
if(Len(currentString) >= fullCount)then
xfa.host.setFocus("TextField2")
endif
Or, if you prefer javaScript:
var fullCount = 3;
var currentString = xfa.event.newText;
if(currentString.length >= fullCount){
xfa.host.setFocus("TextField2");
These work very smoothly.
Hope this helps!
Stephen -
Can I still get CS5 trial - I have limited internet access and just want software on my pc - I am only running vista so that looks to be the latest that will work for me
If so what url do I go to as I have been round in circles and always come back to CC
ThanksDownloadable installation files available:
Suites and Programs: CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
Acrobat: XI, X | 9,8 | 9 standard
Premiere Elements: 13 |12 | 11, 10 | 9, 8, 7
Photoshop Elements: 13 |12 | 11, 10 | 9,8,7
Lightroom: 5.7.1| 5 | 4 | 3 | 2.7(win),2.7(mac)
Captivate: 8 | 7 | 6 | 5
Contribute: CS5 | CS4, CS3
Download and installation help for Adobe links
Download and installation help for Prodesigntools links are listed on most linked pages. They are critical; especially steps 1, 2 and 3. If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.window using the Lightroom 3 link to see those 'Important Instructions'. -
How to limit the access of a transaction
please provide hw to create an authorization object... like hw to limit the access of a particular userdefined trasaction to a particular user
hi
good
Element of the authorization concept.
Authorization objects allow you to define complex authorizations.
An authorization object groups together up to 10 authorization fields in an AND relationship in order to check whether a user is allowed to perform a certain action.
To pass an authorization test for an object, the user must satisfy the authorization check for each field in the object.
http://help.sap.com/saphelp_nw04s/helpdata/en/52/671285439b11d1896f0000e8322d00/content.htm
Basic form->
AUTHORITY-CHECK OBJECT object
ID name1 FIELD f1
ID name2 FIELD f2
ID name10 FIELD f10.
Example
Check whether the user is authorized for a particular plant. In this case, the following authorization object applies:
Table OBJ : Definition of authorization object
M_EINF_WRK
ACTVT
WERKS
Here, M_EINF_WRK is the object name, whilst ACTVT and WERKS are authorization fields. For example, a user with the authorizations
M_EINF_WRK_BERECH1
ACTVT 01-03
WERKS 0001-0003 .
can display and change plants within the Purchasing and Materials Management areas.
Such a user would thus pass the checks
AUTHORITY-CHECK OBJECT 'M_EINF_WRK'
ID 'WERKS' FIELD '0002'
ID 'ACTVT' FIELD '02'.
AUTHORITY-CHECK OBJECT 'M_EINF_WRK'
ID 'WERKS' DUMMY
ID 'ACTVT' FIELD '01':
but would fail the check
AUTHORITY-CHECK OBJECT 'M_EINF_WRK'
ID 'WERKS' FIELD '0005'
ID 'ACTVT' FIELD '04'.
To suppress unnecessary authorization checks or to carry out checks before the user has entered all the values, use DUMMY - as in this example. You can confirm the authorization later with another AUTHORITY-CHECK .
thanks
mrutyun -
Run Time Error - You attempted to access an unassigned field s
Dear All
I created a report to display purchase order history. there is no syntax error.but runtime which i have pasted below.
help me to find the error.
Runtime Errors GETWA_NOT_ASSIGNED
Date and Time 26.02.2008 06:25:56
Short text
Field symbol has not yet been assigned.
Error analysis
You attempted to access an unassigned field s
(data segment 32820).
This error may occur if
- You address a typed field symbol before it
ASSIGN
- You address a field symbol that pointed to
internal table that was deleted
- You address a field symbol that was previou
UNASSIGN or that pointed to a local field t
longer exists
- You address a global function interface, al
respective function module is not active -
not in the list of active calls. The list o
can be taken from this short dump.
Trigger Location of Runtime Error
Program SAPLSLVC
Include LSLVCF36
Row 3.176
Module type (FORM)
Module Name FILL_DATA_TABLE
Source Code Extract
Line SourceCde
3146 alv_style_align_center_top.
3147 endif.
3148
3149 append ls_lvc_data to ct_lvc_data.
3150 endif.
3151
3152 ************************************
3153 * Column per Fieldcat Entry
3154 ************************************
3155 loop at it_fcat_local assigning <ls_fcat>.
3156 clear: ls_lvc_data-href_hndl,
3157 ls_lvc_data-drdn_hndl,
3157 ls_lvc_data-drdn_hndl,
3158 ls_lvc_data-style,
3159 ls_lvc_data-style2,
3160 ls_lvc_data-style3,
3161 ls_lvc_data-style4,
3162 ls_lvc_data-maxlen.
3163
3164 clear: lt_color_lvc, lt_color_slis.
3165
3166 add 1 to ls_lvc_data-col_pos.
3167
3168 if not <ls_fcat>-indx_field is initial.
3169 assign component <ls_fcat>-indx_field
3170 of structure <ls_data> to <l_field_value>.
3171 else.
3172 assign component <ls_fcat>-fieldname
3173 of structure <ls_data> to <l_field_value>.
3174 endif.
3175
>>>> macro_cell_data_get
3177 <ls_fcat>
3178 <ls_data>
3179 <l_field_value>
3180 ls_lvc_data-value.
3181
3182 *>>> new API
3183 if ir_salv_adapter is bound.
3184 clear ls_lvc_data-style.
3185
3186 * color
3187 if g_gui_type ne 1.
3188 if <ls_fcat>-key eq abap_true.
3189 ls_lvc_data-style = alv_style_color_int_key.
3190 elseif l_style_color is initial
3191 and ( <ls_fcat>-emphasize is initial or
3192 <ls_fcat>-emphasize = '$' ).
3193 if <ls_stin>-counter is initial.
3194 ls_lvc_data-style = alv_style_color_normal.
3195 else.Hi
You are getting the dump because you have not populated the field catalog properly. There will be some mistake in the structure which you are using. Kindly check the same.
THanks
Vijay
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 26, 2008 12:41 PM -
How do I get the value of a field object programatically after loading a report
I'm using CR 11.5 and VS2005 in a console application, there is no GUI. I have a report with a page header that has 3 field objects. These field objects, their values change for every record and I want to be able to capture the value of these field objects in code for further processing outside of CR. Is this possible?
Thanks in advance!
I should explain a little more, the information I'm trying to obtain is in the Page Header section of the main report. There are subreports. Basically what I'm trying to put together is a list of how many pages are part of each record, the number of pages fluctuates per records so I need to be able to cycle through. Any other suggestions?When accessing the fields on the report through the SDK you will only get what database field they are using for data. The internal data collection that is used by the report can be gathered using the rowsetcontroller from the ReportClientDocument.
-
Limiting the Text Size in CRM 5.0 IC Web Client
Hello Experts,
We have a scenario where in we can enter the text for a CRM Document (say Service document) in the text field of IC Web Client. We have noticed that we are even allowed to enter the text of size around 73 MB also (which comes into 1000s of Word Documents).
We have now have a requirement for limiting this text as it is causing some problems and somehow affecting system performance.
Could anyone help me in limitating the text size in CRM 5.0 IC Web Client. I mean whether there is any configuration setting for doing the same or we need to do it in any text determination Procedure. Thanks in anticipation for your response.
Best Regards,
Kishore KKishore,
Use below code to determine no of characters typed in FoUpText.htm:
data: col_wrap type ref to cl_bsp_wd_collection_wrapper,
lr_entity type ref to if_bol_bo_property_access,
lv_str type string,
lv_len type i.
col_wrap = typed_context->BTTEXT->get_collection_wrapper( ).
lr_entity ?= col_wrap->get_current( ).
lv_str = lr_entity->get_property_as_string('CONC_LINES').
lv_len = strlen( lv_str ).
Place this code in controller FoUpText.do anywhere accordingly
Cheers,
Ankur -
Access HTML hidden field value in JSP
Hi,
I have a JSP and need to access the hidden fields on that HTML page,
i.e. in HTML i have a hidden tag
<form name="login">
<input type="hidden" name="language" value="en">
</form>
in my jsp i want to read the value of hidden field language
how can i do it???You read it as any other field :
String lng=request.getParameter("language");
The string lng will contain the value "en"
regards -
PS 2013 - Changing the formula in custom field not reflected in the report columns
Hi,
The company where I work have a Sharepoint environment / EPM 2013 with about seven hundred registered projects.
We have a customer demand where it is necessary to change the formula of one of the custom fields of the environment. This field is used in some management reports made in Reporting Services and accessed by the entire board. The report uses as a source
'MSP_EpmProject_UserView' view.
The change in formula was simple, but we found that the change will not be reflected in the reports when the user saves the project in Sharepoint or publish the schedule associated with the Project.
I believe this is the expected behavior of the EPM, but I wonder if there is some other way than through the PSI, to publish all environmental projects.
Best regards,
Armando Machado Gonçalves - Sharepoint / EPM 2013Hello,
That is expected, it will not update until the project is open and republished. No automatic way to do this without automating project pro. Publishing all projects via the PSI wont cause the plan to recalculate, the plans will need to be opened.
Paul
Paul Mather | Twitter |
http://pwmather.wordpress.com | CPS
Maybe you are looking for
-
Report on Excise Part 2 details
Hello friends, I want following report on excise to be extrated from SAP 1.GR No.& date 2.Part II number 3. Excise invoice no. & date 4. Vendor name 5. Duty amount The details are available in foll tables J_1IPART2 - all details available except Exci
-
Nokia Lumia 1520 upgraded to Windows Phone 8.1 G.D...
Hello reader(S), Today I accepted the Fast Ring (which was the only offered ring) programme on my Nokia Lumia 1520 to install the latest preview builds of Windows 10 and provide feedback for Microsoft... but here's the odd part, it installed Windows
-
Blocking sales view when serial number is active
Dear all, I want to block aq material. The basic data i.e. proc. view is alleadyu blocked, but the material will can sale. I want to block the sales view too. As there is serial no profile & serial level its not able to block the same. T
-
How to import an mp3 to GB3?
Hi, I have an .mp3 that I would like to remix in GB3, but I don't know how to. Everytime I bring it to GB3, it runs at its own speed, ignoring the BPM that GB is set to. How doI fix this to be able to keep all the instruments I want to add in synch?
-
Accessing httpSession in GP background callable object?
Hello Everybody, Id like to manipulate the httpSession Object in the Portal Session out of an GP BackgroundCallableObject. Can anybody give me an hint how to solve this problem? Thanks in advance Robert