Changing value of a field in mapping as per condition

Hi Experts,
I have one requirement in IDoc mapping to EDI structure.
I want to change the value of a field depending on the condition. But the problem is the field is mapped at higher level than the condition.
For example:
Say i have a source structure in IDoc with name Source1 and target structure Target1. Source1 is mapped to Target1. Both of these structures have multiple occurances. So in general out structure will look something like below:
Source1-> Target1
Source2->Target2
Source3->Target3
Now i want to change value of one field from Target1 structure depending on Value of one field from Source3. At the runtime when Target1 structure is getting filled Source3 value is not visible so I am not able to set a proper condition.
When at lower level we get value of Source3 can we change value of already filled structure Target1?
Thanks,
Atul

Hi Aamir,
Thanks for your reply.
If possible can you give any sample code for this kind of UDF?
Thanks,
Atul Patil

Similar Messages

  • Change value in a field and reflect value of another field

    Hi all,
    I have a situation here where in the Single Customer View, under the Completed Task. When I changed the value of a field name called Status to "Completed" in the Edit screen and I save it, another field that is in the same screen called "Completed Date" will auto populate the current date as value. may I know how do I achieve this?
    Thanks and appreciate for help
    Regards,
    Anson

    Hi !
    You've got to create a workflow rule on Activity with the event trigger Before modified record saved.
    The condition will be like this :
    *[<Status>]=LookupValue("EVENT_STATUS", "Completed") AND [<Status>]<>PRE('<Status>')*
    Then the action of this rule will update the field *"Completed Date"* with the value Today().
    But you don't have to do it for the completed date field, because it's already filled automatically when you change the status to completed.
    Hope this will help, feel free to ask more !
    Max

  • How can we change value of a field in the Repeating Table using SharePoint Workflow 2013.

    Hi
    I have an InfoPath form published on a SharePoint Library. The form contains a Repeating table and after submit a workflow runs. In this workflow I want to change some values of the fields within Repeating table.
    How can I do this?
    Thanks.

    Hi,
    I found a similar thread posted by you here:
    http://social.technet.microsoft.com/Forums/en-US/e1fa36c1-cb5c-456d-ba40-2f26301913d2/how-to-loop-through-each-row-in-a-repeating-table-using-sharepoint-workflows?forum=sharepointgeneralprevious
    I suppose both the threads are reuqesting the method to get values from repeating table via workflow, so we can focus on the issue on the other case. If there is more requestment here, let me know.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to change value in PPMeter field in IQ02

    Hi,
    Please guide me how can we change the value in PPMeter field in IQ02(in tab 'other').
    The device has already been installed and billing for several months has also been done.
    Please guide.
    Thanks and Regards
    Edited by: MPVash Vash on Dec 4, 2008 7:06 AM

    Transactions SMOD and CMOD are available for enhancing and preassigning fields for devices.
    There is one customer exit under the SAP enhancement EMDK0001.
    When creating a device using Plant Maintenance (PM), you can enter data directly onto the Other tab page. You do this by using transaction IQ01 to define enhancement ITOB0001. This is not possible via transaction IQ04. In change mode, however, you can use both transactions to access customer-specific fields.
    Table EQUI contains device data. The customer include CI_EQUL is used to include customer-specific fields in the database table. You cannot preassign fields for devices. You can use the field selection to display fields for device and connection (both based on equipment) differently.
    Regards,
    Shiva Kumar

  • Use commitKey to change value in next field

    if (event.commitKey == 3){myTrustedFunction(this);} So I want to run this function on a specific field after tab is used in this field. Instead of this I would like to use
    var school=doc.getField("SCHOOL NAME");How can I run this function on this specific field. The tab is going to this field also. So it goes like this enter value tab value for next field is automatically entered. Bam.Tab to next field.

    JavaScript™ for Acrobat® API Reference
    if ((event.value.length<5)&&(event.value.length>3)){
                    event.value=("0"+event.value.toString());
                if ((event.value.length<4)&&(event.value.length>2)){
                    var num=event.value=("00"+event.value.toString());
                if((event.value.length<3)&&(event.value.length>1)){
                    var num=event.value=("000"+event.value.toString());
                 if(event.value.length<2){
                    var num=event.value=("0000"+event.value.toString());
    if (event.commitKey == 3){myTrustedFunction(this);getField("SCHOOL NAME").value = event.value;app.alert(num);}
    else{app.alert("poop");}
    so this crazy thing is just like a puzzle you get one thing to work and you break another. So I now have the field that I want with the correct data in that field. But in doing so i have recked the first field. They both now share the same data. I would like to put it back and give it the data of var num. But I do not know how. Because. getField("SCHOOL NAME").value =num does not work.

  • Changing value of input field in interactive report

    Hi all,
    I have created interactive report. On 3rd list, i had calculated total for netwr filed and it is displayed at bottom.
    netwr field on list is editable. If value in netwr changed by user , value for total should be changed on same list.
    Can anybody help me out?
    Thanks and Regards,
    Rakesh.

    Hi Rakesh
    Within the third alv's usercommand, Try this code.
    FORM user_command1 USING r_ucomm LIKE sy-ucomm
           rs_selfield TYPE slis_selfield.
        CASE r_ucomm.
             WHEN 'EDIT'.
                 <code>
                 CALL METHOD <alv_instance>->refresh_table_display
                     EXPORTING
                     is_stable = <third_alv_internal_table>
                     EXCEPTIONS
                     finished = 1
                     OTHERS = 2.
      ENDCASE.
    ENDFORM.
    This will refresh the internal table each item a edit operation is done, after this write the code to find the sum.
    Thanks and Regards,
    Rinzy Deena Mathews

  • How do I use pots on my client machine to change values, from the field, on my server machine and all other client machines?

    I am using Lookout 4.5, build 12, and I am having a problem concerning pots. I have data tables created for the different size sewer stations my system monitors. For each station, there are setpoints for starting and stopping of the pumps. I want to be able to change the setpoints for a station on the client file using a pot and have it change on all other machines running Lookout. I did this in 3.8 using DDE, but I don't want to use DDE anymore.
    I created a pot on the client file and URL'ed it to a pot on the server. On the server I created a table with a generic member "A" named "Lead Setp" and then created a member "A1" named
    "C5_1LeadSetp" then a member "A2" named "C3_1LeadSetp" and so on....
    In this table I connected the generic member "A" to the Pot I created on the server, and I connected A1 to its corresponding setpoint signal coming in from the field.
    On the client file I connected (in the table similar to the one on the server but with all signals for the station) the "A1" member to the setpoint signal coming in from the field, and I connected the "A" member to the Pot I created on the client file which is URL'ed to the pot on the server file.
    But, when I change the value of the pot on the client file, only the pot on the server and the "A" member in the table on the server change to the value of the pot on the client. The "A1" member whose screen I am changing the values from on the client does not change! This is the last thing I have to do and my file will be completely converted to 4.0. Does anyone have any ideas?
    Thanks for any responses..
    GBWY
    Jason
    Jason Phillips

    Hi Jason,
    If I understood your task correctly, you want to change the Setpoints on the Server DataTable using Pots from different clients. And also reflect these changes on the clients locally.
    You correctly remoted the Pots on the Clients to the corresponding Pots on the Server. However, you do not need tables on your clients. All you need is Expressions on each client to the particular cell of the Clients.
    So, to summarize: On the Server, the Pots write to the DataTable. And since the Pots on the Clients are remoted to these Pots on the Server, you can affect any change using these Pots. Because of the common remote source (Server Pots, i.e.) all of these Pots will always be in sync. Finally, to get the Setpoints on the Clients, just insert Expressio
    ns to the Server's DataTable.
    I am attaching a simple example (exmpl.zip) which does this. There are three processes -- My_Server, My_Client1, and My_Client2. I had them setup on the same machine so the paths are all process relative, but you can always change those to computer relative or absolute and move the client processes to diff machines.
    Hope this helps.
    Rgds,
    Khalid
    Attachments:
    exmpl.zip ‏12 KB

  • XML Unbounded values into one field - Message Mapping

    Dear All,
    I am trying to convert an unbounded multifield XML structure to a 0.1 field so that the maltiple values are mapped into a single fields in semi-colon seperated fasion.
    The source:
    <MT_dates>
       <date>05-10-2011</date>
       <date>10-11-2011</date>
       <date>10-12-2011</date>
       <date>10-13-2011</date>
    </MT_dates>
    date field is 0.. unbounded
    target
    <MT_dates>
       <dates>05,10,2011;10,11,2011;10,12,2011;10,13,2011</date>
    </MT_dates>
    dates field is 0 .. 1
    can anybody please help?
    Regards,
    Haik

    chk this:
    input will be : var1
    execution type All values of a context
    int a = var1.length;
    String b="";
    for(int i=0;i<a;i++)
    b =b +var1<i> + ";";
    int c=b.length();
    String output =b.substring(0,c-1) 
    result.addValue(output);
    date-UDF--dates

  • Filter data based on the value of sorce field in mapping

    Hi,
    I have a scenario (IDOC to file) where i have to move data to target file,  only when one of the source fields has particuler value. Otherwise skip the record, no need to write into output file.
    Please let me know how to handle it in mapping, without BPM.

    Karthik,
    Ofcourse there is no need of BPM, You can use the IF without Else function in your mapping with using Equals function.
    Example:
    Field1 ---> Equals (Particualr Value) -
    > IF -
    > Then -
    > pass it to Target field.
    Since there is no Else option, therefore whenever condition will fail, nothing will be passed to the target field.
    Regards,
    Sarvesh

  • XSLT List View Web part with Inline Editing changing value for one field changes the other lookup field

    Hi
    It's a bit of a weird one. In an XSLT List View web part when Inline editing is enabled if I change the date column, it changes the lookup field column as well. This behavior only occurs if the lookup list has more than 20 entries. Below 20 and we are
    OK.
    Let me explain by example:
    MileStones List - Having more than 20 items
    Tasks List - having a lookup to the Title field from MileStones list. Also having a due date field.
    Simple web part page with one XSLT List View web part for Tasks having inline editing enabled.
    When I edit the first record's due date and press enter (which saves the changes and moves onto next record) and change the due date on second record without even touching the MileStone field. Press enter to commit changes and you see the milestone changing
    on first record!
    The wierd thing is that if the MileStone list has less than 20 items all works as expected.
    Any pointers will be appreciated
    Thanks

    Hi,
    This is a known limitation when working with complex fields like Lookup field.
    A workaround is that we can avoid using the inline edit feature when there are
    complex fields in a list.
    You can take a look at this KB from Microsoft Support to get more details:
    http://support.microsoft.com/kb/2600186/en-us
    A similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3d369611-ee79-4b5c-86bb-c0f3878cd746/standard-list-view-with-inline-editing-lookup-column-copies-preceding-or-following-items-related?forum=sharepointgeneralprevious
    Thanks
    Patrick Liang
    TechNet Community Support

  • Change value of another field based on the value of selectOneRadio

    Hello
    I need to display one of two city fields based on the value of a radio group. If the value of the radio group is "Yes", then display the non mandatory city field, if the value is "No", then display mandatory city field. Please can someone help me? The code is below
    <af:subform id="contactForm3" default="true">
                <af:panelForm binding="#{processScope.backing_regDetails.contactPanel3}">
                  <af:selectOneRadio binding="#{processScope.backing_regDetails.radio1}"
                                     labelAndAccessKey="#{MatrixResource['ContactDetails.inBoroughQuestion']}"
                                     layout="horizontal"
                                     valuePassThru="true"
                                     required="true"
                                     onchange="javascript.refresh;" >
                      <f:selectItems value="#{processScope.backing_regDetails.items}" />
                  </af:selectOneRadio>
                  <af:inputText onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.SAO']}"
                                binding="#{processScope.backing_regDetails.houseNameText}"                           
                                maximumLength="240"/>
                  <af:inputText required="true"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
                                maximumLength="240"
                                label="#{MatrixCommon['Label.PAO']}"
                                binding="#{processScope.backing_regDetails.numberStreetText}"/>
                  <af:inputText onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                maximumLength="240"
                                labelAndAccessKey="#{MatrixCommon['Label.District']}"
                                binding="#{processScope.backing_regDetails.districtText}"/>
                  <af:inputText maximumLength="60"
                                rendered="#{!backing_regDetails.radio1}"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.TownCity']}"
                                required="true"
                                binding="#{processScope.backing_regDetails.cityText}"/>
                 <af:inputText maximumLength="60"
                                rendered="#{backing_regDetails.radio1}"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.TownCity']}"
                                required="false"
                                binding="#{processScope.backing_regDetails.cityText}"/>
                  <af:inputText maximumLength="60"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value='0';"
                                labelAndAccessKey="#{MatrixCommon['Label.County']}"
                                binding="#{processScope.backing_regDetails.countyText}"/>
                  <af:inputText columns="7"
                                onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
                                labelAndAccessKey="#{MatrixCommon['Label.Postcode']}"
                                binding="#{processScope.backing_regDetails.postcodeText}"/>
                  <af:selectOneChoice onchange="javascript:document.forms[0].elements['contactForm3:locationId'].value=0;"
                                      binding="#{processScope.backing_regDetails.countrySelect}"
                                      value="#{processScope.backing_regDetails.enteredAddress.countryId}"
                                      labelAndAccessKey="#{MatrixCommon['Label.Country']}">
                      <f:selectItems value="#{backing_regComponents.countryChoiceList}"/>
                  </af:selectOneChoice>
                  <af:inputHidden value="#{processScope.backing_regDetails.enteredAddress.locationId}"
                                binding="#{processScope.backing_regDetails.locationIdHidden}"
                                id="locationId"/>
                  </af:panelForm>
                  </af:subform>Edited by: aademola on Nov 13, 2008 7:35 AM
    Edited by: aademola on Nov 13, 2008 7:42 AM

    Hi,
    you should be able to apply this example to your 10.1.3 project
    see 4.3.2 of http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF
    Frank

  • Change value of a field, based on another fiekd, before insert...

    I have this situation: I have to generate a code (this happens through a database function) on the moment a new record is saved. This code is based on another field of that record (parameter passed to the function). I (have to) use Apex 3, so I can't use functionality of Apex 4.
    So to be concrete: I have a registration program of books. Eacht book has a unique library code (this is not the PK). The labrary code is based on the year of publication (e.g. B2010-00035). So once a new book is entered, before saving, the year of publication (e.g. 2010) is checked, and throug a database function (e.g. f_get_new_library_code(2010) returns "B2010-00036") the library code has to be filled out.
    How can I do this on the best way, taking into account I can't use Dynamic Actions of Apex 4 (unfortunatly).

    Hi,
    If you had specified the type of Form the answer would have been more to the point !
    If its a single row form then you can write a OnSubmit Computation where in you call your function.
    If its a Tabular Form then you have to write a OnSubmit After Comp & Val process where you will iterate through the apex_application.g_f arrays and update the required arrays.
    Regards,

  • How to delete the values of a vector of map with some conditions?

    Hi Friends!
    I have three map<int, vector<int>>
    mainmap, m1, and m2.
    m1 contains;
    2=>9  16
    3=>11  16
    4=>13
    mainmap contains; (keys of m1 are selected out of keys of mainmap)
    1=>10  13  0  12  15
    2=>12  0  0  11  0
    3=>13  0  0  0  0
    4=>14  11  12  0  15
    m2 contains; (keys of m2 are the values of mainmap)
    11=>9  16
    12=>3  12
    13=>11
    14=>3  9  16
    15=>1  3  6  9  16
    I want to execute the following tasks;
    first, pointing key '2' from m1 and the correspondent vectors are selected from mainmap with same key '2' (12  0  0  11  0).
    second, out of the selected vector(keys of m2) are selected to compare the values of m2 and values of m1.
    here ;
    11=>9  16
    12=>3  12
    are selected.
    Out of these selected figure (11=>9; 12=>3  12) if the value (9, 16) are fully matched, that key '11' is selected.
    Suppose, in case the selected figure is (11=>9; 12=>3  12), that is partially matched as only 9 is available, then 16 is deleted from the value of 2 in m1, and select the key '11' from m2.
    Then, it continues up to key '4' in m1.
    Could anyone help me to solve this?

    Hi Friends!
    I have three map<int, vector<int>>
    mainmap, m1, and m2.
    m1 contains;
    2=>9  16
    3=>11  16
    4=>13
    mainmap contains; (keys of m1 are selected out of keys of mainmap)
    1=>10  13  0  12  15
    2=>12  0  0  11  0
    3=>13  0  0  0  0
    4=>14  11  12  0  15
    m2 contains; (keys of m2 are the values of mainmap)
    11=>9  16
    12=>3  12
    13=>11
    14=>3  9  16
    15=>1  3  6  9  16
    I want to execute the following tasks;
    first, pointing key '2' from m1 and the correspondent vectors are selected from mainmap with same key '2' (12  0  0  11  0).
    second, out of the selected vector(keys of m2) are selected to compare the values of m2 and values of m1.
    here ;
    11=>9  16
    12=>3  12
    are selected.
    Out of these selected figure (11=>9; 12=>3  12) if the value (9, 16) are fully matched, that key '11' is selected.
    Suppose, in case the selected figure is (11=>9; 12=>3  12), that is partially matched as only 9 is available, then 16 is deleted from the value of 2 in m1, and select the key '11' from m2.
    Then, it continues up to key '4' in m1.
    Could anyone help me to solve this?
    1. Did you mean
    "Out of these selected figure (11=>9 16; 12=>3  12) if the value (9, 16) are fully matched, that key '11' is selected."
    2. When you say fully matched or partially matched, do you mean just in key 2 of m1?
    3. What happens if there is no match?
    4. What does it mean to say that a key from m2 is "selected"? What happens to keys that are or are not selected?
    5. If the result of this exercise is a change in the three maps, you should at least tell us what that change is. If the result is some other data structure, then tell us what it is.
    David Wilkinson | Visual C++ MVP

  • ME21N-ME51N - change value of field at item level

    Hello All,
    We create a purchase requisition from a sales order and after a purchase order in reference to the purchase requisition.
    We would like to have the sales order number in the EBAN-BSTNR and/or in EKPO-BEDNR.
    We found some user-exits but it seems that we can't change value of standard fields with these.
    Could someone help us to find a solution ?
    May be with a BADI ?
    Thanks
    Véronique

    The code below should work for you, as for explanation why it will work look at SAP note 178328 over some coffee! )
    I gave some explanation below the code but the SAP note explains it in more detail
    DATA: ls_yvbap LIKE yvbap.
    * Sales doc is in creation mode
    IF t180-trtyp = charh.
      LOOP AT xvbap.
        xvbap-spart = cobl-spart.
        MODIFY xvbap.
      ENDLOOP.
    ENDIF.
    * Sales doc is in change mode
    IF t180-trtyp = charv.
      LOOP AT xvbap.
    *   Append Y-table and set update flag if necessary
        IF xvbap-updkz EQ space.
    *     Save unchanged version of XVBAP to YVBAP
          ls_yvbap = xvbap.
          APPEND ls_yvbap TO yvbap.
          <xvbap-updkz = charu.
          upd_vbap = charu.
        ENDIF.
        xvbap-spart = cobl-spart.
        MODIFY xvbap.
      ENDLOOP.
    ENDIF.
    SAP uses two internal tables XVBAP and YVBAP in sales document processing. XVBAP which contains the order items as they are currently after the user changed them on the screen, whereas YVBAP stores only changed item records the way they were before change. So YVBAP is only populated in change mode and not in creation mode. So if we are updating XVBAP when sales document is in change mode, we should ensure that YVBAP also contains the same record the way it was before our change.
    SAP will only update the records to database if we ensure the integrity of XVBAP and YVBAP internal tables.

  • Serv. Desk: Action: send an email only when a value in a field has changed

    Hello,
    In Soution Manager 4.0, Sevice Desk, I would like to create an action which creates an email only when a value of a certain field has changed.
    - only in change mode relevant
    - only when a value of one field has changed (e.g. Message Processort has changed from Buss. Partner 4 to 5. Than a mail should be sent to BP 5).
    - it should only send this kind of email when the field value has changed in change mode. In other words: it should not sent the email e.g. when the status has changed.
    I tried all kinds of things but I do not know on how to define the COnditions for an Action, so I can compare e.g.
    if <old value> <> <new value>
    Any ideas or experience on how to implement this without major modifications ?
    Thanks
    Christian

    Hi Christian,
    check out my question on SDN.
    Email on Status Change
    it has details on how to send an email when the status changes. I believe you are going to have to do something like this for each of the fields you want to create an Action Starting Condition for.
    regards,
    Jason

Maybe you are looking for

  • Linksys E1200 No Longer Working After Verizon Modem Replacement

    I have a new Linksys E2100 that was working well with an old Verizon modem. Then recently that modem gave up the ghost and I was issued another one (Westel Model 6100G). I have no problems with internet connectivity when connecting directly from my h

  • How Do You Change The Name Of A Folder?

    I have a very simple, almost ashamed to ask, question. How do you change the name of a folder? As always, thanks in advance. 800 mz Flat Screen iMac   Mac OS X (10.4.4)  

  • Problem listening to/recording vinyl records

    Hello I am trying to listen to/record vinyl. I am using a Dell 8700, Windows 8.1 and a Sound Blaster Recon3D PCIe sound card. I have the output from the turntable/preamp plugged into the line in/microphone in jack but am getting no sound. Does anyone

  • How to get pending TRs for production ordr ?

    Hi, Is there any way to get pending TRs w.r.t., production order. Im actually looking for a t code or tables that could link these twos. It could be possible via. material doc. or TOs but not sure how. Please let me know if any idea in this. Rgds sud

  • User Field as date

    Hi all, i try to get in system form with formtype=133 a system field docdate as frm.items.item("10").specific.string i have a user table vData = CDate(CStr(frm.Items.Item("10").Specific.String) Set xTable = oCompany.UserTables.Item(CStr("TABLE")) xTa