Problem with RFC function module from R/3 to CRM

Hi, i have a RFC function module created in R/3, this is the code:
function Z_CRM_PRODUCTO_INTERLOCUTOR.
""Interfase local
*"  IMPORTING
*"     VALUE(GV_VKORG) TYPE  VKORG
*"     VALUE(GV_VTWEG) TYPE  VTWEG
*"     VALUE(GV_MATNR) TYPE  MATNR
*"     VALUE(GV_KUNNR) TYPE  KUNNR_V
*"  EXPORTING
*"     VALUE(GV_KDMAT) TYPE  MATNR_KU
*"     VALUE(GV_POSTX) TYPE  KDPTX
*"  EXCEPTIONS
*"      NOT_FOUND
  UNPACK GV_MATNR TO GV_MATNR.
  UNPACK GV_KUNNR TO GV_KUNNR.
  select single  KDMAT POSTX
          into (GV_KDMAT, GV_POSTX) from KNMT
          where   VKORG = GV_VKORG
                  and  VTWEG = GV_VTWEG
                  and  KUNNR = GV_KUNNR
                  and  MATNR = GV_MATNR.
  IF sy-subrc <> 0.
    RAISE NOT_FOUND.
  ENDIF.
endfunction.
When i call this function from CRM, i do it like this:
CALL FUNCTION 'Z_CRM_PRODUCTO_INTERLOCUTOR'
  DESTINATION LV_RFCDEST
  EXPORTING
    GV_VKORG  = lv_vkorg
    GV_VTWEG  = ORGMAN_H-DIS_CHANNEL
    GV_MATNR  = ORDERADM_I_WRK-ORDERED_PROD
    GV_KUNNR  = WA_DATOS_PER-N_PAGADOR
  IMPORTING
    GV_POSTX  = IT_POS_LINE-DESCRIPCION
    GV_KDMAT  = IT_POS_LINE-material
  EXCEPTIONS
    not_found = 1.
where:
it_pos_line-descripcion type string
it_pos_line-material type string.
Well, my problem is that when debugging, in R/3 the 2 return values have the correct value, but when they are passed to CRM they have only one position.
As i've been told, it was working ok, but it's being wrong since we made a ¿conversion to unicode?. Maybe I should change the type of return ???
Thanks in advance !!!

Hello Maria,
Make sure you define your parameters in CRM exactly the same way as in R3, do not use type string here.
So:
it_pos_line-descripcion type C char 40,
it_pos_line-material type C length 35.
Kind regards,
John.

Similar Messages

  • Collection problem with RFC function module WSDL.

    Hi.
    I have developed an RFC function module in a SAP system version 4.7 (WAS 620). This FM has 2 table parameters. I have no problem when I see the WSDL in the SAP Web Service Browser.
    Another team is trying to consume this RFC FM as a web service from a Java application but they say they can't see the table parameters as collections.
    Here is the WSDL of the FM, the table parameters are T_MOVIM and T_ERROR:
    <?xml version="1.0" encoding="UTF-8" ?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="urn:sap-com:document:sap:rfc:functions" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="urn:sap-com:document:sap:rfc:functions">
         <types>
              <xsd:schema targetNamespace="urn:sap-com:document:sap:rfc:functions">
                   <xsd:element name="ZMMFUSAPTK_0001">
                        <xsd:complexType>
                             <xsd:all>
                                  <xsd:element name="GENIDOC" minOccurs="0">
                                       <xsd:simpleType>
                                            <xsd:restriction base="xsd:string">
                                                 <xsd:maxLength value="1" />
                                            </xsd:restriction>
                                       </xsd:simpleType>
                                  </xsd:element>
                                  <xsd:element name="T_ERROR">
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="s0:ZMMTASAPTK_0012" />
                                            </xsd:sequence>
                                       </xsd:complexType>
                                  </xsd:element>
                                  <xsd:element name="T_MOVIM">
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="s0:ZMMTASAPTK_0011" />
                                            </xsd:sequence>
                                       </xsd:complexType>
                                  </xsd:element>
                             </xsd:all>
                        </xsd:complexType>
                   </xsd:element>
                   <xsd:element name="ZMMFUSAPTK_0001.Response">
                        <xsd:complexType>
                             <xsd:all>
                                  <xsd:element name="CODRET">
                                       <xsd:simpleType>
                                            <xsd:restriction base="xsd:string">
                                                 <xsd:maxLength value="1" />
                                            </xsd:restriction>
                                       </xsd:simpleType>
                                  </xsd:element>
                                  <xsd:element name="T_ERROR">
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="s0:ZMMTASAPTK_0012" />
                                            </xsd:sequence>
                                       </xsd:complexType>
                                  </xsd:element>
                                  <xsd:element name="T_MOVIM">
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="s0:ZMMTASAPTK_0011" />
                                            </xsd:sequence>
                                       </xsd:complexType>
                                  </xsd:element>
                             </xsd:all>
                        </xsd:complexType>
                   </xsd:element>
                   <xsd:complexType name="ZMMTASAPTK_0011">
                        <xsd:sequence>
                             <xsd:element name="REFERENCIA" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="10" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="FECHACONT" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="8" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="FECHADOC" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="8" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CODMOV" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="2" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="NROPLAN" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="12" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="NROCOMP" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="10" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CLASEMOV" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="3" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CENTRO" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="4" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="ALMACEN" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="4" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="MATERIAL" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="5" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="LOTE" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="10" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CANTIDAD" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="15" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="MOTIVOMOV" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="4" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CENTROREC" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="4" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="ALMACENREC" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="4" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CENTROCTO" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="10" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="ORDEN" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="12" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="TIPOSTK" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="1" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="NROPEDIDO" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="10" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CODCISTERNA" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="50" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="ZMMTASAPTK_0012">
                        <xsd:sequence>
                             <xsd:element name="REFERENCIA" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="10" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="CODERR" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="3" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                             <xsd:element name="MSJERR" minOccurs="0">
                                  <xsd:simpleType>
                                       <xsd:restriction base="xsd:string">
                                            <xsd:maxLength value="100" />
                                       </xsd:restriction>
                                  </xsd:simpleType>
                             </xsd:element>
                        </xsd:sequence>
                   </xsd:complexType>
              </xsd:schema>
         </types>
         <message name="ZMMFUSAPTK_0001Input">
              <part name="parameters" element="s0:ZMMFUSAPTK_0001" />
         </message>
         <message name="ZMMFUSAPTK_0001Output">
              <part name="parameters" element="s0:ZMMFUSAPTK_0001.Response" />
         </message>
         <portType name="ZMMFUSAPTK_0001PortType">
              <operation name="ZMMFUSAPTK_0001">
                   <input message="s0:ZMMFUSAPTK_0001Input" />
                   <output message="s0:ZMMFUSAPTK_0001Output" />
              </operation>
         </portType>
         <binding name="ZMMFUSAPTK_0001Binding" type="s0:ZMMFUSAPTK_0001PortType">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
              <operation name="ZMMFUSAPTK_0001">
                   <soap:operation soapAction="http://www.sap.com/ZMMFUSAPTK_0001" />
                   <input>
                        <soap:body use="literal" />
                   </input>
                   <output>
                        <soap:body use="literal" />
                   </output>
              </operation>
         </binding>
         <service name="ZMMFUSAPTK_0001Service">
              <documentation>SAP Service ZMMFUSAPTK_0001 via SOAP</documentation>
              <port name="ZMMFUSAPTK_0001PortType" binding="s0:ZMMFUSAPTK_0001Binding">
                   <soap:address location="http://dbades00.bue.bemberg.com.ar:8002/sap/bc/soap/rfc" />
              </port>
         </service>
    </definitions>
    Should I change something in the definition of the parameters of the FM? or the problem is with the parsing process on the other system?
    Thanks in advance.
    Fabian.

    Welcome to SDN.
    I am not sure about this particular issue, but i have used WSDL from WAS6.20 system in MS Office infopath to consume webservice where we have had table parameters without any issue.
    may be try with office infopath to make sure that the problem is with the WSDL or with the java application.
    Regards
    Raja

  • Facing Problem with RFC Function Module

    Hi,
    I have created an RFC function module to get some data in table format.
    I have run the RFC in original system: It is giving the data.
    However, when I run this in target system, It is not giving any values.
    Could you please let me know, why it happens? I am not sure where I missed out.
    Thanks,
    Sandeep

    HI,
    i hope you are calling the RFC function module in the target system like this
    CALL FUNCTION <FUNC NAME> DESTINATION <DESTINATION NAME> . The destination should be logical system name of the source Logical system .
    Regards,
    Nagaraj

  • Problem with RFC Function module

    Hello All,
    I have created one RFC with importing parameters as material and material description.when I pass some value in material desc it always convert into the uppercase.I have one option of checkbox for upper/lower case but i have to do it manually evrytime.Is there any solution for making the material desc as case sensitive or we can make the checkbocxticked permanently?
    Regards
    Lalit

    Hi Lalit,
    There is no option for making the input case sensitive .
    One alternate can be using "test data directory " but that will not be of much help if you are changing the materail number each and very time.
    Better convert the materail number to upper/lower case inside FM using convert to -
    Rgds,
    Sandeep

  • Performance problem with OLE_FLUSH_CALL function module

    Hello Everyone,
    I am facing problem with OLE_FLUSH_CALL function module (execution is taking long time which is going to be dump error).
    Could you please help me in knowing solution for this problem?
    Thanking you in advance.
    Srinivas

    Hi Srinivas,
    the OLE_FLUSH_CALL does an RFC from ABAP backend to frontend UI. So high execution time could result from high network time, for example latency between UI and backend server.
    How many UI interaction steps did you measure for the trace above? Ideally, there should only be one OLE_FLUSH_CALL per user interaction step. If its more, the application is not written in an optimized way.
    Best Regards, Randolf

  • Problem with BAPI_SALESORDER_CHANGE function module

    I know lot of posts have been done about problems with this function module. However I was not able to find the answer to my problem. Hence posting a new thread
    I have the following code which changes the reason rejection (if required to 'ZF') and also updates the sales order quantity.
    The code works absolutely fine as long as the PGI date of the order item is either today or in the future. However if the PGI date of the order item is in the past. I get an error in the t_return table with error type 'E' saying 'PGI date is in the past hence could not update the item'.
    If I try to update the same order quantity in VA02 for the item with PGI date in the past it does so without any problem.
    Can someone please suggest what the problem might be. Or if there is some other way I can update the quantity. (I dont want to use BDC)
    FORM change_sales_order_item USING value(r_rtb_posnrs) TYPE zpsd_ztsdrtb_ro_track
                                 CHANGING r_return TYPE type_t_bapiret2.
      DATA: v_order_header_in TYPE bapisdh1,
      v_order_header_inx TYPE bapisdh1x,
      t_schedule_lines TYPE bapischdl OCCURS 0 WITH HEADER LINE,
      t_schedule_linesx TYPE bapischdlx OCCURS 0 WITH HEADER LINE,
      v_temp_rtb_vbeln TYPE vbeln,
      v_temp_rtb_posnr TYPE posnr,
      wa_old_rtb_posnrs TYPE ztsdrtb_ro_track,
      t_item_in TYPE bapisditm OCCURS 0 WITH HEADER LINE,
      t_item_inx TYPE bapisditmx OCCURS 0 WITH HEADER LINE,
      v_rtb_old_vbeln TYPE zrtbvbeln,
      v_rtb_old_posnr TYPE zrtbposnr,
      v_ro_old_vbeln TYPE zrovbeln,
      v_ro_old_posnr TYPE zroposnr,
      v_rtb_count TYPE i,
      v_next_row_index TYPE i,
      v_update_order_flg TYPE char1, "Update the sales order flag
      v_rtb_record_counter TYPE i,
      v_original_vbeln TYPE vbeln,
      t_bapiret TYPE STANDARD TABLE OF bapiret2.
      FIELD-SYMBOLS: <wa_r_rtb_posnrs> TYPE ztsdrtb_ro_track,
                     <wa_r_rtb_posnr_next> TYPE ztsdrtb_ro_track.
      CONSTANTS: c_updateflag TYPE bapisditmx-updateflag VALUE 'U'.
      v_order_header_inx-updateflag = 'U'.
    Get rid of the duplicate records for the same RTB order. Just use
    the last record quantity in the internal table
      LOOP AT r_rtb_posnrs ASSIGNING <wa_r_rtb_posnrs>.
        v_rtb_record_counter = v_rtb_record_counter + 1.
        <wa_r_rtb_posnrs>-seqnr = v_rtb_record_counter.
      ENDLOOP.
      SORT r_rtb_posnrs DESCENDING BY zrtbvbeln zrtbposnr seqnr zrtbconsumedflg.
      DELETE ADJACENT DUPLICATES FROM r_rtb_posnrs COMPARING zrtbvbeln zrtbposnr.
      DESCRIBE TABLE r_rtb_posnrs LINES v_rtb_count.
      v_rtb_record_counter = 0.
      v_update_order_flg = space.
      LOOP AT r_rtb_posnrs ASSIGNING <wa_r_rtb_posnrs>.
        v_rtb_record_counter = v_rtb_record_counter + 1.
        v_update_order_flg = space.
    Popluate the item quantity update flags for schedule lines
        t_schedule_linesx-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
        t_schedule_linesx-sched_line = '0001'.
        t_schedule_linesx-updateflag = c_updateflag.
        t_schedule_linesx-req_qty = 'X'.
        APPEND t_schedule_linesx.
        CLEAR t_schedule_linesx.
    *Item (Order QQuantity Field to be changed "KWMENG")
        t_schedule_lines-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
        t_schedule_lines-sched_line = '0001'.
        t_schedule_lines-req_qty = <wa_r_rtb_posnrs>-zrtbchgqty.
        APPEND t_schedule_lines.
        CLEAR t_schedule_lines.
    If fully consumed then set the rejection flag
        IF <wa_r_rtb_posnrs>-zrtbconsumedflg = 'X'.
          t_item_inx-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_inx-updateflag = 'X'.
          t_item_inx-reason_rej = 'X'.
          APPEND t_item_inx.
          CLEAR t_item_inx.
          t_item_in-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_in-reason_rej = 'ZF'.
          APPEND t_item_in.
          CLEAR t_item_in.
        ELSE.
          t_item_inx-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_inx-updateflag = 'X'.
          t_item_inx-reason_rej = 'X'.
          APPEND t_item_inx.
          CLEAR t_item_inx.
          t_item_in-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_in-reason_rej = ' '.
          APPEND t_item_in.
          CLEAR t_item_in.
        ENDIF.
    If you have reached the last line of the RTB intern table update the sales order
    *Index pointing to the next row
        v_next_row_index = v_rtb_record_counter + 1.
        IF v_rtb_record_counter = v_rtb_count.
          v_update_order_flg = 'X'.
        ELSEIF v_rtb_record_counter < v_rtb_count.
    Get the next row data
          READ TABLE r_rtb_posnrs INDEX v_next_row_index ASSIGNING <wa_r_rtb_posnr_next>.
          IF sy-subrc = 0.
            IF <wa_r_rtb_posnrs>-zrtbvbeln <> <wa_r_rtb_posnr_next>-zrtbvbeln.
              v_update_order_flg = 'X'.
            ENDIF.
          ENDIF.
        ELSE.
          v_update_order_flg = space.
        ENDIF.
    update the rtb orders with quantities and the rejection flag (if required)
        IF v_update_order_flg = 'X'.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE' STARTING NEW TASK 'SOUPDATE'
            PERFORMING callbk_bapi_salesorder_change ON END OF TASK
            EXPORTING
              salesdocument    = <wa_r_rtb_posnrs>-zrtbvbeln
              order_header_in  = v_order_header_in
              order_header_inx = v_order_header_inx
            TABLES
              return           = t_return
              schedule_lines   = t_schedule_lines
              schedule_linesx  = t_schedule_linesx
              order_item_in    = t_item_in
              order_item_inx   = t_item_inx.
          WAIT UNTIL t_return[] IS NOT INITIAL.
          READ TABLE t_return INTO wa_return WITH KEY type = 'E'.
          IF sy-subrc <> 0.
          ELSE.
            r_return[] = t_return[].
            MESSAGE ID 'ZSD' TYPE 'E' NUMBER 613.
           RAISE errorinorderupdate.
          ENDIF.
          REFRESH t_schedule_linesx.
          REFRESH t_schedule_lines.
          REFRESH t_item_in.
          REFRESH t_item_inx.
          REFRESH t_return.
        ENDIF.
      ENDLOOP.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       IMPORTING
         return = t_bapiret.
    ENDFORM.                    "Change_Sales_Order

    see the following example and try to do this:
    i_hdrx-updateflag = 'U'.
    *" Fill required SCHEDULE_LINES data.
    i_sched-itm_number = p_posnr.
    i_sched-sched_line = p_etenr.
    i_sched-req_qty = p_reqqty.
    i_schedx-updateflag = 'U'.
    i_schedx-itm_number = p_posnr.
    i_schedx-sched_line = p_etenr.
    i_schedx-req_qty = 'X'.
    APPEND i_sched.
    APPEND i_schedx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_vbeln
    order_header_in = i_hdr
    order_header_inx = i_hdrx
    TABLES
    return = i_ret
    schedule_lines = i_sched
    schedule_linesx = i_schedx.

  • How to invoke RFC function module from XI interface

    Hi all,
    I am having one question, How to invoke RFC function module from XI interface.
    Please reply me as soon as possible.
    Thanks in advance,
    Radhika

    Hi,
    To call the RFC in mapping u need to create the RFC lookups...check these links.
    How we have to create the lookups?
    Check this weblogs with some screenshots on how to achieve this:
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/sap.user72/blog/2005/12/06/optimizing-lookups-in-xi
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    lookups in xi
    XI Design Guidelines
    Re: RFC Lookup API
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Regards,
    Phani

  • 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..

  • Problem with the function module SO_DOCUMENT_SEND_API1

    Hi Friends,
    I am facing the problem wiht the function module SO_DOCUMENT_SEND_API1,
    My actull requirement is : - i need to send the sap data to my externa mail id (Like as XYZ@) with out the any attachment , So i have implemented the code with the function module SO_DOCUMENT_SEND_API1.
    The mail has successfully sent the sap inbox (SOST) but the mail are not reached to the external mail ID'S( XYZ@GMAIL)
    i Have maintained my code lines same as below.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data = wa_doc_data
          put_in_outbox = ca_x
          commit_work   = ca_x
        TABLES
          packing_list  = tb_packing_list
          contents_txt  = tb_mailbody
          receivers     = tb_receiver.
    Can you please tell me soultion ,
    Thanks
    charan.

    Hi charan,
                      If u r able to see the mail in sost, then i think ur code has worked fine. if the mail is not going to outside domains from sost u need to do some configurations for that, u can find lots of configuration docs regarding mail setup in sap.
    once try to pass below parameter also.
    t_receivers1-rec_type = 'U'.
    For configuring mail setup u need to sit with ur basis guy.
    Moderator message: please do not use SMS speak.
    Edited by: Thomas Zloch on Nov 23, 2010 5:51 PM

  • Calling RFC Function module from JAVA

    Hi All,
       We have created a RFC Function Module for Billing Plan tab in Sales order (BDC). The function Module contains BDC. When we are running the same function module in SAP it is working fine. But when the FM is called in Java , it is allowing only maximum of 5 entries , when we trying to insert at 6th position in billing plan tab, we are getting an error.
    Can any one help on this.
    Points will be rewarded for helpful answers.
    Thanks & Regards,
    Kiran I

    I think the problem is because of the number of lines displayed on the screen in the BDC session in the Billing Plan.
    You might have to add the page down logic to your BDC program.

  • Reference-Problem in RFC-Function Module

    Hello,
    I am new to ABAP. As an introduction I read the book "ABAP Objects" from SAP Press.
    I need a web service which returns a before uncertain number of objects.
    First I have written a class representing my object. Then I added a new table type to the DDIC which has as "line type" simply my class as referenced type.
    Afterwards I have implemented a function module which has an export parameter with the TYPE of my table type. The whole thing works fine, if I configure the function module as a normal function module. As soon as I click on RFC, I get the error message "Reference parameters are not allowed with RFC ". However, I have already clicked "pass by value" for the export- and import-parameters. The problem seems to be the table type with my class as referenced type.
    Is the approach in general correct, to create a web service?
    How can I fix the problem with the reference?
    Best regards
    Philipp

    Ok, I understand the problem is that I can not export any reference. And therefore no objects because the declaration has to be done with TYPE REF TO...
    Can you tell me a little more detailed about the usage of the interface IF_SERIALIZABLE_OBJECT?
    Is it possible to serialize the whole internal table which has to exported?
    Would it have the same effect like a table type based on a structure with attributes like my object?
    Best regards
    Philipp

  • Problem with CRM_ROLES_OF_USER_GET function module in BW3.5

    Hi,
    We have a problem in the standard function module.   CRM_ROLES_OF_USER_GET.  This should get the latest roles of the user but it is reading from Buffer and displaying all the old roles.
    How can i clear the buffer so that this function module will return the latest roles not the old roles.
    Thanks
    Naveen

    Hi,
    Let me clear my problem once again.
    -->Home page i.e. P2 does not use authorization, So it is displayed along with text item :p2_user_privilege.
    -->Then user click on one of the links , Now page :P70: should get displayed.
    P70 is using authorization scheme.
    -->But :p2_user_priviledge value is not accessible at authorization scheme, I dont know why.
    I could not find out where to create Application item , as suggested by you.
    & not able to find Developer menu , session at home page as suggested earlier.
    And one more question, my application at runtime display
    X en us
    at bottom
    How to make it
    USER: X Language: en us
    Like in development environment.
    Hope I have cleared my problem, waiting for reply.
    Edited by: TEJU on Nov 17, 2008 9:25 AM

  • Problem with SO_DOCUMENT_SEND_API1 Function module

    Hi Experts,
    Is it anyway possible that If we are sending excel attachment through email using SO_DOCUMENT_SEND_API1, column width in excel get adjusted as per the field content without any manual interaction.
    Looking forward towards your valuable suggestions!!!
    Regards
    VJ

    hi,
    please see the following
    [alignment problem with SO_NEW_DOCUMENT_SEND_API1 FM;
    [Problem with function module SO_NEW_DOCUMENT_SEND_API1;
    hope these helps you
    Regards
    Ritesh

  • Problem with "QC01_Q_CHARACTERISTICS_SELECT" function module

    Hi,
    Can anyone help me out with the problem that i am facing while using the function module "QC01_Q_CHARACTERISTICS_SELECT"?
    This function module is working fine for me for the first time with a specific inspectio lot number but when i call the same function module for the second or third time with the same above data then it gives me an error that "No Characteristics Found"?
    I am using this function module in an Interactive ALV report, where the initial list stores all the storage conditions based on the material,  plant and batch number we give.
    Then in the second list, when the user clicks on the storage conditions we will display the results for that conditions.
    This concept is working fine for the first time but not for the second time.
    Is there any restriction on the number of times that we have to call this function module?
    Can anyone please help me out with this?
    Thanks,
    Praveen

    Hi Praveen,
    I observed one thing in the function module that is after executing this function module se37 and gave a lot no in I_QALS i could not get the result initially the system is giving the message
    No characteristics were found for inspection lot 040000211677 000000
    But for the same lot when i remove the default value 'X' in the field I_WITH_OPERATIONS and tested the result i am able to get the result, Please check this, Hope this helps you.
    Regards,
    Naveen.

  • Problem with Create_Text Function module

    Hi All,
    I am using the function module Create_Text to create the text for Condition types in ME31K. Its working fine and creating text when i go to debug mode. Its updating into transactions(ME31K). But if i run the program in back ground or foregorund with out debuging modes its not creating text. Please do let me know any reasons

    Hi,
    Have you used FM COMMIT_TEXT  after CREATE_TEXT ? :
            CALL FUNCTION 'COMMIT_TEXT'
              EXPORTING
                OBJECT   = 'PMS'
                NAME     = W_TDNAME
                ID       = 'LTXT'
                LANGUAGE = 'E'.
    Try adding the 'COMMIT_TEXT' and check.
    Thanks & Regards,
    Faheem.

Maybe you are looking for