BAPI_TRIP_CREATE_FROM_DATA

Hi,
I need to insert data into SAP. I am using Java connector.
mConnection = JCO.createClient("", "", "", "", "", "");
JCO.Function function = mRepository.getFunctionTemplate("BAPI_TRIP_CREATE_FROM_DATA").getFunction();
JCO.ParameterList input = function.getImportParameterList();
input.setValue("00000002","EMPLOYEENUMBER");
JCO.Structure framedata = input.getStructure("FRAMEDATA");
framedata.setValue("2006-11-08","DEP_DATE");
framedata.setValue("2006-11-09","ARR_DATE");
mConnection.execute(function);
JCO.releaseClient(mConnection);
This code works fine but I need to insert information about the trip which are stored in table TEXT. I insert the data into this table using this code:
JCO.Table table = function.getTableParameterList().getTable("TEXT");
table.insertRow(0);
table.setValue("first row text", "TEXTLINE");
table.setValue("0", "TEXTID");
table.insertRow(1);
table.setValue("second row text", "TEXTLINE");
table.setValue("1", "TEXTID");
But this code doesnt work. There is no error message but the Information field in SAP is empty.
Can anyone help
Thanks for your help
Ivo

I have solved the problem. I have changed the TEXTID parameter to "TEXT".
table.setValue("TEXT", "TEXTID");
Now it works.
Anyway thanks for your effort.

Similar Messages

  • BAPI_TRIP_CREATE_FROM_DATA Fill in all required entry fields

    Dear community,
    We are trying to use the function "BAPI_TRIP_CREATE_FROM_DATA" for a new customer program to create trips for the employees. When we try and use this function to create trips, it returns an error message saying "Fill in all required entry fields".
    We check the ABAP code and found out that the WBS element was not being correctly imported to the screen, thus giving the error message (because the WBS is a mandatory field).
    We have already checked some SAP notes regarding this issue, and only found one regarding the WBS ELEMENT field name, but that note is already implemented.
    We discovered a program called "RPTTIZ_BAPI_TEST" and used it to check what we were doing wrong. But, also this program gives the same error message when we executed:
       BAPI Test: Import Trip, Delete Trip, Recreate Trip
      15:58:57
      BAPI_TRIP_GET_DETAILS
      S56804The selected method was performed successfully
      BAPI_TRIP_DELETE
      S56195The current version of trip 0000036827 was deleted
      BAPI_TRIP_CREATE_FROM_DATA
      E00055Fill in all required entry fields
    Everything went okay, except the creation of the trip. We found out that it was because of the WBS ELEMENT field.
    Do you know if this BAPI is obsolete or not in use anymore?
    Does anyone has an example or an idea for whats happening?
    Thank you all for your help.
    Regards,
    Filipe Barata
    Accenture

    Hi ,
    Kindly let me know how to make the Field visible in ESS Portal screen after making change in V_T588MFPROPC.
    Because I am facing the Same problem but it is for IT-9(Bank Details) Subtype 5(Main Offcyle Bank) and Subtype 6(Other Offcycle Bank).
    I have added the required fields in table V_T588MFPROPC, but not able to view those fields in ESS Screen, though I am sure it is considering those fields because for 2 Fields which I made mandatory , I am getting error in ESS Screen 'Fill in Required details', but only thing is not able to view the Fields on ESS Screen but getting error.
    Kindly let me know , how can resolve the error.
    Regards,
    Ketal Parikh

  • BAPI_TRIP_CREATE_FROM_DATA works in SE37, but not from external program

    BAPI_TRIP_CREATE_FROM_DATA works in SE37, but gives error when calling from external program.
    The error is "Deserialisation failed". I have the WSDL generated by a Web Service wizard in SE 37,
    so there should not be any problem like element name or case(upper/lower) mismatch etc. I populate all mandatory fields.
    I am using the web service created by wizard in a InfoPath form.
    This is the exact error:
    The SOAP response indicates that an error occurred:
    Deserialisation failed

    Thanks for this pointer. I downloaded the code and looked at the same. It very useful as conceptual and coding guidance. However, there are many BAPis working in our product already, only a few return the same error "Deserialisation failed" The sample you pointed out uses BAPI_FLTRIP_CREATE but we have problem with the following BAPIs:
    BAPI_TRIP_CREATE_FROM_DATA
    BAPI_ADDRESSEMP_CREATE
    BAPI_FAMILY_CREATE
    All of them give error similar to following:
    Deserialisation failed
    <detail>
        <n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates">
                    <MainName>/1BCDWB/WSS0071212021944898000</MainName>
                    <ProgName>/1BCDWB/WSS0071212021944898000</ProgName>
                    <Line>170 </Line>
                    <Valid>X</Valid>
                    <ReferenceFault>
                                    <DescriptionText>Error accessing the ref. node 'EMPLOYEENUMBER'</DescriptionText>
                                    <RefName>EMPLOYEENUMBER</RefName>
                    </ReferenceFault>
                    <Caller>
                                    <Class>CL_SRG_RFC_PROXY_CONTEXT</Class>
                                    <Method>IF_SXML_PART~DECODE</Method><Positions>1 </Positions>
                    </Caller>
       </n0:SimpleTransformationFault>
    </detail>
    Any more suggestions are most welcome and highly appreciated.

  • Process flow with BAPIs

    Hi experts,
    as we will try to built the Travel management in SAP CE, we want to trigger the whole travel management flow with BAPIs.
    The following already works:
    - Creation of trip BAPI_TRIP_CREATE_FROM_DATA
    - Approval of trip via BAPI_TRIP_APPROVE
    But now I don't know how to proceed.
    As I've seen in PR05, the status has then be changed to settled.
    Afterwards it can be sent to FI via transaction  PRFI.
    And then the posting in FI can be done in PRRW.
    Is that flow correct?
    What are the BAPIs to use for that?
    Is it BAPI_ACC_TRAVEL_POST?
    DoI also need BAPI_PAYROLLTRAVELEXPNSESPOST?
    Could please somebody of you give me an example for calling those functions?
    Unfortunately you have to specify a lot of parameters and I don't find much about it on SDN.
    Is there a way to retrieve this data first using only personnel number and trip number?
    Thanks in advance!

    Hi Eddie,
    For settling and posting the travel cost into the system, you can use t-code - PREC, PRFI and PRRW.
    Best Regards,
    Raj

  • Web service for CREATE_TRIP_DATA

    Hello,
    I am very new to SAP and webservices and have an issue with getting a response from a web service I created for a simple function module BAPI_CREATE_TRIP_FROM_DATA. I am getting the following response for the SOAP request from soapUI:
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
       <soap-env:Header/>
       <soap-env:Body>
          <soap-env:Fault>
             <faultcode>soap-env:Client</faultcode>
             <faultstring xml:lang="en">Dynamic function call failed</faultstring>
             <detail>
                <n0:DynamicFunctionCallFault xmlns:n0="http://www.sap.com/dynamic-call">
                   <FunctionName>BAPI_TRIP_CREATE_FROM_DATA</FunctionName>
                   <ParameterMissingFault>
                      <DescriptionText>Function call of BAPI_TRIP_CREATE_FROM_DATA failed; the obligatory parameter EMPLOYEENUMBER</DescriptionText>
                   </ParameterMissingFault>
                   <Caller>
                      <Class>CL_SRG_RFC_PROXY_CONTEXT</Class>
                      <Method>EXECUTE</Method>
                      <Positions>1</Positions>
                   </Caller>
                </n0:DynamicFunctionCallFault>
             </detail>
          </soap-env:Fault>
       </soap-env:Body>
    </soap-env:Envelope>
    I am using ECC 6.0 with GUI 7.10. soapUI is v3.5.1.
    What is hard to find also is the purpose of the class / method mentioned ... nothing on googling either. All the errors seem to be on the DECODE method of the same class which is to do with serialization error, my issue is with the EXECUTE method.

    Complete SOAP Request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
    <urn:ZbapiTripCreateFromData xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
    <Employeenumber>00001000</Employeenumber>
    <Framedata>
    <DepDate>2010-11-11</DepDate>
    <DepTime>02:00:00</DepTime>
    <ArrDate>2010-11-12</ArrDate><ArrTime>02:00:00</ArrTime>
    <Customer>Client</Customer>
    <Location>Edison</Location>
    <Country>US</Country>
    <Ort01>2035 Lincoln Hwy</Ort01>
    </Framedata>
    </urn:ZbapiTripCreateFromData></soapenv:Body>
    </soapenv:Envelope>
    I looked at one option: putting a wrapper around the BAPI itself and changing the type of 'Employeenumber' in the importing to a more common data type such as Char8 to see if it was a serialization error. That still gives me this response:
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
       <soap-env:Header/>
       <soap-env:Body>
          <soap-env:Fault>
             <faultcode>soap-env:Client</faultcode>
             <faultstring xml:lang="en">Dynamic function call failed</faultstring>
             <detail>
                <n0:DynamicFunctionCallFault xmlns:n0="http://www.sap.com/dynamic-call">
                   <FunctionName>ZBAPI_TRIP_CREATE_FROM_DATA</FunctionName>
                   <IllegalTypeFault>
                      <DescriptionText>The function call of ZBAPI_TRIP_CREATE_FROM_DATA failed; a field may have been assigned to the parameter EMPLOYEENUMBER whose type is not compatible with this parameter</DescriptionText>
                   </IllegalTypeFault>
                   <Caller>
                      <Class>CL_SRG_RFC_PROXY_CONTEXT</Class>
                      <Method>EXECUTE</Method>
                      <Positions>1</Positions>
                   </Caller>
                </n0:DynamicFunctionCallFault>
             </detail>
          </soap-env:Fault>
       </soap-env:Body>
    </soap-env:Envelope>

  • Bapi to change travel expense report

    Hi,
       I am working on an program to create a travel expense report using the 'BAPI_TRIP_CREATE_FROM_DATA' FM and it is working fine.However,i am unable to change the trip created using this FM.When i use the SAP transaction TRIP,i am able to change the travel expense report created.I am passing the status approved as '3' and account as '1' in the BAPI.Is there any bapi's available to change the travel expense report created?I would appreciate any assistance.
    Regards,
    Rajiv C

    Dear there is no standard Bapi to change the same, However there is one to delete the same( <b>BAPI_TRIP_DELETE</b>) and then you can create the same.
    Why you not trying to write a new BApi to change the Trip ( as standard is not available).
    See other reply there is step by step process to write a custom bapi.
    Just start you will find it intersting.
    rewardif useful.
    Amit Singla

  • BAPI for change trip

    Hello All,
    I am working on a portal application for travel management.
    My goal is to use existing BAPI's and create a Web-Dynpro GUI instead of launching Transaction PR05.
    For creation I successfully used BAPI_TRIP_CREATE_FROM_DATA.
    But, For changing an existing trip, I couldn't find a similar BAPI.
    Does anyone know such a BAPI, or function I can use?
    Is there any way to reuse the code that runs when changing a trip from PR05 in a custom developed BAPI?
    Any help will be appreciated.
    Thanks ahead,
    Yoav.

    Hi Yoav,
    Please check this FM <b>HRTRV_IF_MODIFY_TRIP</b>.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • BAPI's in Travel Request & Expenses

    Dear All,
         As per Clients requirement we are developing New Travel request Form in Web Dynpro.
    Please help me to find the BAPI's used to save data for Travel Request in Web Dynpro.
    Thank you very much in advance.
    Regards,
    Kamal Rawal
    [email protected]

    Hi,
    You can use BAPI 'BAPI_TRIP_CREATE_FROM_DATA' to create a Travel Request,
    BAPI 'BAPI_TRIP_APPROVE' to approve the trip request.
    Hope this helps,
    Shrinivas

  • Creating a trip request using HRTRV_IF_MODIFY_TRIP in 5.0

    I am working on modifying an existing Travel and Expense application for a new client. We've moved the existing application from 4.6C to a 5.0 system. The issue I'm having is the standard function module for creating trips, HRTRV_IF_MODIFY_TRIP, is erroring out. It is using an obsolete transaction (PR01) to create the request. While processing this transaction it attempts to use a field that doesn't exist. Does anyone know of an updated version of this function module? The only other module I've found is BAPI_TRIP_CREATE_FROM_DATA and that one is using the exact same transaction and returns the same error.
    While I'm at it, I'll post the error just in case:  "Field PTP02-KZTKT. does not exist in the screen SAPMP56T 1200." KZTKT is the trip activity type. When I look at the screen in se80 it seems to be there, but oddly it doesn't show up when running the transaction directly.    
    Any help would be much appreciated.
    Regards,
    Marcos Suero
    Arinso International

    Please.
    I need help on that.
    Regards.
    Gregory.

  • BAPI for SAP HR (travel ticket request - TRIP)

    Hi all.
    I need to create a Travel Request with Travel Tickets from remote (using Tibco middleware).
    In other terms, I have to "expose" the TRIP transaction as a remote service.
    The standard BAPI_TRIP_CREATE_FROM_DATA is not sufficient because it allows the creation of travel requests, but does not allow to insert travel ticket requests.
    Could anyone provide suggestions?
    Thanks in advance.

    Hi,
    I have gone through the View mentioned, But i need the Standard Form names for  Example
    Purchase Order ' MEDRUCK' . like wise is there any Standard form for Travel Expence and Travel Requisation.
    if so, how to configure it to Transaction.
    Thanks In Advance.
    Regards
    Nags

  • Any bapi available for Create Employee Trip

    hi ,
    please tell me for Create Employee Trip any bapi is available.
    if it is there means please tell me.

    Check this one -
    BAPI_TRIP_CREATE_FROM_DATA
    Regards,
    Amit

  • What is the BAPI to update a trip in Travel managment?

    Hi,
    I want to know, what is the BAPI to update a trip in Travel managment submodule?
    We have BAPIs to get the details, to create and to delete
    But we are not able to find the BAPI for Edit/Update  trip?
    It will be great if anyone can assist me.

    Hi all,
    I have a similar problem. I tried to use function module HRTRV_IF_MODIFY_TRIP. This is the one that satisfied my requirements. But I keep getting an error message.
    If you would like to open the trip, modify then save, the function module TRIP_CHANGE_INTERACTIVE can me usefull to you.
    My problem is that I would like to pass all trip data and that data must save the trip in the system, just as the BAPI BAPI_TRIP_CREATE_FROM_DATA.
    If you find a solution, please let me know.
    Mr Thung Yuen Yap, your code could be helpfull.
    Regards,
    Robert.

  • (PR05) Travel Expense Manager Question

    Hello All
    I would like to know, under what ObjectID the text are stored in the Commnets section in the PR05 Transaction.
    Thank You.
    Rajiv

    The comments text are stored in the PCL1 cluster table with the trip information in table ZWECK. It can be read using macro rp-imp-c1-te.
    To create a new claim you can use BAPI_TRIP_CREATE_FROM_DATA (4.6C). It will do a call transaction to PR05 so it only allows a trip to be created, not changed.
    Cheers,
    Jaed

  • Any BAPI or FM  for transaction TP04

    Dear all,
    Please tell me are there any bapi or FM to create travel request.
    Please help me.
    Thanks and Regards,
    Chandra

    I think you need to use BDC.
    This BAPI is there - BAPI_TRIP_CREATE_FROM_DATA  but it uses PR01.
    Check following to find BAPI for any tcode -
    1. Find out the package of the transaction. 
    Start Va01 go to system --> status. 
    Double click on transaction 
    Package is VA 
    Open this package in SE80 
    Open business engineering-->Business object types 
    Find the BO which sounds the most appropriate 
    I would suggest BUS2032 Sales Order 
    Double click. 
    Open methods. 
    Find the released method with from data or something similar in the name 
    , Createfromdat2 
    Position the cursor in it and click the program button 
    Scroll down to find the bapi used in this method 
    With this way you can also find out programs and FM's 
    2. Start va01 go to system-->status 
    Double click transaction VA01 
    Double click on package 
    Read the application component. (this is SD-SLS Sales) 
    Then open the transaction BAPI 
    Sales and distribution>Sales>sales order 
    createfromdat2 
    Regards,
    Amit
    \[removed by moderator\]
    Edited by: Jan Stallkamp on Aug 6, 2008 2:26 PM

  • Code 58 : Entry doesn't exist ...

    I use this BAPI_TRIP_CREATE_FROM_DATA.
    I use departure date, arrival date, location, and pernr.
    In SAP 4.6C, BAPI works fine. In my webdynpro, i fill correctly my bapi. But i Have this error : Code 58 doesnt' exist...
    Well, how to debug this call in 4.6C or what can be this error ?
    Thanks for your help
    Aurélien

    Hi
      Try this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutrial on debugging abap code from within web dynpro applications.htm
    This link tells you how you can debug ABAP code from Webdynpro.
    This will help you debug in ABAP from your WebDynpro. You should be able to solve your error. The input values in SAP get converted into CAPS but it does not happen the same way when you pass values from WebDynpro.
    Check out the link i gave you and then you will know what is happening with your code.
    regards
    ravi

Maybe you are looking for

  • Load balancing testing.

    Hi Gurus, For load balancing purpose we have installed sap in one more box (crm quality system). now i need to test whether load balancing is happening or not in below scenarios.. 1.) Test the Load balancing on the C.I and D.I. 2.) Take Multiple Logi

  • PSE 13 will not print to my Canon MG6150.

    Elements 9 does, Premier 13 does, but not elements.  The printer is my default but the fault says "because cannot load default printer". help please

  • Slideshow transfer question

    I transferred a slideshow to imovie to transfer it to another computer via an external hd.  How do I transfer it to iphoto on another computer so it will not be in movie mode.  It will not play frame by frame or show the progression on the bottom pic

  • New version of sapyto - SAP Penetration Testing Framework

    Hello list, I'm glad to let you know that a new version of sapyto, the SAP Penetration Testing Framework, is available. You can download it by accessing the following link: http://www.cybsec.com/EN/research/sapyto.php News in this version: This versi

  • Iphoto will not load after trying to move program from HD to ext. HD

    Not knowing that Mac does not like to have Iphoto program moved from MacHD to an external to save space, I am now in a mess.  I have tried to use time machine to reload the program and the Library.  At first I got an old libary, now the program opens