PI 7.1 Multiple calls of BAPI

Dear all,
We have a file to RFC scenario; the file consists of multiple invoices which should be posted with BAPI_ACC_DOCUMENT_POST. As described in the Weblog of Michal Krawczyk (XI: IDoc bundling - the trick with the occurance change) I have exported the BAPI to an XSD and added the maxOccurs = " Unbounded".
However, when importing this changed XSD file as external definition the error: "Unable to recognize document as valid XSD Check the selected category" is raised. Any ideas?
Regards,
John.

Make sure that while importing you have selected the xsd option and not wsdl which occurs by default.
Just creating the unbounded occurrence won't work in you case. You need to configure multimapping 1:N. This way there would be no need to export and import the RFC. You may directly change the occurrence from the Message tab in Message Mapping.
Regards,
Prateek

Similar Messages

  • Erratic behavior with multiple calls to the same RFC

    Hi,
    I am running into a strange problem invoking a custom RFC from a .NET application. I would appreciate it if someone has any insight into it.
    The steps to call the RFC are straightforward:
    1. Open the connection to SAP server
    2. Make the call
    3. Close the connection
    As you can imagine, the code is also quite simple. 
    In my simulation program, I have a button on a UI form that one can click and execute the above steps.
    The problem I am running into is that, on multiple calls, sometimes the parameter values that show up on the SAP side are not right. When the input parameter (a structure) is viewed in the ABAP debugger, the field values are all getting exchanged. For example, first name field contains values for the last name. Also, some fields that are supposed to have values do not have any.
    Just before the RFC call is made, when we look at the structures on the .NET side, the field values are the way they are supposed to be.
    I have not been able to establish a pattern. Sometimes, it takes two clicks to reproduce this problem. Sometimes it takes five.
    One of the team members thinks that this starts occurring right after one call fails for some valid reasons. However, I am not yet convinced.
    Having written many custom .NET applications using RFCs an BAPIs, I am fairly conversant with the technology. However, this one just baffles me. It appears something is getting messed up at the RFC layer itself. Does anyone have any idea on what could be happening?
    Thank you in advance for your help.
    Pradeep

    Indeed this is interesting .
    The problem is caused by an incompatible change from .NET Framework 1.1 to 2.0. Howerver, the documentation on the 1.1. API was not clear enough to decide if the incompatible change was adequate or not. Now in detail:
    NCo runtime uses the reflection API Type.GetProperties to read and cache all properties of a Proxy structure. NCo assumes that the order of the returned properties is the same on each call and especially that it is the order of the properties as they appear in source code. This was the behavior in .NET 1.1. It has changed in 2.0, see e.g. the internet forum discussion in http://www.thescripts.com/forum/thread455492.html .
    Calling Type.GetProperty(<PropertyName>) or Type.SetProperty(<PropertyName>)  in your code moves the mentioned properties up in the list returned by Type.GetProperties() later inside of NCo.
    We found the following work-arroud:
    When using late-binding, call a dummy Type.GetProperties()  before any GetProperty or SetProperty.

  • BAPI_OUTB_DELIVERY_CHANGE multiple call

    I'm calling BAPI_OUTB_DELIVERY_CHANGE for 4 separate deliveries.  The first call and the last call work fine.  However, the 2nd and 3rd call outputs all HU output conditions again even though the output conditions are NOT set to multiple issuing.  In debugging the program we have found that an internal table XNAST has some left over entries in it from the first call.  If we delete these entries in the debugger, the BAPI call works fine.
    Is there some sort of FLUSH command or FLUSH function module that I should call between BAPI calls
    Thank you,

    Hi.
    Did you check fields of
    HEADER_CONTROL
    TECHN_CONTROL
    TECHN_CONTROL
    structures?
    May be setting or unsetting some fields to 'X' will help you to solve problem.

  • How to call a BAPI from Visual Composer

    hi,
       I am new to Visual composer. can some body give me step by step information of calling a bapi or RFC from VC.
    Thanks in advance,
    Gopi

    Hi Gopi,
    Steps involed for calling RFC/BAPI from VC
    1. Choose Model->Select Data Services.
    (Alternatively, click the Data button in the task panel toolbar.)
    2. In the Portal field at the right end of the main toolbar, enter the URL of the portal from
    which you can access the back-end system used by the iView.
    For example, you could enter: http://<yourportal>:50000/..
    3. Click the traffic light icon to the right of the Portal field. The portal Welcome screen
    appears.
    4. Log on to the portal as a user that exists in the connected back-end system, or which is
    mapped to a user of that system. Click OK.
    Once a connection to the portal is established, a list of system aliases defined in the
    portal system landscape appears in the System drop-down
    list.
    From the System drop-down list, choose the SAP system that contains the function module.
    6. Under Search SAP System, click the Search tab and in the Name field, enter the search string: <RFC/BAPI name>. Then click Search (at the bottom).
    5. A list of function modules matching the search string is displayed.
    7. Drag the function module/bapi from the Data task panel into the
    workspace: The data service is added to your model.
    8. Periodically save your work. To do so, choose File->Save Model.
    Finally test the iview in VC.
    In the workspace, drag your mouse from the Input port of the data service, <inputform> and dragn your mouse from the outut port from the data service <tabelview and etc..>
    or
    Go through the this documentation...
    http://help.sap.com/download/netweaver/nw04/visualcomposer/VC_60_UserGuide_v1_1.pdf
    Thanks,
    Suriya.

  • How to put the message in sxi_monitor when call a bapi

    hi experts,
    I call a bapi in my abap program, and I want to put some information of this program into the xml messages,then I can monitor in future, but I don't know how to do this.
    Thanks.

    I'm still waiting for the answer.  anyone will help me?
    thanks.

  • Error while calling BAPI_PARTNEREMPLOYEE_CREATE BAPI using JCO

    Hi All,
    Our requirement is to create and update customer contact details from java application. For this purpose we are trying to call BAPI_PARTNEREMPLOYEE_CREATE BAPI for create contact and BAPI_PARTNEREMPLOYEE_EDIT for updating contact information. As these BAPIs are of online version, error is coming while calling these BAPIs.
    So is there any way to call these BAPIs through JCO or are there any alternative BAPIs available for same purpose?
    Thanks in advance,
    Arati.

    Hi,
    All the bapi or function module available in SAP to create contact person will internally do a call transaction to VAP1 and VAP2 tcodes in order to create or change contact person respectively.
    We had a similar problem when we were creating and updating customer contact person using inbound idoc. We then created a bdc recording for the same and then created two function module with name Z_CREATE_CONTACT and Z_CHANGE_CONTACT. In your case you can make this function modules as RFC enabled FM and call them using JCO I guess.
    KR Jaideep,

  • Getting error while calling this BAPI:Field MATNR has been transferred inco

    Hi,
    I have a rquirement to upload material master data into sap for Plant 1251.(For plant 1251 we need to upload both Basi veiw and Extended View).
    I am getting the following error while calling this BAPI.Field MATNR has been transferred inconsistently or is blank
    the errror is :Field MATNR has been transferred inconsistently or is blank.
    I have written the below logic in the program to upload material master data into SAP.
    Please help me out to resolve this issue.
    Thanks in advance.
    Program logic which i have wriiten in the program is
    LOOP AT it_rpt.
        CLEAR lwa_return.
        v_tabix  = sy-tabix.
        IF ( it_rpt-werks EQ p_werks AND
           it_rpt-matnr IS INITIAL ).
    retrieve internal number
          PERFORM get_internal_number USING lc_mtart
                                            lc_mbrsh
                                   CHANGING it_rpt-matnr.
        ENDIF.
        IF NOT it_rpt-matnr IS INITIAL.
          PERFORM convert_field_input CHANGING it_rpt-matnr.
        ENDIF.
    Header data
        CLEAR lwa_headdata.
        lwa_headdata-material                = it_rpt-matnr.
        lwa_headdata-ind_sector              = lc_mbrsh.
        lwa_headdata-matl_type               = lc_mtart.
        lwa_headdata-basic_view              = 'X'.
        IF NOT it_rpt-vkorg IS INITIAL.
          lwa_headdata-sales_view            = 'X'.
        ENDIF.
        lwa_headdata-purchase_view           = 'X'.
        lwa_headdata-mrp_view                = 'X'.
        lwa_headdata-storage_view            = 'X'.
        lwa_headdata-forecast_view           = 'X'.
        lwa_headdata-work_sched_view         = 'X'.
        lwa_headdata-account_view            = 'X'.
        lwa_headdata-cost_view               = 'X'.
    *Client data
        CLEAR: lwa_clientdata, lwa_clientdatax.
        IF it_rpt-werks EQ c_1251.
          lwa_clientdata-matl_group          = it_rpt-matkl.
          lwa_clientdata-old_mat_no          = it_rpt-bismt.
          lwa_clientdata-base_uom            = it_rpt-meins.
          lwa_clientdata-manu_mat            = it_rpt-mfrpn.
          lwa_clientdata-mfr_no              = it_rpt-mfrnr.
        ENDIF.
        lwa_clientdata-division              = it_rpt-spart.
        lwa_clientdata-unit_of_wt            = lc_gewei.
        lwa_clientdata-trans_grp             = lc_tragr.
        IF it_rpt-werks EQ c_1251.
          lwa_clientdatax-matl_group         = 'X'.
          lwa_clientdatax-old_mat_no         = 'X'.
          lwa_clientdatax-base_uom           = 'X'.
          lwa_clientdatax-manu_mat           = 'X'.
          lwa_clientdatax-mfr_no             = 'X'.
        ENDIF.
        lwa_clientdatax-unit_of_wt           = 'X'.
        lwa_clientdatax-trans_grp            = 'X'.
        lwa_clientdatax-division             = 'X'.
    Material Description
        IF it_rpt-werks EQ c_1251.
          lt_matdesc-langu           = sy-langu.
          lt_matdesc-matl_desc       = it_rpt-maktx.
          APPEND lt_matdesc.
        ENDIF.
    *Plant data
        CLEAR lwa_plantdata.
        lwa_plantdata-plant                  = it_rpt-werks.
        lwa_plantdata-availcheck             = lc_mtvfp.
        lwa_plantdata-mrp_type               = lc_dismm.
        lwa_plantdata-mrp_group              = lc_disgr.
        lwa_plantdata-auto_p_ord             = 'X'.
        lwa_plantdata-proc_type              = 'F'.
        IF it_rpt-werks EQ c_1251.
          it_rpt-prctr  = lc_prctr.                 "1252
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-prctr  = lc_prctr1.                "1262
        ENDIF.
        lwa_plantdata-profit_ctr             = it_rpt-prctr.
        lwa_plantdata-period_ind             = lc_perkz.
        lwa_plantdata-max_stock              = it_rpt-stawn.
        lwa_plantdata-countryori             = it_rpt-herkl.
        lwa_plantdata-sloc_exprc             = it_rpt-lgfsb.
        CLEAR lwa_plantdatax.
        lwa_plantdatax-plant                 = it_rpt-werks.
        lwa_plantdatax-availcheck            = 'X'.
        lwa_plantdatax-mrp_type              = 'X'.
        lwa_plantdatax-mrp_group             = 'X'.
        lwa_plantdatax-auto_p_ord            = 'X'.
        lwa_plantdatax-proc_type             = 'X'.
        lwa_plantdatax-profit_ctr            = 'X'.
        lwa_plantdata-period_ind             = 'X'.
        lwa_plantdatax-max_stock             = 'X'.
        lwa_plantdatax-countryori            = 'X'.
        lwa_plantdatax-sloc_exprc            = 'X'.
    *Valuation data
        CLEAR lwa_valuationdata.
        lwa_valuationdata-val_area           = it_rpt-werks.
        lwa_valuationdata-price_ctrl         = lc_vprsv.
        lwa_valuationdata-price_unit         = lc_peinh.
        lwa_valuationdata-val_class          = it_rpt-bklas.
        CLEAR lwa_valuationdatax.
        lwa_valuationdatax-val_area          = it_rpt-werks.
        lwa_valuationdatax-price_ctrl        = 'X'.
        lwa_valuationdatax-price_unit        = 'X'.
        lwa_valuationdatax-val_class         = 'X'.
    *Storage location
        CLEAR lwa_storagelocation.
        lwa_storagelocation-plant            = it_rpt-werks.
        lwa_storagelocation-stge_loc         = it_rpt-lgort.
        CLEAR lwa_storagelocationx.
        lwa_storagelocationx-plant           = it_rpt-werks.
        lwa_storagelocationx-stge_loc        = it_rpt-lgort.
    *Tax Classifications
        IF it_rpt-werks EQ c_1251.
          it_rpt-tatyp = lc_tatyp.       "u2018MWSTu2019
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-tatyp = lc_tatyp1.      "u2018UTXJu2019
        ENDIF.
        lt_taxclass-tax_type_1              = it_rpt-tatyp.
        lt_taxclass-taxclass_1              = lc_taxkm.
        lt_taxclass-tax_ind                 = lc_taxim.
        APPEND lt_taxclass.
    *Sales data
        CLEAR: lwa_salesdata, lwa_salesdatax.
        IF it_rpt-werks EQ c_1251.
          it_rpt-vkorg = lc_vkorg.
        ELSEIF it_rpt-werks EQ c_1261.
          it_rpt-vkorg = lc_vkorg1.
        ENDIF.
        lwa_salesdata-sales_org           = it_rpt-vkorg.
        lwa_salesdata-distr_chan          = lc_vtweg.
        lwa_salesdata-cash_disc           = lc_sktof.
        lwa_salesdata-item_cat            = lc_mtpos.
        lwa_salesdatax-sales_org          = it_rpt-vkorg.
        lwa_salesdatax-distr_chan         = lc_vtweg.
        lwa_salesdatax-cash_disc          = 'X'.
        lwa_salesdatax-item_cat           = 'X'.
    *Forecast parameters
        CLEAR: lwa_forecast, lwa_forecastx.
        lwa_forecast-plant                = it_rpt-werks.
        lwa_forecast-fore_model           = lc_prmod.
        lwa_forecast-fore_pds             = lc_anzpr.
        lwa_forecast-hist_vals            = lc_peran.
        lwa_forecastx-plant               = it_rpt-werks.
        lwa_forecastx-fore_model          = 'X'.
        lwa_forecastx-fore_pds            = 'X'.
        lwa_forecastx-hist_vals           = 'X'.
    Purchasing long text
        IF it_rpt-werks EQ c_1251.
          IF it_rpt-tdline1 <> ' '.
            lv_tdobject = 'MATERIAL'.
            lv_tdid     = 'BEST'.
            lv_tdname   =  it_rpt-matnr.
            PERFORM fill_longtext TABLES lt_longtext
                                  USING  lv_tdobject
                                         lv_tdname
                                         lv_tdid
                                         sy-langu
                                         it_rpt-tdline1.
          ENDIF.
    Basic long text
          IF it_rpt-tdline2 <> ' '.
            lv_tdobject = 'MATERIAL'.
            lv_tdid     = 'GRUN'.
            lv_tdname   =  it_rpt-matnr.
            PERFORM fill_longtext TABLES lt_longtext
                                  USING  lv_tdobject
                                         lv_tdname
                                         lv_tdid
                                         sy-langu
                                         it_rpt-tdline2.
          ENDIF.
    *Units of measure
          CLEAR : lt_uom,lt_uomx.
          lt_uom-alt_unit     = it_rpt-meins.
          lt_uom-alt_unit_iso = it_rpt-meins.
          lt_uom-unit_of_wt   = it_rpt-gewei.
          APPEND lt_uom.
          lt_uomx-alt_unit      = it_rpt-meins.
          lt_uomx-alt_unit_iso  = it_rpt-meins.
          lt_uomx-unit_of_wt    = 'X'.
          APPEND lt_uomx.
        ENDIF.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata             = lwa_headdata
            clientdata           = lwa_clientdata
            clientdatax          = lwa_clientdatax
            plantdata            = lwa_plantdata
            plantdatax           = lwa_plantdatax
            forecastparameters   = lwa_forecast
            forecastparametersx  = lwa_forecastx
            storagelocationdata  = lwa_storagelocation
            storagelocationdatax = lwa_storagelocationx
            valuationdata        = lwa_valuationdata
            valuationdatax       = lwa_valuationdatax
            salesdata            = lwa_salesdata
            salesdatax           = lwa_salesdatax
          IMPORTING
            return               = lwa_return
          TABLES
            materialdescription  = lt_matdesc
            unitsofmeasure       = lt_uom
            unitsofmeasurex      = lt_uomx
            materiallongtext     = lt_longtext
            taxclassifications   = lt_taxclass
            returnmessages       = it_messages.
    Regards,
    Reddy

    Can you check with below code .
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
            EXPORTING
              INPUT        =  it_rpt-matnr       
    IMPORTING
              OUTPUT       =  it_rpt-matnr
            EXCEPTIONS
              LENGTH_ERROR = 1
              OTHERS       = 2.
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Move  it_rpt-matnr to    lwa_headdata-material  .
    Regard's
    Smruti

  • How to populate multiple entries to Bapi Table

    Hi all,
      How to populate multiple entries to Bapi Table.....
    Here is the code(in component controller)
      Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
           int  size = wdContext.nodeApplicants().size();
                for(int i = 0 ; i < size ; i++)
                    String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
                     if(isselected == "true")
                               com.models.veteranpoint.Zrecr_Aplno appid = new
                                    com.models.veteranpoint.Zrecr_Aplno();                                        
                                    appid.setAppl_Number(wdContext.nodeApplicants().
                                        getApplicantsElementAt(i).getAppl_Number());
                               request.addApplicants(appid);
    I want to pass the selected input field to bapi..
    Please tel me where i pass the input field...
    Please correct my code...
    Thanks & regards
    Mathi s

    Hi,
    Steps to insert multiple entries to BAPI table.
    1.Create an instance for BAPI input
    2.Bind the instance to the Node of the BAPI input
    3.Create instance of the Structure(BAPI table) to which input has to be added.
    4.Set the input values to the Structure instance.
    5.Add the instance to the BAPI input.
    6.Execute
    From the given example,I assume Z_Recr_Apply_Point_Input  is the BAPI Input and com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno as Structure
    Step 1:
    Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
    Step 2:
    <b>wdContext.nodeZ_Recr_Apply_Point_Input.bind(request);</b>
    Steps 3 & 4:
    int size = wdContext.nodeApplicants().size();
    for(int i = 0 ; i < size ; i++)
    String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
    if(isselected == "true")
    com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno appid = new
    com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno();
    appid.setAppl_Number(wdContext.nodeApplicants().
    getApplicantsElementAt(i).getAppl_Number());
    <b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().addRecr_Aplno(appid);</b>
    Step 5:
    <b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().execute();</b>
    Regards,
    Viji Priya

  • Multiple calling logical database ADA

    Hello,
    I need to call logical database ADA two times in my program. I use calling logical database using LDB_PROCESS function module. I need to call LDB for depreciation areas 01 and 60. If I call second time, I get exception  LDB_NOT_REENTRANT. I found, that for multiple calls of LDB, there should be LDB_PROCESS_INIT subroutine in logical database proram. In this case, program is SAPDBADA and in this program, LDB_PROCESS_INIT is missing.
    Could you pls. help me, how to call ADA logical database two times?
    Thanks&regards,
    Jirka

    The exception LDB_NOT_REENTRANT means: The logical database is not prepared to accept several successive calls within a transaction. So obviously you can't use LDB_PROCESS  for your purpose.
    Perhaps your goal is possible if you use a sequence of commands
    GET <ldb_node_1>.
    GET <ldb_node_1> LATE.
    GET <ldb_node_2>.
    GET <ldb_node_2> LATE.
    etc...
    where  ldb_node_1, ldb_node_2, etc... are some nodes included in logical database ADA. As I am not familiar with this particular LDB I can't tell which nodes are required to achieve your goal.

  • Can we call a BAPI iteratively in Visual Composer

    Hello All,
    I have a Web Service that returns a table of Sold-Tos. I want to call the BAPI iteratively for each Sold-To in Visual Composer, get the cumilative result and display it in a table.
    Please advise.

    Hi Subba,
    I don't think you can do that.
    What you can do is to adapt your service or create a new one that will do that for you (will get the table and make the needed calculation).

  • I am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    i am trying to generate purchase order and i create a BAPI also which is active.
    But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    Hi,
    Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
    This is my CODE-
    FUNCTION ZBAPIPOTV2.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(POHD) TYPE  ZPOHD OPTIONAL
    *"     VALUE(POITEM) TYPE  ZPOITEM OPTIONAL
    *"  TABLES
    *"      RETURN STRUCTURE  BAPIRET1 OPTIONAL
    data: ls_pohd type bapimepoheader,
             ls_pohdx TYPE bapimepoheaderx,
             lt_poit TYPE TABLE OF bapimepoitem,
             lt_poitx TYPE TABLE OF bapimepoitemx,
             ls_poit TYPE bapimepoitem,
             ls_poitx TYPE bapimepoitemx.
       MOVE-CORRESPONDING pohd to ls_pohd.
       MOVE-CORRESPONDING poitem to ls_poit.
       ls_pohdx-comp_code = 'x'.
       ls_pohdx-doc_type = 'x'.
       ls_pohdx-vendor = 'x'.
       ls_pohdx-purch_org = 'x'.
       ls_pohdx-pur_group = 'x'.
       ls_poit-po_item = '00010'.
       APPEND ls_poit to lt_poit.
       ls_poitx-po_item = '00010'.
       ls_poitx-po_itemx = 'x'.
       ls_poitx-material = 'x'.
       ls_poitx-plant = 'x'.
       ls_poitx-quantity = 'x'.
       APPEND ls_poitx to lt_poitx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
       EXPORTING
         POHEADER                     = ls_pohd
        POHEADERX                    =  ls_pohdx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
    *   PARK_COMPLETE                =
    *   PARK_UNCOMPLETE              =
    * IMPORTING
    *   EXPPURCHASEORDER             =
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
      TABLES
        RETURN                       = return
        POITEM                       = lt_poit
        POITEMX                      = lt_poitx
    *   POADDRDELIVERY               =
    *   POSCHEDULE                   =
    *   POSCHEDULEX                  =
    *   POACCOUNT                    =
    *   POACCOUNTPROFITSEGMENT       =
    *   POACCOUNTX                   =
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
    *   POLIMITS                     =
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
    *   POSRVACCESSVALUES            =
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
    *   POCOMPONENTS                 =
    *   POCOMPONENTSX                =
    *   POSHIPPING                   =
    *   POSHIPPINGX                  =
    *   POSHIPPINGEXP                =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    *   INVPLANHEADER                =
    *   INVPLANHEADERX               =
    *   INVPLANITEM                  =
    *   INVPLANITEMX                 =
    ENDFUNCTION.
    i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". 

  • Calling a BAPI in R3 from CRM

    I called a BAPI to retrieve information in R3. However, I encountered a problem when our R3 is in the downtime period. It raises a short dump for my program. Is there any exception that I can catch to prevent or other solutions to prevent this short dump.

    Hi again,
    1.  I use the exception like the below code, right?
    Yes, use it like this only.
    2.
    Does my RFC function on R3 have these exceptions ?
    No, the RFC/BAPI does not have
    any such exceptions
    in the definition
    (u will see in SE37, that,
    the EXCEPTIONS tab is empty)
    3. BUT
      IT IS A FACILITY (AUTOMATIC FACILITY)
      PROVIDED BY R3
      TO DETECT SUCH COMMUNICATION PROBLEMS
    (The RFC FM/BAPI does not Take care of this by itself,
    bcos, if communication is not there,
    then the FM is not at all called in the target system)
    4.
    If not, how can the system know that when the system is cracked, it will raise the exception 2?
    Do not worry.
    If the target server is DOWN,
    then your program will not give run time error.
    However, u should chec sy-subrc
    to DETECT, some error has occured bcos
    of communication.
    5. To get a taste of it,
      just copy paste
    (Change the DESTINATION as per your requriement,
      give some wrong destination,
      give some right one
      etc)
    6.
    REPORT abc.
    DATA: msg_text(80) TYPE c.
    CALL FUNCTION 'RFC_PING' DESTINATION 'PRD'
    EXCEPTIONS
    communication_failure = 1 MESSAGE msg_text
    system_failure = 2 MESSAGE msg_text.
    IF sy-subrc <> 0.
    *----- MESSAGE
    message 'problem' type 'I'.
    ENDIF.
    regards,
    amit m.

  • Problem with call to BAPI when the data contains spaces

    Hi everyone,
    I've a table in R3 that has 2 fields which is consulted via BAPI from XI. The Bapi call run correctly while the data don't contain spaces preffixed but when for example the data is ' A31' the BAPI call doesn't return nothing.
    The table structure is:
    CODE             DESCRIPTION
    values:
    ' A31'               'Desc A'
    'A30'                'Desc B'
    When I call the bapi with A30 value the Bapi return me Desc B, but when I try it with the value ' A31' the Bapi doesn't return any value.
    Could anyone help me?
    Thanks in advance

    >>The problem isn't the trim, because the bapi call must contain the spaces.
    Are you able to get expected results while testing the BAPI with data containing spaces?
    I have seen some cases where you get correct results when you test the RFC in SE 37, but the same data when passed from XI does not get the desired results. It was coz. when testing the RFC in R/3 some user exits are called and the data fets populated in the correct way. Check this.
    Regards,
    Jaishankar

  • Calling a Bapi on XI ABAP stack

    Hi to all,
    I have to call a Bapi defined on XI ABAP stack. I want to use a synchronous scenario in which my sender channel uses a File Adapter. The Bapi that I have to call is defined on the same SAP XI, then I don't know if my receiver channel has to use a RFC Adapter or an XI Adapter. If I use a RFC Adapter, I don't see any message in Message Monitoring. Instead, if I use the XI Adapter as Receiver, I get this error:
    HTTP response contains status code 401 with the description Unauthorized Error when sending by HTTP (error code: 401, error text: Unauthorized)
    Thanks to all!

    <i>I don't know if my receiver channel has to use a RFC Adapter or an XI Adapter</i>
    No XI Adapter configuration required. Use RFC adapter
    <i>
    I want to use a synchronous scenario</i>
    Synchronous scenario using file adapter can be achieved using BPM. A workaround would be
    File - RFC - File without a BPM - Possible from SP 19.
    Regards,
    Prateek

  • Servlet calling a BAPI Web Service...

    Hi everyone,
    I downloaded the wsdl file for the BAPI_USER_GETLIST.
    I created a Deployable Proxy that points to this wsdl file.
    I created a Web modul project with a servlet.
    I also created an Enterprise application project that contains my Web modul project.
    In the Web modul project, I created  a servlet :
    Here is the code of the servlet :
    <b>try {               
         InitialContext ic = new InitialContext();                    
         BAPI_USER_GETLISTService sampleWS = (BAPI_USER_GETLISTService)ic.lookup("java:comp/env/SampleWSProxy");
         BAPI_USER_GETLISTPortType vi = sampleWS.getLogicalPort();
         BAPI_USER_GETLIST importParams  = new BAPI_USER_GETLIST();
         ArrayList list = new ArrayList();
         BAPIUSNAME structure = new BAPIUSNAME();
         structure.setUSERNAME(new String());
         structure.setFIRSTNAME(new String());
         structure.setLASTNAME(new String());
         structure.setFULLNAME(new String());
         list.add(structure);
         BAPIUSNAME[] rows = new BAPIUSNAME[list.size()];
         list.toArray(rows);
         importParams.setUSERLIST(rows);
         importParams.setWITH_USERNAME("X");
         BAPI_USER_GETLISTResponse exportParams = null;
              BAPIUSNAME[] res = vi.BAPI_USER_GETLIST(rows,"");
              for(int i=0;i<res.length;i++)
                   response.getWriter().write(res<i>.getFIRSTNAME());
    } catch(Exception e)
              response.getWriter().write("ERROR!!!" + e.getMessage());
    </b>
    The exception is :
    <b>ERROR!!!Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.</b>
    Can someone help with this security problem ?
    Is the code OK except the security problem ?
    Thanks a lot.

    Hi David,
    Before calling a BAPI, we have to make a connection to
    R/3. Try following code...
    import com.sap.mw.jco.*;
    public class TutorialConnect1 extends Object {
       JCO.Client mConnection;
       public Connect1() {
         try {
           // Change the logon information to your own system/user
           mConnection =
              JCO.createClient("001", // SAP client
                "<userid>", // userid
                "****", // password
                null, // language
                "<hostname>", // application server host name
                "00"); // system number
           mConnection.connect();
           System.out.println(mConnection.getAttributes());
           mConnection.disconnect();
        catch (Exception ex) {
          ex.printStackTrace();
          System.exit(1);
      public static void main (String args[]) {
        Connect1 app = new Connect1();
    This code from sap help, for details visit this link..
    http://help.sap.com/saphelp_erp2004/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
    Hope this helps.
    Regards,
    Narinder Hartala

Maybe you are looking for

  • Using multiple ipods on on computer

    I looked over the discussions on how to do this. It was recommended that using windows XP, one should create different user profiles thus giving different itunes applications. I was wondering if it could be done in the same user preference, in the sa

  • SwingWorker in JDK6

    Hello, We have written the application (everything works great in command line version), but now we need to create a GUI version. The user can run several processes of his choice in the order of his choice in the Worker thread in the doInBackground()

  • Netcfg wireless-wpa-configsection

    In order to use the net-auto-wireless daemon, I'm trying to convert my netcfg profiles from wireless-wpa-config to wireless-wpa-configsection. The profiles are used for plain WPA connections and changing ESSID and KEY in wireless-wpa-config is usuall

  • Copy items to the iPhoto Library option doesn't seem to work

    Hi, I'm using 7.1.1 and if I: 1. De-select the create "Copy items to the iPhoto Library" option in Preferences/Advanced 2. Create a new library It doesn't seem to work. The images are still being copied into the library -- that is, if I show the pack

  • Can i use cisco 2951 cme 9 router to connect different branch location ip phones together with different subnet?

    hi all, I want to do VoIP , with cisco 2951 router with cme 9.0. I just want to know can i connect differnt branch  ip phone in differnt subnet in single centralized cme router 2951. that is for differnt branch ip phone there is differnt dhcp pool an