Badi creation and implementation

HI all ,
I want inforamtion on BADIs.
How to search for BADI and also creating and implementing the badi .
Regards
SAntosh .

There are two steps in User Exit creation.
1} Identify the User Exit suitable for the requirement and that is available in the system:
Code SE18 is used to Identify the BADI available.
Look for the string 'CL_EXITHANDLER' in the standard program. This is a class which has a method 'GET_INSTANCE' which is used to trigger BADI's from the Standard Program. The interface parameter for this static method 'EXIT_NAME' is used to pass the BADI to the method.
Open Standard Program and do a global search 'CL_EXITHANDLER'.
SE18 > give the BADI name found through above search.
CUSTOMER_ADD_DATA > which has a method SAVE_DATA.
2} Implement the User Exit identified through above process.
T.Code SE19 is used to Implement BADI.
SE19 > give the implementation name > Give the Definition name as CUSTOMER_ADD_DATA and the Short Text.
Check this blogs 2 find a BADI:
How to find if we have a BADI in Transaction VB02
Re: BADI for screen enhancement in MM01  transaction
Re: BADI and User exits
How To Define a New BAdI Within the Enhancement Framework (Some Basics About the BAdI,BAdI Commands in ABAP,
When to Use a BAdI?)
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
How to implement a BAdI And How to Use a Filter
/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
Introducing Business Add-Ins
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f3202186-0601-0010-6591-b832b1a0d0de
How to implement BAdi in Enhancement Framework
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702
Business Add-Ins
http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm
BAdI: Customer-Defined Functions in the Formula Builder
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
Difference Between BADI and User Exits
http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
To Use BADI - Business Add In you need to Understand ABAP OO Interface Concept
http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
You can check the links for Step by Step Badi Implemntation
(very helpful self learning docs).
BADI Step by Step Implementation.
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
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/63ee7f486cc143a560799d8803ce29/content.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/badi-general+information&
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
The specified item was not found.
http://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
http://www.allsaplinks.com/badi.html
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-serieshttps:///people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
/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 /people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
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
http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40921dd7-d5cf-2910-1894-bb62316afbd1
http://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
Difference Between BADI and User Exits
http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD Page 40), two different views are available:
• In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
• In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
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.
REPORT Z_BADI_TEST.
test call Badi from standard abap. (Only from rel 6.40 and above)
do the following
1) define the Badi (SE18). For Abap call test uncheck multiple use
and filter boxes
2) Implement the badi (SE19). Add any methods here in the implemntation
3) activate
4) define the standard class exithandler to the abap. This class is the "Badi caller
5) define an exit variable referring to your Badi Implementation interface
this interface will normally be something like ZIF_EX***************
You will see this in SE18/SE19.
6) Instantiate your instance of the badi (method call get_instance)
7) Now call any method(s) in the Badi.
class cl_exithandler definition load. "Declaration
data exit type ref to zif_ex__jimbotest. "Interface reference
data yes type c.
data: v_knvv type knvv. "Used in Fmod call in Badi methods
start-of-selection.
yes = ' '.
selection-screen begin of block b1.
parameters: r1 radiobutton group rad1,
r2 radiobutton group rad1,
r3 radiobutton group rad1.
selection-screen end of block b1.
parameters: p_kunnr type knvv-kunnr.
select single * into v_knvv
from knvv
where kunnr eq p_kunnr.
export v_knvv to memory id 'CUST6A'. "Save customer data for the function module
call method cl_exithandler=>get_instance "Factory method call
exporting "Method
exit_name = 'Z_JIMBOTEST' "Name of your BADI
null_instance_accepted = yes
changing instance = exit.
if not exit is initial.
break-point 1.
if r1 = 'X'.
call method exit->dispord . "Add-In call
changing testparm1 = word.
endif.
if r2 = 'X'.
call method exit->dispfakt.
endif.
if r3 = 'X'.
call method exit->dispmat.
endif.
In the badi methods
1)
method ZIF_EX__JIMBOTEST~DISPORD.
CALL FUNCTION 'Z_DISPLAY_CUST'.
endmethod.
2)
method ZIF_EX__JIMBOTEST~DISPFAKT.
CALL FUNCTION 'Z_DISPLAY_FAKT'.
endmethod
3)
method ZIF_EX__JIMBOTEST~DISPMAT.
CALL FUNCTION 'Z_DISPLAY_CUST'.
endmethod.
Copy via SE 41 the status SALV_STANDARD from standard SAP program SALV_DEMO_METADATA into the main program where you've created the 3 function modules below (SAP______TOP)
Global Data for the three function modules I'm calling
FUNCTION-POOL Z_BADI_KNVV. "MESSAGE-ID ..
include <color>.
include <icon>.
include <symbol>.
tables: zknvv.
data: v_zzkvgr6 TYPE KNVV-ZZKVGR6.
data: choice1 type c.
data: choice2 type c.
data: choice3 type c.
data: choice4 Type c.
data: ok-code(5) type c.
data: answer type string.
data: value1 type SPOP-VARVALUE1.
data: answer1 type string.
tables: vbak, vbap, vakpa, vbrk, vrkpa.
data: lr_functions type ref to cl_salv_functions_list.
constants: gc_true type sap_bool value 'X',
gc_false type sap_bool value space.
add for colour displays
data: ls_color type lvc_s_colo.
DATA : LV_SALV_COLUMNS_TABLE TYPE REF TO CL_SALV_COLUMNS_TABLE.
data: lr_columns type ref to cl_salv_columns_table,
lr_column type ref to cl_salv_column_table.
Data:
gr_table TYPE REF TO cl_salv_table.
data: z_datum type sy-datum.
data: v_knvv type knvv.
data : begin of s_vbak,
vkorg type vakpa-vkorg,
vkgrp type vakpa-vkgrp,
vtweg type vakpa-vtweg,
spart type vakpa-spart,
auart type vakpa-auart,
vbeln type vakpa-vbeln,
bstnk type vakpa-bstnk,
audat type vakpa-audat,
netwr type vbak-netwr,
end of s_vbak.
data : begin of s_vbrk,
vbeln type vrkpa-vbeln,
vkorg type vrkpa-vkorg,
fkart type vrkpa-fkart,
fkdat type vrkpa-fkdat,
netwr type vbrk-netwr,
end of s_vbrk.
data: begin of s_vbap,
matnr type vbap-matnr,
arktx type vbap-arktx,
netwr type vbap-netwr,
kwmeng type vbap-kwmeng,
end of s_vbap.
data: t_vbap like table of s_vbap.
data: t_vbak
like table of s_vbak.
data: t_vbrk
like table of s_vbrk.
data: s_name type tabname.
data: gr_selections type ref to cl_salv_selections.
data: gr_events type ref to cl_salv_events_table.
Source code of the function modules.
Function modules
FUNCTION Z_DISPLAY_CUST.
""Lokale interface:
s_name = 'S_VBAK'.
orders in last 6 months
z_datum = sy-datum - 180.
import v_knvv from memory id 'CUST6A'.
get data
select avkorg aaudat avkgrp avtweg aspart aauart abstnk avbeln b~netwr
into corresponding fields of table t_vbak
up to 100 rows
from ( vakpa as a
inner join vbak as b
on avbeln eq bvbeln )
where a~kunde eq v_knvv-kunnr
and a~parvw eq 'AG'
and a~vkorg eq 'EN01'
and a~trvog eq '0'
and a~audat gt z_datum.
sort t_vbak by audat descending.
*data: gt_hyperlink type standard table of g_type_s_hyperlink.
Instead of if_salv_c_bool_sap=>false, you can pass the
value if_salv_c_bool_sap=>true to this method to
see your ALV as a list.
display data in Grid / List
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_vbak.
CATCH cx_salv_msg.
ENDTRY.
try.
LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
ls_color-col = col_negative.
ls_color-int = 0.
ls_color-inv = 0.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'VBELN' ).
ls_color-col = col_negative.
ls_color-int = 1.
ls_color-inv = 1.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
*LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
lr_column->set_short_text( 'Short' ).
lr_column->set_medium_text( 'Medium' ).
lr_column->set_long_text( 'Net Value' ).
*lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
catch cx_salv_not_found.
endtry.
gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
report = sy-repid
set_functions = gr_table->c_functions_all ).
this statement actually does the display.
gr_table->display( ).
ENDFUNCTION.
FUNCTION Z_DISPLAY_FAKT.
""Lokale interface:
s_name = 'S_VBRK'.
invoices in last 6 months
z_datum = sy-datum - 180.
import v_knvv from memory id 'CUST6A'.
get data
select avbeln afkart avkorg afkdat
b~netwr
into corresponding fields of table t_vbrk
up to 100 rows
from ( vrkpa as a
inner join vbrk as b
on avbeln eq bvbeln )
where a~kunde eq v_knvv-kunnr
and a~parvw eq 'RG'
and a~vkorg eq 'EN01'
and a~vbtyp eq 'M'
and a~fkdat gt z_datum.
sort t_vbrk by fkdat descending.
*data: gt_hyperlink type standard table of g_type_s_hyperlink.
Instead of if_salv_c_bool_sap=>false, you can pass the
value if_salv_c_bool_sap=>true to this method to
see your ALV as a list.
display data in Grid / List
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_vbrk.
CATCH cx_salv_msg.
ENDTRY.
try.
LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
ls_color-col = col_negative.
ls_color-int = 0.
ls_color-inv = 0.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'VBELN' ).
ls_color-col = col_negative.
ls_color-int = 1.
ls_color-inv = 1.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
*LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
lr_column->set_short_text( 'Short' ).
lr_column->set_medium_text( 'Medium' ).
lr_column->set_long_text( 'Net Value' ).
*lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
catch cx_salv_not_found.
endtry.
gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
report = sy-repid
set_functions = gr_table->c_functions_all ).
this statement actually does the display.
gr_table->display( ).
ENDFUNCTION.
FUNCTION Z_DISPLAY_MATERIAL.
""Lokale interface:
s_name = 'S_VBAP'.
invoicesrs in last 6 months
z_datum = sy-datum - 180.
import v_knvv from memory id 'CUST6A'.
get data
select avbeln bmatnr barktx bnetwr b~kwmeng
into corresponding fields of table t_vbap
up to 100 rows
from ( vakpa as a
inner join vbap as b
on avbeln eq bvbeln )
where a~kunde eq v_knvv-kunnr
and a~parvw eq 'AG'
and a~vkorg eq 'EN01'
and a~trvog eq '0'
and a~audat gt z_datum.
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_vbap.
CATCH cx_salv_msg.
ENDTRY.
try.
LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
ls_color-col = col_negative.
ls_color-int = 0.
ls_color-inv = 0.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'ARKTX' ).
ls_color-col = col_negative.
ls_color-int = 1.
ls_color-inv = 1.
lr_column->set_color( ls_color ).
catch cx_salv_not_found.
endtry.
try.
*LV_SALV_COLUMNS_TABLE = gr_table->get_columns( ).
lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'NETWR' ).
lr_column->set_short_text( 'Short' ).
lr_column->set_medium_text( 'Medium' ).
lr_column->set_long_text( 'Net Value' ).
*lr_column ?= LV_SALV_COLUMNS_TABLE->get_column( 'URL' ).
catch cx_salv_not_found.
endtry.
gr_table->set_screen_status( pfstatus = 'SALV_STANDARD'
report = sy-repid
set_functions = gr_table->c_functions_all ).
this statement actually does the display.
gr_table->display( ).
ENDFUNCTION.
http://www.****************/Tutorials/ExitsBADIs/VL02/page1.htm
Reward points..

Similar Messages

  • BADI ME_CHECK_SOURCES and ME56

    Hi Gurus,
    My requirement is to check the date on the info source of supply when creating/changing purchase requisition. I found the badi ME_CHECK_SOURCES and implemented it. During testing I can see that the badi is called and in the code based on my checks the source is marked invalid or not ok. The flag for badi EF_SOURCE_NOT_OK is set to 'X' but in ME56 it still assigns the source. I do not know why it does that. Any ideas?

    Isn't there anyone who can help me with this?

  • How to find and implement badi's

    hello can any one tell me how to find badi's for a transaction and implement them if any one can show with example will be helpful if any of standard transaction for sd ,
    regards
    afzal

    Hi,
    Just copy and paste this code in editor and execute it.
    Then give your Transaction coe it will displays all user exits Regrading your T.Code.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    * Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    * Find Repository Objects for transaction code
      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 = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    * Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            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:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    * Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    Thanks,
    Reward If Helpful.

  • Implementing BADIs CFX_STATUS_TRANS and CFX_STATUS_TRANS_UI

    How would I go about implementing BADIs CFX_STATUS_TRANS and CFX_STATUS_TRANS_UI?  I have never used a BADI before but I have read documentation on implementing BADIs.  One example of such is https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702 
    What would I need to do to use either of these BADIs?  Specifially, I will need to
    •     Get Project Details such as Description, Dates, etc and return these to cFolders for population in the Document
    •     Get Project Partner details such as Names, addresses, email addresses etc for selection and population
    Is it possible in these BADIs?  I was asked to begin with the two BADIs that I listed above but I am unsure how they will help.
    Regards,
    Davis

    Hi Davis,
    If you run the transaction SE18 using the Badi you mentioned, click of 'Display', then you will find a button 'Document', which you can find out, which purpose has the involved Badi.
    Kind regards,
    Zhenbo

  • BADI IDOC_CREATION_CHECK and BDCP_BEFORE_WRITE available in SAP 4.6C?

    I want to use implementations of the BADIs IDOC_CREATION_CHECK and BDCP_BEFORE_WRITE in an SAP 4.6C system but I cannot find the definition for those BADIs there. Is it possible to make the BADIs available? If not, can someone tell me how to perform the same functionality (BDCP_BEFORE_WRITE  - Prevent creation of unwanted change pointers, IDOC_CREATION_CHECK - Suppress the creation of unwanted IDocs) in an SMD (Shared Master Data) scenario?
    I would be very thankful for any hints.

    Hi,
    I am finding following error in your log:
    MsSClientHandle: no server provides service ENQ (4), requested from gmsc2_DBM_00 http://msxxserv_mt. 4669
    UPD  0  0  2000  0  0 
    --------++++--
    +
    ENQ  0  0  2000  0  0 
    --------++++--
    +
    BTC  0  0  2000  0  0 
    --------++++--
    +
    SPO  0  0  2000  0  0 
    --------++++--
    +
    UP2  0  0  2000  0  0 
    Please assign no. of work processes to at least 1 for above mentioned type of work process.

  • Production and Implementation

    Hello Gurus, 
                          I want the details like....In production support what are the our usual works(roles), and what we have to do. 
                          If we are getting tickets, in which manner we have to respond for those tickets.
                          What are the exact daily works in a production support  project. And what are the exact daily works in a implementation  project.
                          What are the t-codes we have to be perfect in support and implementation.
    Please help me
    Thanks and Regards
    Kumar.

    Hi,
    It may vary in different projects.
    I can just give you a couple of general roles.
    Migration project
    • Designing mapping documents in order to check the need of creation in BW.
    • Developing various objects like Cubes, ODS, Info Sources, InfoObjects etc.
    • Designing Transfer Rules and update rules including start routines, update routines and Transfer routines as per the requirement.
    • Scheduling Info Packages to carry out the data loading process. Involved in data loading from SAP R/3 to Source layer ODSs into BW. Loaded data using Data mart, as the Business layer and Report layer ODSs get loaded from source layer ODSs using data mart functionality of BW.
    • Involve in the backfilling of historical data from present sys to SAP BW .
    • Developing the Master/Transactional data process chains considering the dependency among the BW objects and automated the triggering and monitoring of the same on daily, weekly and monthly basis.
    • Transportation of various BW components.
    • Performing unit testing and data validation of newly developed and enhanced objects in Quality BW system in terms of providing an efficient solution.
    • Responsible for overseeing the Quality procedures related to the project.
    • Responsible to deliver (Transport into Prod) the object as per the scheduled deadlines; with accuracy of deliverables by considering the quality norms.
    • Involving in the Client/Onsite communication for any client side clarifications, for assignment of work, for discussing on project status related issues, etc.
    Support project
    Data Load Monitoring:
    1.Carried out data load on a daily, weekly and monthly basis using Process chains from both SAP Source systems as well as Non-SAP Source systems such as Informatica.
    2.Resolving Data load error such as Invalid characters, Time period conversion, Currency conversion, Duplicate records, etc
    3.Ensuring the availability of the updated data in the datatarget on time.
    4.Spooling out data through Infospoke from SAP BW to systems like Trillium, Ariba (Reporting Tool)
    Ticket Resolution:
    1.Process chain modification: Working on “Optimizing Process chain” by creating new process chain considering the load dependencies.
    2.Reloading of R/3 data from different clusters – Reconciliation issues
    3.Enhancements as per Business requirement.
    Additional responsibilities:
    •Preparing design documents from the Business Requirement docs and identified the relevant data targets for satisfying the customer requirements.
    •Creation of Operational manual: BW Run & Maintain Support.
    •Process Chain Detail Documentation (Sequencing & Dependency within Local Chains).
    •Monitoring checklist Document (From Process Chain Perspective)
    •BW Doc checklist preparation
    •Table space activity with basis team.
    •Data load analysis taking into account the CPU utilization.
    •Applying Support packs and performing ORT.
    Most projects have different number of cubes with varying volume of data. You cant generalize this.
    hope this helps,
    Refer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/08f1b622-0c01-0010-618c-cb41e12c72be
    Roles & Responsibilities for Junior & Senior consultants(Technical)
    Thanks,
    JituK

  • Automatic Creation and Confirmation of Warehouse Task in EWM 5.1

    Hello,
    We want an automatic creation and confirmation of the warehouse task in EWM 5.1 on the based of a delivery type and warehouse number.
    The scenario goes in this way... As soon as the inbound delivery is created/replicated in EWM, the creation and confimartion of warehouse request, warehouse task and warehouse order (all the transactions) should be called automatically. And the goods receipt should be posted.
    Can someone throw more light on the customizing/BADI/enhancements etc required??
    Thanks and Regards..

    Hi koen,
    I tried with the FM that you suggested...
    But somehow with the process type 'stock removal' gives an error...
    Is that that this FM will help to create a pick task for a particular outbound delivery--Tcode:/SCWM/TODLV_TO.
    how will this FM take the outbound delivery as an input?or it will be on the corresponding sales order number and item number as input?
    Being new EWM i require help on this..about how to go about creating the pick task for an outbound delivery which wil be equal to the warehouse request.
    Thanks in advance,
    Rashmi.

  • Ask the Expert: Plan, Design, and Implement Mobile Remote Access, the Cisco Collaboration Edge Architecture

    Welcome to the Cisco® Support Community Ask the Expert conversation. This is an opportunity to learn and ask questions about planning, designing, and implementing mobile remote access (Cisco Collaboration Edge Architecture) with Cisco subject matter experts Aashish Jolly and Abhijit Anand.
    Cisco Collaboration Edge Architecture is an architecture that provides VPN-less access of Cisco Unified Communications resources to Cisco Jabber® users. This discussion is dedicated to addressing questions about design best practices while implementing mobile remote access.
    For more information, refer to the Unified Communications Mobile and Remote Access via Cisco VCS deployment guide. 
    Aashish Jolly is a network consulting engineer who is currently serving as the Cisco Unified Communications consultant for the ExxonMobil Global account. Earlier at Cisco, he was part of the Cisco Technical Assistance Center (TAC), where he helped Cisco partners with installation, configuring, and troubleshooting Cisco Unified Communications products such as Cisco Unified Communications Manager and Manager Express, Cisco Unity® solutions, Cisco Unified Border Element, voice gateways and gatekeepers, and more. He has been associated with Cisco Unified Communications for more than seven years. He holds a bachelor of technology degree as well as Cisco CCIE® Voice (#18500), CCNP® Voice, and CCNA® certifications and VMware VCP5 and Red Hat RHCE certifications.
    Abhijit Singh Anand is a network consulting engineer with the Cisco Advanced Services field delivery team in New Delhi. His current role involves designing, implementing, and optimizing large-scale collaboration solutions for enterprise and defense customers. He has also been an engineer at the Cisco TAC. Having worked on multiple technologies including wireless and LAN switching, he has been associated with Cisco Unified Communications technologies since 2006. He holds a master’s degree in computer applications and multiple certifications, including CCIE Voice (#19590), RHCE, and CWSP and CWNP.
    Remember to use the rating system to let Aashish and Abhijit know if you have received an adequate response. 
    Because of the volume expected during this event, our experts might not be able to answer every question. Remember that you can continue the conversation on the Cisco Support Community Collaboration, Voice and Video page, in the Jabber Clients subcommunity, shortly after the event. This event lasts through June 20, 2014. Visit this forum often to view responses to your questions and the questions of other Cisco Support Community members.

    Hi Marcelo,
       Yes, there are some requirements for certificates in Expressway.
    Expressway Core (Exp-C)
    - Can be signed by either External or Internal CA
    - Better to use a cluster name even if you start with 1 peer in Exp-C cluster. In the future, if more peers are added, changes would be minimal.
    - Better to use FQDN of cluster as CN of certificate, this way the traversal zone configuration on Expressway-E won't require any change even if new peers are added to Exp-C cluster.
    - If CUCM is mixed mode, include security profile names (in FQDN format) as Subject Alternate Names
    - The Chat Node Aliases that are configured on the IM and Presence servers. They will be required only for Unified Communications XMPP federation deployments that intend to use both TLS and group chat. (Note that Unified Communications XMPP federation will be supported in a future Expressway release). The Expressway-C automatically includes the chat node aliases in the CSR, providing it has discovered a set of IM&P servers.
    - For TLS b/w CUCM, IM-P & Exp-C
      + If using self-signed certificates on CUCM, IM/P. Load Cisco Tomcat, cup, cup-xmpp certificates from IM-P on Exp-C. Load callmanager, Cisco Tomcat certificates from CUCM on Exp-C.
      + If using Internal CA signed certificates on CUCM, IM/P. Load Root CA certificates on Exp-C.
      + Load CA certificate under tomcat-trust, cup-trust, cup-xmpp-trust on IM-P.
      + Load CA certificate under tomcat-trust, callmanager-trust on CUCM.
    Expressway Edge (Exp-E)
    - Signed by External CA
    - Configured Unified Communications domain as Subject Alternate Name
    - If using a cluster, select FQDN of this peer as CN and FQDN of Cluster + this peer as Subject Alternate Name.
    - If XMPP federation is being deployed, enter the same Chat Node Aliases as entered in Exp-C.
    For more details, please refer to the Certificate Creation Guide for Cisco Expressway x8.1.1
    http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/expressway/config_guide/X8-1/Cisco-Expressway-Certificate-Creation-and-Use-Deployment-Guide-X8-1.pdf
    - Aashish

  • Badi ME_GUI_PO_CUST and ME_PROCESS_PO_CUST

    Dear All,
    I am implementing a customer subscreen in the PO header. I have created the screen, implemented both Badi's int following way.
    Somehow, the customer data is not getting saved. It is not being passed into the Badi's, am not sur what I have missed because I have implemeted it exactly like the example implementation, only the example is for item and I am using a PO Header subscreen. This is what I have done, please suggest.
    First in ME_GUI_PO_CUST
    Methods :-
    METHOD if_ex_me_gui_po_cust~subscribe .
      ls_subscriber-name = subscreen1.
      ls_subscriber-dynpro = lc_dynpro.
      ls_subscriber-program =  lc_repid.
      ls_subscriber-struct_name = lc_struc.
      ls_subscriber-label = text-001.
      ls_subscriber-position = 10.
      ls_subscriber-height = 7.
      APPEND ls_subscriber TO re_subscribers.
    ENDMETHOD.
    METHOD if_ex_me_gui_po_cust~map_dynpro_fields .
      FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
      LOOP AT ch_mapping ASSIGNING <mapping>.
        CASE <mapping>-fieldname.
          WHEN 'ZZDEPT'.
            <mapping>-metafield = mmmfd_cust_01.
        ENDCASE.
      ENDLOOP.
    ENDMETHOD.
    METHOD if_ex_me_gui_po_cust~transport_from_model .
      DATA: l_header       TYPE REF TO if_purchase_order_mm,
            ls_mepoheader  TYPE mepoheader,
            ls_customer  TYPE ci_ekkodb.
      CASE im_name.
        WHEN subscreen1.
          mmpur_dynamic_cast l_header im_model.
          CHECK NOT l_header IS INITIAL.
          ls_mepoheader = l_header->get_data( ).
          MOVE ls_mepoheader-zzdept TO dynp_data_pbo-zzdept.
          MOVE gs_data-zzdept TO dynp_data_pbo-zzdept.
        WHEN OTHERS.
      ENDCASE.
    ENDMETHOD.
    METHOD if_ex_me_gui_po_cust~transport_to_dynp .
      CASE im_name.
        WHEN subscreen1.
          CALL FUNCTION 'ZF00MM_POHEADER_PUSH'
            EXPORTING
              im_dynp_data = dynp_data_pbo.
        WHEN OTHERS.
      ENDCASE.
    ENDMETHOD.
    METHOD if_ex_me_gui_po_cust~transport_from_dynp .
      CASE im_name.
        WHEN subscreen1.
          CALL FUNCTION 'ZF00MM_POHEADER_POP'
            IMPORTING
              ex_dynp_data = dynp_data_pai.
          IF dynp_data_pai NE dynp_data_pbo.
            re_changed = mmpur_yes.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDMETHOD.
    METHOD if_ex_me_gui_po_cust~transport_to_model .
      DATA: lv_header       TYPE REF TO if_purchase_order_mm,
            lw_ekkodb       TYPE mepoheader.
      CASE im_name.
        WHEN subscreen1.
          mmpur_dynamic_cast lv_header im_model.
          CHECK NOT lv_header IS INITIAL.
          lw_ekkodb = lv_header->get_data( ).
          IF dynp_data_pbo-zzdept NE dynp_data_pai-zzdept.
            MOVE dynp_data_pai-zzdept TO lw_ekkodb-zzdept.
            gs_data-zzdept = lw_ekkodb-zzdept.
          ENDIF.
          lv_header->set_data( lw_ekkodb ).
      ENDCASE.
    ENDMETHOD.
    ME_PROCESS_PO_CUST
    Set the field status in method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER
    METHOD if_ex_me_process_po_cust~open .
      DATA: ls_mepoheader TYPE mepoheader.
      CHECK im_trtyp EQ 'V' OR im_trtyp EQ 'A'.
      ls_mepoheader = im_header->get_data( ).
      SELECT SINGLE zzdept FROM ekko INTO gs_data_old-zzdept
                          WHERE ebeln = ls_mepoheader-zzdept.
      gs_data = gs_data_old.
    ENDMETHOD.
    METHOD if_ex_me_process_po_cust~post .
      DATA: ls_mepoheader  TYPE mepoheader.
      ls_mepoheader = im_header->get_data( ).
      ls_mepoheader-zzdept = gs_data-zzdept.
    ENDMETHOD.
    Can somebody please suggest what is going wrong ? All the methods are being called but the field ZZDEPT is not being transferred into the BADI structures and hence is not saved/changed or displayed.
    Appreciate your help.
    Thanks in advance.
    Edited by: SAP ABAPer on Jan 25, 2010 4:55 PM

    Tried very hard to improve the formatting of the post, but it doesn't seem to work for me !!

  • BADI'S AND EXITS

    I need  some information and examples related to Badis and User Exits

    Hi
    Business Add-Ins
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
    As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
    • In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
    • In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
    In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
    A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
    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
    User exits
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a function module. The code for the function module is written by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:
    EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    To find a Exit.
    Goto Transaction -- Find The Package
    SMOD >f4>Use the Package here to Find the Exits In the Package.
    Else if you Want to search by Application Area wise ,
    There is one more tab to find the Exits in the Respective Application Area.
    Implementing the Exit-- CMOD Create ProjectsAssgn your Component .
    Now Run ur Transaction to Check if it Triggers.
    Thats it..
    Suppose you need to find out all the user exits related to a tcode.
    1. Execute the Tcode.
    2. Open the SAP program.
    3. Get the Development Class.
    4. Execute Tcode SE84.
    5. Open the Node 'Envir. -> Exit Techniques -> 'Customer Exits -> Enhancements'
    6. Enter the Development class and execute.
    Check out this thread..
    The specified item was not found.
    1. Type the transaction : system->status-> <PROG. NAME>
    2 open SE37 , type EXIT<PROG NAME> and press F4 to get the list of function exits available.
    3. Open CMOD utilities->SAP enhancements
    EDIT->All selections
    4.type the function module name obtained in step 2, in fields 'component name' in 'additional selections' block. and execute.
    5. The displayed list contains the enhancements names for the transaction You were looking for.
    6. Create a project in CMOD and the code in default include->activate.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    User-Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
    These links will help you to learn more on user exits.
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.allsaplinks.com/user_exit.html
    www.sap-img.com/abap/what-is-user-exits.htm
    Also please check these threads for more details about user exits.
    Re: Screen exit
    user exit and customer exit
    user exit
    1. Document on UserExits in FI/CO
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    2. Finding User Exits...
    http://sap.ionelburlacu.ro/abap/sap2/Other_Useful_Tips.html#Finding_User_Exits
    3. List of all User Exits...
    http://www.planetsap.com/userexit_main_page.htm
    Regards
    Anji

  • BADI'S AND THERE FUNCTIONALITY

    Hello,
       can anyone please give me the list of BADI'S and there functionality in CRM
                            GOPAL VARMA

    Hi Ramgopal,
    BADI's are used to add additional functionality to a
    standard transaction or enhance a standard transaction.
    They are now a days used instead of User Exits.
    E.G. If you want to add some additional checks before
    saving the order in CRM, you can create an
    implementation for the BADI definition ORDER_SAVE in
    SE19, write the code for validation in PREPARE or CHECK
    method and activate it.
    For list of BADI's use the transaction SE18(Definition) and SE19(Implemenation)
    Tables which store BADI's:
    Tables
    SXS_INTER
    SXC_EXIT
    SXC_CLASS
    SXC_ATTR
    Views
    V_EXT_IMP
    V_EXT_ACT
    Here are some links for BADIs:
    http://help.sap.com/saphelp_erp2005/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    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
    <b>Reward points if it helps.</b>
    Message was edited by: Amit Mishra

  • BADI modify and change

    go to SE24 --> CL_EX_FI_TRANS_DATE_DERIVE
    i can double click on the method name.it lead me to the code where i can write my piece of code
    method
    *--- write code my piece of code
    endmethod
    got to SE18 -->FI_TRANS_DATE_DERIVE
    when i double click on the method name nothing happen.  It there a button i must click to get
    method
    endmethod
    Is this two method the only way to search for and modify a badi
    Can anyone explain to me what if i want to create a badi? how will the transaction let recognise the badi?
    what good tips is there to know about BADI

    hI,
      Implementing Business Add-Ins (BADI)     
    The use of object orientated code within SAP has lead to new method of enhancing standard SAP code called
    Business Add-Ins or BADI's for short. Although the implementation concept is based on classes, methods and
    inheritance you do not really have to understand this fully to implement a BADI. Simply think of methods
    as a function module with the same import and export parameters and follow the simple instructions below.     
    Steps:
    1.     Execute Business Add-In(BADI) transaction SE18
    2.     Enter BADI name i.e. HRPBSGB_HESA_NISR and press the display
            button
    3.     Select menu option Implementation->Create
    4.     Give implementation a name such as Z_HRPBSGB_HESA_NISR
    5.      You can now make any changes you require to the BADI within this
            implementation, for example choose the Interface tab
    6.     Double click on the method you want to change, you can now enter
            any code you require.
    7.      Please note to find out what import and export parameters a
            method has got return the original BADI definition
            (i.e. HRPBSGB_HESA_NISR) and double click on the method name
            for example within HRPBSGB_HESA_NISR contract is a method
    8.      When changes have been made activate the implementation
    rEFER
    Check these links for info about badi..
    BADI's
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    BADI's
    http://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://www.esnips.com/web/BAdI
    http://www.allsaplinks.com/badi.html
    New to Badi
    Regards

  • BADI ME_PROCESS_PO_CUST AND BADI ME_DEFINE_CALCTYPE

    Hi,
    How do I change the pricing type when creating aPurchase Order using BADI ME_PROCESS_PO_CUST and ME_DEFINE_CALCTYPE.
    I need to set the value  IM_DATA-Calctype = 'B'  (Calctype) on the first badi.
    Please help!

    hi this is the code:
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:   RE_DATA TYPE MEPOITEM,
              IM_DATA TYPE MEPOITEM.
         CALL METHOD IM_ITEM->get_data
         RECEIVING
            RE_DATA = RE_DATA.
    MOVE 'B' TO RE_DATA-calctype.
    CALL METHOD IM_ITEM->set_data
             EXPORTING
                IM_DATA  = RE_DATA.
    endmethod.
    Upon creation of PO error message prompt
    'Data from Business Add-In ME_PROCESS_PO_CUST not adopted'

  • Why we call badi is multilevel implementation.

    hi friends,
    why we call badi is multi level implementation(i.e.,sap,customer,partner,industry version and country version).
    but comes to user exit we call two level implementation.(i.e.,sap and customer).
    what exactly the two level and multi level implementation.
    can any one tell this.

    Hi,
    See if it helps:
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
    As with customer exits two different views are available:
    In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
    In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
    All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.

  • 12,000 bad creation dates

    Hi,
    I have had some problems with 10.9. 4 kernel panics since December and some Finder issues (delay in files appearing in new folders when moved, delay in creating new folders, other problems...). AppleCare has had me reinstall 10.9, migrate from my Time Capsule and other things that I can't remember in detail.
    I am now noticing that I have ~12,000 files with bad creation dates. I did a search starting from 1993 and found that many. They vary; pics, docs and some apps! (I also have ~300 bad modification dates, from doing a quick similar search.)
    In the past I have used a program, A Better Finder Attributes 5, to fix a few files that had shown up with bad dates. Most then were dates in the future, if I remember correctly. (I don't have any files created in the future now...)
    I talked with AppleCare about this today. The guy, who has been very helpful, recommended I not use a program like that to fix them. He didn't think the bad dates would be a problem. Maybe not but I am sorely tempted to fix them.
    What do you think? Why do you think this happened? Is it possible to get the original file creation and modification dates back?
    Thanks.
    John L

    Hi Terry,
       The problem is that the creation date is not a part of UNIX file metadata but is part of the HFS metadata. That means that it's not accessible to traditional UNIX command line tools. However, Apple provides a command line tool with the Developer Tools that can do it, named SetFile. Unfortunately this tool can only act on one file at a time so it must be embedded in another command or script that invokes it repeated on a large group of files.
       You don't say which files have this problem. Thus I can't address the criteria by which you decide on which files to act. For the purpose of writing down a command, I'll assume that you want to act on all files contained in a directory whose path is /My/Directory and all of it's subdirectories. In that case you could use the following command:
    find /My/Directory -type f -exec /Developer/Tools/SetFile -d 08/30/06 {} \;
    Because of the "-type f" switch, this command will only act on files, not directories. That's not a requirement; you can act on directories as well. I just wanted an example to suggest that you can specify a tremendous variety of criteria in choosing on which files to act. About the only criteria you can't use in the "find" command is the creation date itself, since the "find" command is a traditional UNIX tool.
       You could still use the creation date to determine on which files to act but you would have to access it with GetFileInfo (also part of Apple's Developer Tools) and test the results in a script. Even though you have no interest in changing the modification date, if that was also "zeroed", you could use that to identify files that need to have the creation date changed.
    Gary
    ~~~~
       Our business is run on trust. We trust you will pay
       in advance.

Maybe you are looking for

  • I want to use the Mac more, I really do, but-

    Admittedly, I’m a new Mac user (purchased Macbook Pro last October), and I’m really trying to get acclimated to it. I WANT to use it more, but I hit a roadblock at every turn. I’ll keep my issues limited to iMovie in this thread of course, but it see

  • Pdf files as attachments, inconsistent, some open some as file?

    WHen i attach multiple pdf files, sometimes they just show up at the attachment and sometimes they are open in the email. I prefer the former. How can I make them all the same? They can be created from the same application the same way, no rhyme or r

  • How to continue downloads after dial-up dropout?

    Upon downloading large files via a dial-up Internet connection I've had frequent dropouts. rather than letting me continue the download the file is marked "mounting failed". Is there an way or an application that caould enable me to return to files a

  • Cannot install Lion mountain even in OS 10.6.8, why?

    when click install, the program check up not finish full and then prompt to installation screen.  After press install, there is show please restart your computer. Why?

  • Reports in Oracle9ias

    When i call the Report from parameter form in 9iAs ,the following error is displaying "REP-3002:Error initializing printer.Please make sure a printer is installed" How to rectify the error