Skip to Content
author's profile photo Former Member
Former Member

Implemenation of BADI

Hi ,

My requirement is to add the value in characteristics field in the transaction onto the WBS element in accounting document .

I need to implement a BADI -TPM_ACCIF_TRAC in T.code TBB1. but when i searched in the package related to this tcode i found another BADI - FTR_TR_FIMA_CALLBACK is present . Is it possible to use that new BADI in that tcode .If possible how to do that with code ?

Plz provide me necessary inputs and suggestion.

Regards,

Wasim

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 09:09 AM

    Hi,

    Can you tell me who have suggested this "TPM_ACCIF_TRAC" BADI...?

    If the above said badi is not available for that transaction then you can't implement for T-code "TBB1"....It should be available for your required transaction.....This BADI might be for some other transaction....If you implement this BADI then it will not be effective for above said transaction....Please be carefull while implementing any BADI. First you have to confirm wheather the said BADI is effctive or not for your transaction......

    My suggestion to you that, Why don't you debugged and check the same. After processing your transaction when you reach to your required action.... to add value in charactristics field, just put a debugger "/H" to check which BADI you can implement at that movement/action....as per your requirement.....

    Please revert if any other clarification.....

    rewards points......

    Cheers,

    Sagun Desai....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 08:06 AM

    Hi,

    Go to SE38 and create a new report program named "zdk_find_badi" and copy & paste the following code, save, activate and execute....

    Give the transaction number and it will display all enhancements( userexits and badi's ) available for that transaction.

    Regards

    Karthik D

    <b>P.S.: Reward points if helpful</b>

    report  zdk_find_badi.
    tables : tstc,
    tadir,
    modsapt,
    modact,
    trdir,
    tfdir,
    enlfdir,
    sxs_attrt ,
    tstct.
    
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    
    parameters : p_tcode like tstc-tcode,
    p_pgmna like tstc-pgmna .
    
    
    
    
    data wa_tadir type tadir.
    
    start-of-selection.
    
    if not p_tcode is initial.
    select single * from tstc where tcode eq p_tcode.
    
    elseif not p_pgmna is initial.
    tstc-pgmna = p_pgmna.
    endif.
    
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    
    move : tadir-devclass to v_devclass.
    
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    
    select single * from enlfdir
    where funcname = tfdir-funcname.
    
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object in ('SMOD', 'SXSD')
    and devclass = v_devclass.
    
    
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(105) sy-uline.
    format color col_heading intensified on.
    
    * Sorting the internal Table
    sort jtab by object.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type c.
    clear : wf_smod, wf_badi , wf_object2.
    * Get the total SMOD.
    
    
    
    
    loop at jtab into wa_tadir.
    at first.
    format color col_heading intensified on.
    
    write:/1 sy-vline,
    2 'Enhancement/ Business Add-in',
    41 sy-vline ,
    42 'Description',
    105 sy-vline.
    write:/(105) sy-uline.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    
    endif.
    format color col_group intensified on.
    
    write:/1 sy-vline,
    
    2 wf_object2,
    105 sy-vline.
    endat.
    
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    select single modtext into wf_txt
    from modsapt
    where sprsl = sy-langu
    and name = wa_tadir-obj_name.
    format color col_normal intensified off.
    
    when 'SXSD'.
    * For BADis
    wf_badi = wf_badi + 1 .
    select single text into wf_txt
    from sxs_attrt
    where sprsl = sy-langu
    and exit_name = wa_tadir-obj_name.
    format color col_normal intensified on.
    
    endcase.
    
    
    
    write:/1 sy-vline,
    2 wa_tadir-obj_name hotspot on,
    41 sy-vline ,
    42 wf_txt,
    105 sy-vline.
    at end of object.
    write : /(105) sy-uline.
    endat.
    
    
    endloop.
    
    write:/(105) sy-uline.
    
    
    
    skip.
    format color col_total intensified on.
    write:/ 'No.of Exits:' , wf_smod.
    write:/ 'No.of BADis:' , wf_badi.
    
    else.
    format color col_negative intensified on.
    write:/(105) 'No userexits or BADis exist'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(105) 'Transaction does not exist'.
    endif.
    
    at line-selection.
    
    data : wf_object type tadir-object.
    clear wf_object.
    
    
    get cursor field field1.
    check field1(8) eq 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    
    case wf_object.
    when 'SMOD'.
    set parameter id 'MON' field sy-lisel+1(10).
    
    call transaction 'SMOD' and skip first screen.
    when 'SXSD'.
    set parameter id 'EXN' field sy-lisel+1(20).
    call transaction 'SE18' and skip first screen.
    endcase.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.