Setter/getter
Somewhere in this forum (I can't seem to find it at the moment), someone said one should not use "setter/getter" methods because it "breaks encapsulation."
Well, in the database world, there is a term called "normal" when describing an ideal data set. One of the properties of "normal" data is that there are no duplications but, clearly, two people can make the same salary. So, the number 38500 may appear in a table twice - making a "normal" situation a textbook situation which one strives to approach as closely as possible.
Isn't "encapsulation" the same kinda thing?
Well, in the database world, there is a term called "normal" when describing an ideal data set. No, in the database world there are algorithms that reduce the expression of relations upon a data set to being functional dependencies on the primary keys.
One of the properties of "normal" data is that there are no duplications but, clearly, two people can make the same salary. In that case the functional direction would be from person to salary, so the normalised form of the relation would be to say 'two salaries cannot be made by one person'.
So, the number 38500 may appear in a table twice The relations in the classical normal forms are injective functions, not bijective or surjective, so you can have 38500 twice in a normalised table if it is the result of the 'salary_of_employee(x)' function for more than once value of x.
making a "normal" situation a textbook situation which one strives to approach as closely as possible.Firstly, the classical normal forms can always be achieved without loss of expressivity, so if you're striving and failing, something's in fact wrong. In this sense it's no different than saying 'getting the right answer when you add two numbers together is a textbook situation which one strives to approach as closely as possible'
In both cases - normal forms and addition - there are reasons (eg cpu time computing joins, precision of floating point hardware) where you may choose not to get the textbook answer for performance reasons.
Isn't "encapsulation" the same kinda thing?Not quite. Most OO languages lack the formal vigour that you could prove that encapsulation is achievable in all cases.
But they both get misunderstood, and IME ignoring them often results in more work in the longer run.
Whether that matters is more of a business decision than anything to do with computer science.
Pete
Similar Messages
-
Set/get variables with RSBBS from query 1 to query 2
Hi BW Experts,
I created a sender/receiver assignment from query 1 to query 2 using RSBBS. For two characteristics I assigned the processing method by Variable. Process mode for these variables in the receiver query is by customer exit. But I dont know how to set/get values of these variables.
Is there any function module to do it ??
Please help!!
Devthanks...but i m not used in RSBBS and i m afraid i m lost
could anyone explain me in detail :
- what i have to do for setting the sender & receiver,
- before to set parameter ID in the sender how to get the information of the current line (which will serve for the jump)
please help! i promise points
Dev -
SET/GET not working when I submit one program into Main program.
Hi All,
I am using set/get parameter as follows but somewht it is not working.. Please help.
IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
set parameter id 'AJN' field lf_jobname.
set parameter id 'AJC' field gf_jobcount.
ENDIF.
SUBMIT zace_interface
USER sy-uname
VIA JOB lf_jobname
NUMBER gf_jobcount
WITH SELECTION-TABLE lt_seltab
TO SAP-SPOOL
AND RETURN.
in the zace_interface program I have another submit program
submit zrsbdcsub and return
user 'ZACE_INTERFACE'
with mappe eq lf_group
with von eq sy-datum
with bis eq sy-datum
with fehler eq space
with logall eq co_true.
ad inside this submit im using
get parameter id 'AJN' field v_jobname.
get parameter id 'AJC' field v_jobcount.
but i am not able to get the values into v_jobname & v_jobcount.
Can you please help me in this regard. how i will get the values in v_jobname & v_jobcount.
Thanking you in advance
Regards,
PrashantHi..,
any way u r executing the programs in the same session but between diff. internal sessions u can use the IMPORT and EXPORT options ( ABAP MEMORY )
or do one thing...
<b>In the first program Copy these fields into a file in the <b>application server</b>,, and in the Second submit program u retrieve these variable values from the Application server file into these two variables!!</b>
just now i have solved one of the issues of this Kind by using an Application server file.
In the first program..
IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
OPEN dataset 'FILE' for output in text mode encoding default.
transfer lf_jobname to 'FILE'.
transfer gf_jobcount to 'FILE'.
CLOSE dataset 'FILE'.
ENDIF.
and instead of using the GET parameters in the second program ..
OPEN dataset 'FILE' for input in text mode encoding default.
read dataset 'FILE' into v_jobname.
read dataset 'FILE' into v_jobcount.
CLOSE dataset 'FILE'.
This has solved my problem !!!!! hope this helps u also!!
regards,
sai ramesh -
Set get parameter but free memory id is not working
Hi All,
I am using set get parameter to transfer data from one module to another .
But when i am trying to clear the memory id using Free memory id .
it is not doing that.
Does it work with import export.
What method i should use to clear this memory id ..
Thanks in advance
ANit gautamClears the memory:
SET PARAMETER ID pid FIELD space. -
Using set/get parameters or export/import in BSP.
Hi All,
Is it possible to use set/get or export/import in BSP?
We need to set/export some variables from a BADI and get/ import them in the BSP application.
Code snippet will be of great help..
Thanks,
AnubhavHi Anubhav,
You can use the Export / Import statements for your requirement,
from the BADI use EXPORT to send the variable data to a unique memory location
with IDs
e.g.
*data declaration required for background processing
DATA: WA_INDX TYPE INDX.
**here CNAME is the variable you want to export
EXPORT PNAME = CNAME TO DATABASE INDX(XY) FROM WA_INDX CLIENT
SY-MANDT ID 'ZVAR1'.
and in the BSP application use the IMPORT statement to fetch back the values
set with the IDs above.
IMPORT PNAME = LV_CNAME
FROM DATABASE INDX(XY) TO WA_INDX CLIENT
SY-MANDT ID 'ZVAR1'.
deletes the data to save wastage of memory
DELETE FROM DATABASE INDX(XY)
CLIENT SY-MANDT
ID 'ZVAR1'.
Regards,
Samson Rodrigues -
Using SET GET parameters in ITS
Hi All,
Is it possible to use set get parameters in ITS. We want to set some parameters in a BADI and read the value in ITS Template .
Or is there any other method to do this?
Thanks,
AnubhavSure. In your abap program use the following code
* ITS macros
INCLUDE avwrtcxm.
GET PARAMETER ID 'YOUR_PARAMETER' FIELD SAVE_PARAMETER.
field-set u2018~YOUR_PARAMETERu2019 1 SAVE_PARAMETER.
field-transport.
in the template you can now use ~YOUR_PARAMETER.
regards,
Klaus
Edited by: Klaus Layer on Feb 3, 2009 5:05 PM -
How to set/get the values thru Wedbynpro coding for User mapping fields
Hi All
In system object we have the user mapping fields like District,city,plant,Salesmanager.
now we want to set/get the values of these usermapping fields of system object thru webdynpro coding...
if anybody have sample codes of the same then it would be great help to me
Thanks in advance
Thanks
Trisha RaniHi Kavitha
Thanks for your reply
My requirement is exactly as follows.
1) i have created one portal system object in system administration and also i created usermapping fields in the system object from the usermanagement in system object.
i created the user mapping fields like Plant,SalesManager,District etc.
i also created the system alias name for the same system object
2) Now i came to persoanlize link and mapped the system object to the portal user.
while mapping to the system object we need to enter Mapping userId, Password , once we enter these values and we can also enter the values of usermapping fields which we defined while creating the system object ( for example District,Salesmanager,Plant etc)
once we enter all the values and click on save then these usermapping values to be mapped to the portal user.
3) Now my requirement is , i want to control the usermapping field values thru webdynpro coding for setting/getting the values.
I need sample code of the same.
Please let me know if u need more details on the same.
Thanks
Trisha Rani -
SET GET Parameter working fine but no entery in table TPARA
Hi Experts,
I am using SET/GET Parameter.
All is working fine but no entery is created in table TPARA for this ID beacuse of this i am not able to use DELETE FROM MEMORY ID 'ZID' .It always returns 4 since there is no entry in table TPARA.
Why there is no entery created in TPARA and how can i delete this ID from SAP memory?
Thanks,
Anubhav>
Anubhav Jain wrote:
> Why there is no entery created in TPARA and how can i delete this ID from SAP memory?
> Anubhav
Entry in TPARA automatically gets created when you assign PID to data element.
Check if ZID is assigned to any data element.
To clear the content of PID from memory use SET PARAMETER statement with empty field.
DATA lv_blank type char10 .
CLEAR lv_blank.
SET PARAMETER ID ZID FIELD lv_blank. -
Set/get attribs via SubVI (revisited)
Greetings. This question was asked about a month ago (See "How to
set/get..." by John Cruz, 3/20/00 in this newsgroup), but the ensuing
discussion didn't address a similar question that I have.
The question is the same: Is there a way to set/get attributes of a control
(like "Visible" or "Disabled") on the front panel of a VI directly from
within a subVI?
The solutions given last month all appeared to require an output of the
subVI wired to the attribute node inside the calling VI, and I'd like to
avoid that. E.g. I would like to set an attribute of a top-level control
using a subVI, but using a subVI that has NO OUTPUTS.
Another way to think of it is that I'd like to discover something like a
"Global Attribute
Node" for a control which itself is not global. I.e. an
attribute node which could be referenced from any VI but would still affect
only one control on a different VI's front panel. Obviously that specific
creature doesn't exist, but that's the idea I'm after.
Sufficiently confused? My main goal here is really to enable and disable
buttons through a subVI, and to avoid using more wires whenever possible. I
guess I'm a LabView neat-freak. :-)
Thanks in advance for any advice!
Justin Goeres
Indio Systems, Inc.
Pleasanton, CAA "creature" such as a Global Attribute Node for a control does not exist
yet in LabVIEW. My guess is that sooner or later you will be able to open a
"Control Reference" to a VI FP control and use it to call "Property Nodes"
and "Invoke Nodes" to sets its attributes from anywhere in your application
or even from another application, as it is currently possible for VIs with
the VI Server.
For the moment, a VI must set its attribute nodes on its own diagram. To set
attribute nodes from outside the VI you must provide a method to communicate
with the VI and tell it which value to set its attribute.
For example, the VI can read a global variable in a while loop to update the
attribute node to whatever value have been written to by other running VIs,
even by its subVIs. provided that the loop execute in parallel with the
subVI call.
Instead of using a global, you can wire a front panel control to the
attribute node. A VI that wants to modify the attribute node then uses VI
Server method "Set Control Value" on this front panel control to write the
new value.
Basically, all you need is a technique to pass data between VIs; you can use
any other you like (notifiers, TCP/IP, etc).
Of course, when you design your VI, you must know in advance which attribute
nodes will eventually need to be externally updated and wire them
accordingly. Hopefully, this won't be necessary if a "Control Reference"
ever come to be implemented in LabVIEW.
Regards,
Jean-Pierre Drolet
Scientech R&D inc
Trois-Rivieres-Ouest (Quebec)
CANADA G8Z 4H1
John Lum a �crit dans le message :
[email protected]...
> Justin Goeres wrote:
>
> > Greetings. This question was asked about a month ago (See "How to
> > set/get..." by John Cruz, 3/20/00 in this newsgroup), but the ensuing
> > discussion didn't address a similar question that I have.
> >
> > The question is the same: Is there a way to set/get attributes of a
control
> > (like "Visible" or "Disabled") on the front panel of a VI directly from
> > within a subVI?
> >
> > The solutions given last month all appeared to require an output of the
> > subVI wired to the attribute node inside the calling VI, and I'd like to
> > avoid that. E.g. I would like to set an attribute of a top-level
control
> > using a subVI, but using a subVI that has NO OUTPUTS.
> >
> > Another way to think of it is that I'd like to discover something like a
> > "Global Attribute Node" for a control which itself is not global. I.e.
an
> > attribute node which could be referenced from any VI but would still
affect
> > only one control on a different VI's front panel. Obviously that
specific
> > creature doesn't exist, but that's the idea I'm after.
> >
> > Sufficiently confused? My main goal here is really to enable and
disable
> > buttons through a subVI, and to avoid using more wires whenever
possible. I
> > guess I'm a LabView neat-freak. :-)
>
> Unfortunately, Jean-Pierre Drolet's discussion from the thread in March is
> exactly right. In the current incarnation of LabVIEW, there is simply no
direct
> way to access panel object attribute nodes from a secondary VI. The
suggestion
> to use VI Server and the Set Control Value method with a control wired to
the
> attribute node of choice sounds like an excellent idea to me.
>
> I'm pretty sure that the LabVIEW developers have long since identified
this as a
> very pivotal bit of functionality for LabVIEW, so stay tuned.
>
> Regards,
> John Lum
> -
Problem with Set/Get volume of input device with single channel
from Symadept <[email protected]>
to Cocoa Developers <[email protected]>,
coreaudio-api <[email protected]>
date Thu, Dec 10, 2009 at 2:45 PM
subject Problem with Set/Get volume of input device with single channel
mailed-by gmail.com
hide details 2:45 PM (2 hours ago)
Hi,
I am trying to Set/Get Volume level of Input device which has only single channel but no master channel, then it fails to retrieve the kAudioDevicePropertyPreferredChannelsForStereo and intermittently kAudioDevicePropertyVolumeScalar for each channel. But this works well for Output device.
So is there any difference in setting/getting the volume of input channels?
I am pasting the downloadable link to sample.
http://www.4shared.com/file/169494513/f53ed27/VolumeManagerTest.html
Thanks in advance.
Regards
Mustafa
Tags: MacOSX, CoreAudio, Objective C.That works but the the game will not be in full screen, it will have an empty strip at the bottom.
I actually found out what's the problem. I traced the stageWidth and stageHeight during resizing event. I found out that when it first resized, the stage width and height were the size with the notification bar. So when I pass the stage into startling, myStarling = new Starling(Game,stage), the stage is in the wrong size. For some reason, I can only get the correct stage width and height after the third resizing event.
So now I need to restart Starling everytime a resizing event happened. It gives me the right result but I am not sure it is a good idea to do that.
And thanks a lot for your time kglad~I really appriciate your help. -
Problem with SET GET parameters
Hi all,
I am facing a problem using SET and GET parameters.
There is a Z transaction(Dialog program) where some fields of screen are having parameter ID's. That transaction is designed to diaplay/change status of only one inspection lot at a time.
Now I need to call that transaction in a loop using BDC. I mean i need to update the status of multiple inspection lots(one after the other). Before calling the transaction I am using
SET PARAMETER ID 'QLS' FIELD lv_prueflos.
Unfortunately the transaction is only changing the first inspection lot. When I debugged I found that the screen field is changing in PAI. Even though in PBO it shows the next value, when it goes to PAI it is automatically changing to the first value(inspection lot).
Example: Inspection Lots : 4100000234
4100000235
4100000236
Now first time when the call transaction is being made the status of insp lot 4100000234 is changed. For the second time when insp lot 4100000235 is being passed in PBO ican see this. But the moment it enters PAI the screen field changes to 4100000234.
Could you pls help me in solving this issue.
Thanks,
AravindHi,
Problem with SET GET parameters
Regarding on your query. Follow this below link.
It will help you.
Re: Problem with Set parameter ID
Re: Problem in Set parameter ID
I Hope it will helps to you.
Regards,
Sekhar -
SUBMIT program VIA JOB and SET/GET parameter
Hi All
I need to pass the content of a variable from the program 'A' to program 'B'.
Program A uses JOB_OPEN , SUBMIT program VIA JOB jobname NUMBER jobnumber AND return, JOB_CLOSE.
I tried to use import/export memory but it didn't work. Then I am trying to use set/get parameters but it also did not work.
Program A is going to run in any server and program B will run in the central instance (it is determined in the FM JOB_CLOSE, parameter target_server).
Program does not have selection-screen.
Is it possible use set/get parameter with submit via job?
Could you please advise?
Thanks in advance.
João GaiaHere a simple code
*Submit report as job(i.e. in background)
data: jobname like tbtcjob-jobname value
'TRANSFER DATA'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1 value 'X'.
* Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
* Insert process into job
SUBMIT zreport and return
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
* Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
" event_id = starttime-eventid
" event_param = starttime-eventparm
" event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
" laststrtdt = starttime-laststrtdt
" laststrttm = starttime-laststrttm
" prddays = 1
" prdhours = 0
" prdmins = 0
" prdmonths = 0
" prdweeks = 0
" sdlstrtdt = starttime-sdlstrtdt
" sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
" targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
Then... for import/export of a variable, you can use Import Memory and Export Memory function.
Like this:
REPORT A:
IF NOT it_dlist_out IS INITIAL.
EXPORT it_dlist_out TO MEMORY ID 'TEST1234'.
ELSE.
* Clearing memory
FREE MEMORY ID 'TEST1234'.
ENDIF.
REPORT B:
IMPORT it_dlist_out TO lt_dlist_out FROM MEMORY ID 'TEST1234'.
Edited by: spantaleoni on Jan 11, 2011 3:21 PM
Edited by: spantaleoni on Jan 11, 2011 3:23 PM -
I have project that uses a shared fonts. The fonts are all
contained in a single swf ("fonts.swf"), are embedded in that swf's
library and are set to export for actionscript and runtime sharing.
The text in the project is dynamic and is loaded in from
external XML files. The text is formatted via styles contained in a
CSS object.
This project needs to be localized into 20 or so different
languages.
Everything works great with one exception: I can’t
figure out how to set which character set gets exported for runtime
sharing. i.e. I want to create a fonts.swf that contains Korean
characters, change the XML based text to Korean and have the text
display correctly.
I’ve tried changing the language of my OS (WinXP) and
re-exporting but that doesn’t work correctly. I’ve also
tried adding substitute font keys to the registry (at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes) as outlined here:
http://www.quasimondo.com/archives/000211.php
but the fonts I added did not show up in Flash's font menue.
I’ve also tried the method outlined here:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16275
to no avail.
I know there must be a simple solution that will allow me to
embed language specific character sets for the fonts embedded in
the library but I have yet to discover what it is.
Any insight would be greatly appreciated.
http://www.quasimondo.com/archives/000211.php
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16275Thanks Jim,
I know that it is easy to specify the language you want to
use when setting the embed font properties for a specific text
field but my project has hundreds of text fields and I'm setting
the font globally by referencing the font symbols in a single swf.
I have looked at the info you've pointed out but wasn't
helped by it. What I'd like to be able to do is to tell Flash to
embed a language specific character-set for the font symbols in the
library. It currently is only embedding Latin characters even
though I know the fonts specified contains characters for other
languages.
For example. I have a font symbol in the libary named
"Font1". When I look at its properties I can see it is spcified as
Tahoma. I know the Tahoma font on my system contains the characters
for Korean but when I compile the swf it only contains Latin
characters (gylphs) - this corresponds to the language of my OS (US
English). I want to know how to tell Flash to embedd the Korean
language charaters rather than or as well as the Latin characters
for any given FONT SYMBOL. If I could do that, then, when I enter
Korean text into my XML files the correct characters will be
available to Flash. As it is now, the characters are not available
and thus the text doesn' t display.
Make sense?
Many thanks,
Mike -
How to use SET & GET Parameters in Module Pool
Hi Friends,
Can anyone please tell how to use SET / GET parameters and PARAMETER ID for a text box (Input / Output field ) in module pool? What is the purpose and where do we need to do coding for it?
Note : I will definitely give the marks for good responses.
Thanks in advance,
PradeepHi Pradeep,
You can save values in the SAP memory using a parameter ID. These
are user and terminal-session specific, but available to all internal and
external sessions.
SET Parameter copies the corresponding field contents into the SAP
System memory in the PAI processing block.
GET Parameter copies the corresponding field contents from the SAP
memory at the end of the PBO processing block, after data has been
transferred from the program, if the screen field still has its initial value
You can link an input/output field to an area of the SAP memory in the
ABAP Dictionary.
When you use an input/output field that is defined in the ABAP
Dictionary, its parameter ID is displayed in the Dictionary attribute
Parameter ID in the Screen Painter.
Usage
SET PARAMETER ID: CAR FIELD space,
CON FIELD space,
DAY FIELD space.
Here is the link that explains the usage of GET/SET in detail
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm</a>
Regards,
Sharadha -
How to set/get URL-parameters from ORACLE -tag?
How do I set/get parameters in a URL, using the <ORACLE>-tag?
We are trying to create a UI Template containing a dynamic
stylesheet selection dialogue on top of every page. The question
we are facing now is how to pass parameters (in our case,
stylesheet settings) between different pages.
Any ideas/comments are appreciated!How do I set/get parameters in a URL, using the <ORACLE>-tag?
We are trying to create a UI Template containing a dynamic
stylesheet selection dialogue on top of every page. The question
we are facing now is how to pass parameters (in our case,
stylesheet settings) between different pages.
Any ideas/comments are appreciated! -
How to set/get the archive file attribute?
I am programing a (freeware!) ftp client and need to know, how to set/get the archive attribute of a local file. I was searching through whole the i-net - nothing at all!
please help me!!Hi,
Since not all operating systems support the archive attribute, this ain't included in the JDK.
If you're using Microsoft Foundation Classes for Java, then you can use File.getAttributes(String path) and check whether the result equals FileAttribute.ARCHIVE.
For setting the attribute, you can use
File.setAttributes(String path, FileAttribute.ARCHIVE)
Of course this is all Microsoft-specific stuff.
Hope this helps,
Kurt.
Maybe you are looking for
-
Help with inserting image! it's not showing..
Hi. I'm a very beginner, and really struggling with basics. Please can someone help me?! All I'm trying to do is insert a logo to the bottom of the page (or whereever really!) I've inserted the file onto the page which shows fine in dreamweaver, but
-
How to use cursors on Smith Chart?
Hi everybody, Last 7 days , i was trying to point some markers on Smith chart. Please suggest any method to implement this. i want to mark some points on smith chart and get data. thank you, dg7318 Solved! Go to Solution.
-
Yosemite doesn't recognize my new Apple ID
In August 2014, we changed our AppleID from an email address we had for many years because of a change in internet providers. Today after downloading Yosemite I can't set up my iCloud etc... because the old email address is listed as my AppleID. I
-
Is there a way to encrypt certain column in a table in 8i?
-
RAID 5 Disk State Roaming - What to do?
I have an Apple RAID card that has been giving me some fits lately. My current problem is in my RAID 5 set. I have all 4 drive bays in use. All 4 bays have green circles, so the disks seem to be fine, but the drive in bay 4 says its in "Roaming" as i