How to define a standard value for a table field
Hi All,
I have a date field in a database table, for that while maintaining if we don't give any value it should get the present date. How can we do this.
Thanks,
bsv.
Hi,
This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
Regards,
<p>Blair Wheadon</p>
<p>Product Manager, Crystal Reports</p>
Similar Messages
-
How to defined data carrier valued for Linux?
Hi,
I am Defining Data Carrier. But I don't understand "Data carrier type" value. Is this PC value data carrier type for window? So If I want to define value data carrier for Linux. How to defined data carrier valued for Linux?
Please advise,
DuypmHi Nikita,
Refer the below mentioned links for your requirement.
http://forums.sdn.sap.com/thread.jspa?threadID=412923
http://forums.sdn.sap.com/thread.jspa?threadID=1639500
Both have good guidelines on coding as well as configuration part.
Regards,
Deepak Kori -
How to define maximum base value for vehicle.
Hi.
Could you clearify me why I can't fix maximum value for vehicles (1,000,000)
I already did configure as below:
IMG>> FI >> Asset Accounting >> Depreciation >> Valuation methods >> Dep key >> Caculation method >> Define maximun amount method
then assign to asset class by
IMG>> FI >> Asset Accounting >> Depreciation >> Valuation methods >> further setting >> Define maximun base value
after that I test maximum value and display value but I found that amount that use to calculate dep dosen't be 1,000,000
where is the mistake and how can I fix it ?
Thank you in advance
Best regards,
Utarat.Hi Utarat,
I assume you have linked this maximum amount methods to the depreciation key > AFAMA (V_T090NA-METHBT).
Please check also the amounts entered as maximun amount and if you have flagged the fiels XKUMU (read the documentation on it F1)
Have you set any maximun base value that can affect the calculations (Transaction OAW2)?
Note 1048448 could be helpful.
regards Bernhard
Edited by: Bernhard Kirchner on Sep 29, 2010 8:51 PM -
How to maintain default values for custom table fields -- Urgent
Hi all,
I've a requirement wherein i need to create a Z table (with maintainence view) in which i'll have date and time as two of its field which should have current date and current time as default value. Can somebody suggest as how am i to maintain the date and time fields defaulting to current date and current time.
Incase if someone is unable to intrepret what i'm trying to say, please query me, i'll elaborate it further.
Please give in your quick inputs which is highly valuable to me and also will be highly appreciated.
Thanks in advance,
Vaishnavi VaradarajanWe have a following custom table which contains the fields Date on which record was created and Name of the person who created the object. We would like to have these to be filled up with SY-DATUM and SY-UNAME respectively.
Using the events, we can achieve this.
Please refer the following link:
http://abapliveinfo.blogspot.com/2007/12/events-in-table-maintenance-in-sap.html
Also,
Write a form routine in table maintanance generator.
1. SE11 > utilities > table maintenance generator
2. environment > modification > event
define the event and form routine to make use of the tigger. in the form routine define an object for the class and call the relevant method.
Or u can do it as:
Table maintenance generator is basically used to do table operations like (insert, delete, modify...).
if you create table maintenance for your table it will build a module pool program, by using you do the above operations.
below is the procedure to create table maintenance generator.
1) Create one function group.
2) after activating your Ztable, choose 'Utilities'----> 'Table maintenance genrator'.
3) then give the authorization group and function group created abobe in the next screen.
4) Then choose the "create" button in your application tool bar, which will creates the module pool program.
5) then create one Tcode by chosing "Transaction with parameters( parameter transaction)".
6) in transaction field give "SM30", select the check box "Skip initial screen".
7) in the below of that screen you can find the "Default values" frame.
8) there under the "name of screen field" select the "View name' and 'update".
9) in value column against to "view name" give you table name, and against to "Update" put 'X' in capital letters.
save it then you can straight away use this newly created Tcode to maintain your table.
Note:- 1) make the modification while saving the data into your table using this newly generated program to carry out your validation (even though it looks like standard program; no need to enter the access key).
2) if you do any changes to your table and press the activate button automatically the table maintenace generator will be goes off, you need to create this again.
cheers, -
How to define Composite primary key for a Table
Hi ,
I am basically more into Java Programming , with little bit knowledge on Oracle as DataBase .so please excuse for my silly doubts .
Can anybody please tell me how to define a Composite Primary Key on a Table .
Thanks in advance .
Edited by: user672373773 on Sep 25, 2009 8:54 AMHere is an example right out of the Oracle documentation and the syntax for adding PK since you mention adding a composite PK.
Example creating composite index
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref594
Syntax for adding a PK (composite or not)
alter table oooooooo.tttttttt
add constraint tttttttt_PK
primary key (sample_column2,
sample_column1)
using index
tablespace IDXSPC
pctfree 05
initrans 04
maxtrans 08
storage (initial 16k
next 16k
maxextents 32
pctincrease 0);
-- dictionary management with restricted storage, change as desired.
HTH -- Mark D Powell -- -
How to get all minimum values for a table of unique records?
I need to get the list of minimum value records for a table which has the below structure and data
create table emp (name varchar2(50),org varchar2(50),desig varchar2(50),salary number(10),year number(10));
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',3000,2005);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',4000,2007);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2007);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2008);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2010);
commit;
SELECT e.name,e.org,e.desig,min(e.year) FROM emp e,(
SELECT e1.name,e1.org,e1.desig,e1.salary FROM emp e1
GROUP BY (e1.name,e1.org,e1.desig,e1.salary)
HAVING COUNT(*) >1) min_query
WHERE min_query.name = e.name AND min_query.org = e.org AND min_query.desig =e.desig
AND min_query.salary = e.salary
group by (e.name,e.org,e.desig);With the above query i can get the least value year where the emp has maximum salary. It will return only one record. But i want to all the records which are minimum compare to the max year value
Required output
emp1 org1 mgr 7000 2008
emp1 org1 mgr 7000 2007Please help me with this..Frank,
Can I write the query like this in case of duplicates?
Definitely there would have been a better way than the query I've written.
WITH got_analytics AS
SELECT name, org, desig, salary, year
, MAX (SALARY) OVER ( PARTITION BY NAME, ORG, DESIG) AS MAX_SALARY
, ROW_NUMBER () OVER ( PARTITION BY NAME, ORG, DESIG, SALARY
ORDER BY year DESC
) AS YEAR_NUM
FROM (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
SELECT name, org, desig, salary, year
FROM got_analytics
WHERE salary = max_salary
AND YEAR_NUM > 1
Result:
emp1 org1 mgr 7000 2010
emp1 org1 mgr 7000 2008
emp1 org1 mgr 7000 2007
emp1 org1 mgr 7000 2007
WITH got_analytics AS
SELECT name, org, desig, salary, year
, MAX (SALARY) OVER ( PARTITION BY NAME, ORG, DESIG) AS MAX_SALARY
, ROW_NUMBER () OVER ( PARTITION BY NAME, ORG, DESIG, SALARY
ORDER BY year DESC
) AS YEAR_NUM
, ROW_NUMBER () OVER ( PARTITION BY NAME, ORG, DESIG, SALARY, Year
ORDER BY YEAR DESC
) AS year_num2
FROM (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
SELECT name, org, desig, salary, year
FROM got_analytics
WHERE salary = max_salary
AND YEAR_NUM > 1
AND YEAR_NUM2 < 2
Result:
emp1 org1 mgr 7000 2008
emp1 org1 mgr 7000 2007 -
Default value for a table field?
Hi,
I have a table which contains the fields USER_NAME and DATE_CHANGED_AT.
here's what i want to do:
When we use se16 to enter data into the table, i want these fields to have default values .
user_name should contain the currently logged in user.
date_changed_at should contain todays date.
The aim is to eventually have these fields contain the person who last changed the row and the date when it was changed.
It doesnt matter if se16 doesnt contain it and we have a way of defaulting these values thru the table creation process.
something similar to the mandt field. When we create the table data, MANDT field is pre-populated.
Any thoughts?
Regards
VandanaEntering data using SE16 is not a good practice .
YOu have to use table maintenance generator to maintable the table entries.
This also provides with options to write your own code to meet requirements like this.
EVENTS in table maintenance generator
Regards,
Ravi -
How to pass the standard value for the entire datapackage in the routine
Hi Gurus,
I have timestamp field in the target. In endroutine , i assigned system date to the tiemstamp field . If i assign sy-datum to that field, if i get 4 datapackage im getting 4 different timestamp for each of the datapackage...
But my requirement is the timestamp should not vary for each of the datapackage.
For eg.
Timestamp
20111212060205 - Datapackage 1
20111212060602 - Datapackage 2
But i need as
Timestamp
20111212060205 - Datapackage 1
20111212060205 - Datapackage 2
How to pass it?
Thanks in advanceyou can use tvarv table.
if the datapackage number = 1,
use the current timestamp
overwrite the existing entry in tvarv.
else
use timestamp of tvarv -
How to define 'First Vsible row' for Tree table in Web Dynpro
Hi,
I am using a table with a treebykeytablecolumn. The user can change the selected
line from another view and then I change the selected line within the tree according to his choice. This works fine.
Unfortunatelly, I did not succeed to change the displayed page in the tree, so the user has to scroll up or down to see the selected data, if it is not on the current page.
I try to bind the 'FirstVisibleRow', using the index of the selected element, but this
index does not fit. The page changes, but as the index is somehow 'wrong', it is not
the expected page that is shown.
Looping at the node, my selected element get index 30, but the selected line is the 8th one (regarding what is current ly open or not in the tree) and the 14th if we expand all nodes above.
So, is there a way to specify which line to be the 1st visible one when there is a tree column?
thanks a lot for your help.
reagrds,
barbaraFollow these steps,
1- Create an attribute with char1 in the view context e.g first_vis_row
2- go to the table properties in view and bind the property first_visible_row to this attribute.
3- NOw go to the wddoinit method of the view...
4- read the internal table and find out the index of the row which you want to set as first row. As in ur case you want a specific date in first row. So read the internal table and findout the index.
5- now write this code, say your attribute name is first row inside node flag1...(you can change it for yoru requirement)
DATA lo_nd_flag1 TYPE REF TO if_wd_context_node.
DATA lo_el_flag1 TYPE REF TO if_wd_context_element.
DATA ls_flag1 TYPE wd_this->element_flag1.
DATA lv_first_row LIKE ls_flag1-first_row.
* navigate from <CONTEXT> to <FLAG1> via lead selection
lo_nd_flag1 = wd_context->get_child_node( name = wd_this->wdctx_flag1 ).
* get element via lead selection
lo_el_flag1 = lo_nd_flag1->get_element( ).
* get single attribute
lo_el_flag1->get_attribute(
EXPORTING
name = `FIRST_ROW`
IMPORTING
value = lv_first_row ).
here change the lv_first_row to the index which you got after raeading the internal table.
suppose it's
lv_first_row = 4.
lo_el_flag1->set_attribute(
EXPORTING
name = `FIRST_ROW`
value = lv_first_row ).
Hope it works. -
Maintaing a default value for a particular field in the selection screen
Hi all,
How to maintain a default value for a particular field in the Selection Screen of a Standard report
Regards
Ajay>
ajay babu wrote:
> Hi all,
>
> How to maintain a default value for a particular field in the Selection Screen of a Standard report
>
> Regards
> Ajay
Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
Regards
Rajesh. -
How to populate values for a new field in target infoprovider
Hi Experts,
am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case, i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
Thank you,
Chitra.
Edited by: Chitra_BI on Jun 13, 2011 10:23 AMDebug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
Regards,
Lalit Mohan Gupta. -
How to assign the two values for constant (same key)
How to assign the two values for constant (same key)
CONSTANTS: c_pstkey TYPE bschl VALUE '09',
c_splgl TYPE umskz VALUE 'I',
c_buzei TYPE buzei VALUE '001'.
using BSCH1 again i have two asign vaue
can you just let me know
Edited by: sravya_se38 on Nov 23, 2010 12:14 AMYou can create a structure for that constant .
You can define in this way
CONSTANTS : BEGIN OF c_pstkey,
01 TYPE bschl VALUE '01',
02 TYPE bschl VALUE '02',
END OF c_pstkey.
and can access using...
c_pstkey-01, c_pstkey-02 ........ -
Hi Team,
R12 Instance :
Oracle Installed Base Agent User Responsibility --> Item Instances -->
Item Instance: Item Instances > View : Item Instance : xxxxx> Contracts : Item Instance : xxxxx> Service Contract: xxxxx>
In the above page there are two table regions.
Notes.
-------------------------------------Table Region---------------------------
Attachments
-------------------------------------Table Region---------------------------
--the attachments are shown using the query from the fnd_lobs and fnd_docs etc...
I want to know what are the document types are displayed in this page ?
--We developed a custom program to attach the attachments to the services contracts and the above seeded OAF page displays those ..as needed.
But after recent changes..the Attachments--> table region is not showing the attachments.
I have verified the query..and could not find any clue in that..
but i need some help if you guys can provide..
SELECT *
FROM
*(SELECT d.DOCUMENT_ID,*
d.DATATYPE_ID,
d.DATATYPE_NAME,
d.DESCRIPTION,
DECODE(d.FILE_NAME, NULL,
*(SELECT message_text*
FROM fnd_new_messages
WHERE message_name = 'FND_UNDEFINED'
AND application_id = 0
AND language_code = userenv('LANG')
*), d.FILE_NAME)FileName,*
d.MEDIA_ID,
d.CATEGORY_ID,
d.DM_NODE,
d.DM_FOLDER_PATH,
d.DM_TYPE,
d.DM_DOCUMENT_ID,
d.DM_VERSION_NUMBER,
ad.ATTACHED_DOCUMENT_ID,
ad.ENTITY_NAME,
ad.PK1_VALUE,
ad.PK2_VALUE,
ad.PK3_VALUE,
ad.PK4_VALUE,
ad.PK5_VALUE,
d.usage_type,
d.security_type,
d.security_id,
ad.category_id attachment_catgeory_id,
ad.status,
d.storage_type,
d.image_type,
d.START_DATE_ACTIVE,
d.END_DATE_ACTIVE,
d.REQUEST_ID,
d.PROGRAM_APPLICATION_ID,
d.PROGRAM_ID,
d.category_description,
d.publish_flag,
DECODE(ad.category_id, NULL, d.category_id, ad.category_id) category_id_query,
d.URL,
d.TITLE
FROM FND_DOCUMENTS_VL d,
FND_ATTACHED_DOCUMENTS ad
WHERE d.DOCUMENT_ID = ad.DOCUMENT_ID
*) QRSLT*
WHERE ((entity_name ='OKC_K_HEADERS_V'-- :1
AND pk1_value IN ( 600144,599046) --:2
AND category_id_query IN (1, :3, :4, :5, :6, :7) )
AND datatype_id IN (6,2,1,5)
AND (SECURITY_TYPE =4
OR PUBLISH_FLAG ='Y')))
--='000180931' -- 'ADP118'
The above seeded query is the one which is used for table region to retrieve the data..
how to know the dynamic values for this : AND category_id_query IN (1, :3, :4, :5, :6, :7) )
--SridharHi Patricia,
is it working for restricted key figure and calculated key figure ??
Note Number Fisc Period Opening Days
1 1 2
2 1 3
3 1 0
because I have other restriction, so I create two restricted key figure..
RK1 with restriction : Total Number of Note,
RK2 with restriction : Total Opening Days ,
then I Created a calculated key figure, average opening days in a period
CK1 = RK2 / RK1..
in this case, I am not sure if it will work or not..
for example, during RK2 calclation, it might be this 2+3 = 5, the line with 0 will be ignored..
during RK1 calcualtion, it might be 1 + 1 + 1 = 3. ---> Not sure in this case, the line with opening days 0 will be calculated or not..
could you please confirm.. -
SRM 4.0- How to set the default values for product type (01) only for SC
The radio button Service should not be visible.
Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
How to set the default values for product type (01) only for SC
We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
Here we can set defalut value 01 but it is not correct one since same search help is using several places.
We need to limit the search help results only for SC.
Kindly help out me ASAP.The easiest way to set defautl values is to edit the batch class.
Goto the characteiristic and go to update values.
In here you probably have something like 0 - 100 as a spec range.
On the next line enter the default value within this range. At the end of the line, click in the box in the column labelled "D". This indicates the defautl value for the characteristic.
If you need to you can do this in the material classification view as well.
Just to be clear, these values will only show up in the batch record. You can not have defautl values in resutls recording screens.
FF -
How to set a default value for particular field in SRM PO Portal
Dear Gurus,
Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
Thanks in advance...
Regards,
SathishDear Laurent,
Thanks for your response,
But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
Kinly guide me how to get the particular node of field in the Purchase order screen.
Thanks you in advance,
Sorry for the inconvenience if any
Regards,
sathish
Maybe you are looking for
-
I fixed my Extension Manager Issues.
A customer of mine came in today with his Apple Hackintosh system, running OS X Lion 10.7.1 with all updates done, and the Java Library already installed. The issue they were having was to do with Adobe Extension Manager just crashing about 10 second
-
My IMac works for 30 mins without a glitch then starts putting itself to sleep every five minutes after that - it is getting hot in the top left hand corner - my guess is that something is on its way out - anyone had a similar issue before .
-
Mail rebuild mailbox issue with Gmail
I set up Mail 4.6 to receive and send e-mails to and from Gmail as per the instructions on the Gmail site and used additional information on this forum. What is happening is whenever I rebuild the gmail folder it downloads again all the files I have
-
Create Dynamic Variable in LabView (Newbie Java Developer)
Guys, This is my issue, I am a java & c++ developer and was interested in learning about LabView. But as simple as stated by the NI website it's not as trivial as I would expect it to be maybe because of my though process. So what I'm trying to obtai
-
Problem with CS5 crashing when inserting or deleting page
I have a legacy file (educational textbook) that was created in CS2 and has been edited and updated over the past couple of years with no problems. The file is approximately 360 pages with around 30 illustrations, a ToC, and large index. When updatin