Setting Default values for field using custom.pll
Hi All,
I have an rquirement to set the default values on Meterial Tranasction screen for some condition
I tried it in both ways via Form Personalization and using custom.pll
i m using the following code in custom.pll
form_name varchar2(30):= name_in('system.current_form');
block_name varchar2(30):= name_in('system.cursor_block');
trx_type varchar2(30);
subinv varchar2(30);
begin
if form_name='WIPTXMAT' and block_name ='MTL_TRX_LINE' then
if event_name ='WHEN-VALIDATE-RECORD' then
trx_type:=name_in('WIPTXMAT.TRANSACTION_TYPE');
if trx_type ='WIP Return' THEN
copy(10,'MTL_TRX_LINE.TRANSACTION_QUANTITY');
copy(10,'MTL_TRX_LINE.NUMBER_OF_LOTS_ENTERED');
sinv:=trim(name_in('MTL_TRX_LINE.SUBINVENTORY_CODE'));
if sinv is null then
copy(subinv,'MTL_TRX_LINE.SUBINVENTORY_CODE');
copy(fr_locator,'MTL_TRX_LINE.LOCATOR');
FND_MESSAGE.SET_STRING(sinv);
FND_MESSAGE.SHOW;
end if;
end if;
end if;
end if;
end event;
Problem is that default values are getting set but not for all rows . if there are 4 records then values are set for only first 2 rows and if there are 2 rows then defaults are set for 1st row only.
Same behaviour happens when i do it via form personalization
i couldn't understand the behaviour of WHILE-VALIDATE-RECORD event..
Please provide some suggestion on it. its really urgent.
Thanks in Advance
Renu
Works Now...
Similar Messages
-
Setting default values for field on screen.
Hello,
I am trying to set default value for one of the fields I have on screen when I execute the custom transaction.
I am doing that in PBO as follows. But the default value is not set for Date field.
PROCESS BEFORE OUTPUT.
MODULE PBO_OUT.
MODULE STATUS_5000.
*& Module STATUS_5000 OUTPUT
text
MODULE STATUS_5000 OUTPUT.
SET PF-STATUS 'NON_SAP_DOCUMENT'.
SET TITLEBAR '001'.
ENDMODULE. " STATUS_5000 OUTPUT
*& Module PBO_OUT OUTPUT
text
MODULE PBO_OUT OUTPUT.
ERDAT = SY-DATUM.
ENDMODULE. " PBO_OUT OUTPUT
Please help.
Thanks.
Regards,
Rajesh.Works Now...
-
How to set default value for Zfeild using statusprofile
hi experts,
I need to set a default value for a zfeild using status profile.Although we can default the values,using getter and setter methods,but in my requirement,the feild will be defaulted when the page is locked,also in display mode,which will require me to write code to unlock then set the value and then write a commit,as there wont be any user action performed.
I have created a zstatus profile and have set the required status to inital,but no luck
please suggest if this canbe achived through status profile.
Regards
Anu.Hi,
You can check in the getter if the Page is locked and then display the value to want to display. Note that this will be just Displaying the default value for the Zfield and it will not set the default value into the Zfield in DB, because when the document is locked ( means locked for editing - mostly when system status is completed ) , setters are not called and so you can display the value but cant set it. This is fine if the value you want to display in Z field is just for user's informations and its not required to save this default value.
The best approach would be to set the value in the Zfield before the page is locking. For example, If you wat to set the zfield value when status is set to "Completed" , then you can configure an action that is 1) triggered during saving of the document with 2) start condition "When status is completed" ( both 1 and 2 you can mention in action defination ), then Implement this action badi in which you can set the Zfield to default value.
This will ensure that default value is always set whenever the page is getting locked for editing ( i assumed that page lock means status completed ).
Thanks & Regards
Suchita -
Set default value to field using Personalization
Hi all,
I want to set the default value for 'Comments' field in Termination screen (OAF) in Manager Self Service responsibility. I used OAF Personalization to set the Initial Value, but it didnt work. I tried logging off but in vain.
I tested creating a new field with default value and it works fine.
How I ensure that default value given in Personalization, is overidden by Controller or not? Does it require Controller extension?
Thanks
Kishore RyaliKishore,
May be in ProcessRequest the value will be refilled by the standard program.
De compile the Controller and check in ProcessRequest, the "Comments" value getting changed.
If yes, You have to extend the controller and get the handle of the item and set the value.
Thanks.
With Regards,
Kali.
OSSI. -
Setting default value for fields
Hi
I am facing an issue when setting the default value of an item
setAttributeName("ID")
It is working when ID value is with char
if the ID value is number
Iam not able to set the default value it is giveing error setAttributeName("ID") at this line
can any body suggest on this
Regards
Krishnahi
in this case u can convert your number value to string ,like this
String sNum= num.toString();
thanx
Pratap -
Default values for fields in infotype 0017
Is there any way to set default values for fields in infotype 0017? Maybe a
feature? I'm thinking about defaulting values based on pay scale group.
Thanks before.Hi
You can implement what i suggested in my previous post.
Or else, you can do what we did in one of our client requirement.
We created a custom Ztable where we had defined which value of the the employee grouping to be placed for which record.
We did that on the basis of the company code fields.
For eg: IF BUKRS = 'TR01'
then EE Grp Expense Type = '1'.
ENDIF.
Similarly for other fields.
Hope this helps.
Harsh -
Set default value on field KNA1-AUFSD when creating Customer
Hi,
How to set default value on field KNA1-AUFSD when creating customer master using XD01/VD01?
I have tried user exit SAPMF02D, but all KNA1 values are read only.
ThxHi
Try to implement an enhancement option in include MF02DFEX. (at the beginning before call to FM CALL CUSTOMER-FUNCTION '001'.).
and Initialize the value for KNA1-AUFSD.
In this Include you can see that there is a call for CALL CUSTOMER-FUNCTION '001'.
So even you test/check the initialized value for field KNA1-AUFSD is updated by putting a break point in this function module after implementation of your enhancement SAPMF02D.
Regards,
Dwaraka.S -
Set default value for parameter fields
Good day!
Situation:
1. I have 2 parameter fields in reports (dateFrom and dateTo)
2. Before running report in ASP.NET I change value this fields (dateTo = today, dateFrom = today - 3 days)
3.I use for this source:
foreach (ParameterField crParam in CrystalReportSource1.ReportDocument.ParameterFields)
CrystalDecisions.Web.Parameter crParametr = new CrystalDecisions.Web.Parameter();
string ParametrName = crParam.Name;
crParametr.Name = ParametrName;
crParametr.DefaultValue = ActionReportParameter.GetParametrValue(ReportName, ParametrName);
CrystalReportSource1.Report.Parameters.Add(crParametr);
4. And repurt run without request value parameter fields.
5. BUT!!! now I need request value parameter fields before report start running - I want set default values for filelds and offer user change its before report start run.
How do this?
ThanksI believe you need to create your own parameter promt screen. Capture what the user entered and pass that to the report(?).
slv -
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 -
How to Set default value for taxonomywebtagging control with terms and nested terms
Hi,
I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
Any help would be greatly apprecited.
Control code in aspx page:
<td>
<asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
</td>
<td>
<Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
//Set the Business Unit Field
SPSite site = SPContext.Current.Web.Site;
TermStore termStore = session.TermStores["Managed Metadata Service"];
Group group = termStore.Groups["GROUPName"];
TermSet termSet = group.TermSets["TERMSETNAME"];
Term term = termSet.Terms["TermA"];
Guid termGuid = term.Id;
term.SspId.Add(termStore.Id);
term.TermSetId.Add(termSet.Id);
term.AllowFillIn = true;
term.AnchorId = countryGuid;
term.IsMulti = true;
Thank you.
AA.Hi,
According to your description, you want to set default value for TaxonomyWebTaggingControl.
I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
Here is the code snippet:
TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
SPSite site = SPContext.Current.Web.Site;
TermStore termStore = session.TermStores["Managed Metadata Service"];
Group group = termStore.Groups["GroupA"];
TermSet termSet = group.TermSets["A"];
Term term = termSet.Terms["A1"];
TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
TaxonomyWebTaggingControl1.AllowFillIn = true;
TaxonomyWebTaggingControl1.IsAddTerms = true;
TaxonomyWebTaggingControl1.IsMulti = false;
TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
Here is a detailed article for your reference:
http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
Feel free to Reply the test result.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Patrick Liang
TechNet Community Support -
Setting default values for item in opportunity mgmt(crmd_bus2000111)
Hi All,
I need to set default values for the field Fiscal Quarter in item level using BADI CRM_CUSTOMER_I_BADI .This Field is created using EEW. The default value is like if the date is nov-2007 the value for this fiscal period is FQ4-2007 .
Any clue would be great help..Why don't you try setting the default value in the List next to the Matrix - item 107
Item 107 is a matrix (a transposed one), I have no idea what list you mean... I am using item 107, not 112. Item 112 is used only to detect a click on the "Add Record" button, which is the last row of the matrix 112.
I don't see the gender column in the grid and I'm also unsure of the id you have for it "12" - are you sure it's correct ( i usually use Item("columnName") )?
Sorry for the confusion. "12" is the name of the standard column "Password" which we have renamed to store the gender.
Anton -
How to set default values for boolean columns
I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
I've tried to set default value at column level:
<Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
<Default>TRUE</Default>
</Field>
and at content type level:
<FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
But in any case, when i create a new item with this content type, default value is applied.
Can anyone tell how to set default values for boolean columns?
Thanks in advance,
Regards,
SergioIn the field definition you can set
<Default>1</Default>
or
<Default>0</Default>
How to set the default value Null? -
How to hide PNP selection windows and set default values for PNP.
Hi expert,
I am using HR logical database PNP, but I don't want to display selection windoes for running program on PNP, whereas I want to set default value for some selection items in the program. could you please tell me how to get those two targets?
Many Thanks,Hi
You have mentioned 2 things.
1. Don't want selection windows for running program for PNP - this can be achieved using the HR Report category - You can get more details on HR Report Category on
HR Report Category
2. I want to set default value for some selection items - This you need to achieve in initialization event of your program.
How you can get this can be explained by INITIALIZATION (SAP Library - ABAP Programming (BC-ABA))
Thanks,
Sreeram -
SP Online - Managed Metadata column Default Value for folders (using CSOM)
Hello,
I am working on setting default values (metadata columns) for different folders on my document library. As so far, I've found solution about how to set default values on whole library and many solutions which works for folders, but not for sharepoint
online (using metadataDefaults object).
The only working solution for folders in SPO I've found is editing file library/Forms/client_LocationBasedDefaults and add some data here.
My question is: is there any easier method to set default values for each folder in document library without manually editing this file?I second that, I have a client looking to do the same thing but I don't see a way to automate this.
-
Extending flash: how do I set default values for filenames
Hi,
I am trying to set default values for filenames
<choosefile> and <popupslider>s that will show up when
my XMLpanel first loads in my jsfl extension file. It seems that I
can only set default values for textbox items.
How do I do this for filenames and popups?
As a workaround, I also tried using a flash object dialog box
to look like a <choosefile>, or any jsfl command, but then
how do I return those values back to the XMLpanel that calls them.
and pass the data back to my jsfl script.
lemme know if you know a way,Create two constants for the Allocate Mode input (right click > create > constant). Place one in the true case of the case structure, and place the other one in the false case. Wire them to the same tunnel (border of the case structure), then wire the tunnel to the Allocate Mode terminal of the AO Config. I don't have Traditional DAQ installed, but that should do it.
Misha
Maybe you are looking for
-
App-v 5 and Office2013 Volume Licence Edition - package fails to install with script error
We have used the MS Office Depolyment Tool for click-to-run to download the latest Office 365 version, and flatten it into an app-v 5 package - not a problem. When we try to add the package to our client machine (running the app-v 5 SP2 client softwa
-
IPhone 4 soundis very low when headphones are used
my iPhone volume is extremely low when i plug headphones in when listening to Netflix, Pandora, etc. When i unplug the headphones, the volume is normal when coming from the speakers in the phone- this only happens when we use headphones. We took the
-
I do not know if I have a fault with Phone, Broadb...
I do not know if I have a fault with Phone, Broadband or TV. I have a White Box with the label "Openreach" on it. There are three green lights on the top labelled "Power" "DSL" & "Lan 1". The "Lan 1" loght has very recently started a continuous flash
-
Satelite A100-02B - Can I get new graphic card?
Hello folks, some weeks ago my, unfortunately 2 year and 2 month's old, Toshiba Satelite A100-02B gave up completely. The grafic card (i hope its called like that in english) and display crashed... My question is now: is there any possibility to get
-
How do find out what your network password is if you forgot it?
How do find out what your network password is if you forgot it?