Require a Message mapping for this Logic.

Hi Experts,
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
           So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
Thanq very much in advance..
Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

Hi Prashanth,
Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
formatByExample>collapseContext>SplitByEachValue-->Recv_Date
FormatByExample:
input1:resulrOfSortByKey
input2:concatination>removecontext>sort-->SplitByValuChange
sortByKey:
input1:concatination-->removecontext
input2:date-->removecontext
concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
formatByExample>sum>Recv_Quantity
FormatByExample:
input1:sortByKey
input2:concatination>removecontext>sort-->SplitByValueChange
SortByKey:
input1:concatination-->removecontext
input2:Quantity-->removeContext
Regards,
Priyanka.

Similar Messages

  • Is there pre-configured message mapping for SRM Content?

    Hi,
    My requirement is to do a message mapping between the SRM Message "Purchase Order Request" and the R/3 Idoc Orders01. Is there a preconfigured message mapping in SRM content or will I have to do it?
    I see the generated proxy class from the outbound message interfacePurchaseOrderRequest_Out which will carry the message to XI and my requirement is to map it to the Interface ORDRSP.Orders01 Please let me know if there is a pre-configured message mapping for this ? or is the message mapping between the message "Purchase Order Request" and the R/3 IDOC ORDERS01 to be done by the developer himself?

    HI,
    There are mappings available in the predelivered SRM content from SAP.
    Did you import  the SRM content into the repository? If so , you can find this.
    www.service.sap.com/ibc -> Integrated Business Content for mySAP SRM->
    Hope this helps,
    Rgds,
    Moorthy
    Message was edited by:
            Krishna Moorthy P

  • Exception in Message mapping for JDBC - XI- file

    Hi,
    In the above scenario, Sender JDBC adapter has processed the message but when i checked the processed XML messages, its giving an error message with details
    <i>During the application mapping
    com/sap/xi/tf/_MM_XXXX_a
    com.sap.aii.utilxi.misc.api.BaseRuntimeException
    was thrown: RuntimeException in Message-Mapping
    transformatio~</i>
    how to make the source structure so that it gets correctly populated with the result set of sender JDBC adapter? Are there any constraints while making the Data type for the source structure?
    Regards,
    Nitin Aggarwal.

    Hi,
    The problem is solved...
    Actually, the runtime system was not able to map the result set generated by the Sender JDBC adapter to the source structure of message mapping. This was because the result set has a particular structure and its like
        <resultset>
          <row>
            <column1>value1</column1>
            <column2>value2<column2>
           </row>
        </resultset>
    To map this kind of structure to the source structure, a  <b>row</b> element should always be there below the root node and the structure fields should be placed as sub elements to row. One more thing the root node of the source structure should be same as the document name specified in the sender JDBC adapter config.
    Anyways, Thanks to all for the valuable efforts.
    Regards,
    Nitin.

  • Adobe Photoshop CS4 message: "Licensing for this product has stopped working." I have the serial number but not the media. How do I use the software?

    I recently tried to use Photoshop CS4 that I have on my computer but I get the message:"Licensing for this product has stopped working." I have the serial number but not the media. How can I use this version?

    You can get the installer here: Download CS4 products
    It will install as a fully functional 30 day trial. Entering your serial number will convert it to a permanent version, Standard or Extended, depending on what serial number you purchased.
    If you still have the license problem. get back to me with your OS details and the error code.
    Gene

  • Had to restore my iMac from Time Machine. After the restoration all programs are functioning except my Adobe Creative Suite 4 Design Premium. When I start any program in the suite the error message, "Licensing for this product has stopped working." I rest

    I had to restore my iMac from Time Machine. After the restoration all programs are functioning except my Adobe Creative Suite 4 Design Premium. When I start any program in the suite the error message, "Licensing for this product has stopped working." I restarted the computer and tried again to run Photoshop and the same error message appeared. The message was followed by a message that stated that I needed to contact Adobe technical support and mention Error: 150.30. I need Adobe technical support to provide me a solution for my problem so I can continue using my Adobe products installed on my computer.

    Unfortunately when Adobe products are restored from backup, especial CS4 and especially Mac, it breaks licensing.
    There is a python script included in the license recovery kit that should work if you are familiar with Terminal.
    If not, you must reinstall your CS4 suite.  You don't need to delete your preferences, so it should be the same as before.
    Error "Licensing has stopped working" | Mac OS
    Gene

  • Trying to launch photoshop cs3 on a mac running OS10.6.8 i keep getting the error message: Licensing for this product has stopped working  you cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this pro

    trying to launch photoshop cs3 on a mac running OS10.6.8 i keep getting the error message: Licensing for this product has stopped working  you cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contacting your IT adminstrator or Adobe customer support for help
    I already Uninstalled and reinstalled the product and it still does not work.

    Hi,
    Try to uninstall the software again and you have to manually
    Delete the following folders:
    [Startup Disk]/Library/Application Support/Adobe/Adobe PCD
    [Startup Disk]/Library/Application Support/Adobe/caps
    [Startup Disk]/Library/Application Support/Adobe/backup
    [Startup Disk]/Library/Preferences/FLEXnet Publisher/
    [Startup Disk]/Library/Application Support/FLEXnet Publisher/
    Go to Applications-->Utilities-->Disk Utility, Open it and Select the MAC HD and then click on Repair permissions.
    After that try to run the cleaner tool as mentioned by kglad.
    Restart machine and then try to install again.
    *** Make sure , you only delete these folders if there is no other adobe applications installed on the machine. As if you have any other Adobe application of the suite ( not free applications ) then it will be a problem.

  • Why  will photoshop not open after loading it to new iMac computer from an external hard drive and I get this message: Licensing for this product has stopped working:error code: 150:30

    Why will Photoshop CS4 not open after loading to new iMac from an external hard drive and I get this message: Licensing for this product has stopped working:error code: 150:30

    A Photoshop installation is tied to the machine it was installed on. Moving it to or from a hard drive breaks the licensing.
    The answer is easy: Reinstall CS4 from your disc. and apply all updates.
    Gene

  • Why would my customer reading my pdf file get this message: 'Licensing for this product has stopped'?

    why would my customer reading my pdf file get this message: 'Licensing for this product has stopped'?
    The message goes on to say, 'you cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contacting your IT administrator or Adobe customer support for help.'

    Hi sivey@pdx,
    Can you please let us know the following:
    - Operating System installed;
    - Name and version of the Adobe Product (Adobe Reader or Adobe Acrobat);
    - Screenshot of the error message.

  • Further error messages exist for this transaction

    Hello all ,
    i am getting en error message "Further error messages exist for this transaction" while creating an opportunity from external  number ranges
    please help me out how to solve this.
    Regards
    Ahmad

    Hi Mohammad,
    There might be any error transaction so there suppose to be an error insystem status. If you are able to generate opportunity number after saving than please do check in GUI with transaction crmd_order and check the message detail and revert.message detail is needed in order to proceed further.
    Thanks,
    Prem

  • Message mapping for checking hyphens (-) in material number

    Hi All,
    I have an interface in PI 7.1 for product change and product create coming from ORACLE to SAP
    Now, the reqmt is to take the ORACLE product which could have hyphens or without hyphens
    In SAP, the product can have upto 40 characters and if something without hyphens come in, then it adds leading zeros while creating and while changing, SAP expects a product with leading zeros
    So, how do I handle this? How do I check in message mapping, the product with hyphens or without and write a condition to it.
    Here is my idea
    Take the product, use a message mapping function to check for products without hyphens and if YES, add leading zeros upto 40 characters
    Can anyone let me know how this could be achieved using message mapping function
    I am sure this kind of reqmt especially leading zeros for products is very common in PI interface circle
    So, please let me know the details
    Thx
    mike

    Hi Mike,
                  your requirement can be solved without UDF too
    inputfield ---------------->
                                                 indexOf() ------------>  
    Constant(-)---------->                                                  less---->if ----->target field                                                                               
    constant(0)---------->
    inputfield  and contant (hyphen) are inputs to standard text function indexOf. Output of IndexOF and constant(zero) are inputs to standard arithmetic function less. Out put of less goes to boolean function if. The IF has two inputs then and else .
    For then part write this logic
    inputfield----> formatNumber()---->then
    in standard arithmetic function Formatnumber  specify number format with 40 zeroes, leave decimal separetor blank.
    Now for the else part of "IF" write this
    inputfield----->else
    Finally
    output of "IF" goes to target field
    IF------>target
    Regards
    Anupam

  • How to write code for this logic in a routine, very urgent --help me

    hi all,
    i want to apply this logic into one subroutin ZABC.
    here i m giving my logic ,can any body help me in coding for this, this is very urgent, i hv to submit on wednesday.
    4.1 Read the company code number BSEG-BUKRS from document line item.
    4.2 Fetch PRDHA from MARA into GV_PRDHA where MATNR = BSEG-MATNR.
    4.3 Fetch Business area (GSBER) from ZFIBU into GV_GSBER where (PRDHA = GV_PRDHA and BUKRS = BSEG-BUKRS) OR (PRDHA = GV_PRDHA and BUKRS = SPACE).
    4.4 If business area match is found, go to step 3.9. Else continue.
    4.5 If BKPF-BLART IN set “ZVS_POSDT” OR BKPF-XBLNR starts with “I0*”, execute steps below. Else, go to Step 3.6.
    i. MOVE: BSEG-BKURS TO work area field WA_ZFIBUE-BUKRS,
    BSEG-MATNR TO work area field WA_ZFIBUE-MATNR,
    GV_PRDHA TO work area field WA_ZFIBUE-PRDHA,
    BSEG-HKONT TO work area field WA_ZFIBUE-HKONT,
    BSEG-GSBER TO work area field WA_ZFIBUE-GSBER,
    BSEG-PSWBT TO work area field WA_ZFIBUE-PSWBT,
    BKPF-BUDAT TO work area field WA_ZFIBUE-BUDAT,
    SY-DATUM TO work area field WA_ZFIBUE-CREDATE,
    SY-UZEIT TO work area field WA_ZFIBUE-CRETIME,
    Fetch running serial number (WA_ZFIBUE-SERIALNO) from ZFICO. This number will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "ZFIBUE" and KEY1 = "SERIALNO". The actual serial number will be stored in the field VALUE1.
    i. Insert WA_ZFIBUE INTO ZFIBUE.
    ii. Send email notification to the user (if it is not already sent to user on the same posting date).
    Use function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ to send mail.
    Fetch email address and date of last email from ZFICO. These values will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "EMAIL" and KEY1 = "<USERNAME>". The email address will be stored in the field VALUE1 and posting date in VALUE2. Once mail is sent, VALUE2 is updated with latest posting date (BKPF-BUDAT).
    iii. Increment the running serial number and update ZFICO with new serial number.
    a. GV_ SERIALNO = WA_ZFIBUE-SERIALNO + 1
    b. Update ZFICO Set value1 = GV_SERIALNO
    Where PARAMTYPE = "BPM030307" AND
    SUBTYPE = "ZFIBUE" AND
    KEY1 = "SERIALNO".
    iv Move “VDFT” to BSEG-GSBER.
    v. Exit routine.
    4.6 Fetch MTART into GV_MTART from MARA where MATNR = BSEG-MATNR.
    4.7 If SY-BATCH = INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain the mapping of product hierarchy <PRDHA> from article <MATNR> for <BUKRS>”. Else, go to step 3.8.
    4.8 If SY-BATCH <> INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain product hierarchy on article master”. Go to step 3.10.
    4.9 Move GV_GSBER TO BSEG-GSBER.
    4.10 Exit Routine
    plz give me reply asap --this is very urgent
    thanks in advance
    swathi

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • How to write code for this logic, plz help me very urgent

    Hi All,
    i am new to sap-abap, i got this work and i m working on this can any body help me in writing code, plz help me, this is very very urgent.
    here  i m giving my logic, can anybody send me the code related to this logic.
    this is very urgent .
    this program o/p should be in ALV format and need to create one commond 'SAVE" on this o/t list  if  user clicks save processedon and processedby fields in ZFIBUE should be updated automatically.
    i am creating one custom table zfibue having fields: (serialno, bukrs, matnr,prdha,hkont,gsber,wrbtr,budat, credate, cretime,processed, processedon, processedby,mapped)
    fields of zfibue:
    serailno = numc
    bukrs = char
    matnr = char
    prdha = char
    hkont = char
    gsber = char
    wrbtr = char
    budat = date
    credate = date
    cretime = time
    processed= char
    processedon = date
    processedby = char
    mapped = char      are   belongs to above type data types
    and seelct-optionfields:  s_bukrs for bseg-bukrs
                                        s_hkont for bseg-hkont,
                                         s_budat for bkpf-budat,
                                         s_processed for zfibue-processed,
                                          s_processedon for zfibue-processedon,
                                          s_mapped. for zfibue-mapped
    parameters: p_chk1 as checkbox,
                      p_chk2 as checkbox.
                      p_filepath type rlgrap-filename.
    1.1 Validate the user inputs (S_BUKRS and S_HKONT) against respective check tables (T001 and SKB1). If the validation fails, provide respective error message. Eg: “Invalid input for Company Code”.
    1.2 Fetch SERIALNO, BUKRS, MATNR, PRDHA, HKONT, GSBER, WRBTR, BUDAT, CREDATE, CRETIME, PROCESSED, PROCESSEDON, PROCESSEDBY, MAPPED from table ZFIBUE into internal table GT_ZFIBUE where BUKRS IN S_BUKRS, HKONT IN S_HKONT, BUDAT IN S_BUDAT, PROCESSED IN S_PROCESSED, PROCESSEDON IN S_PROCESSEDON, and MAPPED IN S_MAPPED.
    1.3 If P_CHK2 = ‘X’, go to step 1.11. Else continue.
    1.4 If P_CHK1 = ‘X’, continue. Else go to step 1.9
    1.5 Fetch MATNR, PRDHA from MARA into GT_MARA for all entries in GT_ZFIBUE where MATNR = GT_ZFIBUE-MATNR.
    1.6 Sort and delete adjacent duplicates from GT_MARA based on MATNR.
    1.7 Loop through GT_ZFIBUE where PRDHA = blank.
              Read Table GT_MARA based on MATNR = GT_ZFIBUE-MATNR.
              IF sy-subrc = 0.
                     Move GT_MARA-PRDHA to GT_ZFIBUE-PRDHA.
                  Modify Table GT_ZFIBUE. “Update Product Hierarchy
                 Endif.
        Fetch PRDHA, GSBER from ZFIBU into GT_ZFIBU for all entries in GT_ZFIBUE where PRDHA = GT_ZFIBUE-PRDHA.
        Read Table GT_ZFIBU based on PRDHA = GT_ZFIBUE-PRDHA.
              IF sy-subrc = 0.
                     Move GT_ZFIBU-GSBER to GT_ZFIBUE-GSBER.
                  Move “X” to GT_ZFIBUE-MAPPED.      
                  Modify Table GT_ZFIBUE.
                 Endif.   
    Endloop.
    1.8 Modify database table ZFIBUE from GT_ZFIBUE.
    1.9 Fill the field catalog table GT_FIELDCAT using the details of output fields listed in section “Inputs/Outputs” (above).
       Eg:                 LWA_ FIELDCAT -SELTEXT_L = 'Serial Number’.
                              LWA_ FIELDCAT -DATATYPE = ‘NUMC’.
                              LWA_ FIELDCAT -OUTPUTLEN = 9.
                              LWA_ FIELDCAT -TABNAME = 'GT_ZFIBUE'.
                              LWA_ FIELDCAT-FIELDNAME = 'SERIALNO'.
              Append LWA_FIELDCAT to GT_FIELDCAT
    Note: a) The output field GT_ZFIBUE-PROCESSED will be editable marking INPUT = “X” in field catalog (GT_FIELDCAT).
             b) The standard ALV functionality will be used to give the user option for selecting all or blocks of entries at a time.
             c) The PF-STATUS STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN will be copied to the program and modified to include a “SAVE” button.
    1.10 Call the function module REUSE_ALV_GRID_DISPLAY passing output table GT_ZFIBUE and field catalog GT_FIELDCAT. Additional parameters like I_CALLBACK_PF_STATUS_SET (= ‘ZFIBUESTAT’) and I_CALLBACK_USER_COMMAND (=’HANDLE_USER_ACTION’) will also be passed to handle user events. Go to 2.14.
    1.11 Download the file to P_FILEPATH using function module GUI_DOWNLOAD passing GT_ZFIBUE.
    1.12 Exit Program.
    Logic to be implemented in  routine “Handle_User_Action”
    This routine will have the following interface:
    FORM Handle_User_Action  USING r_ucomm LIKE sy-ucomm
                                                               rs_selfield TYPE slis_selfield.
    ENDFORM.
    Following logic will be implemented in this routine:
    1.     If r_ucomm = ‘SAVE’, continue. Else exit.
    2.     Loop through GT_ZFIBUE where SEL_ROW = ‘X’. “Row is selected
    a.     IF GT_ZFIBUE-PROCESSED = ‘X’.
    i.     GT_ZFIBUE-PROCESSEDON = SY-DATUM.
    ii.     GT_ZFIBUE-PROCESSEDBY = SY-UNAME.
    iii.     MODIFY ZFIBUE FROM work area GT_ZFIBUE.
    Endif.
    Endloop.

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • Please provide code for this logic

    Hi,
    table
    id                    code
    145623          xyz001
    178956          sbh002
    165895          sbi003
    As per this logic,for  every new entity of id a new autogenerated code will be  generated.
    This (xyz or sbh or sbi) code should be fetched using select query (select b_code into table.code from cmp where c_id =145623)
    using id(145623). And 001,002 is autogenerated code and should be concentrated with xyz ex: xyz001
    Here we can use trigger with sequence
    Could you please help me..

    How many times you will ask same question???
    You need to use pl/sql block for your requirement   some thing like this:
    create sequence and add into pl/sql block like:
    >>Select max(count) into temp_var where id=’sbi’
    >>New_code:=’sbi’+temp_var;
    Now you need to optimize it...
    Thanks...

  • I was cleaning my macbook pro and i deleted all my files including itunes. Then when i turn on my itunes it says the folder"itunes" cannot be found or created, and is required. the default location for this folder is inside the "music" folder. help please

    My itunes keep saying The folder “iTunes” cannot be found or created, and is required. The default location for this folder is inside the “Music” folder.iTunes needs a library to continue. You may choose an existing iTunes library or create a new one. please help i presschooseexisting cuase i have one but then it says this The  file cannot be found or created. The default location for this file is in the “iTunes” folder in the “Music” folder. please help

    I was cleaning my macbook pro and i deleted all my files including itunes
    Restore your computer from your backup. 

  • Failed in Message Mapping for Sender SOAP Adapter

    I am using a synchronous Sender SOAP adapter for sending SOAP messages using HTTP security protocol. I am trying to send SOAP messages to XI and then to RFC-R/3. And Responses back from RFC to XI and then to SOAP. I am getting an error for failed in message mapping in SXMB_MONI for converting SOAP messages to RFC. When I debug it in Message Mapping in Integration Repository, it works fine.
    Any help is appreciated.
    Thanks in advance!
    Mrudula

    Hi,
    try to do a full cache refresh
    regards,
    Jakub

Maybe you are looking for

  • Missing hierarchy in Report-Report Interface

    Hello friends, I have a problem with hierarchies in RRI. The scenario is like this: I have two reports based on the same Multiprovider, let's say report A and report B. Report A displays rows based on the Cost Center hierarchy and works fine. Report

  • Links in Interactive Document

    Hi All, I created an interactive document in InDesign CS5 that I exported as a .swf and inserted it into a html based webpage.  I would like the buttons I created with url actions to open the url in the same broswer window and not in a new broswer wi

  • Des6i and intermedia object types

    Hi friends, anybody tried to capture intermedia object types like ORDSYS.ORDImage to the 6i Repos? I always get the error that he can't capture from ORDSYS. It is really nasty to create a column with BLOB and then change it in the DDL files. Someone

  • Can't format iPod fifth generation for Windows XP

    I restored my iPod because it froze and therefore I lost all of my data. I knew that would happen but now the iPod won't format for my computer! I tried many times but it only says Windows cannot complete the formatting. Does anybody have an idea how

  • Iphone 4s my number shows unknown

    Iam using iphone 4s..In that my number its showing unknown...please help me out in this