Creating the IDOC element

Hi,
I am getting an SAP-XML file where in I have the source structure as
ORGANISATION (0 to unbounded)
-> TAG001(1-1)
-> TAG002 (1-1) 
-> TAG019(0 to unbounded)
under TAG019 I have a filed called legacy system ID and under TAG002 I have a field called Customer Name.
Now I am creating IDOC's only when my Legacy system ID under TAG019 is "1" for every occurance of ORGANISATION.
and then populating the Customer name to Name1 segment of Debmas06 Idoc.
This is working fine.
But when I have multiple Organisations and multiple TAG019's and in which if I have legacy system Id as 2 once and 1 in the second occurance of the TAG019 in orgnaisation then this customer number is not being poplutated.
Do I need to write any UDF for this?
Please suggest.
Rgds,
Kumar

Hi Chirag,
I have changed a bit in the code (I have added int )
for (int i=0;i< TAG019.length;i++)
result.addValue(TAG002);
But when executed Iam getting an error as
Source code has syntax error:  /usr/sap/XD1/DVEBMGS81/j2ee/cluster/server0/./temp/classpath_resolver/Mapcfad03f08d1e11dc84bc0018714e8238/source/com/sap/xi/tf/_IDD088_SCV_to_SAP_LOC_ORG_MM_.java:1399: addValue(java.lang.String) in com.sap.aii.mappingtool.tf3.rt.ResultList cannot be applied to (java.lang.String[]) result.addValue(TAG002); ^ 1 error
can you please let me know what could be the reason for this..
Rgds,
Kumar

Similar Messages

  • I need to create RFC function module which creates the IDOC

    Hi-
    Any idea how to create RFC function module which creates the outbound IDOC. If you have any sample code please forward to me.
    Thanks,
    Sony

    My Problem is
    Whenever they create Invoice using T-code's like FV65(Parked Document), automatically should create IDOC's...
    I have used message type FIDCC1 but this message type is usefull only for Posting documents.
    1. Whenever they create parked document, entries will be stored in BKPF(Parked Document-Filed-BKPF-BSTAT = 'V') and Bseg....
    2. I have to read entries from those tables and should create IDOC...
    3. I checked FM's(FI_IDOC_CREATE_FIDCC1, FI_IDOC_PREPARE) but are not useful...
    4. Now I need to write one RFC function module and that FM should create the IDOC's....
    Can anyone please help me out?
    Thanks,
    Sony

  • For the new delivery type created the Idoc is not getting triggered

    Hi All,
    I am facing the following problem:
    For every outbound delivery getting created we have an Idoc which creates the file(sending the outbound delivery details), this file is sent to a system where the picking & packing of the goods happen. This process seems to be working fine for all the existing delivery types, but now we created a new delivery type for which the Idoc is not getting triggered.
    Would like to understand what setting are we missing because of which the Idoc is not getting created for the new delivery type.
    The Idoc being used is:   DESADV01
    Message type :DESADV
    Thanks,
    Geeta

    I believe your existing idocs are created through a output type on the delivery ? if yes, probably you need to configure an existing output type / create a new output type for your new delivery type...

  • Creating XML from XSD, Only create The First Element

    Hi,
    I create a XML File from a xsd schema by this way:
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              factory.setNamespaceAware(true);
              factory.setValidating(true);
                   factory.setAttribute(JAXP_SCHEMA_LANGUAGE,W3C_XML_SCHEMA);
                   factory.setAttribute(JAXP_SCHEMA_SOURCE, new File(MY_SCHEMA));   
                    DocumentBuilder documentBuilder =factory.newDocumentBuilder();
              documentBuilder.setErrorHandler(new SimpleDOMHandler());
              Document parse = documentBuilder.parse(new File(MY_XML));The first lines of the schema:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://gencat.net/scsp/esquemes/peticion"
         elementFormDefault="qualified" attributeFormDefault="unqualified"
         id="Peticio" xmlns:p="http://gencat.net/scsp/esquemes/peticion">
         <xs:element name="Apellido1">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:maxLength value="40" />
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="Apellido2">
            .............................The problem is that the created document only have the first element "Apellido1". I dont know if it is a wrong xsd, or i'm using a bad way to do it.
    Thanks a lot, and apologize for my english

    Hi,
    Is it possible to create and populate XML from an XSD
    without knowing what the XSD elements are beforehand
    (all the examples appear to know what the input XSD
    will be, and therefore know what the set and get
    methods should be called)? I think it is possible--you would have to recompile each time (unless you can dynamically recompile, which would be neat), but using the classes getMethod() function, you can list all the methods. You would then have to do some tricky logic to determine which of the getMethods you want (for example NOT getClass()), and you can basically call them in sequence. You also need to worry about handling lists & recursively call xxxType classes.
    I'm experimenting with this, and it can get a little frustrating because there are a lot of odd cases to handle (for example, while setting the elements of a list, you need to actually get the list & add elements to it), but I think it's possible.
    >
    Can a user browse for an xsd to input, and the java
    will dynamically create the get methods, and be able
    to create instances and populate variables before
    converting to XML?
    What I'm puzzled about is where you'd get the data to populate the variables? Perhaps a database, or a bean? If you just want to make a test xml file, then it doesn't matter, but with real data, I think you'd still have to change how you actually get the variables you want to populate the xml file with, right? In other words, if your schema changed, the parameters you're passing to the set methods would change as well.
    Maybe we'll see some more packages in the future to make this task easier.

  • Issue with ALE configuration for creating the idoc for Purchase orders

    Hello,
            I am trying to send the purchase order through message type configuration using ALE.
    I am using idoc ORDERS05, message ORDERS, Process Code in Partner profile ME10.
    In NACE transaction for the Application EF, Output Type NEU the ALE Configuration is done for Program RSNASTED Form ALE_PROCESSING.
    I have done ALE distribution using BD64.
    Now the problem is that when an order is created or changed in the message output of the PO I am seeing the status as yellow i.e.not processed.
    In NAST table, the entry is there but on executing RSNAST00 nothing happens.
    Please provide me the pointers to solve the given problem.
    Regards,
    Mayank

    Hi,
    Guess it looks like the output is getting proposed but its not getting processed. Check the output type configuration. Check the TIme Settings in the output type configuration.
    It is possible to set the Time when the output must be processed. Is it on SAVE or is it set to other settings. If its set to via background job then the background job must be run to process the output types.
    Check and let me know if all is fine at the output type configuration.
    Cheers
    VJ

  • Where is the document describing the object model for creating the UI elements

    Whre is the document that explains what UI objects are available ie:
    Window
    Panel
    statictext
    button
    I don't see it in my photoshop scripting guide. Thank you.

    It should be in the Javascript Toolkit Guide which can be found in your Adobe install folder:
    ..Adobe\Adobe Utilities\ExtendScript Toolkit 2\SDK\
    good luck.

  • How to get the inbound idoc for the newly created inbound Idoc FM

    Hi,
    I have created a new function module to process the Inbound idoc.  I need to have a idoc to check my function module, whether it is working fine or not.  How I can get the data.  Do I need to have the idoc from the partner ?  Please help me ASAP.
    Thanks,
    sreenivas.

    Hi Sreenivas,
    Go to WE19 and get any of the your present idoc  with the idoc type
    then go to BD20...execute the same idoc...and there you can create the IDoc, and process the same with the Inbound function module tab..( give the FM you are using as the process code.)
    from there you can do the debugging aswell of that FM
    Thanks

  • Should we create the same IDOC type and message type?

    Hi all, if we want to send an IDOC from one R/3 system to another R/3 system type, should we have to create the IDOC type in one system, then repeate the steps in another system? If we don't have to, what shoud we do?

    assuming you want to create a custom IDOC type and not use a standard one, you can create it in one system and then transport it to the other system using normal transport procedure (STMS).
    Cheers
    Thomas

  • Creating multiple idocs in ABAP mapping

    Hi,
    my scenario is source message (JDBC) to target message (idoc).
    There can be multiple idocs (unbounded).
    I am using ABAP mapping to create the Idoc XML structure. For this i use function module IDX_IDOC_TO_XML.
    The idoc is getting created but the problem occurs in case of generating multiple idoc instances.
    I changed the idoc occurence to unbounded & used the new idoc external definition in the interface mapping.
    I also call the IDX_IDOC_TO_XML & create the output stream factory in a loop (per idoc ).
    However only 1 idoc gets generated every time.
    Can someone suggest how to create the multiple idocs.
    Regards
    Prasenjit

    Hi Prasenjit,
    In order to generate multiple idoc first of all you need to change the target structure with multiple occurence...that you have already done...
    Now while generating XML in abap mapping you have to make sure you have element idoc(with its content) repeating for your "N" number of idocs...
    can you please copy paste your final xml generated...
    Nilesh

  • Removing the business area from the WBS element

    Hi Experts,
    I have created the WBS element with business area. Then created the PR against that WBS element , converted the PR's to PO's.
    Now I want to remove the business area from WBS element.
    Now as Business area field become grayed out hence I canot remove the Business area from WBS element.
    Hence I have cancelled the PO's then Cancelled the PR's. So now there is no actual cost & no commitment exists against the WBS element.
    But still Business area field is grayed out for that WBS element.
    Could you please let me know how to remove the business area in this case ???
    Regards,
    Pradip

    Hi,
    Once BA is grayed out then you can not change the same, this is sap std. behavior. Here you can lock the existing wbse which having wrong BA to avoid further actual postings.
    Create new wbse with correct BA & then create pr & po.
    Regards,
    Sandeep

  • IDoc type could not be determined for the IDoc in F110

    Dear All,
    The below mentioned error is encountered by us in F110.We have check all the setiing  and not able to find the solution for this error.
    Now our heads has gone for a toss....can anyone kindly suggest what and where we have missed out.
    The system is not creating the IDOC file.....
    IDoc type could not be determined for the IDoc
    Message no. B1090
    Diagnosis
    The IDoc passed to the ALE layer could not be processed. The specifications passed in the control record were not correct.
    The basic IDoc type (field EDIDC-IDOCTP on the outbound side or EDI_DC-IDOCTYP on the inbound side)has not been specified for this IDoc.
    The attempt to read the basic IDoc type from table EDIDO also failed. No table entry was found for IDoc type  from field DOCTYP.
    Procedure
    Possible error sources:
    - The calling program did not provide values for the fields specified above correctly. Make a note of the transaction in which this error occurred and consult your ALE administrator.
    - The IDoc type  is not known in your system and must be maintained.
    Kindly do the needful.
    Regards

    If you want to create IDocs from the proposal run, outbound parameters (we20) with the 'Test' flag are required in addition.
    see OSS note 504230 : Message EUPEXR forms the logical unit around the individual payment messages (PAYEXT IDocs). The E1IDRD1 segments contain the IDoc numbers of the payment messages in field DOCNUM. Segment E1IDRS1 contains check sums (total of all amounts, account numbers, bank numbers, number of payment messages). This information is provided for the EDI subsystem. Set up EUPEXR In Transaction WE20 for the partner profile for the house bank, create the outbound parameters for message type EUPEXR with IDoc type IDCREF01. If you want to create IDocs from the proposal run, outbound parameters with the 'Test' flag are required in addition.

  • How to display the text as a Bold in the Text Element of a Smart Form

    Hi,
    I created one Smart Form.
    In that i created the Text element.
    I provide some data also in that.
    It is coming as a MS WORD.
    I executed my smart form.
    Customer Number:  &WA_KNA1-KUNNR&
    it display the data of the particular customer.
    But i need to display the Customer Number as BOLD or else Increase the Size.
    For this also I created one SMARTSTYLE.
    In that I created the Paragraph and Character Formats also.
    Now i assignee that SMARTSTYLE in the Output Option Tab of the Text Element also.
    But i unable to get the CUSTOMER NUMBER in Bold.
    In MS WORD we have BOLD button.
    I selected the Text and Press the BOLD button. At that time it is Highlighted.
    Whenever i press the SAVE Button.
    Then it is not saved with BOLD.
    It is coming in Normal Format.
    In the ECC 6.0.  I am unable to get the Text as a BOLD.
    This text Element is like a MS WORD.
    Can you please tell me how to display the Data with BOLD. please tell me. I am unable to get that one.
    Thank You.
    Regards,
    B. Krishna.

    Hi,
    Check where u have given BOLD. In character Format or in Paragraph format.
    In SMART FORM,
    1. Change to OLD EDITOR if u are confused with the new one.
            (This can be done by clicking the button left to new editor ).
    2. If it is PARAGRAPH FORMAT,
               Give the name of paragraph format in the editor.
                P1         &WA_KNA1-KUNNR&
        If it is CHARACTER FORMAT,
                             <C1> &WA_KNA1-KUNNR&
    Thanks,
    Nithya.

  • How to restrict the idoc creation based on the distribution model

    Hi all,
    I want to create the idocs for certain material types only, for this i configured Distribution  model and set the filter for material types.
    If the delivery is created with the material type which is not in the filter means,
    Idoc is creating for that Delivery with header segments only and restricting Item level segments.
    it is coming to XI and failing in mapping every time.
    I do not want to generate the whole idoc itself. Am i missing any thing??
    Regards
    Edited by: Suman gupta on Jun 10, 2010 11:13 PM

    Hi Mike,
    >>config in PI in the routing condition - if no lines exits don't send the message to the mapping/receiver
    If no lines exists we can restrict don't send to receiver, but how can we restrict dont send to mapping??
    It comes to mapping and failing in PI MONI.
    Is there any way that i can restrict the Idoc generation itself in ECC ??
    Regards

  • Is it possible to add the UI element to iview at runtime?

    Hi Expert,
    I want to do a prototype, which can dynamicly create the UI element(For example, create a new input box) in the form iview, is it possible in VC? as I know in webdynpro it works but I am not sure whether it is allowed in VC.
    Thanks for your answer.

    Hi,
    In whatever scenario you want to create a dynamic UI element in a VC iView, you have to have an event, on occurance of which something happens dynamically. This event can be in the form of a button click or some value coming from a previous iView or page. But the important thing to note is that if you want something to become visible or invisble in your iView, the event to make this happen, has to occur in some other view.
    For example, you can have two forms in an iView, make a button in one form, which when clicked passes something (say a number) to the second form. You can now make your input box or anything else in the second form. In the properties of this second form, you have the <b>visibility</b> field, where you can enter a formula, something like:
    <b>BOOL(IF((@Status==1),true,false))</b>
    Similarly you can make tabs in your iview, make the button in one tab, and do something dynamically in the next tab.
    Reward points if it helps...

  • How to create an UI element dynamically on action in drop down?

    Hi,
    How to create an UI element dynamically on action of selecting a value from the  drop down?
    help out with the steps i need to follow..

    Hi,
    <u><i><b>Dynamic UI Element creation</b></i></u>
    We can create it only in the WD Modify View.
    Get the instance for the Root UI Element Container.
    Create the UI element Ex: Input Field, Text View etc.
    Bind the UI Element to the Attribute Value.
    Now bind the UI Element to the Root UI Element Container.
              IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
              IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
              IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
              IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
              IWDNode Mad =wdContext.getChildNode("Person",0);
              IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
              IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
              IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
              DdbName.bindValue(NameAtt);
              DdbAge.bindValue(AgeAtt);
              DdbGender.bindValue(GenderAtt);
              root.addChild(DdbName);     
              root.addChild(DdbAge);
              root.addChild(DdbGender);
    <u><i><b>Dynamic Action Creation</b></i></u>
    Create the Action in the Action tab.
    Create a Button.
    Get the reference for the created action (Through the Event Handler).
    Bind the Action to the Button.
    Bind the Button to the Root UI element Container.
    IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
    IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
    ButGo.setOnAction(ActGo);
    root.addChild(ButGo);
    Now write the required code for the Event Handler that is associated with the Action.
    //@@begin onActionGo(ServerEvent)
        IWDNode Mad = wdContext.getChildNode("Person",0);
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
    //@@end
    Regards
    SURYA

Maybe you are looking for