Method USER_CHECK_RESULTS of BAdI TRIP_WEB_CHECK

We are implementing expense reports for our company and need to influence the trip amounts that display in the Summary section of the Review and Send screen in the Portal. Per IMG activity documentation for BAdI: Define Additional Checks for Web Dynpro, there appears to be a method USER_CHECK_RESULTS to Edit travel cost results for BAdI TRIP_WEB_CHECK.  This method looks promising, but we are not finding this method available in our system.  Has anyone implemented this method or know we are able to change amounts that are saved to PTRV_SHDR (Trip Statistics - Trip Amounts)?  We need an enhancement that will be called from Portal.  In ERP, there appears to be enhancement available: FITR0002: User exit: Create/Change Trip Statistics.

How about the BAdi AFTER_TRIP_SETTLEMNT!

Similar Messages

  • BADI TRIP_WEB_CHECK

    Dear all,
    I am now working on a BADI enhancement in travel management area.  Travel expense receipts would be created using ESS portal and when the user tries to save the receipts, it should trigger this BADI “TRIP_WEB_CHECK” to make validations on certain expense types.
    In BADI, we have to check if total amount of the application exceed certain amount.  If the check fails, a popup message has to appear saying “Amount has been exceeded.”  It seems that method USER_CHECK_RECEIPTS could be used and parameter RECEIPTS could be used for checking on the payment amount.  However, we have no idea on how to calling them and how to publish the error message to ESS portal.  Grateful if you could let know on how to work with this, million thanks!
    Best regards,
    Anne

    Hi Anne,
    I could not find the answer in your question, so I am going to post the answer -
    The best way would be to use the method - IF_EX_TRIP_WEB_CHECK~USER_CHECK_LINE_OF_RECEIPTS.
    To make an error message pop-up, all that is required is to append an entry to the RETURN table.
    Sample Code:
    X_ERROR-TYPE = 'E'.
    X_ERROR-ID = 'Z*.
    X_ ERROR-NUMBER = '000'.
    Append X_ERROR to ERROR.
    Hope this helps.
    Thanks & Regards,
    Aditya

  • METHOD PROCESS_ACCOUNT OF BADI ME_PROCESS_PO_CUST.

    HI,
    I need to implement the method PROCESS_ACCOUNT of badi ME_PROCESS_PO_CUST.
    can anyone suugest me the samolw code for the same.
    i know i can get the account assignment data in the mathod IM_ACCOUNT->get_data.
    But how to declare the variable to store the data of im_account->getdata.
    so that i can use it in the progra?
    i mean for ex for header we will declare
    ls_header type mepoheader
    and then
    ls_header  = im_header->get-data.
    similarly can you plese tell me the declaration for storing the account assinment data.
    which table that variable will refer to.
    Smriti

    hai smriti
    u can call the method
    data: it_data type MEPOACCOUNTING
    im_accoutn->get_data  importing re_data  = it_data.
    just click the method type of parameter IM_ACCOUNT which is IF_PURCHASE_ORDER_ACCOUNT_MM  an interface
    u will get all the methods fro the same  u have ur mehtod get_data just click on it and click parameters and u get the paramter type  which is MEPOACCOUNTING
    regards
    m.a
    Edited by: mohammad afzal on Jul 9, 2009 7:11 AM

  • Call various methods from a BADI

    Hello,
    I would like to know if I can call all the methods in a BADI with one call. If its possible please provide an example. THANK YOU.

    Thats not possible
    check this might be helpful
    http://help.sap.com/saphelp_47x200/helpdata/en/b8/bdb83b5b831f3be10000000a114084/content.htm

  • How to pass one value from method 1 to method 2 in BADI...

    Hello Experts,
    How do I pass a custom variable from lets say method 1 to method 2 in BADI? Do I need to
    enhance it? For example, I need to pass my flag variable which contains 'X' from method as exporting
    and importing in method 2.

    Hi,
    Yes declare a flag in first method and make it 'X' when you get the condition that you have made changes to item values and export it to memory id ...
    EXPORT GV_FLAG TO MEMORY ID 'SSS'.
    and in second method import the same...
    IMPORT GV_FLAG FROM MEMORY ID 'SSS'.
    and according to the value write the logic...
    Thanks,
    Shailaja Ainala.

  • New method in a BADI

    Hello,
    how can I add a new customized method in a BADI ?
    Thank you

    Hi,
    Here is the details of BADI. There are many posts for BADI.
    I could not give you the direct link so copying one of the link details.
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
    and
    http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
    Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
    Suggest to do search in SDN with key - 'BADI'
    Will get a lot of helpful discussions.
    <b>Reward points if this helps.
    Manish</b>

  • Method CHECK_BEFORE_ADD_OBJECTS fo BADi CTS_REQUEST_CHECK

    Hi Experts,
    When the method CHECK_BEFORE_ADD_OBJECTS  of BADi CTS_REQUEST_CHECK is triggered?
    I implemented it (just put a balnk if..endif condition) and put a break point in it, I created a new transport request by changing a object it was not triggered and again
    I changed some other object and included that object in the same transport request then also it was not triggered.
    Thanks
    Yogesh Gupta

    In ECC 5 this is what the documentation says.
    You can use the following methods:
        * CHECK_BEFORE_CREATION
    This method is called before a request is created and after the creation dialog box. It gives you the option to:
              o make your own checks
              o change the short text and attributes.
        * CHECK_BEFORE_RELEASE
    This method is called before a request is released. It gives you the option to:
              o make your own checks (for example, on the objects in the request)
              o change the short text and attributes.
        * CHECK_BEFORE_CHANGING_OWNER
    This method is called before the owner of the request is changed, and after the confirmation dialog box. It gives you the option to make checks.
    If you are on a higher or lower version of SAP. please read the documentation of the BADI via SE18.
    Amandeep

  • Method call of BADI

    Hi All,
    What is the difference in calling a method of babi and implementing BAdi.
    Regards,
    Jeetu

    Hi,
    Are u working in Ecc 6.0. If yes, then once the BADI is implemented, u can call the method u want by using the syntax CALL BADI. This  concept is included in the enhancement framework topic.
    Syntax
    CALL BADI badi->meth    [EXPORTING  p1 = a1 p2 = a2 ...]
                         { {[IMPORTING  p1 = a1 p2 = a2 ...]
                            [CHANGING   p1 = a1 p2 = a2 ...]}
                         |  [RECEIVING   r = a  ] }
                            [EXCEPTIONS [exc1 = n1 exc2 = n2 ...]
                                        [OTHERS = n_others]].
    Effect
    : Calls a BAdI method. For badi, a BAdI reference variable must be specified. For meth, a BAdI method of the corresponding BAdI must be entered directly. The additions assign actual parameters to the formal parameters of the BAdI method, or handle non-class-based exceptions as described in CALL METHOD.
    The effect of the statement CALL BADI is that the specified method is called in all object plug-ins to which the BAdI object referenced by the badi refers.
    If the BAdI is defined for single use, then badi must contain a valid BAdI reference. If badi is initial, a treatable exception occurs in this case.
    If the BAdI is defined for multiple use, then badi must contain a valid BAdI reference or can be initial. If the referenced BAdI object refers to several object plug-ins ,then the calling sequence is the same with every CALL BAdI statement. The exact calling sequence can be determined in the definition of the corresponding BAdI implementations, if the predefined BAdI BADI_SORTER of the enhancement spot of the same name was implemented for the current BAdI. If the referenced BAdI object does not reference object plug-ins, or the badi is initial, then the statement is without effect.
    System fields
    As for a normal CALL METHOD, the system field sy-subrc is either set to 0 or, when treating non-class-based exceptions, it is set to the value specified after EXCEPTIONS.
    Hope this helps u.
    reward points if found useful.

  • Problems in method IF_EX_ACC_DOCUMENT~CHANGE - Badi BADI_ACC_DOCUMENT

    Hi experts,
    im trying to enhance badi BADI_ACC_DOCUMENT method Change in order to change some document items using table extension2 thru bapi.
    Im trying to understand example code to this method but im not understanding it right.
    According to the code we shoud transfer in table extension at least one structure name, accit in my case, POSNR , item number and the the fields taht we want to change but im not getting it...
    Bellow goes the example code:
    LOOP AT c_extension2 INTO wa_extension.
        AT NEW structure.
          CREATE DATA l_ref TYPE (wa_extension-structure).
          ASSIGN l_ref->* TO <l_struc>.
        ENDAT.
        CONCATENATE wa_extension-valuepart1 wa_extension-valuepart2
                    wa_extension-valuepart3 wa_extension-valuepart4
               INTO ext_value.
        MOVE ext_value TO <l_struc>.
        ASSIGN COMPONENT 'POSNR' OF STRUCTURE <l_struc> TO <l_field>.
        READ TABLE c_accit WITH KEY posnr = <l_field>
              INTO wa_accit.
        IF sy-subrc IS INITIAL.
          MOVE-CORRESPONDING <l_struc> TO wa_accit.
          MODIFY c_accit FROM wa_accit INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
    My problem it's that is giving me a dump in 
         MOVE ext_value TO <l_struc>.
      code.
    Im transfering the Accit in structure name and in the valuepart components im trying to transfer 'POSNR' '00001', only for testing but the dumps occurs. What shoul i transfer in Extension2 table?
    Can anyone help me in this subject?
    Thanks in advance
    Best Regards
    João Martins

    Hi joao,
    If you are passing the structure name (C_EXTENSION2-STRUCTURE) as ACCIT, then the concatenated value of VALUEPART1, VALUEPART2, VALUEPART3, VALUEPART4 (of C_EXTENSION2) should be similiar to the structure of ACCIT.  The error you are getting is due to mismatch structure fields.
    The way I implemented this BADI is
    - Create a custom structure with fields (which may need to be updated through BADI), field POSNR (type POSNR_ACC) should be mandatory.
       Eg : Structure ZTEST with fields : POSNR type POSNR_ACC, BSCHL type BSCHL.'
    - While calling the bapi BAPI_ACC_DOCUMENT_POST, pass the records to EXTENSION2 structure as
       Structure name : ZTEST
       valuepart1         : 000000000115 (first 10 characters is POSNR and next 2 characters is BSCHL (posting key) which is to be  
                                   updated through this BADI).
    By using this method, the updation in BADI will be dynamic upto some extent (for the fields available in Z structure).  Care is to taken while populating the fields VALUEPART1, VALUEPART2, VALUEPART3 & VALUEPART4, which should be in sync with the data declaration in custom structure.
    Regards, Vinod

  • Internal table in method of class (BADI)

    Hello people !!
    I need to use an internal table into method of class. I don´t know very well how to use it. I know that it hasn´t a header; but I don´t know how to defined and use it.
    I need to use in a method of badi.-
    I will be grateful by the help that your could offer to me.-
    Thank you so much,
    Esther.-

    Thank you for your answer.
    But, I had defined as de fist item, but I had defined with a structure of dictinary.
    Now, in my code, I need to deposit information to the above mentioned table. Then, when I try to accede to the fields of the estructure, when I compile it gives me the following mistake:
    "ACC_DATA" is a table without a header line and therefore has no          
    component called "CUENTA".     
    I attach departs from the code:
    types: es_accdata type standard table of Z_ES_ACCDATA.
    data: acc_data  type es_accdata.
          loop at it_mseg into r_mseg.
          si es Entrada de Mercancía
            if r_mseg-bwart = '101'.
              at first.
                acc_data-cuenta = r_mseg-sakto.
                if not r_mseg-kostl is initial.
                  acc_data-centro_coste = r_mseg-kostl.
                else.
                  acc_data-orden_inversion = r_mseg-aufnr.
                endif.
              endat.
              monto = monto + r_mseg-dmbtr.
            endif.
          endloop.
    Thank you againg, for a new answer !!!!
    bye, Esther.-

  • FIELDSELECTION_ITEM method in ME_PROCESS_PO_CUST Badi

    Hi all, this question was posted before but looks not answered directly so I am posting again as I have similar problem.
    We have implemented BADI ME_PROCESS_PO_CUST especially on method FIELDSELECTION_ITEM, I look at the sample code and apply almost the same logic in our implementation of this badi. We implemented FIELDSELECTION_ITEM method, however, no matter what breakpoint I put on this method, the debugger does not stop.
    In some methods such as OPEN, PROCESS_ITEM, PROCESS_HEADER, etc, they are all ok, i.e., it stop at the breakpoint.
    Looks like this method is not being triggered. My question is at what point is this method being triggered?
    Anything we missed here? Or any prerequisite I need to do before.
    Pls advise.
    Thanks in advance.
    UPDATE: I ask SAP about this and they told me that this is only applicable to custom fields and not for SAP standard fields. They acknowledged that the documentation is somehow wrong since it did not say that it is only restricted to custom fields.
    Message was edited by: ABAPOne

    Hello,
    I was wondering if found an answer to your question (abou the debugger). I have a similar problem.
    Thank you,
    Jennet

  • More the 1 return in a method, Good or Bad?

    Hello, quick question. Is it bad programming, and maybe even dangerous to have more that 1 return in a class. for example which of these code would be correct?
    int value = 0;
    if(one==true)
    value = 1;
    else if(two==true)
    value = 2;
    else if(three==true)
    value = 3;
    else if(four==true)
    value = 4;
    else if(five==true)
    value = 5;
    return retValue;
    ------------------------OR
    f(one==true)
    return 1;
    else if(two==true)
    return 2;
    else if(three==true)
    return 3;
    else if(four==true)
    return 4;
    else if(five==true)
    return 5;

    As a general rule, yes. Returning a value from the
    middle of a for-loop inside an if-statement would not
    be good style. But I do find myself writing methods
    that get the trivial cases out of the way first,
    before getting into the real code.
    Example:public String extractNames(NodeObject
    node) {
    if (node == null) return null;
    // complex code follows on here
    I agree with you in practice and in general. In fact, I also do the same thing although I would throw in a comment like //exit method if no valid processing possible due to null parameter or just invoke another method to do the complex logic part and have a member variable that is null or what is returned from the complex logic method.
    I try to have one return for several reasons :
    1) as listed above - for ease of debugging
    2) multiple returns reminds me of the code that used "goto exit" to get out of a loop because the programmer could not figure out any better way to get out without overly complex code.
    3) standards of only one point of entry and exit from a method.
    The only reason I can see for the complex code not to be in another method (at least in the simple example above) would be for performance reasons.

  • Call of a BADI method inside another BADI

    Dear colleagues,
    Could someone guide me with the information whether it is allowed to create/call  a Badi inside an implementation of another Badi method?
    Please let me know whether there are other alternatives or the Badi call within Badi acceptable as per SAP standards?
    Many thanks in advance,
    Best regards,
    Srivatsa

    hi Ganesh,
    Check this out
    <b>Calling a BADI from another BADI</b>
    Regards,
    Santosh

  • Problem in spool in method INT_PRINT_OPTIONS for BADi ZFI_INT_CUS01

    Hi all,
              The method INT_PRINT_OPTIONS  which iam using in my Zee Badi .Iam getting spool for e-mail, Fax and print .
    I need to block the spool for e-mail and Fax .The spool should generate for only for rest of the option like print . I want to know which parameter is generating the spool and if i change the parameter i can stop the spool generation. Please let me know .Its urgent support issue ........
    Thanks in advance ..
    Regards,
    VC

    I got the solution from my lecturer who is a Sun Java certified programmer :)

  • CloudPageBlob.Create() Method throws StorageException - Bad Request 400

    Hello,
    I am working with Windows Azure Storage Client Library Version 3.0.2.0 and trying to create a CloudPageBlob.
    when calling to CloudPageBlob.Create(long size) I get a  Microsoft.WindowsAzure.Storage.StorageException with message :
    "The remote server returned an error: (400) Bad Request."
    I used fiddler to get the HTTP result and this is what I get:
    <?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
    RequestId:9977d564-c5b2-4957-a64e-17a65ea7834c
    Time:2014-02-05T18:05:35.8265038Z</Message><HeaderName>x-ms-blob-content-length</HeaderName><HeaderValue>22600</HeaderValue></Error>
    The number is the value sent to CloudPageBlob.Create() Method.
    my code looks like:
    CloudPageBlob pageBlob = _BlobContainer.GetPageBlobReference(blobName);
    var stream = new MemoryStream(streamBytes);
    long messageSizeBytes = stream.Length;
    pageBlob.Create(messageSizeBytes);
    long offset = 0;
    //writing to page blob in 4 KB chunks
    while (offset < messageSizeBytes)
    pageBlob.WritePagesAsync(stream, offset, null);
    offset = offset + 4096;
    Would be happy for any assistance.
    Thanks.

    Hi,
    Are you running this in the Storage Emulator (locally)? If so, what version are you running? Storage Emulator 2.2 doesn't work against the version of the Client library you are running.
    You probably need the
    preview version of the Storage Emulator. 
    Edward

Maybe you are looking for