+ All Categories
Home > Documents > Classic BADI With Single Use

Classic BADI With Single Use

Date post: 01-Mar-2018
Category:
Upload: anil
View: 223 times
Download: 1 times
Share this document with a friend

of 25

Transcript
  • 7/25/2019 Classic BADI With Single Use

    1/25

    Classic BADI with Single Use(Single Implementation)Scenario: Creation of Classic BADI definition with single use and creation of BADI

    implementation and calling the BADI implementation from program.

    The current SAP system release is 605.

    http://freesapabap.blogspot.com/2013/10/classic-badi-with-single-usesingle.htmlhttp://freesapabap.blogspot.com/2013/10/classic-badi-with-single-usesingle.html
  • 7/25/2019 Classic BADI With Single Use

    2/25

    Step1. Go to TCODE- SE18.

    Step2. Select radio button BADI Name and provide a BADI definition name and click on

    Create button.It gives a error message as 'Create operation is only possible for enhancement spots'.

    As SAP provided a new concept of BADI as Kernal BADI, the classical BADI is restricted

    but

    still there is a way to go ahead in the system to create it.

  • 7/25/2019 Classic BADI With Single Use

    3/25

    Step3. Provide the BADI name and go to the menu Utilities and Click on Create Classic

    BADI .

  • 7/25/2019 Classic BADI With Single Use

    4/25

    Step4. Provide a short description. In the properties section, the system automatically

    generates a BADI Class based on the BADI name. In the TYPE section, as the multiple use

    option is not selected, it means

    that it is a single use BADI.

  • 7/25/2019 Classic BADI With Single Use

    5/25

    Step5. Click on the Interface tab. The system also generate a Interface with no method

    based on the BADI name.Now double click on the interface name

    'ZIF_EX_BADI_DEFN_DEMO1'.

    Step6. It navigates to SE24 transaction. Now in the 'METHODS' tab, provide a method

    name as 'DISPLAY_MESSAGE', select the level and provide the description and activate

    the interface. At last Click on the BACK button.

    Step7. Now the method is added to the interface. Up to this point the BADI definition is

    created with interface containing an empty method.

  • 7/25/2019 Classic BADI With Single Use

    6/25

    Step8. Creating a BADI Implementation. Go to TCODE - SE19. Under the CREATE

    Implementation Section, Select the Radio button classic badi and provide the BADI

    definition name created above and click on the Create Impl. button and it 'll show a popup

    screen . Provide the Implementation name as 'ZBADI_IMPL_DEMO1' and click on the

    continue button.

  • 7/25/2019 Classic BADI With Single Use

    7/25

    Step9. Provide a implementation short text and click on the Interface Tab.

    Step10. For this implementation the system automatically creates a Implementing Class

    which implements the method 'DISPLAY_MESSAGE' of the interface associated with BADI

    definition.Now double click on the method 'DISPLAY_MESSAGE' to implement the method.

  • 7/25/2019 Classic BADI With Single Use

    8/25

    Step11. Provide some statement here and then click on the activate button and at last click

    on the back button.Now up to this point we crated a BADI implementation successfully.

    Step12. Calling the BADI implementation form the program . Go to TCODE - SE38 and

    create a report program.

  • 7/25/2019 Classic BADI With Single Use

    9/25

    Step13. Create a reference variable referring to the Interface name associated with the

    BADI definition.

    Then call the static method GET_INSTANCE of the class CL_EXITHANDLER. Pass the

    BADI definition name and it ll return the object of the active implementing class to the

    reference variable. Activate the program and run it.

    Step14. Now it calls the methods and display the output.

  • 7/25/2019 Classic BADI With Single Use

    10/25

    _________________________________________________________________________

    ______

    Step15. Further scenarios. As the badi is a single use BADI let's create anotherimplementation of it.

    Go to TCODE- SE19 and in the Create Implementation Section provide the BADI definition

    name and click on the Create Impl. Button. In the popup screen provide the Implementation

    name and click on teh continue button.

    Step16. Provide a implementation short text and then click on the interface button.

  • 7/25/2019 Classic BADI With Single Use

    11/25

    Step17. Now for this implementation a new implementing class is generated and the

    interface associated with the BADI definition is implemented in this class. Now double click

    on the method 'DISPLAY_MESSAGE'

    to implement it.

    Step18. Provide some statement and activate the same . At last click on the back button.

  • 7/25/2019 Classic BADI With Single Use

    12/25

    Step19. Activate the BADI Implementation.

    Step20. Run the report as per shown below.

  • 7/25/2019 Classic BADI With Single Use

    13/25

    Step21. Now for this the sy-subrc = 5 [Single_exit_multiple_active]. As our BADI definition is

    not a multiple use badi (single uses badi) and we have multiple implementations of it.

  • 7/25/2019 Classic BADI With Single Use

    14/25

    Step22.The output is as follows.

    XXXXXXXXXXXXXXXXXXXXXXXXX

    Posted 20th October 2013 byS Prasad

    View comments

    TECHSAP

    https://plus.google.com/114153916726242002532http://freesapabap.blogspot.in/https://plus.google.com/114153916726242002532http://freesapabap.blogspot.in/
  • 7/25/2019 Classic BADI With Single Use

    15/25

    [visit www.marathustech.net for

    classroom or online training or

    contact +91 89708 40880]

    Sidebar

    Home

    Topic Tutorials

    F! Tutorials

    Topic "ise #uestions $or Inter%iew&

    SA ABA Short #uestions $or written inter%iew

    'eed SA Training&

    "ant to Call an U* $rom ABA rogram&

    http://freesapabap.blogspot.in/http://freesapabap.blogspot.in/p/tutorials.htmlhttp://freesapabap.blogspot.in/p/fpm-tutorials.htmlhttp://freesapabap.blogspot.in/p/topic-wise-ques-ans.htmlhttp://freesapabap.blogspot.in/p/sap-abap-short-questions-for-written.htmlhttp://freesapabap.blogspot.in/p/need-sap-tarining.htmlhttp://freesapabap.blogspot.com/2015/05/want-to-call-any-url-from-abap-program.htmlhttp://freesapabap.blogspot.in/http://freesapabap.blogspot.in/p/tutorials.htmlhttp://freesapabap.blogspot.in/p/fpm-tutorials.htmlhttp://freesapabap.blogspot.in/p/topic-wise-ques-ans.htmlhttp://freesapabap.blogspot.in/p/sap-abap-short-questions-for-written.htmlhttp://freesapabap.blogspot.in/p/need-sap-tarining.htmlhttp://freesapabap.blogspot.com/2015/05/want-to-call-any-url-from-abap-program.html
  • 7/25/2019 Classic BADI With Single Use

    16/25

    Calling Calculator in ABA rogram+

    eading program te,t pool+

    How to create a Single #uote &

    Con%ersion- aw to String

    Con%ersions (.) - /STI'0 to STI'0

    Con%ersions - /STI'0 to STI'0

    Con%ersions - STI'0 to /STI'0

    SA Script Important Standard rograms+

    How to use User arameter ID &

    How to call !aintenance 1iew rogramaticall&

    How get to 2now SA34A1A engine is acti%e or not&

    How to Chec2 Di$$erent *anguages Installed in SA Sstem&

    http://freesapabap.blogspot.com/2015/05/calling-calculator-in-abap-program.htmlhttp://freesapabap.blogspot.com/2015/05/step1.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-create-single-quote.htmlhttp://freesapabap.blogspot.com/2015/05/conversion-raw-to-string.htmlhttp://freesapabap.blogspot.com/2015/05/conversions-2-xstring-to-string.htmlhttp://freesapabap.blogspot.com/2015/05/conversions-xstring-to-string.htmlhttp://freesapabap.blogspot.com/2015/05/conversions-string-to-xstring.htmlhttp://freesapabap.blogspot.com/2015/05/sap-script-important-standard-programs.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-use-user-parameter-id.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-call-maintenance-view.htmlhttp://freesapabap.blogspot.com/2015/05/how-get-to-know-sapjava-engine-is.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-check-different-languages.htmlhttp://freesapabap.blogspot.com/2015/05/calling-calculator-in-abap-program.htmlhttp://freesapabap.blogspot.com/2015/05/step1.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-create-single-quote.htmlhttp://freesapabap.blogspot.com/2015/05/conversion-raw-to-string.htmlhttp://freesapabap.blogspot.com/2015/05/conversions-2-xstring-to-string.htmlhttp://freesapabap.blogspot.com/2015/05/conversions-xstring-to-string.htmlhttp://freesapabap.blogspot.com/2015/05/conversions-string-to-xstring.htmlhttp://freesapabap.blogspot.com/2015/05/sap-script-important-standard-programs.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-use-user-parameter-id.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-call-maintenance-view.htmlhttp://freesapabap.blogspot.com/2015/05/how-get-to-know-sapjava-engine-is.htmlhttp://freesapabap.blogspot.com/2015/05/how-to-check-different-languages.html
  • 7/25/2019 Classic BADI With Single Use

    17/25

    !a,imum allowed sessions in SA&

    How to Create 'umber ange 5b6ect 7T,8 S'59

    :ditable A*1 with sa%e $unctionalit uisng 55ABA

    Creating a dnamic %ariant $or a report

    unning bac2ground 6ob b triggering an e%ent

    ;

  • 7/25/2019 Classic BADI With Single Use

    18/25

    eading Data $rom SA Application Ser%er 7 T,8 A*;; 9

    "riting Data to SA Application Ser%er 7 T,8 A*;; 9

    ;>= Smart$orm -Designing a template in Smart$orm

    ?= Smart$orm - Designing a table in smart$orm

    @= Smart$orm - Displaing address on a Smart$orm "indow

    = Smart$orm - Displaing a logo on a Smart$orm "indow

    =Smart$rom- How to call a Smart$orm progrmaticall that wor2s in de%elopment ualit E production&

    =Smart$rom - How to call a Smart$orm rogrmaticall&

    G=Smart$orm8 Using Dnamic Te,t in window

  • 7/25/2019 Classic BADI With Single Use

    19/25

    ;=Smart$orm 8 Using a te,t element in window

    Bene$its o$ use o$ te,t elements and its translation

    Use o$ SA 5T 75nlineTe,t epositor9 Te,t

    artG - F! 51 Application 8Integrating Search UIBB and *ist UIBB- Displaing 5U Screen

    art< - F! 51 Application 8Integrating Search UIBB and *ist UIBB- !essage Displa

    art. - F! Integrating Search UIBB and *ist UIBB into F! 51 Application - *in2 to action

    art; - F! Integrating Search UIBB and *ist UIBB into F! 51 Application

    Creating ange Table Tpe in Data Dictionar

    Con%erting Script 5TF data to DF

    'eed to Con%ert Spool euest(0enerated Bac2ground 4ob ) Into DF+

    'eed to Con%ert Spool euest(5TF Script) Into DF+

    http://freesapabap.blogspot.com/2015/03/1smartfrom-using-text-element-in-window.htmlhttp://freesapabap.blogspot.com/2015/01/benefits-of-use-of-text-elements-and.htmlhttp://freesapabap.blogspot.com/2015/01/use-of-sap-otr-onlin-etext-repositiry.htmlhttp://freesapabap.blogspot.com/2015/01/part3-fpm-ovp-application-integrating_20.htmlhttp://freesapabap.blogspot.com/2015/01/part3-fpm-ovp-application-integrating.htmlhttp://freesapabap.blogspot.com/2015/01/part2-fpm-integarting-search-uibb-and.htmlhttp://freesapabap.blogspot.com/2015/01/fpm-integarting-search-uibb-and-list.htmlhttp://freesapabap.blogspot.com/2015/01/creating-range-table-type-in-data.htmlhttp://freesapabap.blogspot.com/2015/01/converting-script-otf-data-to-pdf.htmlhttp://freesapabap.blogspot.com/2015/01/need-to-convert-spool-requestgenerated.htmlhttp://freesapabap.blogspot.com/2015/01/need-to-convert-spool-request-into-pdf.htmlhttp://freesapabap.blogspot.com/2015/03/1smartfrom-using-text-element-in-window.htmlhttp://freesapabap.blogspot.com/2015/01/benefits-of-use-of-text-elements-and.htmlhttp://freesapabap.blogspot.com/2015/01/use-of-sap-otr-onlin-etext-repositiry.htmlhttp://freesapabap.blogspot.com/2015/01/part3-fpm-ovp-application-integrating_20.htmlhttp://freesapabap.blogspot.com/2015/01/part3-fpm-ovp-application-integrating.htmlhttp://freesapabap.blogspot.com/2015/01/part2-fpm-integarting-search-uibb-and.htmlhttp://freesapabap.blogspot.com/2015/01/fpm-integarting-search-uibb-and-list.htmlhttp://freesapabap.blogspot.com/2015/01/creating-range-table-type-in-data.htmlhttp://freesapabap.blogspot.com/2015/01/converting-script-otf-data-to-pdf.htmlhttp://freesapabap.blogspot.com/2015/01/need-to-convert-spool-requestgenerated.htmlhttp://freesapabap.blogspot.com/2015/01/need-to-convert-spool-request-into-pdf.html
  • 7/25/2019 Classic BADI With Single Use

    20/25

    Tabbed Bloc2 at Selection8screen

    FC with 5utbound #ueue E Inbound #ueue between two di$$erent SA sstems 8 5ne *U" per mi,ed part o$ the

    #ueues

    FC with 5utbound #ueue E Inbound #ueue between two di$$erent SA sstems 8 5ne *U" per #ueue Call

    FC with 5utbound #ueue E Inbound #ueue between two di$$erent SA sstems 8 5ne *U" $or !ultiple #U:U: Calls"ant to Call an U* $rom ABA rogram&

    -------------------------------------------------------------------------------------------------------------------------------Code:---------------------------------------------------------------------------------------------------------------CALL METHOD cl_gui_frontend_services=>execute EXO!T"#$% docu&ent = ' (t)*#(&e to Docu&ent (++lic(tion = ,.google.co&, ' (t) (nd #(&e of A++lic(tion

    % +(r(&eter = ' (r(&eter for A++lic(tion% def(ult_director/ = ' Def(ult Director/% &(xi&i0ed = ' 1)o 2indo M(xi&i0ed% &ini&i0ed = ' 1)o 2indo Mini&i0ed% s/nc)ronous = ' 2)en ,X,: !uns t)e A++lic(tion in 1/nc)ronous Mode% o+er(tion = ,OE#, ' !eserved: 3er4 f5r 1)ellExecute EXCET"O#1 cntl_error = 6 error_no_gui = 7 4(d_+(r(&eter = 8 file_not_found = 9 +(t)_not_found =

    file_extension_un;non = < error_execute_f(iled = s/nc)ronous_f(iled = not_su++orted_4/_gui = ? OTHE!1 = 6@." s/-su4rc B> @.% ME11A$E "D s/-&sgid TE s/-&sgt/ #ME! s/-&sgno% 2"TH s/-&sgv6 s/-&sgv7 s/-&sgv8 s/-&sgv9.

    http://freesapabap.blogspot.com/2015/01/tabbed-block-at-selection-screen.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_55.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_55.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_56.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_57.htmlhttp://freesapabap.blogspot.com/2015/05/want-to-call-any-url-from-abap-program.htmlhttp://freesapabap.blogspot.com/2015/01/tabbed-block-at-selection-screen.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_55.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_55.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_56.htmlhttp://freesapabap.blogspot.com/2014/12/qrfc-with-outbound-queue-inbound-queue_57.htmlhttp://freesapabap.blogspot.com/2015/05/want-to-call-any-url-from-abap-program.html
  • 7/25/2019 Classic BADI With Single Use

    21/25

    E#D".

    ---------------------------------------------------------------------------------------------------------------

    1te+6. cl_gui_frontend_services=>execute &et)od c(n 4e used to c(ll (n/ !L. "t c(n4e used to c(ll (n/ e4d/n+roFf+& (++lic(tion fro& t)e +rogr(& (s ever/e4d/n+roFf+& (++lic(tion )(ve (n uniuGe !L.

  • 7/25/2019 Classic BADI With Single Use

    22/25

    1te+7. Here it c(lls t)e !L.

  • 7/25/2019 Classic BADI With Single Use

    23/25

    1te+8. 1till e c(n o+en (n/ docu&ent 4/ s+ecif/ing t)e (++ro+ri(te execut(4le fileloc(tion of t)e director/ of t)e file (nd +roviding t)e file n(&e.

    1te+9. Here is one ex(&+le )o e c(n o+en ( D file 4/ t)e &et)odcl_gui_frontend_services=>execute.

  • 7/25/2019 Classic BADI With Single Use

    24/25

    -------------------------------------------------------------------------------------------------------------------------------

    Posted 2 days ago byS Prasad

    View comments

    https://plus.google.com/114153916726242002532https://plus.google.com/114153916726242002532
  • 7/25/2019 Classic BADI With Single Use

    25/25

    Loading


Recommended