Default value in custom field in webdynpro screen

Hi.
We have added a custom field in the Item level for Shopping Cart (SRM 7.1).
I however want a default value to show up or get populated in that custom field all the time. What is the best way to achieve this?
Thanks.
Anuradha.

depends upon how you have added it.
if its just though the structures and not added in the WD then you need to do it with doc-change badi.. and this is a preferred option.
if you have done it though WD then you can default the values using the post exits in the INIT method.
you can check if the value is blank then populate this default value (so that it does not overwrite the edited values).
moreover, do you want it as a non editable field or just a default value which user can change on the screen as well?

Similar Messages

  • Default value to a field in PBO

    Hi all,
    I need to set a default value to a fields in a screen.
    But when  i declared field as NUMC , i am not able to store 0 (zero value) into it .
    and also when iam declaring as  integer also iam not able to store 0 .
    Pls anybody let me know how to set the defualt value.
    its urgent

    Hi Madhavi,
    This is the issue with NUMC type field. It will not display zero on the screen. As you want it only numeric field then NUMC not suit your need as it can also store CHAR values. So you better declare it as CHAR field and in the code give error if someone enters CHAR values for that field like below.
    IF l_field CA sy-abcde.
    ERROR -Only numeric values allowed.
    ENDIF.
    Regards,
    Atish

  • 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,
    Sathish

    Dear 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

  • How to set default value to input field dynamically

    Hello Experts,
    I am using adobe forms inside Webdynpro Java.
    Adobe form is having few input fields where at run time i want to assign default value to those fields.
    How can i do it ?
    Thanks in advance,
    Vinay
    Edited by: VINAY on Feb 24, 2011 6:39 AM

    Hi Mate,
    Just set the value to the webdynpro context fields on view init.
    if its like that will override the values entered by use on the form.
    just check if the default value is equall to the field value if yes leave it, if not dont touch that field.
    does this make sense...?
    Cheers,
    Sai

  • Want to affix a default value to a field in PO creation

    Hi all,
    I want to set the default value for the field 'Account assignment category ' when a certain type of Purchase order is created in all the screens pertaining to Purchase order.
    Please suggest
    regards
    kanishak

    Dear 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

  • Hello  Guru's,  How to setup default value to a field

    Hello Guru's,,
    will anyone guide me the procedure how to setup a default value to a field in mm01 SAP STD Transaction.
    example: material description  ' xxxxxxx ' , it should be constant for all materials.
    full points for the answer
    PV

    Hi,
    Pls look into it
    These are the way to set the default values.
    Step 1 :
    CONSTANTS : P_MAKTX TYPE MAKT-MAKTX VALUE 'DESCRIPTION'.
    STEP 2:
        SET PARAMETER ID 'MAT' FIELD 'DESC'.
        CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.
    If it is useful reward points.

  • Assigning a default value to a field

    Hello Everyone,
           Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
    Thanks,
    Anbu.

    Like this
    DATA: BEGIN OF itab OCCURS 0,
            field1 TYPE c VALUE 'X'
            field2 TYPE c,
          END OF itab.
    append itab.
    append itab.
    You will have by default X set in both rows for field1.
    Regards
    Marcin
    PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
    Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM

  • Field with a default value from another field

    I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
    Topic
    Acrobat 5 - field with default value of another field
    Ben PF - 03:31am Mar 23, 2007 Pacific
    How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
    I've tried, but I just can't figure it out!
    Any help much appreciated.
    Ben
    | Back to Topic List | Bookmark | Subscribe
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages
    2 messages. Displaying 1 through 2.
    First Previous Next Last Show All Messages
    Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
    This, or some variation of this, should work:
    if(this.getField("date2").value == ""{
    this.getField("date2").value = this.getField("date1).value;
    | Bookmark back to top
    Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
    Thanks very much.
    I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
    Thanks for your help.
    Ben

    Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
    Put this:
    this.getField("myField2").value = event.target.value;
    Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
    I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

  • Show value in "customer" field of FAGLB03

    Hi Experts,
    we have a requirement to Show value in "customer" field of FAGLB03 for all sales related transactions.
    Your support is appreciated.
    Thanks

    solution has been implemented using badi FAGL_ITEMS_CH_DATA

  • Adding customer field to selection screen of RFKORD11 - Customer  Statement Printing Program:

    Hello,
    We are required to add an important customer field to selection screen of customer
    statement printing program: RFKORD11 for our South African branch.
    Please advise us regarding this matter,
    is there a proper user-exit or a repair is needed?
    Kind Regards.

    Enhancement
    text
    F050S001
    FIDCMT, FIDCC1,
      FIDCC2: Edit user-defined IDoc segment
    F050S002
    FIDCC1: Change
      IDoc/do not send
    F050S003
    FIDCC2: Change
      IDoc/do not send
    F050S004
    FIDCMT, FIDCC1,
      FIDCC2: Change outbound IDoc/do not send
    F050S005
    FIDCMT, FIDCC1,
      FIDCC2 Inbound IDoc: Change FI document
    F050S006
    FI Outgoing IDoc:
      Reset Clearing in FI Document
    F050S007
    FIDCCH Outbound:
      Influence on IDoc for Document Change
    F180A001
    Balance Sheet
      Adjustment
    FARC0001
    Enhancements within
      archiving (FI)
    FARC0002
    Additional Checks for
      Archiving MM Vendor Master Data
    FEDI0001
    Function exits for
      EDI in FI
    FICT0001
    Exits for
      inter-company transactions
    RFAVIS01
    Customer Exit for
      Changing Payment Advice Segment Text
    RFBVX001
    Enhancement for bank
      directory transfer (Austria)
    RFEPOS00
    Line item display:
      Checking of selection conditions
    SAPLBANK
    User exit: Bank data
    SAPLF040
    WF: Preliminary
      posting (authorized for release)
    SAPLF051
    Workflow for FI
      (pre-capture, release for payment)
    SAPLFCPD
    One-time account data
      or different payee in booking
    SAPLSSRV
    User exit: Bank
      account numbers
    RFKORIEX
    Automatic
      correspondence
    please check which one  is better .

  • 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 Advance

    hi .
    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

  • SDK: adding new value in custom fields

    Hello,
    I wanted to add new value in custom field of the resource table... I used this code (taken from SDK example) :
    //Create and fill request for CustomData Service
    SaveCustomDataRequest request = new SaveCustomDataRequest();
    List<CustomValue> customData = new ArrayList<CustomValue>();
    CustomValue attribute = new CustomValue();
    //Field name
    attribute.setName("NOTIFICATION_NUMBER");
    //value received from ERP
    attribute.setValue(notification);
    customData.add(attribute);
    request.setCustomData(customData);
    //table name
    request.setObjectAlias("RESRCE");
    request.setRef(handle);
    customDataService.saveCustomData(request);
    But get a validation error, complaining about no ModifiedDateTime providen... How can I initialize this date or avoid the validation ?
    I also tried using the ResourceDOService, using the setCustomData method, but same error...
    Thanks

    I'm using ME 5.2.2.2, sdk 5.0.1.8, for the moment locally on my laptop for development.
    There is no stack trace, I can just see the error when debugging :
    com.sap.me.frame.domain.RequiredValueValidationException: class com.sap.me.domain.model.CustomFieldDOmodifiedDateTime
    The resource exist, I do a read request before to check if the custom field has value or not. Anyway, it's a collaboration plug-in, executed when we change the resource status, so I got the resource handle as input ;o)
    I can confirm there are some resource with custom value in other fields with date = null. It occurs when I'm saving the data in the GUI (so entering data's manually in custom field, do a save => fields are not initialized)
    Regards

  • How to set the default values of the field of the context.

    Hi Experts ,
    I want to set the default value of the field of the context.
    Where and how this declaration should be done.
    Thanks in Advance.

    In the context tab of the view. Select the attribute for which you want to set the default value.it will show the properties at the bottom. set the Default value property to the value which you want to set as the default value.
    Regards
    Naresh

  • Not allows to assign default value to input field using values in datastore

    Hi Masters,
    Consider that I have one input field in a form. I should assign default value to it. I should assign to it, the value which i have stored in a datastore. When i run the application, if i give default value as 123 ,then it is working fine i.e., it is showing 123 in the textfield in form , but if i give the default value as STORE@ProductId, then it is not displaying that value in the form.
    Please help me out.
    Thanks & Regards,
    Kaushik Sreeram

    Hi,
    i faced this problem and here's what i concluded:
    There's no way you can set default value for input field dynamicly, since the default value of input control is caculated only once (i think on initializing of the iView). The input control and the data store are initialized at the same time, STORE@productID is empty that time...
    If you don't need to recieve value through the input field you're trying to initialize, but just to display the value from the store - I suggest you try using another control - Expression Box. It's value is calculated continiously, just like the Label's, and you can refere to it later.
    Regards,
    Yulia

  • Change the value of the field on the screen

    Hello All,
    I want to change the value of another field on the screen when the user selects the value for a particular field.
    For eg: If i select ship-to-party value on the screen by F4 based on that the sales office and sales group values should change on the screen.
    I am modifying the internal table that has these values, but its not showing the new values on the screen.
    Please let me know how to resolve this issue.
    Points gauranteed.....
    Thank You,
    Suresh

    hi
    use at selection-screen on help request for field1
    OR  on value request for field1.
    Use selection screen events.
      AT SELECTION-SCREEN OUTPUT
      AT SELECTION-SCREEN ON sel_opt1.
      AT SELECTION-SCREEN ON test1.
    AT SELECTION-SCREEN ON END OF sel_opt1.
    AT SELECTION-SCREEN ON HELP-REQUEST FOR sel_opt1-low.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR test2.
    AT SELECTION-SCREEN ON BLOCK block1
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP rad1.
    Regards,
    Prasanth
    *Reward points if helpful

Maybe you are looking for

  • XML file to B1 Sales Quotaion

    hello, I am trying to insert a sales quotation in XML file format into SAP B1. In the message log i get an error : Value too long in property 'CardCode' of 'Document' every time i use an Item code or a card code containing Hebrew characters , i get g

  • Question about how to create FORIGEN KEY constraints against XMLTYPE table

    Hi, 1.I have a table called SNPLEX_DESIGN which is created as XMLTYPE, the XMLTYPE is refered to a registered XMLschema. The XMLschema has a data element called BATCH_ID, and I create a primary key for the SNPLEX_DESIGN table on the BATCH_ID. The SQL

  • Hi Srini - third party orders

    Hi Srini, Can you plz send me the notes what u have related to the third party orders and respective configuration in the system? My email id is: [email protected] Points will be awarded and ur help would be kindly appriciated. Thank you. Juhi

  • Dispplay message at field level.

    Hi, There is a requirement from the client side that on a particular field revenue,if the user enters value greater than Rs5000,then he should a confirmation popup message but it should accept the value.But according to CRMOD if we put field validati

  • Editing a Package - Dynamic Page

    I am a developer in Portal. I created a Dynamic page. Unfortunately there is only one way that a query could be displayed, Tabular and with colors by default. The problem comes when you want to display the fields in a diferent order and also format t