Dynamic determination of IDOC

Hi,
I have a scenario wherein based on a particular KeyField, I need to dynamically determine the IDOC.  I haven't used BPM before and I don't know whether this scenario is feasible using BPM.
My approach is creating a data type for the source which will have common fields of both the IDOCs.  This data type will hold the data sent by the sender system.  Thereafter, I would create 2 message interfaces for each IDOC.  Subsequent Message Mapping and Interface Mapping will also be done.  In BPM based on the KeyField, I will determine the Message Interface dynamically and post it to the target system.
Kindly advice whether the above approach is right.  Is this scenario possible without using BPM.  If so, kindly suggest how to proceed.
Thanks in advance.
Bala

Hi Kumar,
Is there any possibilites of coming both the idoc data ? If so, you can do as following.
As you are going to execute 1:N mapping, it is required to have BPM here. (and one more reason is Idoc adapter is not a part of J2EE engine.)
<i>Is this scenario possible without using BPM</i>
>>>If it is not of above case, then you can make use of conditional Interface determination , you can try without BPM
Hope this helps,
Regards,
Moorthy

Similar Messages

  • How to dynamically determine Receivers within BPM

    I’m trying to design a way to determine my receivers within my BPM process during runtime.   My Scenario is as follows:
    SAP IDOC
        V
      XI
                 XI uses JAVA Mapping MT1 to determine vendors and if customer receives PIDX
                             JAVA Mapping MT2 to creates the PIDX output file if required
      V
    SENDs to required Vendor (PIDX if required otherwise email)
    My problem is how to dynamically determine the appropriate receiving vendor for my PIDX.
    I can not use the condition editor on the standard Receiver Determination because the output message (PIDX) doesn't have specific enough information to determine the vendor.
    Other than the customer number there are no other values and we don't want to use customer number because each vendor can have multiple customer numbers (hundreds).
    I've tried various attempts but none seem to work.  This could also be because I have limited knowledge of BPMs and this is my first complex development.  Below are the different attempts I've made at dynamically determining the receiver.  Any input would be appreciated.
    Receiver Scenario 1 
      I developed an interface mapping with MT1 as input and the SAP Receiver Determination as output.  The problem is for me to use this, the interface mapping had to reference the PIDX output (MT2 instead of MT1) which has no data that I can use to determine the receiver.
    Receiver Scenario 2
    I added a receiver step right before my send step and used the receiver list.  This appears to send the PIDX to everyone in the list and there is no way to evaluate or eliminate a name from the list. 
    Receiver Scenario 3
    I created a context object in the Integration Builder and assigned it to a field in MT1.  I then added a switch step with a branch for each vendor.  Within each specific branch there is a Send step that has the context object name I created in the "Send Context" field.  However, on the configuration side I’m unable to access the context object which I created on the design side.  Whenever I open the condition editor and select the radiobutton for "Context Object" the list  does not include the context object I created in the Integration Builder.

    Hi,
    Try using the enhaced receiver determination concept.
    Maybe based on certain field values you can write a UDF which calculates the receiver.
    Try this Blog out
    Link : [
    http://help.sap.com/saphelp_nw70/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm]
    Regards,
    Abhishek
    Award if helpful.

  • Is there a way to dynamically determine the number of out parameters for a server side procedure?

    Hi,
    Below is a helper method used for calling a server-side function which loops through the inbound bindVars parameter to populate the function's IN parameters. Is there a way to dynamically determine the IN/OUT parameters based on the procedure name in the stmt parameter? No members of the CallableStatement class seemed promising, but the getParameterMetaData() method in the PreparedStatement class seemed like it could be helpful lead. However, I have not found any detailed descriptions (yet) of how to use it.
    protected Object callStoredFunction(int sqlReturnType, String stmt,
      Object[] bindVars) {
      CallableStatement st = null;
      try {
      // 1. Create a JDBC CallabledStatement 
      st = getDBTransaction().createCallableStatement(
      "begin ? := "+stmt+";end;",0);
      // 2. Register the first bind variable for the return value
      st.registerOutParameter(1, sqlReturnType);
      if (bindVars != null) {
      // 3. Loop over values for the bind variables passed in, if any
      for (int z = 0; z < bindVars.length; z++) {
      // 4. Set the value of user-supplied bind vars in the stmt
      st.setObject(z + 2, bindVars[z]);
      // 5. Set the value of user-supplied bind vars in the stmt
      st.executeUpdate();
      // 6. Return the value of the first bind variable
      return st.getObject(1);
      catch (SQLException e) {
      throw new JboException(e);
      finally {
      if (st != null) {
      try {
      // 7. Close the statement
      st.close();
      catch (SQLException e) {}
    James

    The PreparedStatement.getParameterMetaData() object is exactly what you need for this task.
    Once you have the ParameterMetaData you can ask it how many parameters are present and which mode they are. The parameters are numbered from 1 to n and you can use ParameterMetaData.getParameterMode(1); to get the mode of the 1st parameter. The modes are defined as static values in the ParameterMetaData object. Check out the doc at http://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html
    Timo

  • Enhanced Interface Determination for IDOCs

    Hi All,
        I've a query on the usage of Enhanced Interface Determination for IDocs.
    I've to create IDocs based on the condition in the Message Mapping i.e. say if recordtype in the source is A then IDoc1 should be created and if recordtype is B then IDoc2 should be created.
    Is it possible to use Enhanced Interface Determination to achieve this??..  Because I was told by someone that Enhanced Interface Determination can't be used for IDoc based scenarios though am using External Definitions for the mapping purpose. Please clarify.
    Thanks in advance
    Regards,
    Joe.

    Hi Sridhar/ Bhavesh,
                           Thanks for your prompt reply. I think I wasn't clear in my previous post.
    The scenario is the input file has three different record types (3 different structures) and the IDocs should be created based on the record type. I don't think I can use the condition based scenario as the record types are totally different. Please suggest.
    Thanks,
    Joe.

  • Dynamic Determination of Logical System- Transaction Launcher

    Hi Friends,
    Need your suggestions and inputs on how to dynamically determine the logical system for the transaction launcher.
    Our system landscape is like this.
    We have one CRM connected to mulitple back end ECC Boxes. Currently, we have created separate TL's fo VA01 ( One each for each back end application ) and provided the same in logical link and controlled the same via business role.
    For eg: BROLE1 - LLINK1  having (TL VA01) pointing to ECC System1
    BROLE2 - LLINK2  having (TL VA01) pointing to ECC System2
    BROLE3 - LLINK3  having (TL VA01) pointing to ECC System3
    The above procedure is working fine. But what we are trying to do is, when the end user clicks on the TL link in WEB UI, Based on the assigned business role, it should dynamically determine the back end system and open the VA01 Screen in that system.
    I have activated indicator multiple systems in the customizing of mapped logical systems.
    In debugging mode, i have tried changing the LOGSYS value @ run time in the handler class.
    Any pointers on this would be of great help.
    Thanks,
    Madhu

    Hi,
    Try this..
    To maintain RFC destination in each business role, there is one functional profile  "ERP_SALES_ORDER" where in you can maintain respective rfc destination.
    Create z-functional profile's for "ERP_SALES_ORDER" and maintain corresponding rfc destination, later assign these erp sales order function profiles in respective business roles trxn (CRMC_UI_PROFILE).
    you can use the below statement to fetch rfc destination whcih assigned to business role via functional profile.
      If gv_rfc is INITIAL.
        gv_rfc = CL_CRM_IC_ERP_SERVICE=>GS_ERPPROF-RFCDEST.
      ENDIF.
    Hope this helps.
    Cheers,
    Sumit Mittal

  • Dynamically determine location for a file relatively to current CLASSPATH

    Hi All,
    I am quite new to Java and I have a problem.
    I am trying to write a program that can dynamically determine the location of a file (the class that handles this will only have the relative path/file name).
    Eg.
    File f = new File(config/MyMainCfg.file);
    The class will then need to be "smart" enough to locate the file "config/MyMainCfg.file" in relative to the current CLASSPATH.
    Hence, if the current CLASSPATH is /usr/local/myclasspath, then the file should be able to be located at "/usr/local/myclasspath/config/MyMainCfg.file".
    My main question is:
    (1) If the CLASSPATH contains multiple values (i.e. CLASSPATH=path_1:path_2:path_3), how do I correctly determine the current CLASSPATH that the currently executing program is using?

    I have a method that does something like that. A few lines of it below:
       // Get location class loaded from
       public final static String getHomeLoc(Object obj, String className) {
            URL ourLoc = obj.getClass().getResource(className);
           ... code gets ourLoc.toString()  and parses it.
    // Called by:
         String loc = getHomeLoc(this, "MyClassname.class");

  • XI - Dynamically Determine System Details in User Functions

    Hello.
    Does anybody know how to dynamically determine the logon information for the statement JCO.Client mConnection = JCO.createClient() from a user defined function in XI? 
    Within a mapping I have written a user defined function to call a function module on ECC but as the system details are 'hard-coded' the incorrect system is called once the interface is promoted from the DEV system. I am not able to modify the user function code for each system as we transport the interfaces between systems which are locked and as such code the builder objects cannot be modified .  I desperately need a method of determining which logon details should be used and I would prefer the solution to be within the user defined function.
    User defined function code:
    JCO.Repository mRepository;
    // Change the logon information to your own system/user
        JCO.Client mConnection = JCO.createClient(
                "300",         // SAP client   
                "pi_jco_rfc",        // userid
                "ecd4adrt",       // password
                "EN",          // language
                "adrp560dev1",        // host name
                "10" );        // system number                     
    // connect to SAP
    mConnection.connect();
    // create repository
    mRepository = new JCO.Repository( "SAPLookup", mConnection );
    // Create function
    JCO.Function function = null;
    IFunctionTemplate ft = mRepository.getFunctionTemplate("ZPI_DETERMINE_STORE_FROM_SITE");
    function = ft.getFunction();
    // Obtain parameter list for function
    JCO.ParameterList input = function.getImportParameterList();
    // Pass function parameters
    input.setValue( site[0] , "IM_WERKS" );
    mConnection.execute( function );
    String ret = function.getExportParameterList().getString( "EX_VLFKZ" );      
    mConnection.disconnect();
    result.addValue(ret);
    Any ideas gratefully accepted.

    Darren,
    Why are you using JCOs directly? It is not advisable to do so. You can/have to use the RFC Lookup API to achieve this.
    Have a look at Michal's article about this.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Regards,
    Jai Shankar

  • Dynamically determining the port number of a deployed application

              Hi
              How do I dynamically determine the port number of a deployed web application ?
              I know HttpRequest.RequestURL() returns us the entire URL but I wanted to just
              know the port number .
              Is there any API do that ??
              Thanks
              Kar
              

    kar piyush wrote:
              > Hi
              >
              > How do I dynamically determine the port number of a deployed web application ?
              > I know HttpRequest.RequestURL() returns us the entire URL but I wanted to just
              > know the port number .
              >
              > Is there any API do that ??
              >
              kar,
              Here's what I do under WL 7 SP2:
              import javax.management.AttributeNotFoundException;
              import javax.management.DynamicMBean;
              import javax.management.MBeanException;
              import javax.management.ReflectionException;
              import javax.naming.Context;
              import javax.naming.NamingException;
              import weblogic.jndi.Environment;
              import weblogic.management.MBeanHome;
              String domainName,
              serverName,
              serverPort,
              serverUrl;
              // Getting the initial context
              Environment env = new Environment();
              try
              Context ctx = env.getInitialContext();
              if (ctx == null)
              // unable to retrieve a JNDI context
              return;
              // Retrieving the server-specific MBeanHome interface
              MBeanHome home =
              (MBeanHome) ctx.lookup(MBeanHome.LOCAL_JNDI_NAME);
              if (home == null)
              // unable to retrieve the local server MBean
              return;
              // Get the domain & server name
              domainName = home.getDomainName();
              serverName = home.getMBeanServer().getServerName();
              // The server port and address are a little trickier to extract...
              Object mbeanArray[] =
              home.getMBeansByType("ServerConfig").toArray();
              DynamicMBean mbean = (DynamicMBean) mbeanArray[0];
              try
              serverPort =
              Integer.parseInt(
              mbean.getAttribute("ListenPort").toString());
              serverUrl =
              mbean.getAttribute("ListenAddress").toString();
              catch (AttributeNotFoundException thrown)
              // caught a AttributeNotFoundException
              catch (MBeanException thrown)
              // caught a MBeanException
              catch (NullPointerException thrown)
              // caught a NullPointerException
              catch (ReflectionException thrown)
              // caught a ReflectionException
              catch (NamingException thrown)
              log.debug("caught a NamingException", thrown);
              

  • Dynamically determining the number of cols in Select stmt

    Hi,
    I was wondering if it is possible to dynamically determine the number of cols in Select stmt.
    For example:
    If it had:
    Select empno, lname from emp where empno = 32
    then I'd like it to return 2.
    Thanks in advance.
    Sincerely,
    Nikhil Kulkarni

    Hi,
    I was wondering if it is possible to dynamically determine the number of cols in Select stmt.
    For example:
    If it had:
    Select empno, lname from emp where empno = 32
    then I'd like it to return 2.
    Thanks in advance.
    Sincerely,
    Nikhil Kulkarni

  • Dynamic Determination of Target Messge Type (IDoc)

    Hello,
    we have a IDoc - HTTP scenario. A SYSTAT01 IDoc should be sent back to the sender system setting the status depending on the http response.
    The basic scenario works fine, however depending on the value of one field there should be either a STATUS or ZSTATUS message type be sent back. Both are based on the SYSTAT01 IDoc structure and there absolutely no difference in the mapping logic. The two differet message types are used to handle inbound processing in SAP differently.
    Question now is, whether I can set the output message type dynamically in ONE message mapping. I tried to set the field MESTYP in the control header, but this does not work, as the MESTYP obviously is always set according to the imported type.
    Of course it would work using two different mappings, but I would rather handle ii

    Hi,
    you cannot change message type in the mapping
    but you can have two target messages in one mapping and fill only one of them
    Regards,
    Michal Krawczyk

  • Receiver determination in IDOC

    Hi Experts,
    For one scenarion of ALE IDOC , i need to determine the receiver system dynamically depending on a value of a segment field.
    Can you tell me what configuration is needed for this?
    I Appriciate your help.
    Regards,
    Ashish

    Hi Ashish,
    couldn't you use the filter definition in your distribution model?
    Regards
    Bernd

  • Getting an error "Customer could not be determined" for IDOCs in SCM 7.0

    Hi Friends,
        I am executing the report RSMIPROACT in ECC 6.0 system to publish Demand and Stocks into the SCM 7.0 system.
    The IDOC is processed without any errors in ECC 6.0 . However, in the SCM 7.0 system , the IDOC fails with the error.
    I have noticed that 2 things .
    1.  E1ADRE1 field is NOT being sent by the ECC system .
    2. I get the same error even if I manually add this field and add value 300 or 301 for the qualifier field.
    Has anybody faced this problem before ?
    I look forward to replies.
    Detailed error is given below.
    Regards,
    Ranjini.
    Customer could not be determined
    Message no. /SAPAPO/EDI010
    Diagnosis
    The system must determine the customer number from the IDoc data in order to update stock and sales figures for customers. It uses the additional section E1ADRE1 with the qualifier '300' or '301' in the vendor address section to do this. The customer number stored here should have a valid customer number in the APO System.
    The section was not available in the processed IDoc.
    System Response
    The system cancels processing.
    Procedure
    Configure the EDI convertor in such a way that the corresponding section has a value.

    Hi Ranjini,
    Please look into the following
    1) Customer master data is fully maintained
    2) Customer number ranges are fully defined in customisation
    3) Customer address details are maintained
    4) Is there any special characters used while defining customer data or customer
    number like $, #,[ etc.,?
    5) Customer int models are active in SCM side prior to IDOC processing (including
    customer, demand, stocks etc)
    Please confirm your findings
    Regards
    R. Senthil Mareeswaran.

  • Report RSMIPROACT gives Customer could not be determined for IDOCs

    Hi Friends,
    I am executing the report RSMIPROACT in ECC 6.0 system to publish Demand and Stocks into the SCM 7.0 system.
    The IDOC is processed without any errors in ECC 6.0 . However, in the SCM 7.0 system , the IDOC fails with the error.
    I have noticed that 2 things .
    1. E1ADRE1 field is NOT being sent by the ECC system .
    2. I get the same error even if I manually add this field and add value 300 or 301 for the qualifier field.
    Has anybody faced this problem before ?
    I look forward to replies.
    Detailed error is given below.
    Regards,
    Ranjini.
    Customer could not be determined
    Message no. /SAPAPO/EDI010
    Diagnosis
    The system must determine the customer number from the IDoc data in order to update stock and sales figures for customers. It uses the additional section E1ADRE1 with the qualifier '300' or '301' in the vendor address section to do this. The customer number stored here should have a valid customer number in the APO System.
    The section was not available in the processed IDoc.
    System Response
    The system cancels processing.
    Procedure
    Configure the EDI convertor in such a way that the corresponding section has a value.

    Hi,
    i'm facing the same problem. Could you solve it?
    Regards

  • Customer/vendor could not be determined for IDOC

    Hi all,
    Am trying to post incoming payments through EDI ..
    IDOC Information
    IDOC type: PEXR2002
    Message type: REMADV
    Function Module: IDOC_INPUT_REMADV
    Process code: REMA
    Am getting these 2 errors :
    Customer/vendor could not be determined for intermediate document
    Company code could not be determined for intermediate document
    Has anyone encountered this problem, if yes can anyone suggest the solutions, any help regarding this is highly appreciated.
    Thanks.

    Hi,
    Currently I am facing with the same type error when trying to post incoming payments through EDI.
    IDOC Information
    IDOC type: PEXR2002
    Message type: REMADV
    Function Module: IDOC_INPUT_REMADV
    Process code: REMA
    I am getting the below error:
    1. Company code could not be determined for intermediate document
    I have maintained record records for partner type and partner number in OBCA.
    Please advice what are the other configuration changes do I need to maintain.
    Your assistance would be highly appreciated.
    Thanks.
    Edited by: Victor Collins on Feb 27, 2009 9:31 PM

  • Company code could not be determined for IDoc #.......

    I was trying to generate an IDoc manually by using the tcode WE19. I have manually keyed the data in to the respective segments for the basic type PEXR2002 and message type REMADV. After this while processing, the IDoc is getting generated, but not posted OK. I am getting the following two error messages 51 stating:
    'Company code could not be determined for the IDoc #....'
    'Customer/vendor could not be determined for the IDoc #.'
    Can any one give some inputs on this issue?
    Shaji
    Message was edited by: Shaji Thomas

    Hi Shaji,
    You may look at the OSS note 316811.
    Thanks
    Vinod

Maybe you are looking for

  • TS1559 My Iphone 4S with the latest software, wifi setting is grayed out. Could not be resolved even after restore software in Itune.

    My Iphone4S wifi setting was grayed off and could not set wifi on even after I have reset network setting and also restore software from Itune.

  • I can't save and open .ai files.

    Hello. I can't save and open the file with special character in virtual drive(using communications). -> refer to this.. ( http://software.naver.com/software/summary.nhn?softwareId=MFS_105031 ) *Special character I used is 黒(not 黑). If I rename the fi

  • Monitor quality for LR4?

    Has anyone described the effects of monitor quality on using LR4 to edit color photos?  What effect is this likely to have on quality? Thank you, Hersch Pilloff [email protected]

  • Re Order Pages

    i have a 700 page document, which are patents a company has done. I need to re order the pages so instaed of the title number, the date is used which is in a different text field. The only problem is the date is formatted 10-sep-03 will I have to re

  • Specify colors in drop down lists

    A client has requested that their drop down menu options are color coded - is this possible? As an example, they have a drop down with 3 choices (Completed, In Progress, Not Started). They want to attribute a color to each option (ie Complete - Green