Related to bapi

Hi every body,
       This is Srinivas. I need to create a BAPI .  i.e.  From ASP .NET  the user sends the
employee no and date . So it has to fetch the status of the employee that means , work hours, etc...
        So what I have to do
   Plz help me. I am new to BAPI.
Thanks in advance .
Regards,
Srinivas

refer this link to know how to create a BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
pass the structure to the RFC Function module & write ur logic

Similar Messages

  • Activity relation using bapi bapi_network_maintain

    hi gurus,
    i wrote a upload program to create relation between the activities using the bapi  bapi_networ_maintain .
    I used refnumber  Objecttype                method         object key    
                  000001    NetworkRelation      CREATE        FS0000600001610280
                  000000                                    save
    for i_method_project table
    object key is formed with the combination of
    wa_tab-relation_type wa_tab-net_pd wa_tab-activity_predecessor
                        wa_tab-net_sc wa_tab-activity_successor  INTO w_objkey
    here in my program  objectkey value is obtained from the bellow  values.
                                        wa_tab-relation_type value is 'FS'
                                         wa_tab-net_pd  VALUE is empty  (there is no value for this field in excel sheet)
                                         wa_tab-activity_predecessor value is  ' 000060000161'
                                          wa_tab-net_sc value is empty ((there is no value for this field in excel sheet)
                                            wa_tab-activity_successor   value is ' 0280'
    when i run the program  I am getting the bellow error ..........
    An incorrect object key was entered for object type Relationship
    kindly sugest the solution for my problem.
    thanks in advance,
    padmaja.

    Hi ,
    I think there is some error in the code written as you have mentioned that
    object key is formed with the combination of
    wa_tab-relation_type wa_tab-net_pd wa_tab-activity_predecessor
    wa_tab-net_sc wa_tab-activity_successor INTO w_objkey
    but as per the documentation found for this particular  BAPI ( bapi_network_maintain ) ,
    there should be only 1 object type , and can be a single network .
    Please look into the documentation by opening this BAPI in system and try to write the program as per the rules.
    May your problem get resolved .
    And I suggest you to post this thread to Abap Forum , and there you can get the exact solution.
    Thanks ,
    Dhruv Kumar Malhotra
    Edited by: Dhruv Kumar Malhotra on Aug 4, 2009 8:30 AM

  • Question related to BAPI Call

    Hi All,
    I am using a BAPI Call to SAP in my BLS transaction. One of the action blocks in the transaction is a SQL Query which updates a Oracle table based on the SAP returned values from the previous action block. For the most part, it works fine except once in a blue moon, the values show up as 'null' when in fact I expect some values to be returned from SAP. Is there anyone out there who has faced a similar issue? What would be a quick and easy solution to this? Thanks.
    Regards,
    V M.

    Hi Venki,
    Possible response segments for CONF_CNT (in DETAIL_RETURN):
    1) That BAPI will return "000000" for counter if the confirmation was unable to be processed for some reason, but you were able to connect to SAP.  A fairly common reason is the record being locked if you run similar confirmations too close together.  It takes time for the confirmation record to be released by SAP.
    2) It will return a number "000001 or greater if the confirmation was successful (along with a confirmation number). 
    3) The circumstances where it will return an empty field are when it is unable to connect to SAP, but you should have a conditional to check for the success flag from the BAPI.  This is standard error handling when using a BAPI.  This will also leave all fields in the response segment blank. 
    4) And there is another set of circumstances which will leave the fields blank.  This is fairly unusual, but does happen when the error handling inside the BAPI runs into a situation which it can't handle.  So the BAPI crashes and never returns any information back to MII.
    You will need to decide which of these situations are causing your null data.  But put error handling in based on the Success flag for the BAPI for SAP unavailable and for a CONF_CNT = "000000" or blank.
    Good luck,
    Mike

  • Related to bapi and badi

    as i was a fresher to bapi and badi concepts, and now i want to learn and work on these concepts. so pls any one can suggest how to follow in the way of learning and any meateril links also ....
    pls froward me for both BAPI AND BADI pdf's word docs,ppt's so as i can learn and implement.....
    than x...
    hareesh tadepali

    check this for BADI
    Regards BADI
    Regards
    Prabhu

  • Employee Related Standard Bapi's

    wat are the standard bapi's for below
    1) create employee education.
    2) create employee nominations.
    3) create employee Internal medical service.
        Its urgent plz send me bapi's names.
                                       Advance Thx.

    Hi,
    Try BAPI_PERSDATA_CREATE
    Regards

  • Problem related to BAPI BUS0015.

    Hi All,
    I have to update Company code details for the particular profit center in T-Code Ke52 , and that I have to do through LSMW. For that I used BAPI BUS015. I have used the field ASSIGN_TO_PRCTR in BAPI  so that it Comes as checked for the particular company code under Company code TAB in KE52. But it is not working. Can you please suggest what should I do get the desired result.

    Hi Rob,
    I have already updated the Profit Center Master Data. But Now the client wants that if in future the want to add a new company code or remove the old company code, they could do that. So for that I used LSMW with BaPI BUS0015. Now when I am uploading the profit center with the new Company code with the Field ASSIGN_TO_PRCTR in bapi under E1BP0015_7X marked as 'X'. It is not reflecting in KE52 under Company code Tab. Could you help, as my motive is to add new or delete existing company code for a particular profit center through LSMW using BAPI BUS0015

  • INTERVIEW RELATED  BDC, BAPI

    hI !!!!
      If interviewer asks
      1) What is the most difficult situation you faced in BDC, BAPI, Reports, Smartforms or                                            give me any good scenario how i handled it.
       2) What wer the appreciations you got . on this what shoul i say
        3) in Enhancement project how will we get Specs which software and what will be
            Project duration ?
    Thansk for answering my queried .

    hi !!
    Suppose i have a badi using it i modify salesorder no suppose ..
                 i have an definition to implement it and using its parametes i'll write the code.
    Now how shall i find the sales order field or any relevant field what has the value  to be modified.
      How would we find this relevant field no tonly in sales order any transaction
    thanks

  • BAPI for closing process orders

    Dear Gurus ,
    I use Transaction CO02 and i go to the final delivery checkbox to check it .
    Can i use a BAPI ?
    I tried the  BAPI_PROCORD_CLOSE in se37 and i got the following messages :
                                                                                    E KO                   115 Balance of ORD 39078000 is not zero                                         
    E CO                   440 Inspection lot 020000066415 for order 39078000 has not yet been completed   
    W CO                   437 Order 39078000 is partially confirmed                                       
    W CO                   438 Order 39078000 is partially delivered                                       
    Can you help me .....?

    Hi Dimath,
    These are not any error messages related to BAPIs or any technical things. I guess these error messages are raised because of incomplete data i.e., the data you have entered in the screen/BAPI is not sufficient enough to close your Order. Try to check on the BALANCE (which i think is a cost related issue) of the Order. I'm not into FI so couldn't exactly give the reason to you. But I hope this should be some help for you.
    Regards,
    Anil.

  • No Connection btw JCAPS 5.1.2 and SAP ECC 6.0 whle creatining SAP/Bapi OTD

    Hello.
    We have the following problem trying to build SAP BAPI/RFC OTD.
    1) JCAPS 5.1.2. SAP ECC 6.0. Jco version 2.1.7 (also tried 2.1.8, 2.0.12 with the same result). All steps were done according to SAP BAPI/ALE eWays user guides and readmes
    2) SAP client already installed and worked ok on the same host as the JCAPS
    3) It looks like the problem is in JCo. It seems like doesn't react when we trying to connect to SAP during creation of BAPI/RFC OTDs at design time.
    Error message: partner not reached
    ERRNO 10060
    All ports are open and no restrictions imposed on JCAPS server. There are no connection log entries on SAP router host.
    4)We tried to run sample Project which goes with eway, and the following entries in logical host log file were found:
    [#|2007-06-12T11:35:13.171+0600|WARNING|IS5.1.2|STC.eWay.SAP.BAPI.com.stc.connector.sapbapiadapter.sapbapi.SAPConnector|_ThreadID=17; ThreadName=Worker: 5;|SAPConnector.isConnect(): JCO Client is null|#]
    [#|2007-06-12T11:35:13.296+0600|INFO|IS5.1.2|STC.eWay.framework.management.com.stc.connector.management.util.Alerter|_ThreadID=17; ThreadName=Worker: 5;|sendAlert(), connection info: ConnectionInfo [ collaboration: cmBAPIOutbound_jcdFlightGetList, project: prjBAPIOutbound, component: eaSAPBAPI, deployment: dpBAPIOutbound, environment: envTest, logicalhost: LogicalHost1, integration server: IntegrationSvr1 ], monitor: ObjectReference [ name: SeeBeyond:GUID={70010000-D247521E130100-AC14015A-01},Name=prjBAPIOutbounddpBAPIOutbound|prjBAPIOutbound|dpBAPIOutbound|cmBAPIOutbound_jcdFlightGetList_eaSAPBAPI ], alert message: No connection established to SAP R/3 for user $$$$$$ on host $$$$$.|#]
    [#|2007-06-12T11:35:13.312+0600|WARNING|IS5.1.2|STC.eWay.SAP.BAPI.com.stc.connector.sapbapiadapter.sapbapi.SAPConnector|_ThreadID=17; ThreadName=Worker: 5;|SAPConnector.isConnect(): JCO Client is not connected.|#]
    [#|2007-06-12T11:35:34.781+0600|INFO|IS5.1.2|STC.eWay.framework.management.com.stc.connector.management.util.Alerter|_ThreadID=17; ThreadName=Worker: 5;|sendAlert(), connection info: ConnectionInfo [ collaboration: cmBAPIOutbound_jcdFlightGetList, project: prjBAPIOutbound, component: eaSAPBAPI, deployment: dpBAPIOutbound, environment: envTest, logicalhost: LogicalHost1, integration server: IntegrationSvr1 ], monitor: ObjectReference [ name: SeeBeyond:GUID={70010000-D247521E130100-AC14015A-01},Name=prjBAPIOutbounddpBAPIOutbound|prjBAPIOutbound|dpBAPIOutbound|cmBAPIOutbound_jcdFlightGetList_eaSAPBAPI ], alert message: Connection to SAP R/3 failed for user $$$$$$ on host $$$$$$.|#]
    [#|2007-06-12T11:35:34.781+0600|SEVERE|IS5.1.2|STC.eWay.SAP.BAPI.com.stc.connector.sapbapiadapter.sapbapi.SAPConnector|_ThreadID=17; ThreadName=Worker: 5;|Unable to initialize SAP R/3 Client Connection|#]
    Any help is appreciated

    Hi Yermek.
    I guess you are placed and set all jars relates to bapi/rfc.
    You need to pass atleast one parameter from jcd which will initiates the BAPI connection.
    i.e atleast from jcd you need to send a request.
    Hope it will work...
    Thanks,
    M.P.Rao.

  • Erratic behaviour while firing a BAPI

    Hi All,
    In my application, I am using a BAPI.
    I enter an account no in the text field and data corresponding to it is returned.
    The problem I am facing is that, very rarely a data for different acccount no is returned. This happens 1 in 20000 times approx.
    I have tested the BAPI in SAP R/3 number of times. It works fine there everytime.
    Is this a problem related to BAPI. Kindly help me to know why this very rare erratic behaviour occurs at front end.
    Regards,
    Nikhil

    Hi,
    Place the code which executes the BAPI and fetches data in others block of Web Dynpro component or view and call it from anywhere. This will ensure sequencing of requests.
      //@@begin others
      synchronized void testMethod()
      //@@end
    Plz remember following points:
    a) the scenario u have posted should be reproducible otherwise you can't check whether code changes of above have taken effect or not.
    Regards,
    Ganga

  • Help regarding  structure field for BAPI

    Hi all,
    I need to select print GR/GI slip and Collective slip in the initial screen of MB1A.
    I am using bapi BAPI_GOODSMVT_CREATE.Can anyone tell the corresponding fields for the above things, so that i can pass to BAPI.
    I looked at the structure related to bapi, but i could not figured it out.
    Anyhelp would be greatly appeciated.
    screen field RM07M-XNAPR -to pront gr/gi slip
                 RM07M-WVERS3-collective slip
    i need to pass X to this fields and then bapi
    Thanks

    use these fields in the header
    VER_GR_GI_SLIP
    VER_GR_GI_SLIPX
    also check this thread:
    BAPI_GOODSMVT_CREATE: printing GR/GI slip

  • BAPI in webdynpro

    Dear All,
    iam using BAPI_FLIGHT_GETLIST while creating a WD, I  have used a Service call
    while using the wizard i got method EXECUTE_BAPI_FLIGHT_GETLIST for using the BAPI
    now iam trying the same activity with BAPI_COMPANYCODE_GETLIST but i am unable to get any method for it, how can i find and use the methods that are related to BAPI s.
    Thanks and Regards
    Kumar

    hi
    step 1 Right Click Webdynpro componet
           2 create a servive call
    Select Controller 
      Select Service Type 
      Select Service 
      Adapt Context 
    all fine till here ...........
      Specify Method Name 
    Component       ZWDP_FLIGHT                     
    Controller      COMPONENTCONTROLLER             
    Method          EXECUTE_BAPI_FLIGHT_GETLIST     
    Description     Find list of flights            
    EXECUTE_BAPI_FLIGHT_GETLIST      is method for BAPI_FLIGHT_GETLIST     
    where do i get methods for other BAPIs example BAPI_COMPANYCODE_GETLIST
    here is the problem .
      Generate Controller

  • BAPI Function Module

    Hi,
    Can anybody tell me,
    like i need to get the phone number from the BAPI table. can anybody tell me in which table the phone number is available ? and can i change the standard BAPI function module?. ( i mean can i change the standard BAPI function module like including some tables in the import and export etc as per the requirement? will it work ? )
    Pls Suggest me.urgent pls suggest me. also pls send any docs related to BAPI's if anybody having .
    Thanks in advance
    KP

    Hi,
    To anablyze the issue, identify what the input parameter is? Is it the PERNR which becomes the import parameter, then you are looking for the address if it is HR related it comes from PA0002 table and that parameter goes in the export section
    In the source code write the query to extract the phone number for the employee.
    For more info: type BAPI FM in the search forum that should give you a lot of results.
    I hope this helps.
    SK

  • Problem related to transfer posting?

    Hi All,
    I want to transfer a material from one storage location to another with in same or different plant. So I need a BAPI for Warehousae Management for the same. Please help me in this .

    Please check this related link:
    bapi for transfer posting
    Re: bapi for Transfer Posting
    bapi- for mb1b(transfer posting

  • BAPI enhancements Vs BADI

    Hi All,
      Can any one explain me briefely, what is the relation between 'BAPI enhancements' and 'BADI'?
    Thanks
    naveen

    BADI is just an object-oriented version of user-exit. Instead of entering program code into some function module (as in customer-exit), you define some class which has to implement predefined methods and those methods are fired at predefined points just like an old user-exit. Some BADI can have multiple independent implementations which is much better for software deployment as several developers can implement the same BADI independently.

Maybe you are looking for