Procedure for Mapping two types of Idocs from RFC function Module

Hi
My Scenario is RFC -- XI -- IDOC
Here i have 2 custom Idocs
First IDOC for Creation
second is for Deletion/Changing
Based on the condition from RFC it should trigger either one of the IDOC above.
Please provide me the procedure to do in IR and ID..
Regards,
Yeswanth.

YeswanthRaj:
I found your conflicted statements
The following statement you say you just have one receiver, to receive two IDOCs
But i have only one receiver where the 2 IDOcs needs to be send based on the condition..
The following statements showing that you have more than one receiver,
the condition editor for receiver determination usually used for multiple receivers based on XPATH or Context Object condition
It is mapped based on the condition that is given in Receiver Determination and i has two interface Determinations.
It seems that the first scenario is your situation.
If your answer is yes, and your source interface is just one,and target interface is two (two IDOC), then this should be typical
muti-mapping scenario, and the propose I gave to you should fit
Regards.
Liang

Similar Messages

  • IDOC from inbound function module

    Hi All,
    I have a inbound function module..
    I dont know its Idoc type.
    Ho to find the IDOC based on Inbound Function module
    Thanks
    Amruta

    Hi Amruta
    Inbound Function Moduel always in the format of IDOC_INPUT_XXXXXXX
    xxxxxx is the your Message type...
    Based on you message type u can get you idoc type....
    if function moduel is Standard one ...
    Thanks
    Ram

  • How to take back the control from RFC function module to calling program

    Hi,
    In our system landscape, more than 200 child systems are connected to Solution manager(SMP). I have copied a RFC enabled function module into all the child systems and calling that FM from Sol Man in sychronous mode.
    Here goes my code in SolMan.
    LOOP AT it_dest INTO wa_dest.
      CALL FUNCTION 'Z_GET_LOGIN_DETAILS' DESTINATION wa_dest-rfcdest
        EXPORTING
          date_fr               = s_date-low
          date_to               = s_date-high
        TABLES
          tab_data              = it_val
        EXCEPTIONS
          communication_failure = 1
          system_failure        = 2
          OTHERS                = 3.
      IF sy-subrc EQ 0.
    *     Updates zuserlogon
          MODIFY zt_logon_det FROM TABLE it_val.
          COMMIT WORK.
          WRITE:/'RFC for Destination', wa_dest-rfcdest, 'succesfully updated.'.
      ELSE.
          WRITE:/'RFC for Destination', wa_dest-rfcdest, ' failed.'.
      ENDIF.
    ENDLOOP.
    Few child systems are very slow & takes more than 20 minutes(Many of the times system hangs) to return the result. But I should not wait for so long. Even if the child system doesn't return any values in 5 minutes I shoud continue with other system ignoring the current one.
    I tried calling the FM in asynchronous mode(STARTING NEW TASK) but no success because only 6 DIA processes possible but as I said I have more than 200 systems connected to SolMan.
    Please help me resolving this problem.
    Thanks,
    Prathap

    If there are only few child systems with bad response time, use asynchronous call using a CALL FUNCTION func STARTING NEW TASK task DESTINATION dest PERFORMING subr or CALLING meth ON END OF TASK. Count asynchronous calls still running/waiting (increment a counter when creating a task (not the one used for task id). In the form/method performed at end of a call decrement the counter. When counter is lower than a limit, 4-5 if 6 processes (*), perform an asynchronous call else perform a synchronous call or wait until the counter falls below the limit.
    Regards,
    Raymond
    (*) Use SPBT_INITIALIZE at start of program to get actual number of free/available processes.

  • Unable to retrieve parameters from RFC Function Module

    Hi All,
    I have created a model for the RFC Enabled function module BAPI_BUPA_CENTRAL_GETDETAIL within my webdynpro program. I am passing parameters to the function module BAPI_BUPA_CENTRAL_GETDETAIL and I have validated that this is being passed correctly by displaying the passed value from the node of the input parameters.
    Code used to pass input parameters -
      IWDMessageManager manager = wdComponentAPI.getMessageManager();
       try
          wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
          size = wdContext.nodeCentraldataperson().size();     
          wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
          wdContext.nodeOutput().invalidate();
       catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
    I also see that it returns 1 record by using the code below:
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
       try
          wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
          size = wdContext.nodeCentraldataperson().size();     
          wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
          wdContext.nodeOutput().invalidate();
       catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
    But, when I try to retrieve the value returned it does not fetch that value -
       Bapi_Bupa_Central_Getdetail_Output getdata = wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().currentOutputElement().modelObject();
       Bapibus1006_Central_Person[] getres = new Bapibus1006_Central_Person[size];
       for(int i=0; i<size; i++){
            wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(i));
            getres<i> = getdata.getCentraldataperson();
              //String fullname = wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().getElementAt(i).getAttributeValue("Fullname").toString();
            String fullname = getres<i>.getFullname();
           fullname += Integer.toString(i);
            wdContext.currentContextElement().setFullname(fullname);
            wdComponentAPI.getMessageManager().reportSuccess("fullname:" + fullname);
    It always returns 0 or null. Can someone please help me with this issue. The BAPI returns values in structure format and not internal table and hence I dont see the issue there as well.
    What can be the problem?
    Thanks for all your help in advance.
    Best regards,
    Divya

    Nikhil / Srihari,
    I changed my code and it now looks like -  I am trying get the return value into the context fullname but i still cant get the value although the size of nodeCentraldataperson() is thrown as 1 and the input is being passed correctly as i have validated this in this line of code [wdContext.nodeBapi_Bupa_Central_Getdetail_Input().currentBapi_Bupa_Central_Getdetail_InputElement().getBusinesspartner();]
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
       try
          wdContext.currentBapi_Bupa_Central_Getdetail_InputElement().modelObject().execute();
          size = wdContext.nodeCentraldataperson().size();     
          wdComponentAPI.getMessageManager().reportSuccess(Integer.toString(size));
          wdContext.nodeCentraldataperson().invalidate();
       catch(WDDynamicRFCExecuteException e)
          manager.reportException(e.getMessage(), false);
         for(int i=0; i <size; i++){
              String name = "FullName: ";
              wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().setLeadSelection(i);
              name += wdContext.nodeBapi_Bupa_Central_Getdetail_Input().currentBapi_Bupa_Central_Getdetail_InputElement().getBusinesspartner();
              name += wdContext.nodeBapi_Bupa_Central_Getdetail_Input().nodeOutput().nodeCentraldataperson().currentCentraldatapersonElement().getFullname();
              wdContext.currentContextElement().setFullname(name);     
    Any idea what could be wrong?
    Thanks,
    Divya

  • Web Service from RFC function module

    Hi all,
    I'm searching for a way to create web services from RFC-enabled function modules. I know there is a wizard, but it's not suitable for my problem:
    I have around 30 function modules (number raising in near future) I want to enable for web services, most of them share the same structures representing the underlying data model. When one structure is modified (i.e. a new sub-structure is added) I have to recreate all web services, which is quite uncomfortable.
    In addition, using the wizard results in one wsdl-file for each web service operation, that leads to an administration overhead using this web services from a java frontend.
    So I'm searching for a "bulk creation". I also know the wizard can be used for a function group, but I can't put all my RFC-enabled function module in one function group, that would lead to confusion in the package.
    Does anyone know how web services are created programmaticaly? If I had a function module which creates the web services I could write a function module which creates all web services I need.
    Thank you in anticipation!
    Florian

    I'm not sure I understand the 're-create' part...how are you re-creating the web service?  if you modify the interface of a function-based web service, then you use the 'modify operations' functionality (context menu - right-click) to regenerate the web service interface; this works for a function group based web service as well and hits all of the methods at once.  As for the java overhead on function group services, stating the obvious, maybe you just need to lower the number of functions in your groups.  We use .Net-developed applications with multi-function webservices and don't have any overhead issues.

  • Approval Procedure for Issue to Production and Receipt from Production

    Hi All,
    Is there a way to create an approval procedure for Issue to production and Receipt from production?
    Thanks.
    Eric

    Hi Riyaz,
    Yes it is not in Standard SAP Business One.  But is there a way to create one for issue to production and receipt from production? 
    Thanks.
    Eric

  • T.Code for Release Procedure for Purchase Order Type

    Hi Frd
    im working in ECC 6.0.
    OMGS is t.code for Release Procedure for Purchase Order Type in SAP 4.6.
    Can anyone tell me what is the t.code for Release Procedure for Purchase Order Type in ECC 6.0 .the OMGS t.code is not working in ECC.
    Thanks
    By
    Pari

    Hi Rajasekharan,
        Go to tcode ME22 and enter the Purchase order number.
    inside the Display screen,u can see a GREEN flag button on the Application Toolbar.
        Click on a item and press the Green Button.
    U will see the release code,provided the Purchase order is set to release strategy,after that Go to tocde ME28 enter the release code ,along with Document number and then release the Purchase order.
    Actually the tcode for releasing purchase order is ME28
    Reward points if useful.
    Cheers,
    Swamy Kunche

  • RFC Function module needed for getting table details in APO from R/3

    Hi,
    I need a RFC function module where I can write a query from R/3 to access APO server database table and get the necessary records.
    Regards
    Mac

    Possible ways
    1. Call fm RFC_READ_TABLE and give destination and table name ( But i am not sure how it will work SCIF enviornment of APO)
    or
    2. Create a custom function module in APO side and call from R/3 side using destnation option

  • IDOC error 51- Function module not allowed:

    Hi,
    I am getting following error in IDOC inbouond.I verifyed all parameters mentioned in error.
    Issue still not resolved.
    When debugged from WE19 this issue dosnt arise.
    Kindly guide.
    Function module not allowed: ZIDOC_INPUT_MATCLASS
    Message no. B1252
    Diagnosis
    The function module ZIDOC_INPUT_MATCLASS and the application object type BUS1001 which were determined are not valid for this IDoc.
    Procedure
    1. Please check that the process code in the inbound partner profile is correct.
    2. If this is the case, you should check the ALE inbound methods ALE inbound methods for the process code and see whether the specified function module and application object type are correct.
    3. If this is also the case, then the function module and the application object type are not permitted for the logical message type, message variant, message function and basis type that are contained in the IDoc control record. You should check whether the correct values have been assigned to these fields in the control record. If they do have the correct values, then the assignment to the function module and the application object type needs to be maintained.

    Hi,
    Check in WE42, for the process code, you have assigned this function module and given the correct process code in the partner profile.
    Sujay

  • 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

  • RFC function module - not considering string type parameters

    Hi,
    i am calling one RFC, this rfc function module is enhanced to have one more import parameter and the type of this parameter is of type "string".
    i am passing this value from while calling rfc fm but i can see this value is not being considered here in the target system, i mean the passed value from source system is not seen in the target system.
    i read some thing related to rfc restrictions on code pages, is it something to do with that or string type is not allowed??
    Please suggest!!!

    Hi all,
                   I faced the same problem and solved it ,
    You have defined a reference parameter for a remotely called
      function module. However, only value parameters are allowed
      for this type of module.
      Procedure
      Change the reference parameter to a value parameter.
    Guys  pls .don't leave the thread un-asnwered when you solved problem , post the solution it might be useful for others also.
    Regards
    Krishna Acharya

  • Getting values from a function module called in a WDA method

    Friends,
    I am trying to execute a function module from WDA.
    I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
    I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
    When the event handler method containing the call to the function module is executed, nothing happens.
    I am not sure how to pass values to the function module and to get the return values from the function module.
    I am new to using function modules from WDA. Please help me out.
    Thanks and Regards.

    Rashmi,
    Is the function module intended to collect input data from the UI and process it? - Yes
    If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
    Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
    Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
    The function module takes a single value as import parameter and returns a table of values as return value.
    It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
    Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
    Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
    Thanks and Regards.

  • Debugging RFC function module from ECC to CRM

    Hi All,
    My requirement is to debug an RFC function module present in CRM(7.0) system from ECC(6.0) system. A report program in ECC will call CRM custom FM. I found many posts in SDN with the same issue and tried to implement suggestions provided there. But I couldn't succeed. The approach I followed is:
    I logged in to ECC report program and kept an external breakpoint just before the function module call.
    I logged in to CRM system, opened the function module and kept an external breakpoint there.
    In both the systems I provided the dialogue userid( id through which I log in to SAPGUI) in the system->settings->debugging option.
    In CRM I activated the external break point in  transaction SRDEBUG.
    Now when I execute the report program in ECC, control stops at the breakpoint. If I press F5 at the function call, control is not going to the external break point set in the CRM FM. I am getting output of FM directly.
    I tried with different settings like turning on the check box for IP matching and session breakpoint active immediate, switching to classic debugger etc. I also tried to provide the RFC user id instead of dialogue user but system throws exception saying only dialogue userids are allowed. I found that by inserting an infinite loop statement, control goes inside the RFC CRM FM but I prefer not to change the code.
    Please let me know if I missed anything.
    Thanks and Regards,
    Naren

    Hi,
    Debug RFC calls
    When an RFC function module is called it is usually not possible to debug the call, using the below techniques we can achieve the same. For this example we are calling an RFC enabled FM in ECC system from CRM system.
    Scenario 1: Calling a custom RFC FM
    STEP 1: Add an infinite loop in the remote custom Function Module (adding a u201CDO. ENDDO.u201D statement at the start of the FM would be enough).
    STEP 2: Execute your program in the CRM system. The execution stops at the RFC call, because of the infinite loop.
    STEP 3: Now login to the ECC system and go to transaction SM51 select the process which is executing the RFC and navigate to the menu: u201CProgram/Session->Program->Debuggingu201D this triggers the debugger session in a separate window.
    Scenario 2: Calling a Standard RFC FM
    When we are debugging a standard program we cannot add the infinite loop, hence we cannot go to SM51 and debug the work process. The RFC destination for the ECC system has a User specified, the RFC function module gets executed using this users credentials. Usually the basis team set up the RFC user as non Dialog user, this does not allow debugging. Contact your Basis team and get this changed to a dialog user enabling you to debug RFC function calls via the normal debugger.
    Note: User name configured in the RFC destination (transaction SM59) 
    Note: User type for the RFC User (transaction SU01D)
    Hope this will be helpful..

  • Type conflict when calling a function module (field length)

    Dear All,
                I am getting this following error while executing:  Type conflict when calling a function module (field length)
    This is piece of coding i have writern in my action button.
    method SEARCH_MATERIAL .
      data:
            node_mat_input TYPE REF TO  if_wd_context_node,
            node_mat_output TYPE REF TO if_wd_context_node,
            material TYPE BAPIMATDET-MATERIAL,
            itab TYPE TABLE OF BAPIMATDOA.
      node_mat_input = wd_context->get_child_node( 'NODE_MAT_INPUT' ).
      node_mat_output = wd_context->get_child_node( 'NODE_MAT_OUTPUT' ).
      node_mat_input->get_attribute( EXPORTING name = 'MATERIAL'
                                     IMPORTING value = material ).
      CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
        EXPORTING
          material                    = material
        PLANT                       = plant
        VALUATIONAREA               =
        VALUATIONTYPE               =
        MATERIAL_EVG                =
       IMPORTING
         MATERIAL_GENERAL_DATA       = itab
        RETURN                      =
        MATERIALPLANTDATA           =
        MATERIALVALUATIONDATA       =
      node_mat_output->bind_table( itab ).
    endmethod.
    Attributes are:
    Node name = INPUT its structure is BAPIMATDET
    INPUT attributes = MATERIAL of type BAPIMATDET-MATERIAL
    Thanks,
    Gopi.

    Hi Amit,
               I have used service call to fetch records from that bapi..
    The following is the code generated by service call:-
    METHOD execute_bapi_material_get_deta .
    declarations for context navigation
      DATA:
        node_bapi_material_get_de   TYPE REF TO if_wd_context_node,
         node_exporting   TYPE REF TO if_wd_context_node,
         node_material_general_dat   TYPE REF TO if_wd_context_node,
         node_importing   TYPE REF TO if_wd_context_node,
          lri_element    TYPE REF TO if_wd_context_element.
    declarations for fuba parameters
      data:
        stru_c_material_general_dat    TYPE if_componentcontroller=>element_material_general_dat.
      DATA:
        attr_material    TYPE bapimatdet-material,
        attr_plant    TYPE bapimatall-plant.
    get all involved child nodes
      node_bapi_material_get_de = wd_context->get_child_node( `BAPI_MATERIAL_GET_DE` ).
      node_exporting = node_bapi_material_get_de->get_child_node( `EXPORTING` ).
      node_material_general_dat = node_exporting->get_child_node( `MATERIAL_GENERAL_DAT` ).
      node_importing = node_bapi_material_get_de->get_child_node( `IMPORTING` ).
    get input from context
      node_importing->get_attribute(    EXPORTING      name = `MATERIAL`
                                                         IMPORTING      value = attr_material ).
      node_importing->get_attribute(  EXPORTING       name = `PLANT`
                                                              IMPORTING       value = attr_plant ).
    the invocation - errors are always fatal !!!
      CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
        EXPORTING
          material =                        attr_material
          plant =                           attr_plant
    "      valuationarea =                   wd_This->Valuationarea
    "      valuationtype =                   wd_This->Valuationtype
    "      material_Evg =                    wd_This->Material_Evg
        IMPORTING
          material_general_data =           stru_c_material_general_dat
    "      return =                          wd_This->Return
    "      materialplantdata =               wd_This->Materialplantdata
    "      materialvaluationdata =           wd_This->Materialvaluationdat
      node_material_general_dat->bind_structure( stru_c_material_general_dat[] ).
    ENDMETHOD.
                                 but the problem is I  am getting the following error while compiling...
    " stru_c_materialplantdata " is not an internal table - the " OCCOURS n"  specification is missing.
    Thanks,
    Gopi.
    Edited by: Yegalaivan on Nov 18, 2009 8:30 AM

  • Call RFC Function Module in R/3 via XI during Mapping

    Hi,
    I have an XI scenario where I have to fill the IDoc ADRMAS03 in XI and send it to R/3. Unfortunately the sender system does not provide the required address number (ADRNR) for the Business Partner, only the Business Partner number. Therefore I want to call a Function Module in R/3 during the mapping in order to get the ADRNR.
    Does anybody know which RFC-Function Module I can call in R/3 4.6c providing the Busness Partner number in order to get the ADRNR?
    Thanks.
    Alex

    Hi,
    no need for RFC lookup it's better to do as he wants
    (inside an exit in R3) - just my point of view
    BTW
    don't use a FM just find a table with both values
    and create a select statement youself
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for