Help in BADI Creation
Hi
I got solution from OSS to create the BADI
MB_MIGO_BADI (method CHECK_HEADER) to
check if the date in GOHEAD-BUDAT is greater than the system date
(SY-DATLO).
But i have tried this in Tcode Se18 where i write Badi Definition
MB_MIGO_BADI but it gives error that Badi Definition does not Exist.
So how should i proceed further.
Please help me in this regard.
Thank you,
Bhaskar
Hi,
Goto SE18-> 'MB_MIGO_BADI'-> Click Display. Then goto Transaction SE19 - Type ZMB_MIGO_BADI and click on create, it will ask for Definition name provide 'MB_MIGO_BADI' in it and then provide text. Goto interface tab now and double click on the method you need to code and write your code there.
Hope this might have helped you.
Thanks,
Prashanth
Similar Messages
-
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 LHi 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. -
i need help really bad. im trying to sync music on my ipod, but a message comes up say " cannot synce photoes in ipod because the folder pictures cannot be found . what do i do ?
Try deleting the iPod Photos Cache folder. There may be more than one. For its location see:
iTunes: Photo sync creates iPod Photo Cache folder
Also, go to the Photos pane for the iPod in iTunes and make sure syncing photos is unchecked. -
I receive an error message each time I start my PC. I get the I Tunes Helper.exe- Bad Image message and need to click 5 times before it goes away. I was trying to sync my I Phone with OUtlook and something happened. I am not tech-savvy.
Many thanks.
Taken at face value, you're having trouble with an Apple Mobile Device Support file there.
Let's try something relatively simple first.
Restart the PC. After you've fought your way through the error messages, go into your Uninstall a program control panel, select "Apple Mobile Device Support", and click "Repair".
Does the repair install seem to go through okay? If so, restart the PC again. Have the error messages from iTunesHelper.exe stopped? -
Schedule line Release with help of release creation profile.
Hello,
Is it possible to create the schedule line release for scehule line automaticaly by heuristcs run with the help of release creation profile of external procurement relationship ?
We can release the schedule line in product view.
What is other way release the schedule line?Hi,
Credit check is done to see if the customer has crossed his credit limit or not. Incase you want to forcefully release order we use [VKM1]. What is this got to do with the schedule lines??? Irrespective of whether the order is under credit hold or no the schedule line are determined the same way. Didnt understand the connection.
Regards
Nadarajah Pratheb -
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.. -
Urgent help needed in creation of planning application
Hi,
Iam new to planning. I installed planning and configured(Created planning instance, Datasource). When i login into workspace and want to create new planning application. The wizard opens correctly. After giving application name, calender,currency type, Plan type, etc... when i click finish to create a new planning application, it says *"An error occured while processing this page. Check the log for detail".* But i observed one thing the application was created in Essbase without Databases and outline. So can anyone explain me wats the exact prob. where I can see the Log details. Help me.
Thanks in advance.Hi,
Databases will not be created until you created until you refresh to essbase from within planning, you are not up to that stage yet. Only an essbase application will be created.
What I suggest you do, is delete the essbase application. Then run planning from the start menu and not as a service, this will mean you will get any error messages displayed in the window.
Then try and perform the application creation again and see what errors are produced.
Cheers
John
http://john-goodwin.blogspot.com/ -
Help with dynamic creation of class object names
Hi all
Wonder if you can help. I have a class player.java. I want to be able to create objects from this class depending on a int counter variable.
So, for example,
int counter = 1;
Player p+counter = new Player ("Sam","Smith");the counter increments by 1 each time the method this sits within is called. The syntax for Player name creation is incorrect. What I am looking to create is Player p1, Player p2, Player p3.... depending on value of i.
Basically I think this is just a question of syntax, but I can't quite get there.
Please help if you can.
Thanks.
Samhere is the method:
//add member
public void addMember() {
String output,firstName,secondName,address1,address2,phoneNumberAsString;
long phoneNumber;
boolean isMember=true;
this.memberCounter++;
Player temp;
//create HashMap
HashMap memberList = new HashMap();
output="Squash Court Booking System \n";
output=output+"Enter Details \n\n";
firstName=askUser("Enter First Name: ");
secondName=askUser("Enter Second Name: ");
address1=askUser("Enter Street Name and Number: ");
address2=askUser("Enter Town: ");
phoneNumberAsString=askUser("Enter Phone Number: ");
phoneNumber=Long.parseLong(phoneNumberAsString);
Player p = new Player(firstName,secondName,address1,address2,phoneNumber,isMember);
//place member into HashMap
memberList.put(new Integer(memberCounter),p);
//JOptionPane.showMessageDialog(null,"Membercounter="+memberCounter,"Test",JOptionPane.INFORMATION_MESSAGE);
//create iterator
Iterator members = memberList.values().iterator();
//create output
output="";
while(members.hasNext()) {
temp = (Player)members.next();
output=output + temp.getFirstName() + " ";
output=output + temp.getSecondName() + "\n";
output=output + temp.getAddress1() + "\n";
output=output + temp.getAddress2() + "\n";
output= output + temp.getPhoneNumber() + "\n";
output= output + temp.getIsMember();
//display message
JOptionPane.showMessageDialog(null,output,"Member Listings",JOptionPane.INFORMATION_MESSAGE);
}//end addMemberOn running this, no matter how many details are input, the HashMap only gives me the first one back....
Any ideas?
Sam -
Hi Abappers,
Kindly help me out as i am in trouble. I have got a requirement to add customized fields onto O4_TIGER screen using BADI. I have got the name of the BADI definition ie., OII_DIP_ADD_COLUMNS . This screen is related to MM -> Inventory mangement -> Is-OIL.
Can anyone pl help me out of how to add fields . Coz i have absolutely nil knowledge in BADIs and Userexits. I would be very much pleased if some one suggest me a step by step process.
Regards.<b>first u define BADI in " SE18", and implement in "SE19".
for predefined GLOBAL CLASS : CL_EXITHANDLER which can enable BADI service.
method-->GET_INSTANCE (which can create instance of a class)
gowith SE18 --> NAME..... Z***** --> CREATE,
click check box MULTIPLE USE.
select INTERFACE tab
INTERFACE ..... ZIF_EX_**** <-----click on this -
> enter.
save details.
METHODS LEVEL DESCRIPTION
SELECT-DATA INSTANCE SELECTING DATA
select PARAMETERS
PARAMETER TYPE TYPING
CUST_LOW IMPORTING TYPE KNA1-KUNNR
CUST_HIGH IMPORTING TYPE KNA1-KUNNR
SAVE DETAILS.
implementing BADI -
> SE19
implementation name ...... Z**********-----> CREATE
DESCRIPTION--...DEMO FOR BADI
select--> INTERFACE
for method> SELECT_DATA <--- click on this ---> enter
save details.
METHOD
DATA : ITAB TYPE TABLE OF KNA1,
WA TYPE KNA1.
SELECT KUNNR LAND1 NAME1 ORT01 FROM KNA1 INTO TABLE ITAB WHERE KUNNR BETWEEN CUST_LOW AND CUST_HIGH.
LOOP AT ITAB INTO WA.
WRITE:/ WA-KUNNR,WA-LAND1,WA-NAME1,WA-ORT01.
ENDLOOP.
ENDMETHOD.
F3 , SAVE and ACTIVATE.
LETUS CREATE EXECUTABLE PROGRAM (SE38).
PROVIDE TABLE WA.
REPORT Z*******
TABLES: KNA1.
SELECT-OPTIONS: S_KUNNR FOR KNA1-KUNNR.
declaration.
CLASS CL_EXITHANDLER DEFINITION LOAD.
interface reference
DATA: OBJ_EXIT TYPE REF TO ZIF_EX_*****.
START-OF-SELECTION.
gowith PATTERN ---> AABAP object pattern --> ENTER.
CALL METHOD
CLASS---- CL_EXITHANDLER
METHOD--- GET_INSTANCE
ENTER.
CALL METHOD.............
CHANGING
INSTANCE = OBJ_EXIT.
gowith PATTERN> AABAP OBJECT--> ENTER
CALL METHOD
OBJ---> OBJ_EXIT,
CLASS---> ZIF_EX_*******,
METHOD----> SELECT_DATA.
CALL METHOD.................
EXPORTING
CUST_LOW = S_KUNNR-LOW
CUST_HIGH = S_KUNNR-HIGH.
SAVE and ACTIVATE.
EXECUTE.</b> -
hi friends,
i have a requirement in which, when i post goods in migo, a pop up should come where i have to enter a form(form-31) details and this should get reflected in an ztable along with the vendor details. i have found that a BAdi(MB_DOCUMENT_BADI- i am using SAP R/3 5.0 ) exists with two methods
1.'MB_DOCUMENT_BEFORE_UPDATE'
2.'MB_DOCUMENT_UPDATE'.
which one should i use? becos in the documentation it says that 'MB_DOCUMENT_BEFORE_UPDATE' is called before any accounting documents are generated and if i write any database commit in this method then if some error occurs after the business add-ins are processed we cannot carry out a complete ROLL BACK,as the data up to the COMMIT has already been written in the database(ztable),it will lead to data inconsistency.
again in 'MB_DOCUMENT_UPDATE' it says is processed after the FI document numbers are called and for For performance reasons, you should not re-read the tables or write to any tables or carry out any time-consuming routines in this method..
pls advice if there is any other BAdi or any work around...waiting for your replies...and pls be descriptive...
also if the user cancels or exits the popup then processing should not proceed..it should come back to the migo initial screen without posting the goods...how to go about it?
regards
kiran
pls ...help is urgent...every effort is appreciated
Message was edited by: kiran kHi
If you call a popup I don't think you can use the method 'MB_DOCUMENT_UPDATE', as here you can update your Z-TABLE without the COMMIT. So I suppose this method works in background and in this step any popup can be shown.
So you should use 'MB_DOCUMENT_BEFORE_UPDATE', but I don't know I you can stop the saving, try to use an error message.
Max -
Changing the F4 help in BADIs of XK01
Hi,
I ve implemented the BADI defn VENDOR_ADD_DATA for XK01 and the method is PRESET_VALUES_CCODE..
For some fields there are certain values in the F4 help now I need to change the F4 help to show the values according to my requirement..
Ex for Cashmanagmnt group in XK01 the F4 help is ... A, B, C, K,J,T,M.(This Values are feteched from Predefined table T035 and I cant delete the Values from that table)
now if the condition which I given in the coding satisfies I should get the F4 help as.. A, B,T,M. Only
Please answer to my question...
please please please...
Edited by: Nalina Acharya on May 21, 2008 9:59 AMThnx for the answers
-
Required help for badi for GL tab in MIRO transaction
Hi,
I am working in MIRO transaction.
I am having a requirement as below:
While creating invoices, In the gl tab when we enter gl account number system should populate Tax jurisdiction code by default.
I am using BADI EXTENSION_US_TAXES method MM_ITEM_TAX_MODIFY but it populates the tax jurisdiction in PO reference tab not in GL tab.
Please advice
Regards,
Suvarna NandiHi
Have you tried with enhancement FYTX0002? See also Note 302998 - Collecting fields for user-exit. It's an idea.
I hope this helps you
Regards
Eduardo -
Help on BADI HRHAP_OFFLINE
Hi Experts,
I am having some difficulties with BADI HRHAP_OFFLINE (available in ECC 6.0).
This BADI is having standard SAP implementation HRHAP_OFFLINE01 in ECC 6.0. I want to attach customized smartform for appraisal form (for upload/download fucntions) using this BAPI.
I have created and activated Z Implementation of HRHAP_OFFLINE, but cannot find parameter to link smartform in any of the methods of this BAPI.
Any help will be highly appreciated.
Thanks in advance.
Regards,
Mohaiyuddin.solution : Copy and Edit hap_pdf_offline_form and attach it to the implementation of BADI HRHAP_OFFLINE.
-
Calling Search Help in BAdI implementation.
Hi All,
I have created my search help with search help exit function. Now I need to call this Search Help in my BAdI Implementation ( Method of BAdI) . Please suggest me which function I should use to call my search help.Hi,
Please use the following FM. It might be helpful.
F4IF_SELECT_VALUES
Regards
Bhupal Reddy -
Help required:Spool Creation for posted document in FB03 transaction
Hi Experts,
The requirement is like I have to send the PDF document to the user by mail once the document gets posted in SAP ECC. The posting is taking place by IDOC.
The problem is how do i get the spool request for the document which is posted in ECC. It can be seen by entering document number in FB03 transaction but there is no smart form or SAP script or any Output type. The document is posted by IDOC.The client wants the PDF document excatly as seen from FB03 transaction. Please help as this is typical requirement i have never come across.
Do let me know some of the user exits where in just after the posting i can write my code for spool creation. The idoc is using the BAPI_ACC_DOCUMENT_POST.HI
In test mode i am able to view the document no. but not the reference document no and when double click on the document no i am not able to view the journal entry.
Thanks.
Maybe you are looking for
-
My iTunes library no longer matches the music on my iPhone.
My iTunes library no longer matches the music on my iPhone. How can I sync the music and playlists from my phone onto iTunes without iTunes completely wiping all the music on my iPhone? I'm also afraid I'll lose any newer music.
-
Price mandatory in sales order
Hi SAP Experts, I want to make price ( PR00) mandatory in sales order . The sales order should not be allowed to save with out the price. How do I achieve this? I have made the following setting. 1. Made PR00 mandatory in pricing procedure. 2. Assig
-
IDOC to Flat file and Flat file to IDOC
Hello Experts, I have the following requirement in my current project: Third Party Sender sends the data in the in the below XML format via HTTP: <?xml version="1.0"?> <fxEnvelope> <header> <message> <exchangeID></exchangeID> <mes
-
A unique library for each iPod, but still sharing content
Each member of our household has an iPod, four in total, and their own HP laptop, one running Windows 7 and the others running Vista. Currently I synch all to an iTunes library on my laptop (Windows 7), with everyone sharing the same Apple ID for pur
-
IPad 2 Freezing and Dropping WiFi
Over the last few days my iPad 2 continuously freezes whilst watching things through iPlayer / Sky Go / 4 OD etc. Sometimes the WiFi will go completely and I need to switch back on. I have checked our Internet and all is fine, tried using the apps vi