What bapi return structure consists

Hi experts,
    can anybody clarify my doubt regarding bapi's used for data transfer.
when we r using bapi for data transfer how error transactions will be handled.
what exactly return structure consists. can we get error transactions log in the return structure.
plz reply me.
Regards
Trinadh.

Moderator message - Please search before asking
Please do not spam the forum with this sort of question
post locked

Similar Messages

  • How to create a log file for bapi return structure

    Hi ppl,
         I am using BAPI_PO_CHANGE to mark the delivery of POs as complete after many validations through a classic report now my concern is i have been asked to create a log file which details the errors in the POs which is in the bapi return structure.
       I don't know how to do can any one help at the earliest.
    Regards,
    Bharathy.

    hi
    pls see this thread...
    it may help you...
    /people/kamalkumar.ramakrishnan/blog/2007/01/10/a-primer-on-using-and-creating-sap-application-log
    thx
    pavan
    *pls mark for helpful answers

  • Multiline BAPI return structure  and RFC Adapter

    Since SP14 RFC Adapter check return structure of RFC function.
    But how it works if BAPI returns multiline BAPIRET2?
    Will adapter loop all elements and perfom commit only if <b>all</b> alements don't have errors.

    I'am about this:
    <i>As of SP 14 support for commit handling for single BAPI calls was added to the RfcAdapter receiver channel. If activated in the receiver channel setting, the received XI message will be executed as synchronous RFC (sRFC) in the receiving system. This is also true for asynchronous (QoS EO) XI messages to receive and analyze the execution result by the RfcAdapter.
                   The received response is parsed by the RfcAdapter to get the BAPI return parameter with name "RETURN". This return parameter can be of BAPIRETURN, BAPIRET1 or BAPIRET2 types. The "RETURN" parameter is checked for the response status (field TYPE) which can take following values:
                  1. 'S' : Success
                  2. 'I' : Information
                  3. 'W' : Warning
                  4. ''  : Empty String
                  5. 'A' : Abort
                  6. 'E' : Error
                   If the response contains one amongst the first four response status then it implies that the BAPI was successful. If the response contains one amongst the last two response then the BAPI failed. If the BAPI "RETURN" parameter is of not of type ABAP structure rather of type ABAP table, a empty table is also considered as successful execution result.
                   In case of a successful execution the BAPI function module "BAPI_TRANSACTION_COMMIT" is called within the same context to trigger the commit of the BAPI. In case of a failure the BAPI function module "BAPI_TRANSACTION_ROLLBACK" is executed by RFC Adapter which rolls back the changes.</i>

  • URGENT--Converting the BAPI return structure to XML

    Hi,
    I need to convert the return structure(export parameter) from a BAPI call to XML but not able to make out how to do that.
    Before this I was required to convert the BAPI return table(export table) to XML and I did that by first converting it to the AdoDataTable, added it to a dataset and then used the builtin function to return the dataset in XML format. But here I am not able to make out how can I do the same with the Export structure.
    Any help would be appreciated.
    You may also mail on [email protected]
    regards,
    Ankit Bhansali

    If the XML schema that you find as Xml attributes on the fields of the structure is good for you, you can just use the XML serializer to serialize it out:
    XmlSerializer ser = new XmlSerializer(typeof(BRFCKNA1));
    ser.Serialize(...);

  • BAPI return

    Hi all,
    I am working on an SOAP to RFC scenario:
    I am able to execute the scenario. I am testing it using SOAP test tool.But i am facing a problem. when we give valid inputs to the BAPi, the BAPI return structure returns correct values, which is mapped to the response msg and the response is also fine, in the testing tool.
    But when i give non-valid values to the BAPI, the BAPI returns an error msg like "partner does not exist" and for some reason i am not able to see this msg in my response msg, instead i get an "XI Exception error in my
    testing tool display. How can i achieve, the BAPI return value to be displayed in my response msg for invalid values?
    Thanks in advance

    Hi,
    I had also faced the same problem in one of my scenarios. What you can do is, you can check the length of the parameter returned by BAPI. If it is zero, it means that non valid value has been passed to BAPI. In this case you have to map some constant to the target field during mapping.
    If the length is not zero, you can map it as it is.
    For finding the length of the field, you can use the standard text function: length. Hope this helps.
    Regards,
    Divija.

  • How to add error message to return structure of calling BAPI from a BADI

    i have a bapi where a badi is triggered.this badi method has just importing and changing parameters.is there any way with which i can add error message to the return structure of calling bapi.please reply at the earliest.High points can be expected.

    thanks got it

  • Error in BAPI RETURN for Service Contract

    Hi,
      I get an error in the BAPI Return for the Uploading the Service Contracts by LSMW. The Error Message is E BS No status object is available for &.Also want to know can we upload multiple line of header text for a Contract by this BAPI. If so then how would I do this , as the BAPI structure BAPISDTEXT has textline upto 132 characters. And I am take only one file in LSMW where the header & details come alongwith text. Or could also tell me the file structure of for the data upload. The legacy system sends multiple text in the header for a Contract.For Eg.
    Header1 Detail1 Text1
    HEader1 Detail2 Text2
    Header1 Detail3 Text3
    So I would need this text1TEXT2text3 in the Header Text of the Contracts. Or do I need the change the file structure. Many thanks for your time and help.

    Thanks Nablan, I could do that for multiple header coming in file. But I have a question for you on BAdI ALM_ME_006_GOODSMVT. I have implemented this BAdI , and this BAdI is called by a function Module ALM_MEREP_006_CREATE. When I test this FM giving the Material , Orderid and Movement type entries, this BAdI is triggered when giving a breakpoint. I've given this code for changing the movement type to 961. Cause the stanadrd scenario does not maintain Movement type 961 in Mobile Asset Management. The Movement type 961 for unplanned Materials comes to SAP and changes to 261 as maiantained by TCOKO table. To bypass this & retain the movement type 961 in SAP I'm using this BAdI. Currently this is what I'm doing and am stuck in the method interface how do I call the method.
    method IF_EX_ALM_ME_006_GOODSMVT~CREATE .
    break-point.
    *DATA : i_ce_goodsmovement TYPE REFERENCE
              ALM_ME_CUSTOMER_ENHANCEMENT.
    DATA : lr_badi_goods_movement TYPE REF TO if_ex_alm_me_006_goodsmvt.
    DATA : ls_user_data TYPE ALM_ME_USER_DATA-USERID.
    *DATA : goods_movement TYPE ALM_ME_MATERIAL_MOVEMENT.
    CALL METHOD lr_badi_goods_movement->create
      EXPORTING
           ce_goodsmovement = ce_goodsmovement
      IMPORTING
           user_data        = ls_user_data
           custom_user_data = ls_ce_user_data
           goods_movement   = goods_movement
      changing
           return           = return[].
    CALL FUNCTION 'ALM_ME_COMMIT_OR_ROLLBACK'
           TABLES
                return = return.
    endmethod.
    Please help me to get the data in this method. How do I call this.

  • Not able to clear return structure in BAPI_ALM_ORDER_MAINTAIN

    Hi,
    I'm having a problem with the return structure in BAPI_ALM_ORDER_MAINTAIN where it's keeping all the records and I can't seem to clear the structure. I've tried sending in a blank return table from webdynpro, but the bapi still remembers any messages from the same session and returns them back. Does anyone know how to clear this structure so that it only returns the messages for the current call? Thanks.
    Joanna

    Joanna,
    When you us BAPI its normally unidirectional as far as return is concerned. You have to ge the return values from R/3. When you map the BAPI to context in the component controller the data from the BAPI is transferred to the controller context on the invalidate method of the node. If you want the controller context node to consist some other value then you can write into that node manually and the value will remain there till you invalidate the node. Remember if you want new values in Return then you need to run the BAPI again.
    I hope this answers your question.
    Regards,
    Anand

  • Function or bapi returning customers or vendors with open items  per plant

    Dear experts.
    may you please tell me which function or bapi can i use that will return all customers or vendors with open items per given plant. i have tried to use BAPI_AR_ACC_GETOPENITEMS and BAPI_AP_ACC_GETOPENITEMS but they return open items for a given customer and vendor respectively per given company code.

    ok but those 2 BAPIs return open items after providing the customer or vendor. what i need is a BAPI which returns a list of customers or vendors with open items

  • LSMW what BAPI to use to load Business Partner?

    Could anyone tell me what BAPI to use for business partner? i think its part of CRM..... I'll work out what a BAPI is later! But i gather batch recording is not the go?
    I don't know anything about SAP, BAPIs and Idocs and Batch recordings!!! I have a number of flat files, I want to import please show be some direction, would be appreciated.
    mike

    Thanks,
    Yes we have used the recording tool and actually loaded one file in the SAP system, as a test, however we have fields in "tabs" ie one customer has many phone numbers - a multi structure record. I believe the recording tool is no good for such cases!
    I'm not sure whether I have need to have one input file or whether I need to have two files one for cutomer and another for phone details.
    The 2nd question is my original question what BAPI or other method can I use for customer (business partner) details, as the recording method is no good for data with 1 to many relationships. HELP!

  • Convert BAPI Return to Faults?

    Hi,
    For the development of Web Services, the use of Fault messages is preferred to report errors.  Proxies (Java and ABAP) can return Fault messages, that in turn can be returned through the Web Services.
    However, BAPI's are not able to return Fault messages.  BAPI's retun a 'Return' structure containing items.  <b>Is there a simple way (no BPM please) to convert these Return items of type 'E' into Fault messages?</b>
    This would lead to nice web services reporting errors back as Fault messages.
    Kind regards, Guy Crets

    hi,
    AS of SP13 this is not possoble in XI3.0 There is no way RFC Adapter automatically convets errors to fault messages.
    In fact Xi throws a hard error(Server Exceprtion) at the caller.
    Naveen

  • Is there any BAPI returning the affected organisational units to users?

    Dear all,
    I would like to ask a question about organizational units. Whenever I want to affect a user to a given unit I
    use PPOME transaction. If I want to do this in ABAP level I use the function module RH_RELATION_WRITE.
    I would like to know, is there any BAPI returning the affected organizational unit to a given user?
    Thanks in advance,
    Kind Regards,
    Dariyoosh

    Alberto Sesma wrote:
    You can use Function Module RH_STRUC_GET
    >
    >
    > CALL FUNCTION 'RH_STRUC_GET'
    >   EXPORTING
    >      ACT_OTYPE = 'US'
    >      ACT_OBJID = user_name
    >      ACT_WEGID = 'US_CP_O'
    >   TABLES
    >        RESULT_TAB = LT_RESULT_TAB.
    >
    >
    > You will get the related org units in LT_RESULT_TAB. There are other two table parameters in that function module that you may find useful.
    >
    > If the function does not return any valid data you may try with other values for WEGID. You will find all the possible evaluation paths in transaction OOAW.
    >
    > Kind regards
    Dear Alberto,
    Thank you very much for your answer. I didn't know this FM and it solved my problem.
    For those who may be intered here is exactly I proceed. Suppose that in the table HRP1000 you have an
    structure (type S) with ObjID = 50000342 and you wish to have the SapUserID of the affected persons.
    DATA:
          affected_users TYPE STANDARD TABLE OF swhactor,
          user LIKE LINE OF affected_users.
    START-OF-SELECTION.
      CALL FUNCTION 'RH_STRUC_GET'
        EXPORTING
          act_otype              = 'S'
          act_objid              = '50000342'
          act_wegid              = 'A008'
          act_plvar              = '01'
          act_begda              = sy-datum
          act_endda              = sy-datum
          act_tdepth             = 0
       TABLES
         result_tab             = affected_users
    EXCEPTIONS
       NO_PLVAR_FOUND         = 1
       NO_ENTRY_FOUND         = 2
       OTHERS                 = 3
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT affected_users INTO user.
        WRITE: / user-objid.
      ENDLOOP.
    Also in transaction OOAW we can have all possible values for the third argument of the module function (act_wegid).
    For those who are interested, here are a few among many possible values which seem to be intesting for my
    problem.
    DFPS_DG1----
    Organizational Unit of User
    DFPS_DG3----
    All Org. Units Above a User
    ORGAS----
    Closest Organizational Unit and structure
    ORGASS----
    Closest Organizational Unit and structure     
    PPLEORG     -
    Organizational unit of an employee or position
    SAP_ORGP----
    Organizational assignments of a user/person
    SAP_USOG----
    Organizational Assignments of a User
    SAP_US_S----
    Positions and Personnel Number of a User
    US_S_S_C----
    All positions and jobs of a user
    WFM_ORGU----
    Organizational Assignment of User
    WF_ORGUN----
    Organizational unit of a user/person (module id Ben./Pers.)
    For example, let's say we have a userid named MYUSER01 and we would like to find all structures to which the user
    is affected. Here is how I proceed.
    DATA:
          itab_user_structures TYPE STANDARD TABLE OF swhactor,
          row_user_structures LIKE LINE OF itab_user_structures.
    START-OF-SELECTION.
    CALL FUNCTION 'RH_STRUC_GET'
        EXPORTING
          act_otype              = 'US'
          act_objid              = 'MYUSER01'
          act_wegid              = 'US_S_S_C'
          act_plvar              = '01'
          act_begda              = sy-datum
          act_endda              = sy-datum
          act_tdepth             = 0
       TABLES
         result_tab             = itab_user_structures
    EXCEPTIONS
       NO_PLVAR_FOUND         = 1
       NO_ENTRY_FOUND         = 2
       OTHERS                 = 3
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT itab_user_structures INTO row_user_structures.
        WRITE: / row_user_structures-objid.
      ENDLOOP.
    Thank you very much for your help.
    Kind Regards,
    Dariyoosh

  • Data package is missing in the return structure

    Hi BW Folks,
    I have an issue with ODS activation.While activating the data in ODS object am getting following error message
    Activation of data records from ODS object XXXX terminated.
    data package XXXXX contains errors with status 9 in table 'XX' but this data package is missing in the return structure.
    In detail: The data package is entered in the return structure as incorrect.
    Can anyone provide me the solution. Thanks in advance. Have a nice time!
    Regards,
    Nani.

    HI
    Check these links
    Re: Status 9 error when activating an ODS in a Process Chain
    ODS activation error - status 9
    Error while data loading-terminated with Status 9
    Error while data loading-terminated with Status 9
    hope it helps
    regards
    CK
    Assing points if usefull

  • What is use of ejbPostCreate(), what it returns, where exactly can it be in

    what is use of ejbPostCreate(), what it returns, where exactly can it be invoked?

    Why don't you try reading or googling or something, rather than asking every question that pops into your head?

  • Regarding BAPI Return Parameter.

    Hi All,
              I want to create Bapi Return Message with Variable values like : ' Sales Order 1876738267 is not created, please try again.' and want to create a log of this after BAPI calling in Calling FM. How can I do this. Please guide me.
    Thanks in Advance.

    Hi,
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        ORDER_HEADER_IN           = sd_header
      WITHOUT_COMMIT            = ' '
      CONVERT_PARVW_AUART       = ' '
    IMPORTING
       SALESDOCUMENT             = sd_doc_num
      SOLD_TO_PARTY             =
      SHIP_TO_PARTY             =
      BILLING_PARTY             =
       RETURN                    = return_it
      TABLES
        ORDER_ITEMS_IN            = itemin_it
        ORDER_PARTNERS            = partnr_it
      ORDER_ITEMS_OUT           =
      ORDER_CFGS_REF            =
      ORDER_CFGS_INST           =
      ORDER_CFGS_PART_OF        =
      ORDER_CFGS_VALUE          =
      ORDER_CCARD               =
      ORDER_CFGS_BLOB           =
      ORDER_SCHEDULE_EX         =
    WRITE : / 'sy-subrc = ' , SY-SUBRC.
    IF NOT SD_DOC_Num IS INITIAL.
    WRITE : / 'Sales Order ' , SD_DOC_Num, 'Created'.
    ELSE.
    WRITE : / 'incorrect'.
    WRITE : / RETURN_it-TYPE , RETURN_it-MESSAGE.
    WRITE : / RETURN_it-LOG_NO, RETURN_it-LOG_MSG_NO,
              RETURN_it-MESSAGE_V1.
    ENDIF.
    Hope this helps you.
    Thanks,
    Ruthra

Maybe you are looking for

  • How to connect my phone with the cloud

    How to connect my iphone to the cloud so I can download Itunes

  • IChat gone missing

    The iChat application is no longer in my Applications folder (along with DVD Player). Is there a location from Apple that I can download these two apps, to replace the missing two? Also, in the top menu bar, I seem to remember that I could choose opt

  • Issue with default install of SOA suite under Windows

    Hello, I installed SOA Suite without error, using the defaults of the Basic Installation. When I start the SOA Suite, it starts up without error, but reports that ASG is Status=Down When I try to create an Integration Server in JDeveloper, and test i

  • Oracle Applications 11i Release 4 CD Pack for MS Windows

    I am about to buy Oracle Applications 11i Release 4 CD Pack for MS Windows 2000 for my personal training use, What I want to know is the requirements; - CPU PENTIUM III - size of hard drive gb - certified against 9i or 8i(8.1.7) - what is the differe

  • Adding layers with opacity masks

    I wanna use a opacity mask for multiple layers and different designes, but everytime I make a mask with the transparency panel it locks my layers to one layer and does not let me add any new ones or go back to my other stroke designes on other layers