XLATLONGNAME of dropdown need to be default value of editbox
Hi,
I have two fields in a grid, One is Drop Down named "TEST_Type" and one is Edit box named "TEST_Name".
Use case is , TEST_Name's by default value will be TEST_Type in Drop Down.
"TEST_Type" is Translate Table Edit and "TEST_Name" will contain XLATLONGNAME.
I drag XLATLONGNAME from PSXLATITEM table in my grid and make it Related Field and "TEST_Type" a Related Control Field.
It is showing LongName according to "TEST_Type" Value.
In RowInit Event of "TEST_Name" Field, I wrote
If GetRow().IsNew And
None(MYRecord.TEST_NAME.Value) Then
MYRecord.TEST_NAME.Value = GetRow().GetRecord(Record.PSXLATITEM).GetField(Field.XLATLONGNAME).Value;
End-If;
It gives Error
"Class Row method GetRecord record PSXLATITEM is invalid. (2,268)
MYRecord.TEST_NAME.RowInit
The record has been used as a parameter of the specified method. It is not valid for the current object."
What is the problem ?
Is there any better solution for this use case ?
Thanks in Advance
I think you are mixing some thinks up.
The dropdown is on a filed with translate values. So when you set the page field properties of the dropdown to show the longxlatitem, you are done.
If you want to copy the xlatlongvalue for some reason to other fields, then use the field object properties instead.
&dropdownlownlist = getrecord([YOUR_RECORD]).getfield([YOUR_FIELD]);
&VALUE =&dropdownlownlist.LongTranslateValue;
Regards,
Hakan
Similar Messages
-
Need to set default values for the fields plant and location in ME21N
Hi All,
i need to set default values for the fields plant and location in ME21N tcode.
In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
How to resolve this?
Thanks in Advancehi .
i needed to set default strorage location and plant in personal setting in me21n.
i solve it with this way.
go to program SAPLMEPERS in se38.
create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
in this module write:
if MEPOITEM_PROP-WERKS is INITIAL and MEPOITEM_PROP-LGORT is INITIAL.
MEPOITEM_PROP-WERKS = '1000'.
MEPOITEM_PROP-LGORT = '0032'.
endif.
this is the solution.
best regards.
maryam -
Hi Team,
Am using BULK INSERT Format file option to load data into table from .txt file here am facing an issue i.e ibased on input file i need to insert default values to some columns of table so we can not declare it on table level, Can we give default values in
format file ? if we can give how it is ? or Any alternate possibilities to this scenario instead of BULK INSERT ?
Thanks,
SudhakarThanks for your response, here i don't have any rights to change table structure the table is created by different team, my work is to load data from file to table. Is there any chance to supply default values by*XML* format file instead of *.fmt* file
please let me know the possibility.
Again, no. If you want to supply default values that are not present in DEFAULT constraints in the table definition, you will need to write your own code. There are plentyfull of options, and I have mentioned some already.
Here are some more:
* Table-valued parameters, see here for examples:
http://www.sommarskog.se/arrays-in-sql-2008.html
* Use BULK INSERT to load data to a staging table, and then apply the default values when you copy from staging to target.
Erland Sommarskog, SQL Server MVP, [email protected] -
SQL Loader needs to load default value instead of null
I am loading data from the flat file into the table. The table primary key consists of 5 fields. One of these fields might be empty in the text file, so on the load I need to substitute it with some default value like "***", for instance. Is there any way to make some conditions in the control file?
You can either make use of the suggession given by Warren Tollentino or alter table by adding default constraint for the column.
-
Need to show default value in a form
hi this is azhar..i have a question..
i have created a form that displays values using a dyanimc lov however i need to show the default value as 'NA' which is one of the values in the lov..plz let me knw ...Hello Azhar,
Just set the "Initial Value" property of the LOV's associated item to "NA".
Hope this helps.
Craig... -
Need to set default value on Account Search
HI All,
In BSP BP_HEADSEARCH view MainSearch I need to default the value of the attribute 'RESP_AREA' to '01'. I can see the attribute on the value node SEARCH but when get the current context of SEARCH the entity is of a type CL_CRM_BOL_DQUERY_SERVICE and I am not sure how to set the default value.
Any help will be appreciated,
Regards,
TomHi Tom,
When it comes to setting values in a search entity you can not use the normal getter/setter methods because the context node class will be inherited from CL_BSP_WD_CONTEXT_NODE_ASP. In the context node class there will be few attributes (FIELD,MAX_HITS,OPERATOR,VALUE1,VALUE2) that corresponds to the fields diosplayed in the search criteria. The fields VALUE1 and VALUE2 represents the LOW and HIGH values.
To set default value for RESP_AREA you must redefine SET_VALUE1 method and read the ATTR_NAME. If ATTR_NAME is RESP_AREA then you can set the value.
Method SET_VALUE1.
* Get current criterion
data: criterion type ref to if_bol_bo_property_access.
if iterator is bound.
criterion = iterator->get_current( ).
else.
criterion = me->parameter_collection->get_current( ).
endif.
* Set its low value from user input
try.
data: lv_value type string.
lv_value =
me->convert_value_from_string( iv_string = value
iv_criterion = criterion ).
criterion->set_property( iv_attr_name = 'LOW'
iv_value = lv_value ). "#EC NOTEXT
cleanup.
* Keep buggy user input for correction
criterion->set_property( iv_attr_name = 'LOW'
iv_value = value ). "#EC NOTEXT
endtry.
* Set the default value for RESP_AREA
lv_attr_name = criterion->get_property_as_string( 'ATTR_NAME' ).
if lv_attr_name eq 'RESP_AREA'.
criterion->set_property( iv_attr_name = 'LOW' iv_value = ---- ).
Endif.
Regards,
Arun -
Help needed in setting Default Value of Concurrent program parameter
Hi All,
I have 3 parameters in a concurrent program
Org ID From
Org ID To
Currency Code
In the Currency Code parameter I want to use the following query in the Default Value
SELECT currency_code
FROM gl_sets_of_books sob, org_organization_definitions ood
WHERE ood.organization_id = :p_org_id_from
AND sob.set_of_books_id = ood.set_of_books_id
Now, at runtime this gives me an error of p_org_id.
Can anyone please advice me how can I use this parameter(p_org_id_from) in the above query.
Any help will be really appreciated.
Regards,
ShrutiHi Helios,
Thaks a lot for the help.
I modified the query as follows:
SELECT currency_code
FROM gl_sets_of_books sob, org_organization_definitions ood
WHERE ood.organization_id = :$FLEX$.ORG_INTRANSIT
AND sob.set_of_books_id = ood.set_of_books_id
Here ORG_INTRANSIT is the valueset I am using in From Org ID and To Org ID.
Now the problem which I face is that when I use ORG_INTRANSIT valueset in both From Org as well as TO Org then the Currency is not defaulted, but if I use it in either From Org or To Org then the Currency is defaulted.
How can I resolve this. Please help.
Regards,
Shruti -
Need to set default value in table EABL.
Hi Experts,
How to set default value of field ATIM form 00:00 to 23:59 ion field selection screen for table EABL in transaction SE16?hi jazz try this way.
forget about every thing and come from beginning.
by now i think your are familiar with shd0.
firstly create a variant using shd0 for your table eabl with default value and save it and activate it.
next check whether it is working or not by opening se11 or 14 and enter table name and click display, the you can you see your default vale in your required field.
after it is done the come to second part i.e your se16.
now create another variant for this and save it and activate it.
(by this i mean to say you are creating two variants )
hope this will solve your problem.
if your purpose is not solved yet then please write to my mbox.
regards,
kool. -
Dropdown list default value in Visual Composer
Hi all ,
i have dropdown list in my Visual composer layout i have values coming like 2001 to 2014 ,everything is fine . i need to display default value in the dropdown list should be curent year like 2009when i deploy the application by default the current year should be displayed in input field.Hi Venkatp,
To Assign the function into the dropdown inputfield DSTR(NOW(),'YYYY') and you can to display the current year
Followings links are available to display the dateformat,
http://www.sdn.sap.com.ngrs.net/irj/scn/index?rid=/library/uuid/60535002-571c-2c10-58b6-cc27faa7be4d&overridelayout=true
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/7556c6b7-0e01-0010-878b-cbf4dbe859eb&overridelayout=true
Regards,
Prabha -
How to Set default value to dropdown list in oracle ADF
hi,
I need to set default value in the drop down list in oracle ADF.
If you take in HTML :
<select>
<option value="">Select Value </option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
Like this i need to set default value in drop down llist in oracle ADF.
Thanks and Regards,
M. Ramu.Hi Ramu,
Please be more clear on ur post whts ur Jdev version and wht type of dropdown u r using model driven or static list..?????
Its hard to help u without proper info..
Just have a look into this before u post a thread...
https://forums.oracle.com/forums/ann.jspa?annID=56
Regards,
Suganth.G -
I need to pass null as a default value for a parameter in Before Trigger
Hi All,
I am using Before trigger function in calculation tab which has some set of parameters.So, I accept some parameters which are passed to this Before Trigger function and need these parameters default value as null.
To be clear I want to set the Default value for a parameter in workbook to be NULL and pass the same to the calling Function.
please help me.
Thanks in advanceHi All,
I am using Before trigger function in calculation tab which has some set of parameters.So, I accept some parameters which are passed to this Before Trigger function and need these parameters default value as null.
To be clear I want to set the Default value for a parameter in workbook to be NULL and pass the same to the calling Function.
please help me.
Thanks in advance -
How to make a default value by using dynamic actions
Hi,
I want to default a field nationality in infotype 0002 as a great britan, using dynamic actions but unable to go ahead. Any help regarding this really appreciate.
Regards
NiranjanHi,
I need some guidance around creating dynamic action with default value, Please guide me through.
I am aware I can set default values for new infotype, but I need to set default value for same infotype, let me explain the scenario.
Currently employee is on one pension scheme which is called NE1 and now we are moving this employee to CRESP Pension Scheme.
When employee is in NE1, his IT0071 has got a opt in field with a flag on, when the same employee is moved from NE1 pension scheme to CRESP Pension scheme, his new IT0071 record should have the same opt in field with a flag on, I want it to set this flag automatically using dynamic action. I dont want to update this field manually, while moving from NE1 to CRESP.
Currently the below dynamic action is coded when employees are being moved form NE1 to CRESP, but now they will have a opt in flag which should appear automatically, What needs to be done to make this happen?
Please let me know if I set default value for the Opt in field for the same infotype.
. When employees are being moved from NE1 to CRESP pension scheme we currently use a dynamic action as show below:
0071 04 10 I INS,0069
0071 04 20 W P0069-BEGDA=P0071-BEGDA
0071 04 30 W P0069-ENDDA=P0071-ENDDA
0071 06 1 F DYNACT_PAE031(ZHRPROG016)
Also if it is not possible via dynamic action could you please explain how to create it using user exit, I am not an ABAPer.
Your help is very much appreciated.
Kind Regards,
SK -
How to set default value to input field
Hi Experts,
I need to set default value to one input field for the transaction crmd_order as a screen variant. Guide me in doing that.
Regards,
HarishUsing the transaction SHD0, you can define the screen variant. While defining the sceen variant, you are allowed to define the default values.
Using screen variant, for the main transactoin, you can also define the transaction variant and you can use this as an independent transaction. -
Material Master Default Values
Dear All
Whenever we create a material, we want to have the same value as default for a particular field in one of the Material master views.
Is this possible and how can it be done?
Regards
HaryHi Hary,
Discuss with an ABAP consultant & find the user enhancement for the material master screen & then get the user exits for the fields.
Give the list of fields you need to have default values, then it can coded in the include program.
To find a user exit use T.code SMOD.
For further coding use T.code CMOD.
Regards,
Senthilkumar SD -
Default values for the controlling area and language
Hello
I have a query.
I need to set default values for the controlling area and language in the screen
"find account assignment data 1"
Is it possible to do so?
Thanks.
Jayawant GokhaleHello
To clarify,
This is the search used ,when I go for shopping.For the Cost assignment,the fields controlling area and language should be default for a user.
Could someone throw a light on this.
Thanks.
Maybe you are looking for
-
For a couple of weeks now I can't use the forward button on my iPod. No matter how soft or hard I press it, nothing happens. Is this just a sign of an aging iPod (it's actually less than a year old) or is it something else?
-
Short text and number of outline not maintained error in BAPI_ENTRYSHEET_CREATE
Hi Experts, I am using BAPI BAPI_ENTRYSHEET_CREATE' for creation of service entry sheets. I passed below data into the respective parameters Entry Header Sheet - SHORT_TEXT THIS IS SAMPLE TEXT PO_NUMBER 231002130 PO_I
-
Time Characterstics Coversion(Urgent)
Hi Guys, I have a requirement to calculate the Current month and corresponding last year month and Current year and corresponding last year. I have Fiscal year,Fiscal year variant,Fiscal year/period and Posting period. Based on these time
-
How to reset iMac terminal password ?
How to reset iMac teriminal password?
-
HT1212 Cannot get past Terms and conditions on ios7 ipad
Trying to update onto the new 7 ios but once on terms and conditions. I accept but nothing happens. Any ideas? Many thanks, Cam