Displaying default value for a field in ALV table

Hai all,
     I am having an ALV table in which I want to display Requisition number by default using a value which i generated randomly and it is stored in a variable.
While displaying ALV table my req number field should display that value by default when ever user is inserting a row( all the coloumns n my alv are editable.
Is it possible?? 
Kindly give some suggestions.
Thanks in Advance,
Nalla.B

Hai Kris,
    I took help from ur link and i declared a global attribute request_number.
and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
  DATA bill_details TYPE REF TO zdom_bill_detail.
  LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
    bill_details ?= <wa_row>-r_value.
    IF bill_details->REQ_NUMBER IS INITIAL.
  DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
  DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
  DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
  lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
      lo_el_bill_detail->set_attribute(
        EXPORTING
          name  = 'REQ_NUMBER'
          value = wd_comp_controller->request_number
Wen am  setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
lo_el_bill_detail->set_attribute(
    name =  `REQ_NUMBER`
    value = wd_comp_controller->request_number ).
Pls give some suggestions,
Thanks in Advance,
Nalla.B

Similar Messages

  • 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

  • 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

  • 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?
    Thanks

    I believe you need to create your own parameter promt screen. Capture what the user entered and pass that to the report(?).
    slv

  • Default values for a field in itab

    Hello everyone!
    In the declaration below,
    DATA: BEGIN OF itab OCCURS 0,
             belnr   LIKE bkpf-belnr,
             myField,
          END OF itab.
    The belnr field will be filled by using SELECT statement but myField will have a default value, for example, "1,000".
    Is it possible to do without looping around the itab?
    Thanks!

    > HI,
    > We can not set a Default value for a Internal table
    > field, after selecting all the records in to the
    > Internal table, Loop the internal and pass the
    > constant value to that field and modify field
    >
    >
    > Regards
    >  sudheer
    I see.. Is it really necessary to loop? I would like to avoid looping because it takes so much time...

  • Default value for a field in Purchase order

    I want that while creating purchase order system should suggest one value for the field ' prior vendor ' in retail tab. I don't want to use user exit. Can anybody help?

    Hi,
    if that button is clicked then give the values in the work area of  table control and then append it to the table control
      in pai of the screen.
      if r_rad eq 'X'.
        fs_tab = ur value.
    append fs_tab to it_tab.
    endif.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Feb 13, 2008 3:39 PM

  • Set Default Value based on Field from another table for a custom object

    I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
    The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
    I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
    If anyone knows how to enter this I'd really appreciate the help.

    Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
    Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
    The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
    In your case, ref_record_type is '<Account>', foreign_key is &#91;<AccountId>&#93;, and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
    Give this a shot and let me know how you do.
    Thom

  • Drop down list of  values for a field in ALV rpt within a BADI

    Hi,
    I need help on this issue.
    TCODE LI21 is used to clear the differences in IM.  The business now wants to prompt for a reason code before they can post a new material document for this clearing.  I have create an implementation in BADI LE_WM_INV_WM_IM, which display the field for user to enter the reason code.   However, I am trying to get a dropdown list which contain the possible values for reason code so the user can choose from this list.  There are sample codes to do this but I can't apply to the codes in the implementation because call screen is not allowed.  Has anyone done this before or can advise me of the solution?
    Thanks.

    Hi,
    Use the Field Catalogue Properties
    Ref_fieldname
    Ref_Tablename
    and assign the corresponding field & Table/Strucutre Name to the above fields....

  • Setting default value for form field assoc with a table column

    On a "Create Record" situation I was trying to set the default values of some form fields using a page level "Process". These form fields have Source Type = Database Column. It wasn't working, I could only set non-db assoc form field values no matter when the "Process" was set to exec. From some other posts it seems that this is by design, ie. not being able to programatically set the initial values of form fields that are sourced to db columns. I was hoping to have just one "Process" that would exec to set these initial values in one place rather than scattered about for each field that needed a default value. These particular default values come from ref tables and may be different for each user.
    So, it looks like I have to use a "Default Value" plsql chunk for each field on the form itself or else set their value on the calling form's Redirect in the "Set these Items" area.
    Is this correct?

    You could define a database function which accepts the name of the item and the user ID of the user running the application. Based on the item name and the user ID have the function return the appropriate initial value. Invoke this function in a "Default Value" PL/SQL block.
    Does that help in centralizing your initial values? You could have one function per page or one function per application. I would do one function per application.

  • Vendor Line Item Display-Default value for customer items

    Is it possible in selection screen of transaction FBL1N (Vendor line item display) the default value of field "customer items" to be checked?
    Thanks in advance.

    hi Tsiami
    it's not possible. if u want check customer line items go throw this TC:FBL5N
    plz assign points
    regards
    sivareddy.

  • Help values for a field in ALV GRID

    Hi !
    i have a field in a structure, whose field have a table of values in its domain. How does this table values can apear in the ALV, when i click the corresponding field?
    Best regards,
    Rui

    Hi,
    Use the Field Catalogue Properties
    Ref_fieldname
    Ref_Tablename
    and assign the corresponding field & Table/Strucutre Name to the above fields....

  • Decimal  values for a field in ALV

    Hi,
    I created an ALV report.
    It has a field which will display the calculated value as '103,839,389'. This should be dispalyed as '103,839,389.00' with decimal value, I mean with 2 decimal places, how can this be achieved?
    Thanks,
    Kumar

    hi check this..
    use these in populating the fieldcat..
    it_fieldcat-decimalsfieldname = fieldname
    it_fieldcat-decimalstabname   = tabname
    it_fieldcat- decimals_out   = 2.
    regards,
    venkat

  • Displaying blank value for the Rounding Value field in MM03 transaction

    Hello All,
    We are using BDC to create a material master record.Some users are not loading the rouding value in the MRP1 screen. The rounding value is stored in the MARC table which has the data type as QUAN. Thus when there is no value being passed it implicitly converts the blank value to 0.00. The users do not want the rounding value to be displayed as 0 when they view the material record using mm03. Kindly let me know if there is any way to display the rounding value as blank if no value is present.
    Thanks in Advance.
    Regards,
    Avinash Sai N S

    Hai siddharth,
    I have enabled the BADi HRPBSIN_ADDITIONAL_CHECKS to do validations for loans. Can u pls explain is there any FM or wat can be used to set default value for the field in portal.
    Pls give some suggestions,
    thnaks,
    Nalla B.

  • Select MULTIPLE default values for a multiple selection list box based on another field in Infopath 2010

    Hello there - Before I explain my issue, I would like to point out that I have reviewed some other discussions on selecting default values for multiple selection listbox. But my issue is specific and different, and not answered by any of the discussions
    I visited.
    I have a multiple selection list box (say for example all countries in the world as values), and I would like to pre-select or setup multiple default values (say five countries) based on some criteria that I query from MS SQL database table.
    I know we can go to Data | Default Values option to setup one or many default values for multiple selection list box. When I enter the default values manually this works. I also right click the field under the Multiple-Selection List Box group, then select
    Add another Value Below and set the Default Value for this field to setup multiple default values.
    However, if I reference a field (either an infopath field or a field from SQL database) I am not able to setup multiple default values. Infopath automatically selects the last field I selected for all instances and in the end I am able to see only one
    default value selected instead of many. How to fix this problem? Why would infopath allow multiple default values when we enter it manually but not when we reference some fields?
    Please let me know if you need more info. Appreciate your help.
    Thanks!

    Hi redhotc,
    According to your description, my understanding is that you want to set multiple default values for a multiple checkbox list in InfoPath form.
    I did a test with SQL database table. I set three default values for the checkbox list by adding three values field under the group field(Data->Default values), each value field is for a default value. Then publish it to my SharePoint site, everything
    was fine.Please have a try as the below link:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Note: if you are using SQL databse table, you may need to enable ‘Allow cross-domain data access for user form templates that use connection settings in a data connection file’ in CA. More information, please refer to:
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=418b9423-a96c-4e5e-91f9-6a1b010ebb69
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • HOW TO  SET A DEAFULT  VALUE  FOR A FIELD?

    hi friends
      i have doubt..how to  set a default  value for a field..say  like in  local printer field i always want  lp01 to  be displayed defaultly..when i  click  F1  in that  field i  get the parameter id ..i  know there is something  dealt with that  parameter id..how can i  set that  default value ..in the case of the default  printer value i made in  own data settings as lp01 but  how to  do it  normally  for other  field which has parameter id ??????
    thanks and regards
    prince

    Hi Prince,
    u can set the default value in abap as given below
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : S_BUKRS TYPE BSID-BUKRS OBLIGATORY DEFAULT '1000'.
    PARAMETERS : S_BELNR TYPE BELNR_D OBLIGATORY DEFAULT '1600000070'.
    PARAMETERS : S_GJAHR TYPE GJAHR OBLIGATORY DEFAULT '2008'.
    PARAMETERS : ASON TYPE BUDAT OBLIGATORY DEFAULT SY-DATUM.
    PARAMETERS : S_KUNNR TYPE KUNNR MODIF ID GP1.
    PARAMETERS : S_LIFNR TYPE LIFNR MODIF ID GP2.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN : END OF BLOCK B1.
    or
    u can give the default value in INITIALIZATION also.
    vlue = '1000'.

Maybe you are looking for

  • In a shared reminder list, it refuses to push alerts to the other iPhone.

    Me and my Girlfriend use the sharing function for the Calenders and Reminders due to living away because of a job placement this year, the Calender's that are shared work flawlessly, when we add something, it tells you, change, it tells you, assign a

  • IView Deployment - how to set maximum file size?

    Hello, we have a problem while deploying iViews and uploading files to enterprise portal . The maximum upload file size seems to be limited to 1 MB. I have to deploy an iView greater than 1 MB. While deploying with netweaver developer studio I get fo

  • Sync/Async communication with JMS Receiver

    Hi all, I am working on one Sync/Async model without BPM. Sender is  RFC which is expecting some response, but we know receiver jms doesnt support response message directly. For this i used modules provided by SAP. While developing interface i used b

  • 2nd folio doesn't show in dev app

    Hi There I am testing my dev app; already published a folio, works well I had publish another one, but it doesnt appear in my dev app, I dont know why (it appears in the Adobe app, with the same account details) Any idea ? Are we limited in dev app w

  • Maximum storage space for iTunes

    Is there a maximum number or size for my music library?