Create and Approve leave's either using BAPI or IDoc

Hello Experts,
My requirment is to create a leave from my JSP in to SAP(Employee Login), then there will be a approval process where in my manger will approve the leave from his JSP(Manager login).
Approach 1: If I use BAPI for this approach what are the BAPI's that I can use? I have found the below BAPI's out of which 1&2's documentation say " Using these APIs can create inconsistencies in time data.Instead, use the corresponding API Methods "ManageDelete," "ManageCreation," and "ManageChange" for the Business Object BUS7007"
1. BAPI_ABSENCE_APPROVE
2. BAPI_ABSENCE_CREATE
3. BAPI_PTMGRATTABS_MNGCREATION
Approach 2: If I use IDoc what are the Idoc types and process codes for Create and Approve leave's.
Please help...
Thanks in Advance,
Suma
Edited by: Suma B on Sep 16, 2008 4:16 PM

Hi,
Can you please give me the details of the workflow, I will try to get info from that to levarage.
Thanks,
Suma

Similar Messages

  • Create and Approve absence using BAPI's

    Hello Experts,
    I got to know that BAPI_EMPLOYEE_ENQUEE, BAPI_ABSENCE_CREATE & BAPI_ABSENCE_APPROVE. has to called in a sequence (test sequence) for creating and approving absence.
    But when I test them I am getting the following error: "Attendance/absence type 0148 requires minimum of 1 attendance/absence days " for absence type 0148, when I try to use 425 it says fill in all required fields.
    Please suggest,
    Thanks,
    Sandhya

    Because of no relevant replies I am closing this question.....

  • Create and Approve Absence using BAPI_ABSENCE_CREATE/APPROVE

    Hello Experts,
    Have any one ever used BAPI_ABSENCE_CREATE and BAPI_ABSENCE_APPROVE for creating and approving absence?
    Please help me with test data that can be used on to the BAPI.
    Thanks,
    Suma

    Hi Thyagu,
    I was able to create an absence using BAPI_EMPLOYEE_ENQUEUE, BAPI_ABSENCE_CREATE/REQUEST in a sequence. But not able to approve the same using BAPI_ABSENCE_APPROVE.
    Approve BAPI has the following input fields(input data that I am passing):
    1. EMPLOYEENUMBER - Emp Number
    2. SUBTYPE - 0200
    3. OBJECTID - 01 "not sure if I am using correct data here"
    4. LOCKINDICATOR - X
    5. VALIDITYBEGIN - Start date
    6. VALIDITYEND - End Date
    7. RECORDNUMBER - 000
    8. NOCOMMIT - blank
    It returns the following error " No data stored for 2001 in the selected period".
    In a critical situation please help
    Thanks in advace,
    Suma
    Edited by: Suma B on Oct 14, 2008 11:04 AM

  • How to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM (ABAP Programming)

    Hi All,
    I have to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM. Either a table, or any Function module, Method, please let me know ASAP. Same i can use in my Program.
    Thank you Very much.
    Regards,
    Ramesh J.

    Hi,
    Refer the below wiki link it may help you.
    Product catlog configuration for ECC - CRM - SCN Wiki

  • How to create and edit a .ini file using java

    Hi All...
    Pls help me in creating and editing an .ini file using java...
    thanks in advance
    Regards,
    sathya

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • Is it possible to prevent a user from creating and approving a JV

    Hi,
    Is it possible to prevent a user from creating and approving a JV.  We have a rule that one user cannot do both.  What happens is user#1 creates the JV, then some other user#9 approves the JV.  Both user#1 and user#9 need to be able to create a JV and approve someone else's JV.
    The transactions in question are...
    F-02  General Posting - enter Journal Voucher (create & post)
    F-65  Enter General Document - Parking (create)
    FBV0  Post or Delete a Parked Document (approval)
    Please let me know the details.
    Thanks in advance,
    regrads,
    Chaks

    Hi,
    Requisition is submitted.....it means Requisition is saved or it means Requisition is Released..?
    Regards,
    manish

  • Create and approve batch record first. message: EBR015

    HI All,
                         when i am doing UD for Early inspection lot (04 inspection type) i getting the error message "create and approve batch record first. message: EBR015"
    PLEASE HELP ME,
    Regards,
    sbabu

    PLease refer:
    Short Text
    Create and approve batch record first
    Diagnosis
    You can only carry out the following functions for the batch you have selected when an approved batch record exists (see material master record, Work scheduling view):
    Making a usage decision for an inspection lot of origin Goods receipt from production
    Changing the batch status from Restricted to Unrestricted
    However, no batch record has been created for the batch you have selected. Therefore, the system does not carry out the function.
    Procedure
    Create and approve the batch record.
    For more information, see the SAP Library, section Basis Services / Communication Interfaces -> SAP ArchiveLink -> SAP ArchiveLink - Scenarios in Applications -> Storage Scenarios PP -> Optical Archiving of Batch Records (PP-PI).

  • How create a purchase order without imputation using bapi: BAPI_PO_CREATE1

    Hello Forum
    I have an request for purchase order with imputation K (cost center, EBAN-KNTTP). During the liberation of the request for purchase order, and using the Bapi: BAPI_PO_CREATE1, I want to create a Purchase Order without imputation (imputation empty or charge empty).
    The system displays the following error: The request for purchase order, item (position) 10, is attributed to another order...
    I imagine that is because the request for purchase order has imputation (charged) K and the purchase order will have no type of imputation (imputation empty).
    However, manually, Yes, I can create the purchase order. That is, I first release, the request for purchase order. Then I create the order of purchase using ME21 and with reference to request for purchase order, and when SAP returns the items of the request for purchase order, I manually remove the imputation K, and these items to become the purchase order.
    Please support me want to know how to resolve this case, why can not I create a purchase order without imputation to from the request for purchase order with imputation K, using Bapi
    Thank you.
    Greetings,

    Hi,
    In the item overview of the purchase order creation screen (ME21N), you have a column Purchasing Doc and next it item no.  You can give the existing purchase order number here with item no which will create a purchase order, and changes can be made wherever you require.
    Hope this helps.
    Thanks
    Krishna.

  • Create Employee as a Business partner using BAPI

    Hi,
        I created a business partner using the BAPI,
    "BAPI_BUP_CREATE_FROM_DATA". I used this within a program. The business partner gets successfully created and gets reflected in the table BUT000. But I do not see it when I run the user exit "RPM_EMPDATA".Because of this I am not able to see the business partner inside cProjects. I am able to see the business partner inside the transaction BP. When I go into change mode and change the role (from Business partner role to Resource role),and when I save this business partner  I am able to see the details in the user exit RPM_EMPDATA. I am also able to assign this business partner to tasks in cProjects.
    Message was edited by:
            Sudheendra Puthuraya

    Hi sanjay,
    Thanks for ur reply.
    i just referred all the documents that you have mentioned in the previous suggestion.
    [ID 1400877.1] - This one doesnt help me and i have rehired the employee and checked but still facing the same issue in the supplier interface.
    [ID 433746.1] - This one refers to the creation supplier through forms and i have checked the same which has been mentioned in the document. Everything is fine which the front end creation too.
    But am still facing the same issue.
    Kindly suggest me the if the issue can be solved in someother ways.
    Thanks in Advance.
    Brgds
    Max

  • Help needed to create Notification in IW21 tr code using BAPI

    <b>Hi Experts,
                      I am searching for some BAPI's of IW21 tr code, where I need to create Notification using the details of some legasy system/flat file. I dont wanna use BDC, I need to use BAPI so could anyone help me out.
    Thanks in advance,
    Sunil</b>

    <b>Hi Surya,
                   Thanx for your reply, if u have the program to create the notification could you please send me,,,, I need it urgently....I have a Z-table which has the datas like;
    CusomerName
    Customeraddress
    Work_order_type
    Work_order_priority.........and so on...
    Now I need to create notification using the same datas....
    Thanks in advance..
    Sunil</b>

  • Creating a material with its classification using BAPI's

    Hi there,
               I am creating a function module to create a material master using BAPI's. I am using the BAPI 'BAPI_MATERIAL_SAVEDATA'. However I did not find a way to pass the classification details to this BAPI. As I need to create a classification data along with material basic data, can you please tell me how I can do it. Are there any BAPI's which I can use to create classification data?
             Please help, I have stuck here from a longer time.
    Thanks,
    Ganesh.

    hi
    good
    Use FM 'BAPI_OBJCL_GETDETAIL' to retrieve the classification data.
    Import params:
    1. Object key : give the material number
    2. Object table : give material master table i.e. MARA
    3. Class Num: Give the class name from which u have to fetch the characteristic data
    4. Class type: give '001' for material
    You will get the classification data in the following tables:
    ALLOCVALUESNUM
    ALLOCVALUESCHAR
    ALLOCVALUESCURR
    This should be helpful, do get back in case of any queries.
    thanks
    mrutyun^

  • Help on creating and deleting xml child elements using Toplink please.

    Hi there,
    I am trying to build a toplink xml demo illustrating toplink acting as the layer between my java code and an xml datasource.
    After pulling my custom schema into toplink and following the steps in http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/jaxb/index.htm related to
    Click on Mapping Workbench Project...Click on From XML Schema (JAXB)...
    I am able to set up java code which can run get and sets against my xml datasource. However, I want to also be able create and delete elements within the xml data for child elements.
    i.e. in a simple scenario I have a xsd for departments which has an unbounded element of type employee. How does toplink allow me to add and or remove employees in a department on the marshalled xml data source? Only gets and sets for the elements seem accessible.
    In my experience with database schema based toplink demos I have seen methods such as:
    public void setEmployeesCollection(Collection EmployeesCollection) {
         this.employeesCollection = employeesCollection;
    Is this functionality available for xml backended toplink projects?
    cheers
    Nick

    Hi Nick,
    Below I'll give an example of using the generated JAXB object model to remove and add a new node. The available APIs are defined in the JAXB spec. TopLink also supports mapping your own objects to XML, your own objects could contain more convenient APIs for adding or removing collection members
    Example Schema
    The following XML Schema will be used to generate a JAXB model.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="department">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="employee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>---
    Example Input
    The following document will be used as input. For the purpose of this example this XML document is saved in a file called "employee-data.xml".
    <department>
         <employee>
              <name>Anne</name>
         </employee>
         <employee>
              <name>Bob</name>
         </employee>
    </department>---
    Example Code
    The following code demonstrates how to use the JAXB APIs to remove the object representing the first employee node, and to add a new Employee (with name = "Carol").
    JAXBContext jaxbContext = JAXBContext.newInstance("your_context_path");
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    File file = new File("employee-data.xml");
    Department department = (Department) unmarshaller.unmarshal(file);
    // Remove the first employee in the list
    department.getEmployee().remove(0);
    // Add a new employee
    ObjectFactory objectFactory = new ObjectFactory();
    Employee newEmployee = objectFactory.createEmployee();
    newEmployee.setName("Carol");
    department.getEmployee().add(newEmployee);
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    marshaller.marshal(department, System.out);---
    Example Output
    The following is the result of running the example code.
    <department>
         <employee>
              <name>Bob</name>
         </employee>
         <employee>
              <name>Carol</name>
         </employee>
    </department>

  • Create and Password protect a pdf using VBA?

    Hi,
    I have a requirement to generate and password protect a pdf using a Microsoft access application (version 2007).
    I have seen plenty of code examples for generating the pdf, but is it possible to password protect the pdf programmitically?
    Thanks!

    is it possible to password protect the pdf programmitically?
    Yes, you can write a plugin for Acrobat.

  • Create and Approve Supplier in R12

    Hi,
    Is it possible that an user creates a supplier in Oracle and before
    you can use the supplier it needs to be approved by another user
    by sending a notification trough oracle workflow.
    What is possible?
    Regdards,
    Kaan

    Hi,
    As per the standard functionality, As soon as a user create a supplier with all the required information then one can use supplier for creating invoices and PO's. If you need to achieve the functionality which you have mentioned then you need to go for customization.
    Regards,
    Shashi.

  • Creating & posting the incoming invoice (MIRO) using BAPI

    Hi,
    We used to give ,
    Document Date = current date
    Delivery Note    = EX1
    Select the vendor
    Once we select the vendor the following data gets populated automatically such as,
    Item,Amount,Quantity,UOM and so on.
    For my data I get tax_code as V5.
    When I select the check box CALCULATE_TAX tax amount gets populated as 120 and Balance Amount as 3120.
    PO No         Amount Quantity UOM INVOICESIGN
    4600003648 2000       200       PCS  +
    4500000208 1000       100       PCS  +
    This data gets Populated automatically when I select EX1 as deleivery note and 000025 as vendor
    Since invoicesign is '+' for both the rows I give
    MATERIALDATA-SHKZG = 'S' for both the rows.
    I am getting errors like:
    1.  Balance <> 0  debit = 6120 credit = 3120.
    2.  Quantity greater than amount to be debited.
    and I couln't post the document.
    Kindly help me in this regard .
    If possible pls give me the code.

    For vendor invoices GLaccount will have cost centre data.the first line is always of vendor when you create vendor invoice in which vendor number is passed.
    In GLaccount apss your cost centre data.
    Nabhheet

Maybe you are looking for

  • Please Recommend - AIO/MFP Printer

    Hi, i'm looking for a AIO/MFP printer that support "scan to email" and "scan to network folder". the above functionality should not require the printer to be directly attach to a pc via USB/LAN/WiFi. the printer should only need to be be configured a

  • The data type of InfoObject 0ORGUNIT is incompatible with field 0ORGUNIT

    I am trying to create a DataSource in BW to load the organizational hierarchy from HR R/3 to BW.  I get the message "The data type of InfoObject 0ORGUNIT is incompatible with field 0ORGUNIT,"  Our BW version is 3.5; the version of HR R/3 is SAP ECC 6

  • Same partner functions shared by customer and vendor

    Need to upload the partner functions centrally and then this to be mapped to Customer, Vendor & etc., i.e. these partner functions to be shared. Can anybody suggest me how to do this by using LSMW?

  • Increasing Crashes "Read Only Memory Exception" HELP please!

    Over the past month and a half I'm starting to get regular and increasing crashes, mostly in my Adobe CS3 programs with this error: Read-only memory exception. A memory reference was made to an address that cannot be written to. unresolvablePageFault

  • 10.4.9 and DHCP related problems

    Hi, This behavior has happened twice since I updated to 10.4.9, before the 10.4.9 I had never experienced this fault. Without any warning I have lost the network connection, with further analysis I noted that my PowerMac G4 could not get IP address f