Bapi message type e

I am trying to execute the following program.i am getting an exception here:
I am using crm5.2
I AM GETTING BAPI_MTYPE AS E.
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S")) ) {
System.out.println(returnStructure.getString("MESSAGE"));
System.out.println("TYPE");
System.exit(1);
y am i not getting type as S or " ".
I am working with jco for the first time.please help.
how to resolve this?
regards
shilpi
import com.sap.mw.jco.*;
public class Bapi1 extends Object{
JCO.Client mConnection;
JCO.Repository mRepository;
public Bapi1() {
try {
// Change the logon information to your own system/user
mConnection =
JCO.createClient("002", // SAP client
"training3", // userid
"welcome", // password
null, // language
"usaboses01.ad.infosys.com", // application server host name
"00"); // system number
mConnection.connect();
mRepository = new JCO.Repository("SAPJCo", mConnection);
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
JCO.Function function = null;
JCO.Table codes = null;
try {
function = this.createFunction("BAPI_BANK_GETLIST");
if (function == null) {
System.out.println("BAPI_BANK_GETLIST" +
" not found in SAP.");
System.exit(1);
mConnection.execute(function);
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S")) ) {
System.out.println(returnStructure.getString("MESSAGE"));
System.out.println("TYPE");
System.exit(1);
codes =
function.getTableParameterList().getTable("BANK_LIST");
for (int i = 0; i < codes.getNumRows(); i++) {
codes.setRow(i);
System.out.println(codes.getString("BANK_KEY") + '\t' +
codes.getString("BANK_NAME"));
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
try {
codes.firstRow();
for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
function = this.createFunction("BAPI_BANK_GETDETAIL");
if (function == null) {
System.out.println("BAPI_COMPANYCODE_GETDETAIL" +
" not found in SAP.");
System.exit(1);
function.getImportParameterList().
setValue(codes.getString("BANK_KEY"), "BANKKEY");
function.getExportParameterList().
setActive(false, "BANK_CTRY");
mConnection.execute(function);
JCO.Structure returnStructure =
function.getExportParameterList().getStructure("RETURN");
if (! (returnStructure.getString("TYPE").equals("") ||
returnStructure.getString("TYPE").equals("S") ||
returnStructure.getString("TYPE").equals("W")) ) {
System.out.println(returnStructure.getString("MESSAGE"));
JCO.Structure detail =
function.getExportParameterList().
getStructure("BANK_DETAIL");
System.out.println(detail.getString("BANK_KEY") + '\t' +
detail.getString("BANK_CTRY") + '\t' +
detail.getString("CITY"));
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
mConnection.disconnect();
public JCO.Function createFunction(String name) throws Exception {
try {
IFunctionTemplate ft =
mRepository.getFunctionTemplate(name.toUpperCase());
if (ft == null)
return null;
return ft.getFunction();
catch (Exception ex) {
throw new Exception("Problem retrieving JCO.Function object.");
public static void main (String args[]) {
Bapi1 app = new Bapi1();

"E" stands for error. Check the input parameters you are passing to SAP to make sure you set all parameters correctly. Additionally, you can test the Function Module directly by setting the same data that you try setting through JCo and then see what happens.
Under "Message" in the return table, you should be able to see a more detailed reason for the error.
T00th

Similar Messages

  • Bapi for creating message type in a sales order

    Hi, I am involved in a IS-MAM project for an italian company.
    I need to create or add a message output type in a sales order in a complex batch program. I thought to use a bapi technicality; in particular BAPI_ADMGMTSO_CHANGE in order to change the document.
    How can I create message type in the order? Can I use the same bapi or I need of an other one?
    thanks in advance for your help
    Lucia

    Can you please provide more information...

  • Trigger inbound BAPI IDOC for message type ACC_GL_POSTING

    I configured our SAP system for inbound GL postings -- message Type ACC_GL_POSTING process code BAPI.  I successfully tested all the configuration pieces using WE19. 
    So how do I trigger the inbound process from my external non-SAP system.  I would prefer not create a flat file that is passed by calling EDI_DATA_INCOMING.  I also do not want to use BAPI_ACC_GL_POSTING_POST.  So what RFC enable FM can I call to pass data and trigger the IDOC generation and processing?  Is there anything standard?

    I will use the standard RFC enabled function module IDOC_INBOUND_SYNCHRONOUS.  No custom abap development will be needed.
    Message was edited by:
            David F

  • BAPI Function Get partner profiles of message type

    Hi Gurus!
    Does anyone know any function module or bapi to retrieve the partner profiles / logical system of a message type?
    For example, if message type ZMATMAS is in two different logical systems, I would need to retrieve both those logical system.
    Thanks!
    Adi

    I have played around a bit, and found out that the table where this info is stored is EDP13 - therefore this solves my problem...
    Nevertheless, if anyone knows a good function module/ BAPI please let me know!
    Thanks Gurus!

  • ALE with BAPI; No recipient found for message type

    We have to send sales activities from an ECC-system to CRM and tried to do this with message type SFADPSA and Idoc SFADPSA01.
    When adding this message type to the distribution model (transaction BD64) we got the SAP-message to use a BAPI instead:  IF1037SR with method RECEIVEPARTNERSALESACTIVITY. So we did.
    To trigger the Idoc, we customized an output type, with transmission medium ALE, program RSNASTED and processing ALE_PROCESSING.
    When processing the output type we get an error B1 129: "No recipient found for message type SFADPSA in the ALE model".
    Analysing the error I found out following: during processing (RSNASTED, ALE_PROCESSING) function module MMODEL_INT_VALID_GET is called. This FM only looks into table TBD05, in which no entry for message type SFADPSA is found.
    However, also function module BMODEL_INT_VALID_GET exist, searching table TBD06.
    This table does contain an entry for the above BAPI and method and would not lead to an error message.
    Obviously this last FM should be called, but this never happened...
    Has anyone a clue?
    Do we use the correct processing code?
    Another message type to use could be SFADSACTIVITY, but this message type has no Idoc type assigned.

    Hello Wolf,
    This error message come while determing the distribution channel.
    This error come from one of below includes. Can you please put a break point and swich update debugging on and check whether the program is populating reuqired parameters to determine the distribution model. by doing this you can understand what is going wrong....
    LBDMOU17
    PCHEAF01
    PCITEF01
    RBDSECOP
    RBDSEGLM
    if you are not able to check this let us know..
    Regards
    Naresh

  • IDOC message type or bapi to create CRM Product hierarchy

    hi all,
    I tried to tranfer the Product hierarchy to CRM using LSMW, it could not transftered by batch input and I could not find any IDOC message type or bapi to create Product hierarchy. it seemed that I could not using LSMW?
    i also found that many BAPIs in CRM were not related with ALE message.so we can not use LSMW using IDOC or BAPI to transfer data?  i will very appreciate anyone who can tell me to solve such problem, especially tranfer data to CRM. thanks so much!

    hi Ramgopal,
    u can check the  bapi-<b>BUS1112</b> for cost center, and from the methods what ever u want u can take based upon requirement
    if u find it useful plz mark the points.
    <b>check the IDOC method with message type COSMAS and basic type COSMAS1</b>
    it should workout now
    Regards,
    Naveen
    Message was edited by: NAVEENKUMAR GUDURI

  • Error Message type ARTMAS belongs to BAPI in BD64?

    Hi,
    when i want to send ARTICLES using ARTMAS Message Type in BD64 ( Customer Distribution Model ) it shows an error message like below
      " Message type ARTMAS belongs to BAPI
        RetailMaterial.Clone: Use the BAPI in the model "
    but i want use ARTMAS Message Type in BD64.
    Please can anyone tell me how solve this issue.

    I found the sloution.
    First, for our distribution model we add message type still is "MATMAS", and then we should add BAPI as fllow:
    Obj. name/interface:  BUS1001001
    Method: Clone
    We can find these information from table TBDBE.
    Try BD10, it can work.
    I hope it can help other people.

  • RFC to RFC - Error in the target RFC - Message type I

    Dear all,
    I am making a message using from RFC(ECC 6.0) to RFC(ECC 5.0).
    It happens an error(System_Failure) because in the target RFC(source code), there is a message type I. I can't take off the message, so how can I create my message without error?
    Best Regards,
    Fernando

    hi,
    are you using a BAPI with direct commit fomr RFC adapter?
    read info about parameter:
    <b>Commit Control for Individual BAPI Calls</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm
    "I" should not affect the commit
    if you have the commit inside then don't raise exception
    or raise it inside another Function module that will serve as a wrapper
    to the one you use) 
    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>

  • How to send IDOC with extended message type MATMAS

    Hi Experts,
    I am looking for a solution to send open PR & open PO related data for diffrent materials through as IDCO in XML file.
    Scenario is i have to show a report in a 3rd party system for open PR & open PR that too will come after selection some materials. That means select a materials & it will show all the open PO & related data in a report.
    The rough idea for the solution i got is I can save the data in XML file in the system. For this i have to send IDOC. but the problem is there is no message type for PR. IF i am not wrong i can extend the MATMAS05 for a segment that will have PR related info.
    Now what to do with that how to send the IDOC do i need to create another report to send IDOC or i can send the extended one through BD10. I tried it but it shows error message "0 communication idoc sent" so I dont no y such error is coming i think i am not filling the extended idoc. But again my QUestion is how to do that.
    Can i use BAPI also for such work, if then how it can be helpful.
    If anyone have any other solution Please help me out of this.
    Regards,
    Nik

    Hi Mahesh,
    Thanks for your reply.
    My requirement is bit different. i have to send Open PR data for diffrent materials. In a 3rd party application user will search for few materials which will generate a report that will show the PR related data for those material.
    That means for few selected materials there will be few PR's which may be open, i have to show those in my report.
    Eg: material A, B. are in PR 00001 & material B, C in PR 00002.
    After selecting materials A to C report will show
    Material                 PR No                   Item No                Quantity
    A                           00001                    10                             1
    B                           00001                     20                            3
    B                           00002                     10                            3
    C                           00002                      10                           1
    Same thing i have to do for open PO & open Sales order also.
    Can u please help me to provide the solution how can i proceed for it. U have given the Message type & a bapi how it will help in my issue?
    I got a suggesion from someone that extend message type matmas for PR, PO, SD related data & send the idoc. but i am confused how to pass that much data ina single IDOC.
    Regards,
    Nik

  • Idoc types and message types

    Hi ,
    Anyone can send what are all the std idoc types and message types are there in SAP?
    Coz i dnt have SAP.
    Please let me know

    The IDoc type indicates the SAP format that is to be used to interpret the data of a business transaction.
    An IDoc type consists of the following components:
    ·       a control record
    This is identical for each IDoc type.
    ·       several data records
    One data record consists of a fixed key part and a variable data part. The data part is interpreted using segments, which differ depending on the IDoc type selected.
    ·       several status records
    These are identical for each IDoc type and describe the statuses an IDoc has already passed through or the status an IDoc has attained.
    You find various IDOC / Message types in SAP -
    http://www.erpgenie.com/sapedi/message_types_masterdata.htm
    IDoc Types - Message Types -Accounting Business Processes
    IDoc Types - Message Types - HR Business Processes
    IDoc Types - Message Types - Logistics Business Processes
    Eg.
    General       Message types / IDoc types / BAPI
    Vendor        CREMAS / CREMAS02
    Customer      DEBMAS / DEBMAS03
    Accounting   Message types / IDoc types / BAPI
    G/L account   GLMAST / GLMAST01
    Cost center     COSMAS / COSMAS01
    Cost element  COELEM / COELEM01

  • Idoc/message type related to su01 tcode fields?

    hi experts,
    when i create a user in su01,an idoc should get triggered.
    are there any standard idoc / message type having fields related to this.
    thanks,
    charu
    Edited by: charudevrani on Jan 11, 2012 7:38 AM

    Hi Charu,
    You can use one of following IDoc types, depending on the action you want to perform on the user master record:
    USERCHANGE     Change user
    USERCLONE     Create User with Template in Another System
    USERCREATE     BAPI to Create a User
    Regards,
    Marcin

  • [HR] About message type HRSM_D

    Hi to all
    As a migration issue I was asked to migrate personnel absence records (infotype 2001) data from an SAP 4.6 legacy system to an ECC5 system. Actually, I have no PT knowledge but I want to use HRSM_D message type to transfer data through LSMW. Does anyone know any FM or report filling this IDoc structure like "RH_OBJECT_IDOCDATA_CREATE" does for HRMD_A?
    I would welcome any other ideas for migrating 2001 data through LSMW as well.
    Thanks

    Hi Suresh
    Thank you for the answer. The BAPI you've mentioned belongs to BO 'ABSENCE' and it has no ALE message type in standard. I do not want to genarate, either. Besides, it is obsolete as of Release 4.6A. However, it may be replaced by BO BUS7007.
    Actually, what I want is an outbound FM handling the HRSM_D message type.
    There are more than one legacy system and this way is prefered by the client.
    Thanks

  • Partner profile for message type.

    Dear All,
    I am using bapi in lsmw for data conversion.
    I am getting error in 13th step of lsmw, ie, when I execute Start Idoc Generation, it's saying,
    Create a partner profile for message type - MATERIALVALUATION_PRICECHANGE.
    I already created a partner profile and assigned in the initial screen of lsmw.
    Kindly let me know where I am missing.
    Thanks in Advance,
    Ranjan

    See if any of the follwing helps:
    1. The port used in the partner profile should be a file port, not tRFC.
    2. The checkbox 'Unicode Format' for the port LSMW in WE21 should remain unchecked.

  • Message type is not triggered in SAP when PO copied from eSHOP

    Hi,
    We are creating PO in eShop and sending to SAP.
    POs are correctly getting copied from eShop to SAP.No issues.
    We have set condition record for Message type to trigger in SAP for those POs as EDI Medium.
    No message is getting triggering in SAP.
    Whether it is standard one ? or any further enhancement required ? If so please suggest the BAPI.
    Thanks

    Hi Dhina
    What is the application eSHOP?.
    for example
    In SAP SRM - Technical scenario - Extended Classic.
    Purchase orders were created in SRM -EBP and replica of Purchase Orders were replicated to ECC system. In the above scenario messages are created in SRM not ECC.
    The PO messages are out puted to vendor from SRM itself.
    So please clarify what is meant by eShop. so others can help you further  ..
    Muthu

  • IDOC Message Type LOIPRO (Production order)

    Hi All,
             How I can setup Process code for inbound Production order (Message Type LOIPRO)
    I receive idoc file from external SAP system I try to use "BAPP" , "ABI_AIDN_IN" , "APLI" it not work for
    this message type. Idoc error message "Function module not allowed: APPL_IDOC_INPUTI"
    Regards,

    It should go with BAPI..have you tried that?

Maybe you are looking for

  • Changed pinned Firefox icon, but it returns to default when opening. Help?

    I have two different profiles of Firefox pinned to my Win7 taskbar. I changed the icon on one of them to distinguish between them, but the change is only visible when FF is closed. Once I open the Firefox with the changed icon, it switches back to th

  • Opening an .ics file attachment on the treo

    When I get a Meeting invite email with a .ics attachment, I can open it but both the Calendar and Task come up as NONE so I can't add it to the calendar. .vCS files open and add just fine. Post relates to: Treo 650 (Cingular)

  • Chapter Markers with Media Encoder.

    Is it possible to export media with the media encoder and include chapter markers that will be picked up by encore? In the past few PP versions I have been using export movie and it imported into Encore with all chapter markers named as I named them

  • ATO model with both "Make" and "Buy" options

    Hello, Is it possible that an ATO Model has both "Make" and "Buy" type of options in it. If yes, how does the "Buy" item get fulfilled on the sales order. The buy item needs to ship together with the assembly, but as a separate part. Or should such a

  • PS6 Update

    Hello. Updating PS CS6 doesn´t work. Wath´s the problem? Thank you!