Set field value whiel calling MM12

How Can I set the value of Schedule data to some value.
I am calling MM12 with material Number and Date.
I can set the material Number because it has parameter ID. How can I set the value of schedule date ?. it doesn't have parameter ID. Schedule date is mandatory field.
I need to call the MM12 Skip first screen.

Do you think that you can use a partial BDC?
report zrich_0003
       no standard page heading line-size 255.
data: bdcdata type table of bdcdata with header line.
data: bdcdate(10) type c.
parameters: p_matnr type mara-matnr,
            p_datum type sy-datum.
start-of-selection.
  call function 'CONVERT_DATE_TO_EXTERNAL'
       exporting
            date_internal = p_datum
       importing
            date_external = bdcdate.
  perform bdc_dynpro      using 'SAPLMGMM' '0060'.
  perform bdc_field       using 'BDC_CURSOR'
                                'RMMG1-AEDAT'.
  perform bdc_field       using 'BDC_OKCODE'
                                '/00'.
  perform bdc_field       using 'RMMG1-MATNR'
                          p_matnr.
  perform bdc_field       using 'RMMG1-AEDAT'
                          bdcdate.
  call transaction 'MM12' using bdcdata mode 'E'.
*        Start new screen                                              *
form bdc_dynpro using program dynpro.
  clear bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  append bdcdata.
endform.
*        Insert field                                                  *
form bdc_field using fnam fval.
  clear bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  append bdcdata.
endform.
Regards,
Rich Heilman

Similar Messages

  • Setting Fields value via reflection

    I'm starting from a c# code:
              internal void RefreshFromObject(object objFromUpdate)
                   if (this.GetType()==objFromUpdate.GetType())
                        PropertyInfo[] fieldsFrom = objFromUpdate.GetType().GetProperties();
                        PropertyInfo[] fieldsThis = this.GetType().GetProperties();
                        for(int idxProp=0; idxProp<fieldsFrom.Length;idxProp++)
                             if (fieldsThis[idxProp].CanWrite && fieldsFrom[idxProp].CanRead)
                                  fieldsThis[idxProp].SetValue(this, fieldsFrom[idxProp].GetValue(objFromUpdate,null),null);
                   else
                        throw new ObjectTypeNotValidException("Object type from which update current instance not valid. Use same type.");
    Now I have to translate it in Java:
    Class clazz = objFromUpdate.getClass();
    Class thisClazz = this.getClass();
    do {
         Field[] fieldsFrom = clazz.getDeclaredFields();
         Field[] fieldsThis = thisClazz.getDeclaredFields();
         try {
              fieldsThis[idxProp].set(thisClazz, fieldsFrom[idxProp].get(clazz));
         catch (IllegalAccessException iaccEx) {
              System.out.println("IllegalAccessException");
         catch (IllegalArgumentException iaccEx) {
              System.out.println("IllegalArgumentException");
    clazz = clazz.getSuperclass();
    thisClazz = thisClazz.getSuperclass();
    } while (clazz != null && clazz != Object.class);
    My problem is that I don't know if the field type is one of primitive, for which I should use the particular setters and getters.
    My questions are:
    1) is there in Java a more elegant way to set fields values via reflection?
    2) how can I know if a field i changable (equivalent to the method CanWrite of c#?
    Thanks a lot to each one that will answer me.
    Marco

    Hi georgemc,
    thanks for replying. I-m new with java forum, so I don't know if it is correct the code tags...
    Anyway... the problem is that the Field of reflected object could be both of Object types or primitive types. So I cannot use the general method "set" when changing Field's value.
    Maybe somebody else had the same problem...
    Seems in C# it is a very easy thing... not in java :(
    Marco
    Class clazz = objFromUpdate.getClass();
    Class thisClazz = this.getClass();
    do {
    Field[] fieldsFrom = clazz.getDeclaredFields();
    Field[] fieldsThis = thisClazz.getDeclaredFields();
    try {
    fieldsThis[idxProp].set(thisClazz, fieldsFrom[idxProp].get(clazz));
    catch (IllegalAccessException iaccEx) {
    System.out.println("IllegalAccessException");
    catch (IllegalArgumentException iaccEx) {
    System.out.println("IllegalArgumentException");
    clazz = clazz.getSuperclass();
    thisClazz = thisClazz.getSuperclass();
    } while (clazz != null && clazz != Object.class);

  • How to set field value in workflow SPD2013?

    Hi All,
    how to set field value in workflow SPD2013? Actually using Infopath, i need to update a field value through workflow.(Little differnt from SPD2010). How to do this?

    As Amit says, some elaboration here would be good.  You can use InfoPath as a form for either a list or a library and then set it to trigger a workflow upon item creation.  The workflow will consist a number of actions, one of which is the Update
    Field Item.
    More information on the available steps can be seen here.
    http://msdn.microsoft.com/en-us/library/office/jj164026.aspx
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • How to Set Field value using javascript?

    I have a Field in First Page called 'SO'. I want to populate this field from the field value of SD_ITEMS.DATA.VBELN first row in the each page. Please help me with javascript to set this value.
    Thank you.
    Ranji

    I have a Field in First Page called 'SO'. I want to populate this field from the field value of SD_ITEMS.DATA.VBELN first row in the each page. Please help me with javascript to set this value.
    Thank you.
    Ranji

  • Can't Set Item Value After Calling Stored Procedure

    In a forms6i program unit, I call a stored procedure. The stored procedure executes successfully. Then I set the value of a date item on a data block to sysdate.
    When I run the form and execute the program unit the stored procedure executes successfully, but then the program unit gives me a No Data Found error when I set the value of the date item on the block. The value of the date item never changes. However, if I comment out the call to the stored procedure, the date item changes to sysdate and there is no error message generated.
    Just to be sure, I moved the logic to set the date item value to a separate button on the form. Then I re-ran the program unit. The stored procedure executed successfully. Then I clicked the button to set the value of the date field on the block, which gave me the same no data found error.
    Then I commented out the call in the program unit and re-ran the test. The program unit executed. Then I clicked the button to set the date value in the block and it was set to sysdate with no errors.
    Why can I not set the date item after running a stored procedure?

    Seems like a MSDTC config issue
    See if this helps
    http://support.microsoft.com/kb/2027550/en-us
    http://zarez.net/?p=1469
    http://danieladeniji.wordpress.com/2013/03/06/microsoft-sql-server-linked-server-error-the-partner-transaction-manager-has-disabled-its-support-for-remotenetw/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Setting field value from antother field

    I am having problems setting the value of a field depending on the entry of a previous drop down field.
    I am creating some wizard pages. On one page i wish a drop down list to populate another field. The drop downlist is unbound. (I have tried doing this with bound field aswell). To do this I have the Depends on Item of the target field to depend on the dropdown list field, so that the appropriate values are updated. (i have tried with the target field being bound and unbound aswell not that it should matter).
    I have then updated the VO (view object) adding transient fields when the fields are unbound. Then i updated the view row class. The setter of the drop down field was used to set the value of the target field. (Using the setter of target field). I added system.out.println and the fields are called and set accordingly. ie getters and setters are correct.
    However when i run the screens the target field value is not set with the value within the getter of target field.
    Could you advice if this is a bug or whether i should be coding this in a different manner. (if it is a bug and you tell me when it is likely to be fixed and any alternative work arounds).
    Cheers
    Alan

    Alan,
    Not really a bug, but "missing functionality". The problem is that ADF Faces will only refresh a UI Component value from the underlying model binding value when you submit the request with immediate="false", OR when you explicitly call resetValue() on the component.
    We have added a new boolean item-level property "Clear/Refresh Item When Depends-On-Item Changes" in the latest build.That property will do the trick for you: it will clear the value and call resetValue on the UI Components of the dependent items, BEFORE the depends-on-item model value is updated. So, in your case, the setter method of your depends-on-item attribute will update your dependent item after JHS cleared the item, and you will see the new value right away because UIComponent.resetValue() was called as well.
    Steven Davelaar,
    JHeadstart Team.

  • HELP - i can't set field value in a form

    Hi,
    I created a form based on a stored procedure.
    I try to set a field value on this form( the name of the item in the wizard is 'P_GG') from the advanced PL/SQL SECTION in the wizard, and, for exact, in "... before displaying the page..." i wrote:
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_P_GG',
    p_value => '20');
    But when I run the form the field is blank
    Thank for everyone reply and help me.
    Simone Mancino

    Dmitry,
    thank u for your reply.
    I tried your solution, but there is another problem. I specified a default value for the form, using the syntax "#myfunction()".
    The first time I run the form, i get the correct value. But whenever i run the form again in the same session, I always get the FIRST value: it looks like the function is not evaluated again. For example, suppose the function is
    return to_char(SYSDATE, 'SS')
    (just to have a random dynamic value);
    you always get the value of the first run, even if you refresh the page.
    Regards
    Simone

  • Set field value in Discussion Board Reply

    Hi all,
    I need to set the value of a field in all discussion board replies within a discussion. In my example, I need to pass a value from the discussion board item to all of the replies (ex. when a reply is made, I want a field named "Project Number" to be populated
    by the Project Number set when a Discussion is created). I need this so I can email out varying users related to the Project Number.
    Thanks,
    Kelly
    Personal Blog: http://thebitsthatbyte.com

    Hi
    SPQuery query = new SPQuery();
    query.Folder = discussItem.Folder;
    SPListItemCollection replyCollection = ctxList.GetItems(query);
    foreach (SPListItem itemReply in itemCollection)
    itemReply["FIELD_TO_UPDATE"] = VALUE;
    itemReply.SystemUpdate(false);
    discussionItem: is a discussion item
    ctxList: is a current discussion list
    If there are many reply items need to be update, please build an update string and use BatchUpdateProcess command to perform update with best performance.
    Hope this help.
    Visit my blog: My Blog | Visit my forum:
    SharePoint Community for Vietnamese |
    Bamboo Solution Corporation

  • Set Field value

    I have placed several fields in my form. I want to set the value of those fields through code. How do i do this. Under what trigger do I have to write this code? It would be helpful if you could be a bit specific as I'm really new to Reports.

    Something like this ? (in general)
    - In your data model create your query from CASES table.
    - Use layout wizard to do the layout (for example)
    - for example you need an additional column that is something like calculation that can't be done using sql query, then create a formula column in your data model.
    - click properties for that formula column,change the data type and width accordingly.
    - click pl/sql formula, enter your calculation there.
    - put your new fields in the layout model.
    You can tell me which one you need me to explain in details.

  • Set field value problem

    Hi All,
    I want to set a field value of a class. I do this in the way of modifying codes in getText() method in XXXItemProvider.java as the red frame in the following picture.
    It generates the following problem
    But, if I remove the codes, "(NFRSoftgoal)object.setLabel......", it becomes normal.
    Can anyone help me solve the problem?
    Thanks & Regards,

    Comments below.
    On 17/07/2015 7:19 PM, Shin-Yi Lin wrote:
    > Ed Merks wrote on Fri, 17 July 2015 12:28
    >> Comments below.
    >>
    >> On 17/07/2015 4:40 AM, Shin-Yi Lin wrote:
    >>> (1) My model structure (I want to change label attribute.):
    >> So the label feature is on a class that's the root of a several other
    >> classes...
    >> ----> Yes.
    >>>
    >>> (2.1) Before (Child and parent clouds are undecided. Cloud represents NFRSoftgoal class.):
    >> This undecided thing is the default state...
    >> -----> That's right.
    >>>
    >>> (2.2) After (After child cloud changes to satisfy through command, parent cloud changes to satisfy automatically.)
    >> Is this via a command that directly modifies the label feature of the
    >> "child"? If so, that's the place to modify the state of the parents,
    >> e.g., using a compound command that modifies the child as normal, and
    >> walks up the parents to modify the parent label also using commands.
    >> What, if anything, prevents the "parent" label from being directly
    >> changed back to undecided (which is perhaps an inconsistent state for
    >> the model)?
    >> -----> I change the label feature of "child" through the red frame in the following pictures (This is under run-time application and Sirius environment.):
    >>
    >>
    >> -----> But I don't want to change the label feature of "parent" through the same way, because it should be automatically changed, not manually.
    I'm asking what's preventing that from happening? I suppose it doesn't
    matter if you've done something so that only a leaf/child can be
    directly modified.
    >> That's why I modified the code of getText( Object object) function in NFRSoftgoalItemProvide.java under bpmn.edit.
    That's not a good idea.
    >>
    >>
    >>
    >> -----> What do you mean "via a command" ? I don't know how to change via a command. Could you explain or give any reference for it?
    On the child, the set command is created by
    org.eclipse.emf.edit.provider.ItemProviderAdapter.createSetCommand(EditingDomain,
    EObject, EStructuralFeature, Object) so you can specialize this method
    of the child's item provider so that it modifies not only the child's
    label feature, but modifies also the parents. All that could be done
    with a CompoundCommand that composes all the SetCommands.
    >>
    >> Thanks & Regards,
    >>

  • Form field check for calling Dependent task

    Hi Folks,
    Here is a scenario, I have a custom RO for which I have a Process Form (with Auto Save enabled), which had default values set for its form fields. User provisioning works fine.
    The process form has a child form for entering some role data with a single field(multi select/Lookup Field) which triggers a task for every insert, like wise for delete.
    I have also created a Request Dataset and Request Template for the same RO with a few fields. The Create Task gets called once the approvals happen and the user provisioning happens.
    Is there a way I can call the tasks that are triggered on the child from update?
    Or, is there a way I can check for a form field value before calling a task?
    I have a request data set as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <request-data-set xmlns="http://www.oracle.com/schema/oim/request" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/request" name="ProvisionResourceABC" entity="ABC" operation="PROVISION">
    <AttributeReference name="Domain" attr-ref="ABCDomain" type="String" length="50" widget="dropdown" required="false" available-in-bulk="false">
    <lookupValues encoded-value="abc.com" decoded-value="abc.com"/>
    <lookupValues encoded-value="abc.partner.com" decoded-value="abc.partner.com"/>
    </AttributeReference>
    <AttributeReference name="ABC Roles" attr-ref="ABC Roles" type="String" length="50" widget="ENTITY" required="false" available-in-bulk="true">
    <lookupValues encoded-value="Role0" decoded-value="Role0"/>
    <lookupValues encoded-value="Role1" decoded-value="Role1"/>
    </AttributeReference>
    </request-data-set>
    Any pointers appreciated.
    Thanks,
    Saiesh

    user9116351 wrote:
    Hi Folks,
    Is there a way I can call the tasks that are triggered on the child from update? In the provisioning process mark the task trigger as 'Update' on the child form and you should be good.
    Or, is there a way I can check for a form field value before calling a task?For this write a task and and adapter which would return true/false depending upon the check of the form field and then depending upon true/false attach the task to generate.
    >
    HTH,
    Bikash

  • Set the default field value to transaction code field, when calling from WD

    Hi all,
    Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
    Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
    Is there any way to set the default field value to transaction code field, when calling from WD?
    Please suggest, if anyone have any idea.
    Thanks
    Sanket

    Hi,
    I am using the below code to open a standard transaction. It will help you to explain my point more easily.
    DATA: url TYPE string,
              host TYPE string,
              port TYPE string.
    *Call below method to get host and port
      cl_http_server=>if_http_server~get_location(
         IMPORTING host = host
                port = port ).
    *create URL
      CONCATENATE 'http'
      '://' host ':' port
      '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
       INTO url.
    *get the window manager as we are opening t code in external window.
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component TYPE REF TO if_wd_component.
      DATA lo_window TYPE REF TO if_wd_window.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
    call the url which we created above
      lo_window_manager->create_external_window(
      EXPORTING
      url = url
      RECEIVING
      window = lo_window ).
      lo_window->open( ).
    Note*
    One more query I want to add to this thread, that is there any possibility to call a custom transaction as well?

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

  • How to set a particual field value as sysdate if it is null

    Hi,
    I have a requirement in custom OAF page.
    In the results table, if DATE field value is NULL, then we need to set it as SYSDATE by default.
    For this I'm using the following code. Could anyone suggest me whether I'm doing correct or not?
    PFR CO Code:
    if(xxMDateBean == null)
    OAMessageDateFieldBean xxMDate = (OAMessageDateFieldBean)webBean.findIndexedChildRecursive("xxMDate");
    oracle.jbo.domain.Date date1 = am.getOADBTransaction().getCurrentUserDate();
    java.text.SimpleDateFormat displayDateFormat = new java.text.SimpleDateFormat ("dd-MM-yyyy");
    String OracleDateForm = displayDateFormat.format(date1.dateValue());
    xxMDate.setValue(pageContext,OracleDateForm);
    I am getting the following error:
    Error(81,8): variable xxMDate not found in class (CONTROLLER)
    Edited by: Sruthi on Jan 20, 2011 5:09 PM

    Sruthi,
    Sorry I missed the point that the field is in the table region.
    Now my understanding is, you have a display table, which has a column of Type Date,
    If the query returns null for that value, you want to display the sysdate is it correct?
    If yes, please change ur logic little bit,
    I am sure you will be calling an AM Method to execute the VO,
    In your AM, after the execution, traverse throw the Rows,
    And check for the dateColumn value and then set Sysdate, which will reflect here.
    Sample code:
    locatorVO.executeQuery();
    XXPOLocatorVORowImpl locatorVORow = (XXPOLocatorVORowImpl)locatorVO.first();
    while (locatorVORow!=null)
    //get the dateValue and check it is null
    if(date is null)
    Date currentDate = this.getOADBTransaction().getCurrentDBDate();
    locatorVORow.setOrderedDate(currentDate);
    locatorVORow = (XXPOLocatorVORowImpl)locatorVO.next();
    Thanks,
    With regards,
    Kali.
    OSSI.

  • 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

Maybe you are looking for

  • How to reset my macbook pro

    I'm running out of space on my macbook, & i really just wanna start over on it. but, how can i reset it?

  • How to find out names of reports using a particular view

    hi guys, i am newbie here, i jsut want to know how to find out which reports are using a particular view many thanks in advance for your help

  • How to display filter values in analyzer

    Hi expert,       I want to add filter into analyzer, above data table, I insert a few rows, and add text to hold filters, but after quit from design mode, inserted rows for filters dispear, and its spaces are taken by data table. could you please tel

  • New beginner : ORA-01704: string literal too long

    Does anyone found this error and know how to solve it. I am very new in using Oracle. Please give mw some any ideas. Thanks, Oil

  • Zen V Plus Graph

    Hey.. Could someone please somehow send me the graphics that are on the Zen V Plus from the beginning. Those graphics were so aesthetic as wallpaper but unfortunately I had to format my Zen V Plus. It was like 3 or 4 folders with like 6 pictures in e