Error Returned From Bapi 'BAPI_INSPECTIONPLAN_CREATE'

hi
I am using 'BAPI_INSPECTIONPLAN_CREATE' for creating inspection plan in QM.the bapi is returning error"Inspection characteristic cannot be uniquely assigned to one operation".I am using one operation and one characteristic.I am also providing operation id in both the structures for operation and characterisitcs.Can anyone suggest what the problem is?
Edited by: abapuser on Oct 10, 2009 5:12 AM

Hi
There is Activity Field in BAPI1012_OPR_C  sturcture...
Similay there is also activity field  BAPI1012_CHA_C sturcture.....
assign same Activity No in Both sturcture...
Check this Link  https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Program%20to%20upload%20QM%20Inspection%20Plan%20Using%20BAPI
Regards
ABG...

Similar Messages

  • Error in value returned from BAPI

    Hi,
             I have created a RFC model for the BAPI. This has many nodes as context. In my scenario, I have like this.
    <b>Node A
      Node B ( Model node)
      Var C  (Model variable)</b>
    When I execute the BAPI, I get size for Node A as 1 but node B as zero. But this is not the case if I execute the BAPI directly from SAP GUI. I get output in both nodes with same inputs. I couldn't trace the problem why I don't get any value in other node. It returns null pointer exception. Kindly help me out.
    Regards,
    Harini S

    Hi,
       This is the snippet.     
    String stLow = wdContext.nodeDl_Head().currentDl_HeadElement().getKunnr();
    wdContext.nodeOutputCusContact().invalidate();
    wdContext.nodeContactaddressdata().invalidate();
    // Execute BAPI in getCustomerContactList method
    wdThis.wdGetCO_GenerateappController().getCustomerContactList(stLow);
    wdComponentAPI.getMessageManager().reportSuccess("Cont:"+ wdContext.nodeContactaddressdata().size());
    wdComponentAPI.getMessageManager().reportSuccess("Out:"+ wdContext.nodeOutputCusContact().size());
    The BAPI gets executed successfully since we r getting values for other nodes in the same main node. Only one particular node gives this problem.
    wdContext.nodeContactaddressdata().size() returns 0. Any get on that node causes null pointer exception. Please guide me.
    Regards,
    Harini S

  • Error return from xmlparserBuffer

    Hi,
    I am in the process of converting the program from using IBM's
    XML C++ parser to Oracle's C++ parser. I am usnig the
    xmlparseBuffer to parse an in-memory message (with embedded
    DTD). The following error was returned:
    <1,1> LPX-00218: invalid character found
    How do we investigate the problem based on this return error ?
    Is there any other details that we (the application) need to
    know ?
    The same message was fine when using IBM's parser.
    Alex
    null

    Alex Liu (guest) wrote:
    : Hi,
    : I am in the process of converting the program from using IBM's
    : XML C++ parser to Oracle's C++ parser. I am usnig the
    : xmlparseBuffer to parse an in-memory message (with embedded
    : DTD). The following error was returned:
    : <1,1> LPX-00218: invalid character found
    : How do we investigate the problem based on this return error ?
    : Is there any other details that we (the application) need to
    : know ?
    : The same message was fine when using IBM's parser.
    : Alex
    The "<1,1>" is the line,char location of the offending
    character. If this doesn't help can you post the XML message you
    are trying to parse?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Error Return in bapi 'BAPI_CASE_CHANGE'

    Hello Im getting error
    Internal error: class CL_SCMG_CASE_API; method SAVE
    in Bapi "BAPI_CASE_CHANGE" to update the tables ?
    I have check the lock also but there is not locking in
    'SE12'
    What to do ?

    Hi Saurabh,
    Some of my colleagues had the same problem yesterday. I could find out a solution for them.
    We used to get this error as the case that we were trying to change had the status 'New' and the BAPI coding validation prevented it from changing the status from 'New' to 'Closed'. The valid paths of status change are maintained in the table SCMGSTATPROFS.
    Hope it would give you some headstart.
    Thanks, Debasish

  • Error return from JOB_SUBMIT / SUBMIT when running with another  username

    I am trying to run the program RSBDCSUB after setting up a BDC session.
    Due to our authorisations in the production environment I have to run this program under a generic user (l_ernam) that has the authorisations as most users do not.
    Here is the code I am using:
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    jobname = l_jobname
    IMPORTING
    JOBCOUNT = l_jobcount
    CHANGING
    RET = l_ret
    EXCEPTIONS
    CANT_CREATE_JOB = 1
    INVALID_JOB_DATA = 2
    JOBNAME_MISSING = 3
    OTHERS = 4
    Submit RSBDCSUB And Return
    User l_Ernam
    Via Job l_Jobname Number l_Jobcount
    with mappe = l_mappe .
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    jobcount = l_jobcount
    jobname = l_jobname
    STRTIMMED = 'X'
    EXCEPTIONS
    CANT_START_IMMEDIATE = 1
    INVALID_STARTDATE = 2
    JOBNAME_MISSING = 3
    JOB_CLOSE_FAILED = 4
    JOB_NOSTEPS = 5
    JOB_NOTEX = 6
    LOCK_FAILED = 7
    OTHERS = 8
    When I run this with a restricted user I get a return of 8 from the submit rsbdcsub - has anyone seen this before and can you offer advice on how to solve it?.
    I have also tried using JOB_SUBMIT with the following settings instead
    CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
    authcknam = l_ernam
    jobcount = l_jobcount
    jobname = l_jobname
    REPORT = l_report
    VARIANT = l_variant
    EXCEPTIONS
    BAD_PRIPARAMS = 1
    BAD_XPGFLAGS = 2
    INVALID_JOBDATA = 3
    JOBNAME_MISSING = 4
    JOB_NOTEX = 5
    JOB_SUBMIT_FAILED = 6
    LOCK_FAILED = 7
    PROGRAM_MISSING = 8
    PROG_ABAP_AND_EXTPG_SET = 9
    OTHERS = 10
    and in this case get a return of 3 (INVALID_JOBDATA) - anyone any ideas as to how to resolve this?.

    Hello Caroline,
    I do not know whether this issue is resolved at your end. I faced a similar problem and found that User Type for the generic user(l_Ernam) was the cause.
    We had initially defined User Type for the generic user as a 'Communication' and it was giving return code 8 after SUBMIT.
    We later changed the User Type to 'System' and it worked as intended. Job was created under the name of the user who executed the main program and the steps added using the generic user(l_Ernam).
    Please note that the user who is running the main program will need authorization to add job steps using the generic user.
    With Kind Regards,
    Jatin.

  • Error return from Host Command

    I use procedure below to run Win commands from stored procedure, Had found this last year by searching in this forum and it works fine.
    However this procedure lacks facility to return if command was succesful on OS.
    All I want is for Oracle to be able to pick up value of windows variable: %errorlevel% after command has been executed. If necessary I will include " echo %errorlevel% "in a batch file.
    I am patching up somehow but it is too slow. I am currently saving %errorlevel% in a txt file and then using sqlldr to load value in an Oracle table. But this takes about 40 seconds to execute (time needed to open a new session each time).
    I would rather have Java procedure pick up result of batch command directly.
    James
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HOST AS
    import java.lang.*;
    import java.io.*;
    public class Host
    public static void executeCommand (String command, String etype) throws IOException
    String[] wFullCommand = {"C:\\winnt\\system32\\cmd.exe", "/y", "/c", command};
    String[] uFullCommand = {"/bin/sh", "-c", command};
    if (etype.toUpperCase().equals("W"))
    Runtime.getRuntime().exec(wFullCommand);
    else if(etype.toUpperCase().equals("U+"))
    Runtime.getRuntime().exec(uFullCommand);
    else if(etype.toUpperCase().equals("U"))
    Runtime.getRuntime().exec(command);
    CREATE OR REPLACE PROCEDURE Host_Command_Proc
    ( p_command IN VARCHAR2,
    p_etype IN VARCHAR2)
    AS
    LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String, java.lang.String)';
    /

    I use procedure below to run Win commands from stored procedure, Had found this last year by searching in this forum and it works fine.
    However this procedure lacks facility to return if command was succesful on OS.
    All I want is for Oracle to be able to pick up value of windows variable: %errorlevel% after command has been executed. If necessary I will include " echo %errorlevel% "in a batch file.
    I am patching up somehow but it is too slow. I am currently saving %errorlevel% in a txt file and then using sqlldr to load value in an Oracle table. But this takes about 40 seconds to execute (time needed to open a new session each time).
    I would rather have Java procedure pick up result of batch command directly.
    James
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HOST AS
    import java.lang.*;
    import java.io.*;
    public class Host
    public static void executeCommand (String command, String etype) throws IOException
    String[] wFullCommand = {"C:\\winnt\\system32\\cmd.exe", "/y", "/c", command};
    String[] uFullCommand = {"/bin/sh", "-c", command};
    if (etype.toUpperCase().equals("W"))
    Runtime.getRuntime().exec(wFullCommand);
    else if(etype.toUpperCase().equals("U+"))
    Runtime.getRuntime().exec(uFullCommand);
    else if(etype.toUpperCase().equals("U"))
    Runtime.getRuntime().exec(command);
    CREATE OR REPLACE PROCEDURE Host_Command_Proc
    ( p_command IN VARCHAR2,
    p_etype IN VARCHAR2)
    AS
    LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String, java.lang.String)';
    /

  • Error return from sleep

    By putting my Mac to sleep for a long time.
    He does not return and a message in several languages with a gray screen.
    reporting to restart it by pressing the power button.
    Note: Even when fully charged battery
    Can anyone tell me how to fix it?

    You are getting a Kernel Panic. I'd recommend reading the following articles about them and how to trouble shoot them. If you cannot figure it out you need to contact an AASP for repair.
    http://www.thexlab.com/faqs/kernelpanics.html
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8965.html
    http://reviews.cnet.com/8301-13727_7-10344626-263.html?tag=mfiredir
    http://www.index-site.com/kernelpanic.html
    http://support.apple.com/kb/HT1392

  • Photo upload failed. Error returned from Facebook: An unexpected error has occurred. Please try your request later

    I've been getting this error everytime I try to upload photos to the Facebook publishing service has anyone encountered this before? upload through flicker is fine though

    I am getting the same error. Did you have any luck getting this to work?

  • Strange error returned from smbtree

    when i type smbtree i get this:
    WORKGROUP
    \\ONTHEFRIDGE LinkStation HLAN 250GB
    [b]cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe \srvsvc failed with error NT_STATUS_UNSUCCESSFUL[/b]
    \\ONTHEFRIDGE\applications LinkStation Share Folder
    \\ONTHEFRIDGE\pictures LinkStation Share Folder
    \\ONTHEFRIDGE\development LinkStation Share Folder
    \\ONTHEFRIDGE\database LinkStation Share Folder
    \\ONTHEFRIDGE\share LinkStation Share Folder
    \\ONTHEFRIDGE\info LinkStation information
    \\ONTHEFRIDGE\lp Network Printer for Windows
    what does this error mean?
    when i booted up arch today i found myself unable to ping/connect to this NAS - is the error related?
    thanks.

    never mind the second issue - i forgot to comment out eth0 in rc.conf as specified in the networkmanager wiki, after i did that + rebooted i can see the NAS fine as well as mount the shares using autofs.
    still getting that error with smbtree though.

  • Suppress an error message from BAPI

    Dear all,
    One of the BAPIs we are using issues messages like type I or E during background processing.
    I want these messages suppressed. I heard this can be customized in some where.
    Does anybody know how to do it?
    Regards,
    Kazuya

    HI
    GOOD
    GO THROUGH THE FOLLOWING LINKS,I HOPE THIS WILL HELP YOU TO SOLVE YOUR PROBLEM.
    http://www.realtech.com/wDeutsch/software/application_manager/Applications/SAP/APO_DC_WP_EN.pdf
    THANKS
    MRUTYUN

  • Possible error from BAPI

    Hi all,
    Is it possible to find out all possible error codes (ls_return) returned from BAPI in case of error ??
    Thanks
    Pooja

    I know that ls_return contains the error message but I was list of errors which ls_error could return any point of time.
    e.g i want to know table which maintains all possible errors and based on error in data few error moves to the ls_return....
    I appreciate for your response and time.
    pooja

  • How ro send error message from BADI to BAPI

    i have a BADI which is triggered from a BAPI.This BADI has only importing and changing parameters.How can i send error message to BAPI.Please reply at the earliest.
    High points can be expected.

    Hi Arshi,
         Please check whether the following link is of any use to you,
    how to capture the error message from bapi
    Best Regards.
    Reward points if it is helpful.

  • Error handling in bapi

    hi all,
          how to handle errors in bapis,and also can anyone send faqs on bapis.

    Hi
    A BAPI should be able to record and classify all possible errors that may occur a function Module BAPI_MESSAGE_GETDETAIL is used to Handle the Error Messages..
    You have to create a parameter named Return for every BAPI. This parameter returns exception messages or success messages to the calling program.
    BAPIs themselves must not trigger any messages (such as MESSAGE xnnn) in the coding. In particular they must not generate terminations or display dialog boxes. Instead, all messages must be intercepted internally and reported back to the calling program in the Return parameter. Otherwise the BAPI will not be processed correctly and control may not be given back to the calling program.
    All error messages or indeed any message that may be returned by the BAPI, must be defined in message table (Tools ® ABAP Workbench ® Development ® Programming environment ® Messages) and described in the documentation for the return parameter. This also applies to the most important or most likely error messages generated by other programs that can be indirectly passed via the BAPI to the application program.
    You must not use exceptions in BAPI interfaces.
    When a termination message (message type A) is triggered, a database rollback is executed in the standard programming model, that is, all tasks performed since the last COMMIT WORK are canceled. When you program BAPIs, we recommend that you also execute a database rollback in the return parameter for termination messages. You must describe this process in the documentation for the Return parameter. For messages of type E (error), the calling program performs the error handling.
    Application developers are provided with two service BAPIs to diagnose and process error messages from BAPI calls:
    BapiService.MessageGetDetail() displays the short and long texts of BAPI error messages.
    BapiService.ApplicationLogGetDetail(), with which information in application logs can be displayed.
    Features
    The export parameter Return can be implemented as follows:
    As a structure, whereby it must be defined in the function module as an export parameter, as well as in the method in the BOR.
    As a table, whereby it must be defined in the function module as a table parameter, as well as in the method in the BOR as an export parameter.
    Before filling the Return parameter you should either initialize the structure with CLEAR or the table with REFRESH and CLEAR.
    If the return parameter is not set or is set to an initial value this means that no error has occurred.
    The Return parameter may be based on the following reference structures:
    BAPIRET2
    You must use this reference structure when developing new BAPIS.
    BAPIRET1, BAPIRETURN
    These reference structures are still partly used in old BAPIs.
    Both structures must be filled in the logon language.
    Reward if Helpfull,
    Naresh.

  • Read messages from BAPI

    Hi....
      How to read the messages from BAPI returned table.
    Regards,
    SP

    Hi,
    data: it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        POHEADER                     = HEADER
        POHEADERX                    = HEADERX
      POADDRVENDOR                 =
      TESTRUN                      =
    IMPORTING
      EXPPURCHASEORDER             =
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
    TABLES
       RETURN                       = IT_RETURN
       POITEM                       = ITEM
       POITEMX                      = ITEMX.
    *Output the messages returned from BAPI call
    LOOP AT it_return.
    WRITE:/ it_return-type, it_return-id, it_return-number,
    it_return-message.
    ENDLOOP
    thanx.
    Edited by: Dhanashri Pawar on Oct 15, 2008 12:31 PM

  • Error FI/CO interface: Balance in transaction currency from BAPI BAPI_ACC_DOCUMENT_POST

    Hi All,
    We are facing error FI/CO interface: Balance in transaction currency from BAPI BAPI_ACC_DOCUMENT_POST.
    This error we are getting only in case of passing tax data.
    Can anyone help me on this.
    Below is the code :
       *fill header
    gd_documentheader-username   =  sy-uname.
    gd_documentheader-header_txt = 'Test'.
    gd_documentheader-comp_code  = p_ccode.   "SQ
    gd_documentheader-doc_date   =  sy-datum.
    gd_documentheader-pstng_date =  sy-datum.
    gd_documentheader-doc_type   = 'KR'.
    gd_documentheader-ref_doc_no = p_xblnr. "SQ
    *gd_documentheader-bus_act = 'RMWE'.
    city = p_city.
    state = p_state.
    zipcode = p_zip.
    *get tax juridisction code
    IF NOT ( city     IS INITIAL ) AND
       NOT ( state    IS INITIAL ) AND
       NOT ( zipcode IS INITIAL ).
      SELECT SINGLE rfcdest INTO ttxd-rfcdest FROM ttxd
       WHERE kalsm = 'TAXUSX'.
      CLEAR x_com_jur.
      REFRESH t_com_jur.
      x_com_jur-city     =  city.
      x_com_jur-state    =  state.
      IF zipcode+5(4) EQ space.
        zipcode+5(4) = '0000'.
      ENDIF.
      CONCATENATE zipcode+0(5) '-' zipcode+5(4)
             INTO x_com_jur-zipcode.
      x_com_jur-country  = 'US'.
      CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'
        DESTINATION ttxd-rfcdest
        EXPORTING
          location_data    = x_com_jur
        IMPORTING
          location_err     = x_com_err
        TABLES
          location_results = t_com_jur.
      IF sy-subrc = 0.
        READ TABLE t_com_jur INTO x_com_jur INDEX 1.
        it_accountgl-taxjurcode =  x_com_jur-txjcd.
      ENDIF.
    ENDIF.
    *fill AP (line 1) - vendor related data
    SELECT SINGLE zterm FROM lfb1 INTO p_zterm WHERE lifnr = p_lifnr.
    it_accountpayable-itemno_acc = 1.
    it_accountpayable-tax_code = p_txcd.
    it_accountpayable-pmnttrms   = p_zterm. "SQ
    it_accountpayable-vendor_no  = p_lifnr. "SQ
    *it_accountpayable-item_text = 'S2P Testing in UDR1'. - SQ
    it_accountpayable-pymt_meth = p_pmet. "- SQ
    APPEND it_accountpayable.
    *fill GL (line 2)
    it_accountgl-itemno_acc      =  2.
    *item_text - sq
    IF p_asset IS NOT INITIAL.
      TABLES : anlz,
               anla.
      SELECT SINGLE * FROM anlz  WHERE anln1 = p_asset.
      SELECT SINGLE * FROM anla WHERE anln1 = p_asset.
    *concatenate '00' anla-KTOGR into it_accountgl-gl_account .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = anla-ktogr
        IMPORTING
          output = it_accountgl-gl_account.
      it_accountgl-asset_no = p_asset.
      it_accountgl-sub_number = '0000'.
      it_accountgl-cs_trans_t = '105'.
      it_accountgl-acct_type = 'A'.
    ELSE.
      it_accountgl-gl_account      = p_gl.
      it_accountgl-costcenter      = p_cc.
      it_accountgl-wbs_element     = p_posid.
    ENDIF.
    it_accountgl-comp_code       = p_ccode.
    it_accountgl-tax_code = p_txcd.  "SQ
    it_accountgl-pstng_date      =  sy-datum.
    it_accountgl-fisc_year       =  sy-datum(4).
    APPEND it_accountgl.
    CLEAR it_currencyamount.
    *fill currency ammounts for lines 1 & 2
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-itemno_acc  = 1.
    *it_currencyamount-amt_base =  -1.
    it_currencyamount-amt_doccur  = - 116. "p_totamt.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    it_currencyamount-tax_amt  = - 16.
    APPEND it_currencyamount.
    CLEAR it_currencyamount.
    it_currencyamount-itemno_acc  = 2.
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-amt_doccur  = 100.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    *it_currencyamount-amt_base =  100.
    *it_currencyamount-TAX_AMT =  -10.
    APPEND it_currencyamount.
    *tax data
    it_accounttax-itemno_acc = 3.
    it_accounttax-tax_code = p_txcd.
    it_accounttax-gl_account = '0023110000'.
    *it_accounttax-gl_account = p_gl.
    it_accounttax-TAXJURCODE = x_com_jur-txjcd.
    it_accounttax-acct_key = 'NVV'.
    it_accounttax-cond_key = 'XP2I'.
    **it_accounttax-direct_tax = 'X'.
    APPEND it_accounttax.
    CLEAR it_currencyamount.
    it_currencyamount-itemno_acc  = 3.
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-amt_doccur  = 16.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    it_currencyamount-amt_base =  100.
    it_currencyamount-TAX_AMT =  - 16  .
    APPEND it_currencyamount.
       CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = gd_documentheader
    IMPORTING
       obj_key                 = wa_obj_key
      TABLES
       accountgl               = it_accountgl
    *   ACCOUNTRECEIVABLE       =
       accountpayable          = it_accountpayable
       accounttax              = it_accounttax
        currencyamount          = it_currencyamount
    *   CRITERIA                =
    *   VALUEFIELD              =
    *   EXTENSION1              =
        return                  =  it_return
    COMMIT WORK.
    Regards,
    Priyaranjan

    Hi,
    Reason 1:
    An revenue-recognition-relevant item has several active conditions whose values cancel themselves so that a net item value of 0 results. The conditions have both the same revenue account (SAKN1) and the same clearing account (SAKN2).
    For these conditions, the system writes a line with value 0 into the temporary FI/CO interface (internal tables: CACCIT, CACCCR). If table VBREVK does not contain control lines for this line, no further processing occurs and the line remains in the temporary FI/CO interface. Then the system reads this line for the creation of the next billing item which conatins a net value and generates a posting line with value 0. As a result, there is a balance in the FI/CO interface, and the billing document cannot be transferred.
    Reason 2:
    The billing document contains at least one item with an item category for which there is a setting stipulating that the values of this item should not be transferred to the header total of the document.
    That is, in the maintenance of the item categories, this item category has the characteristic 'X' or 'Y' in 'Statistical value' field.
    Reason 3:
    Case: Billing document contains items without pricing conditions.
    Then, on release to accounting, error RW022 occurs.
    regards,
    Saju.S

Maybe you are looking for