UDF for file to IDoc.

Hi,
I could like to create an UDF for file to IDoc secenario.
Srouce:
MTCashPosting_
Header
CashPosting
PubDiv
DocType
DocDate
PostDate
RefDocNo
HeaderTxt
Customer
Value
Currency
ExchangeRate
Ledger
Item
Material
TaxValue
VAtValue
Trailer
Traget: (IDOC Type: FIDCCP02 Message Type: FIDCC2)
FIDCCP02
IDoc (Under FIDCCP02)
Begin (Under IDoc)
EDIDC40_:DISABLED
E1FIKPF (Under IDoc)
E1FISEG (Under E1FIKPF)
Segment
buzei
bschl
shkzg
mwskz
dmbtr
hkont
matnr
"The secenario is the 'Value,TaxVAlue & VatValue' should be handled by replicating E1FISEG like (HAve used External definition for IDoc)"
Value -> Line item 1
IF TaxValue exists->Line Item 2
IF VatValue exists-> Line item 3
Finally Line item 4 for cerdit.All above are debit
Value____________UDF______________E1FISEG
TaxValue_________|
VatValue_________|
Value____________UDF______________DMBTR
TaxValue_________|
VatValue_________|
How should I map?? Inputs plzzzzz

Hi
I am not sure whether my understanding is correct.
As per my understanding
You need to duplicate E1F1SEG segment 4 times as there are 4 conditions
and those nodes need to be enabled or suppressed based on your condition .
Regards
sandeep

Similar Messages

  • Alert Configuration for File to IDoc scenario

    I have followed Alerts : Step-by-Step /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
    and configured Alerts for file to IDoc scenario.
    But the problem is, I did not notice any alerts being generated. I could notice the IDocs being posted to destination system. So I was going through Alerts-Troubleshoute Guide. In intension to maintain monitoring level, I clicked Configuration tab. But I did not notice my sender and receiver system there to maintain.
    Can any body help me to detail out the procedure to add sender and receiver systems to maintain the monitoring level?
    Regards,
    Suraj Kumar

    hi Suraj,
    WHich SP version are you on??
    If you are on Sp14 or above, then unfortunately, Michal's Trouble Shooting for Alerts will not help.
    From SP14 onwards, activation of end to end monitoring is not needed for Alerting. Refer to this note <b>870232</b> for this info.
    Next, to test if your Alerts have been defined correctly, go to SE38. In the program , type RSALERTTEST and then click on EXECUTE button ( F8 ). In the next window, it will ask you for your ALERTCATEGORY. Just give the name of your ALERT CATEGORY and click EXECUTE.
    If you have configured your alerts correctly, you will receive a message that tells ALERT IS GENERATED and will give the ALERT ID.
    Now, go to your Run TIme workbench and then select ALERT INBOX and see if you have got the ALERT message in your ALERT INBOX.
    If this is working fine, then the last step, implement the note 913858.
    Regards,
    Bhavesh

  • Namespace Creation for file to idoc scenario

    Hi ,
    while creating new  namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
                                           system :..............
                                           Client .................
    Pl confirm the above system and client to be mentioned is of XI server or R/3 system.
    Further when we go for
                                   imported objetcs ->
                                                IDOCS -import of sap object-->
                                                Application server Name :....................
                                                System No:..............................
                                                User :.................
                                                Name :................
                                                Pwd:.................
    Pl confirm the above data to be mentioned is of XI server or R/3 system.
    pl help.

    Hi,
    <b>while creating new namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
    system :..............
    Client .................
    Pl confirm the above system and client to be mentioned is of XI server or R/3 system.</b>
    Ans <b>R/3</b>
    <b>Further when we go for
    imported objetcs ->
    IDOCS -import of sap object-->
    Application server Name :....................
    System No:..............................
    User :.................
    Name :................
    Pwd:.................
    Pl confirm the above data to be mentioned is of XI server or R/3 system.</b>
    Ans: <b>R/3</b>
    Regards,

  • Partner Profile for file to IDOC scenario

    Hi experts,
    I am doing file to Idoc scenario. I did the ALE configuration steps between XI and r/3. For sender (ThirdParty) system, I defined Business system. While defining partner profiles in WE20 I got confused, whether to Give XI logical system Name or Third party logical system name. Please clarify..........
    Thanks
    Manoj

    Hi,
    >>I defined Business system. While defining partner profiles in WE20 I got confused, whether to Give XI logical system Name or Third party logical system name. Please clarify..........
    in most cases you will only use one logical system in WE20
    this will be XI's logical system - and you can route all the traffic
    via this logicail system - this is the most popular case
    for more about IDOCs and XI have a look at my book:
    Mastering IDoc Business Scenarios with the SAP XI
    http://www.sap-press.com/product.cfm?account=&product=H1935
    Regards,
    Michal Krawczyk
    http://mypigenie.com - XI/PI FAQ

  • Lookup issue for File to Idoc scenario-- Urgent Pls.

    Hi All,
    Iam doing File to IDoc scenario with one file --> any of 3 R/3 systems.
    Routing has to be done dynamically using a lookup file, based on the incoming GLN code and last character of the Order Reference number.
    The last character of the Order ref Num will have A,B or C.
    Where,  ' A'  for  R/3 152 Client
                 ' B' for  R/3 142 Client
                 'C'  for  R/3  132 Client.
    1. PlantGLN_Routing lookup file :
    DestinationSystem,   Plant GLNCode,       Partner Number,  
    A,                            5000243000473,         GDKDVRC152,     
    B,                            5000243000473,         GDKDVRC142,      
    C,                            5000243000473,         GDKDVRC132,      
    A                                 500034000487           GDKDVRC152,     
    B                                 500034000487           GDKDVRC142,     
    C                                 500034000487           GDKDVRC132,
    By Using DestinationSystem and Plant GLN Code as lookup key --> I need to get the value of partner system.
    2.  IdocCtrlLookup
    Purpose: To read the IdocCtrlLookup file to populate the Idoc control segment
    Now based on the partner system from previous table --> I need to get the details of Sender Port , Sender Partner Type , Sender Partner Function , Sender Partner Number , Rx Port , Rx Partner Type , Rx Partner Function , Rx Partner Number.
    Please help me how can acheive this scenario with the help of lookups.
    Its very urgent.
    Regards
    Krupakar.

    HI,
    Here you would have to use one mapping for dynamic routing , based on this create IM and use it in receiver determination.
    the another mapping is general to file to idoc.
    see the dynamic routing link here
    Dynamic Configuration of Some Communication Channel Parameters using Message Mapping -
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Also if you know the field name the context object can be defined for partner no that can be used in receiver determination in condition. to particular partner no in receiver determination.
    Regards
    Chilla

  • For  file to IDOC scenario, do i need to make a partner profile in XI  ?

    for a file--->XI--->IDOC scenario, do i need to make a partner profile in XI(for the R/3 system which is going to receive the IDOC),
    or only a port maintenance in idx1 will do.....

    hi Sudheer,
    yes u need to maintain partner profile in R/3
    Check below link in WIKi for complete File to IDOC
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/fileToIDOC&
    Sachin

  • Pass through scenario in SAP PI with no mapping for File to IDoc and Idoc to file scenarios

    Hi Experts,
    Can i have step by step process in SAP PI for pass through scenario with no mapping in case of file to Idoc and Idoc to file both cases please.
    What objects i can skip.
    My PI system is 7.3 dual stack.
    I have seen below blogs, still its confusing to me.
    When and how to create an scenario in SAP PI without mapping objects.
    Pass Through Scenario with no Mapping in PI 7.1
    Appreciate your help on this.
    Regards,
    Mohan.

    Hi Mohan
    In pass thru interface you don't need to create any ESR objects, only ID objects are required.
    Just Create a Receiver Determination and Receiver Agreement for your scenario (no need for Interface Det. and Sender Agreement).
    Specify the IDOC in the Sender Interface and namespace as urn:sap-com:document:sap:idoc:messages
    Or instead of creating objects manually, Run the wizard with Idoc name/namespace in sender/receiver interface
    Regards
    Osman

  • Multiple Operations for File to IDoc scenario

    Hi all,
    I have a file to IDoc scenario where two IdocXML files (one for INSERT and one for CHANGE of Business Object) have to be picked up by file adapter and transfered to SAP System. In respect to the multiple operations PI 7.1 can handle I would like to create one Service Interface for the Business Object and two operations (INSERT and CHANGE).
    Unfortunately I am not able to use the operation in the sender agreement, so I can't specify the comm-channel for the operations, only for the interface.
    So, can I use multiple operations in a file scenario (respectively in a non Web Service scenario)??
    Thanks a bunch,
    Manfred

    The scenario is pretty easy. I just want two different files to be read by one Comm Channel with one Sender Agreement.
    They are both transferred to the same receiver. I just wanted to test one scenario using multiple operations.
    In your blog you described that you should not use two operations with the same set of messages (synchronous/asynchronous). In my case both are asynchronous but I already tried it with one being sync and the other one async. Where did you actually get this information, it puzzles me a little since SAP does the same in its preconfigured Enterprise Services as far as I know.
    In the Trace for pipeline step Interface determination in SXMB_MONI it says:
    <Trace level="1" type="T">...There is no Interface Determination configured for receiver party and receiver service BS_RECEIVER</Trace>
      <Trace level="2" type="T">Check conditions for (Inb: Party Srvc If) BS_RECEIVER SI_..._Out</Trace>
      <Trace level="2" type="T">...valid InbIf without Condition: SI_..._Out</Trace>
      <Trace level="2" type="T">Number of receiving Interfaces:1</Trace>
    So it finds the Outbound Interface in Receiver side which is wrong since I specified the Inbound Interface in the Interface determination. Did anyone of you already encounter such a behaviour? I already deleted and recreated all routing objects but without any success.
    Thanks,
    Manfred

  • How to trigger alerts from UDF for file to file scenario

    Hi,
       My scenario is something like this.......
    I have lookup in which there exists more than one output value corresponding to this one input value.In such cases i need to raise an exception and trigger an alert from UDF so as to inform the functional team.
    Now this entire procedure has to be implemeted for file to file scenario.
    I am not using any RFC nor do i need a BPM.
    Entire scenario should be excuted without BPM and RFC.
    Can anyone kindly suggest me as to how to proceed for this so as to trigger alerts
    from UDF.
    Thanks in advance
    Madhu

    HI,
    Please see the below links
    Triggering XI Alerts from a User Defined Function - /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Alerts with variables from the messages payload (XI) - UPDATED - /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step - Alert Configuration
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide - Trouble shoot alert config
    Regards
    Chilla

  • Suggestions for File to IDOC Scenario

    Experts,
    Here is the requirement A Legacy System will Produce the Customer data file and we have to transform certain data and post it to DEBMAS.
    As Part of the information in the file there is a field Which could have a value Update,Amend or Delete.
    My Question is How do it handle this.
    Please give me your valuable thoughts.
    Is it Possible to go for File2IDOC here?
    Thanks
    Vasu.

    Hi Vasu,
      If Customer data file is of type xml then file to IDOC scenario is preferable.
    Else you have to convert Customer data file to xml first and then proceed for that you can use content converson feature of File Adapter.
    The information for Update,Amend or Delete will be provided by customer or you have to decide it based of data in table?
    if it is provided by customer then you can go for ABAP Proxy for that take help of ABAPers.
    If you have to decide the Update,Amend or Delete logic.
    Then fetch the data from table compare it with incoming data decide the Action and then perform the action this can also be handled in ABAP Proxy.
    Reward Points if HElpful
    Thanks
    Sunil Singh

  • Issue in segment creation for File to IDOC mapping

    Hi,
    I have file with many feilds, i need to create a segment in IDOC for unique combination of 2 feilds.
    eg:
    408
    430050
    segment
    208
    430050
    segment
    208
    430050
    208
    460100
    segment
    208
    452010
    segment
    408
    432000
    segment
    208
    432000
    segment
    the value for the combination of first column and 2nd column are equal it should trigger one segment instead of 2segments else(for different combination) trigger the segment
    eg from table:
    in table for 208,430050 is occuring twice but it should trigger only one segment(unique combinations of 2 columns), for all other combinations it should trigger one segment for each.

    Hi Swapna,
    You can use below mapping.
    UDF:
    Execution type : All Values Of Context
    public void removeDuplicates(String[] context, ResultList result, Container container) throws StreamTransformationException{
    HashSet<String> hashSet = new HashSet<String>();      
            for (int i = 0; i < context.length; i++) {
                if (hashSet.add(context[i]))
                   result.addValue(context[i]);             
                else {
                   result.addSuppress();              
    Reards,
    Praveen.

  • Mapping Requirement for File to IDOC

    Hi All,
    I have a requirement related to Mapping and need your help on this. There is a financial posting Interface and the data is being fetched from database using strored procedure.
    The source file is having structure like as shown below
    <FIExport>
        <resultset>
             <row>
               <headerid>12345</header id>
                <field2>5</field2>
               <field3>1</field3>
               <field4>29</field4>
               <field5>3</field5>
              </row>
             <row>
               <headerid>12345</header id>
                <field2>5</field2>
               <field3>1</field3>
               <field4>48</field4>
               <field5>3</field5>
              </row>
             <row>
               <headerid>12345</header id>
                <field2>5</field2>
               <field3>1</field3>
               </field4>
               <field5>3</field5>
              </row>
              <row>
               <headerid>12346</header id>
                <field2>5</field2>
               <field3>1</field3>
               <field4>2</field4>
               <field5>3</field5>
              </row>
             <row>
               <headerid>12347</header id>
                <field2>5</field2>
               <field3>1</field3>
               <field4>2</field4>
               <field5>3</field5>
              </row>
          </resultset>
        </FIExport>
    Condition:
    For creating target structure follwoing conditions are required
    1) IDOC at receiver side will be created as per unique header id  therefore in the current source structure 3 Idocs will be created for 3 unique header id like 12345 , 12346 , 12347
    2) Target EIFISEG which is line item will be created based on per row per unique header id under each IDOC and there has to be 2 SEGMENTS (2A & 2B ) per row based on the VAT amount presence and also two additional E1FISEG has to be created statically per idoc for BSCHL = 34
    so for the above source structure the target should have number of EIFISEG as follows:
    As there are 3 rows for header id 12345, therefore under IDOC1 the number of EIFISEG will be
    since VAT Amount(field 4) is present therefore for 2rows of 12345 header id IDOC it will generate 2X2=4 , E1FISEG segments (each for 2A & 2B) and 1 E1FISEG for 3 row of header id IDOC 12345.
    In addition to this 2 additional segment will be created for BSCHL=34( it's duplicate segment of E1FISEG, so no issues in this)
    Total number of E1FISEG segments in IDOC for header id(12345) will be = 4 + 1 + 2 = 7 segments
    Similarly for IDOC  with header id (12346) the total number of EIFISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
    Similarly for IDOC with header id(12347) the total number of E1FISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
    So the target strcuture should look like:
    Target Structure
    IDOC1 for header id= 12345
        E1FIKPF
            field 1
              E1FISEG1
                field 2
              E1FISEG2
                field 2
              E1FISEG3
                field 2
              E1FISEG4
                 field 2
              E1FISEG5
                 field 2
              E1FISEG6
                  field 2      
              E1FISEG7
                  field 2
    IDOC1 for header id= 12346
        E1FIKPF
            field 1
              E1FISEG1
                field 2
              E1FISEG2
                field 2
              E1FISEG3
                field 2
              E1FISEG4
                 field 2
    IDOC1 for header id= 12347
        E1FIKPF
            field 1
              E1FISEG1
                field 2
              E1FISEG2
                field 2
              E1FISEG3
                field 2
              E1FISEG4
                 field 2
    Please help me to complete this mapping requirement as it seems to be complex.
    Thanks & Regards
    Prabhat

    Hi,
    There was one typo mistake, the TARGET structure will be
    Target Structure
    IDOC1 for header id= 12345
       E1FIKPF
         field 1
             E1FISEG1
               field 2
             E1FISEG2
               field 2
             E1FISEG3
               field 2
             E1FISEG4
                field 2
             E1FISEG5
                field 2
             E1FISEG6
                field 2
             E1FISEG7
                field 2
    IDOC2 for header id= 12346
          E1FIKPF
            field 1
               E1FISEG1
                  field 2
               E1FISEG2
                  field 2
               E1FISEG3
                  field 2
               E1FISEG4
                  field 2
    IDOC3 for header id= 12347
               E1FIKPF
                   field 1
                     E1FISEG1
                        field 2
                     E1FISEG2
                        field 2
                     E1FISEG3
                        field 2
                     E1FISEG4
                        field 2
    Thanks & Regards
    Prabhat

  • Problem when creating receiver agreement for File to IDOC scenario

    I have done the following :
    1. Created two business systems one for the file system and other for the R3 system and also I created two communication channel, one as sender communication channel and one as receiver communication channel.
    2. Created the receiver determination
    3. Created the interface determination
    4. Created the sender agrement
    5. Now when I was trying to create the receiver agreement I want to assign the receiver communication channel i have created to the receiver agreement but the F4 help gives me no records and I am thus stuck at this point.
    Please suggest me how to proceed forward from here.

    Hi ,
    <i>5. Now when I was trying to create the receiver agreement I want to assign the receiver communication channel i have created to the receiver agreement but the F4 help gives me no records and I am thus stuck at this point.</i>
    Make sure that your created communication channel for reciever is under the respective reciever business system and give the same while creating the reciver agrement.
    sekhar

  • Generating partner profile for File to Idoc(CREMAS) scenario.

    Dear friend,
    Completed all the steps in SLD, IR and ID.
    I do not know how to create Partner profile and I skipped this step.
    While testing I got the error "Unable to convert sender service  to an ALE logical system".
    I think i got this error because I have not created partner profile.
    Could anybody tell step by step process of creating partner profile including logical system names( Sender and Receiver)?
    I have seen many blogs and i couldn't get clear picture on how to generate partner profile.
    My sender system is XI server and receiver is R/3.
    I have created RFC destination, Port also.
    Thanks in Advance
    Chiru

    generally u create partner profiles using transaction WE20.
    SAP Menu -> Tools -> IDoc Interface/ALE -> Administration -> Runtime Settings -> Partner Agreement (WE20).
    go through this link for step  by steps
    http://help.sap.com/saphelp_nw2004s/helpdata/en/dc/6b808e43d711d1893e0000e8323c4f/content.htm
    http://www.thespot4sap.com/Articles/SAP_ALE_Configuring.asp

  • Enhanced Inerface Determination for File to IDoc scenario

    I am using Enhanced Interface Determination in my scenario - where I map my source message (from a single instance) into more than one IDoc messages (separate instance of Idoc for each occurance of a particular segment in the source message). To implement this I am 1:n message mapping for Message Splitting.
    The mapping is being executed successfully and several instances of the target IDoc type is being created at the runtime. But at the technical routing step I am getting error:
    <SAP:Stack>Messages in multi-message format can only be sent to one Adapter Engine</SAP:Stack>
    Does this mean that we cannot use Multi-Mapping for Message Splitting for IDoc Outbound Channels? Even if all the target messages (more than one) are being sent through the same Inbound interface and same Reciever IDoc Channel?
    Regards,
    Suddha

    Thanks Farooq for your valuable advice.
    You know what, I read those restrictions in the help.sap.com but had thought there must be some work around. It says split messages are sent using only one AE, but I hoped that Idoc and Http can be used as they are not part of AE and rather IE itself. Anyways, can't help...............but could help me understand what are the technical reasons for these restrictions?
    The blog is really a nice one and very helpful..............thanks! I used multi-mapping in exactly similar way as in the blog and used enhanced interface determination - but the target message being Idoc
    Is BPM the only option for my scenario?
    Regards,
    Suddha

Maybe you are looking for

  • Lyrics not displaying correctly

    I'm trying to add lyrics to the Song "恋に焦がれた八百万" (maybe because of unicode characters?) which I've got as .aiff-File (about 50 MB big). However, when I copy/paste the entire lyrics, the iPhone displays it as blank. More strangely, when I only write "

  • Planned Order delivery date

    When you run MS04/MS05 and system throws out the Planned order with the order start and order finish date. Can you tell me from how system calculates this order start and order finish dates??

  • Can we Join Fact to Fact obiee11g

    Can we Join Fact to Fact obiee11g? Regards kumar

  • Contacts - seach Skype by country

    Is it possible to search Skype using both a name and country when trying to add a contact? Any help greatly appreciated

  • Workshop generated WSDL.

    In short when I load a WSDL that Workshop generates into XMLSpy , SoapScope , and Cape Clear Studio 4 the file shows up as invalid. So when I tried to generate a WSDL with Cape Clear Studio 4 using the same input and out put parameters for the previo