Create Bdc Program Sap Abap

Classical way to ABAP OO style of coding. Object Oriented ABAP is taking slow phase in adoption for Pure ABAPersNot working in Webdynpro or other object oriented space even I took a yearlong to completely do my work in OO. Even I was in a situation when one of my clients questioned, why you code in OO as he was not able to understand. I was dumbstruck and the thought provoked me to write this for guys who are in dilemma on how to move to OO. I have seen many blogs on ABAP OO which will be a good start for learning explaining concepts and examples but still faced few challenges in moving to ABAP OO like where and how to start, just putting down my thoughts about the problems which faced little longer and ways I overcame Few road blocks in using ABAP OOo    Understanding concepts of OO who has no previous knowledge on OOo    How to implement the same in our regular work in RICEF objects. How to use major advantages of OOThis blog is for experienced developers, who are familiar with OO concepts but lazy in implementing the same in ABAP. Before I talk about any of these stuff, I would like to tell how to get familiarize with classes. Note This blog only provides approach and not any examplesFor newbies to ABAP OO, can get familiarize with these links ABAPABAPObjectsGettingStarted. I will show a small example report getting some entries from MARA and using CLSALVTABLE to display the same in ALV in four ways here         Traditional way of writing         OO way only using Static methods To get the hang of class and method concept         OO way Only Instance methods To get the hang of class and method concept         My IDEAL way in OO         New Trend of and completely moving your report to OO. YNaoOPXig/WTYyovuwY5I/AAAAAAAAAhA/sBEkorzuwoEuehKQa31rshapdRmwsjnswCLcB/s1600/b5.png' alt='Create Bdc Program Sap Abap' title='Create Bdc Program Sap Abap' />SAP ABAP Online Training Tutorials for beginners and professionals. Refer SAP ABAP training tutorial that explains step by step with screen shots. SAP ABAP. Helpful ABAP reports ABAP Program to delete mass documents ABAP System Fields ABAP Objects ABAP statements overview Introducing the next generation of ABAP. SDN Contribution ABAP BDC PROGRAM TO LOAD OUTPUT CONDITIONS Applies to ABAP BDC Summary ABAP Code Sample that uses dynamic programming techniques to build a. Create Bdc Program Sap Abap' title='Create Bdc Program Sap Abap' />This is the bestest yet easiest ABAP tutorial on the internet till date Dear SAP Community Member, In order to fully benefit from what the SAP Community has to offer, please register at http Thank you, The SAP Community team. Create Bdc Program Sap Abap' title='Create Bdc Program Sap Abap' />Traditional way of writing the code REPORT  ysdnblogclassic. PARAMETERS prows TYPE count DEFAULT 1. START OF SELECTION. DATA itmara TYPE STANDARD TABLE OF mara. PERFORM getdata CHANGING itmara. PERFORM display USING itmara. Form  GETDATAamp ORM getdata  CHANGING chmara TYPE maratt. Create Bdc Program Sap Abap' title='Create Bdc Program Sap Abap' />SELECT FROM mara INTO TABLE chmara  UP TO prows ROWS. ENDFORM.                     GETDATAamp       Form  DISPLAYamp ORM display  USING    imara TYPE maratt. DATA lrtable TYPE REF TO clsalvtable. IMPORTING    rsalvtable   lrtable. CHANGING     ttable           imara    . ENDFORM.                     DISPLAYOO way only using Static methods To get the hang of class and method concept. Lets start with classes and dont go in to boring part of explaining what is a STATIC or INSTANCE method Please google or go through about this stuff. Major developers who are new to OO, first question is whether my method should be INSTANCE or STATIC Lets save this question to the last. First to get the hang of the OO ABAP from traditional ABAP using STATIC methods only and above report looks like this suggest continuing writing couple of reportsobjectsREPORT  ysdnblogclassstatic. PARAMETERS prows TYPE count DEFAULT 1. CLASS lclmain DEFINITION LASS lclmain DEFINITION. PUBLIC SECTION. CLASS METHODS getdata  ,display. PRIVATE SECTION. CLASS DATA itmara TYPE maratt. ENDCLASS.                     lclmain DEFINITION        CLASS lclmain IMPLEMENTATION LASS lclmain IMPLEMENTATION. METHOD getdata. SELECT FROM mara INTO TABLE lclmain itmara  UP TO prows ROWS. ENDMETHOD.                     GETDATAMETHOD display. DATA lrtable TYPE REF TO clsalvtable. IMPORTING    rsalvtable   lrtable. CHANGING     ttable           lclmain itmara     . ENDMETHOD.                     display. ENDCLASS.                     lclmain IMPLEMENTATIONSTART OF SELECTION. OK I hope by now you got hang of what a traditional report looks in CLASSMETHODS. OO way Only Instance methods To get the hang of class and method concept. Whats next Lets see the same program with instance methods. Additional steps would be declaration of an object and instantiate it to use in your program. REPORT  ysdnblogclassinstance. PARAMETERS prows TYPE count DEFAULT 1. CLASS lclmain DEFINITION LASS lclmain DEFINITION. PUBLIC SECTION. METHODS    getdata  ,display. PRIVATE SECTION. DATA itmara TYPE maratt. ENDCLASS.                     lclmain DEFINITION        CLASS lclmain IMPLEMENTATION LASS lclmain IMPLEMENTATION. METHOD getdata. SELECT FROM mara INTO TABLE me itmara  UP TO Prows ROWS. ENDMETHOD.                     GETDATAMETHOD display. DATA lrtable TYPE REF TO clsalvtable. IMPORTING    rsalvtable   lrtable. CHANGING     ttable           me itmara     . ENDMETHOD.                     display. ENDCLASS.                     lclmain IMPLEMENTATIONSTART OF SELECTION. TYPE REF TO lclmain. OBJECT lrmain. lrmain getdata. Materi Bahasa Inggris SD Pdf. In the above example we declare an object reference of type LCLMAIN and have to command CREATE OBJECT to create a reference for further usage of the same in program. The same LCLMAIN can be declared with different names many references and initiated based on the requirement needsPlease do some live programs either using with any of the above ways to really get initial kick start of OO. My IDEAL way in OO MY IDEAL way of writing the above program would be as below. REPORT  ysdnblogclassideal. CLASS lclmain DEFINITION LASS lclmain DEFINITION. PUBLIC SECTION. CLASS METHODS start. PRIVATE SECTION. METHODS getdata  ,display. CLASS DATA lrmain TYPE REF TO lclmain. DATA itmara TYPE maratt. ENDCLASS.                     lclmain DEFINITION        CLASS lclmain IMPLEMENTATION LASS lclmain IMPLEMENTATION. METHOD start. CREATE OBJECT lrmain. ENDMETHOD.                     start. METHOD getdata. SELECT FROM mara INTO TABLE me itmara  UP TO Prows ROWS. ENDMETHOD.                     GETDATAMETHOD display. DATA lrtable TYPE REF TO clsalvtable. IMPORTING    rsalvtable   lrtable. CHANGING     ttable           me itmara     . ENDMETHOD.                     display. ENDCLASS.                     lclmain IMPLEMENTATIONSTART OF SELECTION. Here we call the START method only once for a program and so I made it as a static method and one static object LRMAIN referencing the same class for dealing with rest of the business logic. There can be many better ways as well. New Trend of and completely moving your report to OO The new way of writing the reports includes t code to launch your report. Lets start with T code creation as below and select 3rd option METHOD OF A CLASS OO TRANSACTION. Next step navigates to below screen and un check the box OO TRANSACTION MODEL enabling another field LOCAL IN PROGRAMNow provide your program name and local class name and method for the below program. Program looks like below. REPORT  ysdnblogclassnew. SELECTION SCREEN BEGIN OF SCREEN 2. PARAMETERS prows TYPE count DEFAULT 1. SELECTION SCREEN END OF SCREEN 2. CLASS lclmain DEFINITION LASS lclmain DEFINITION. PUBLIC SECTION. CLASS METHODS start. PRIVATE SECTION. Reject quotation in ME4. Hi,There is a requirement to reject quotations in ME4. I checked BAPICUSTOMERQUOTATIONCHANGE. But it does not work. It only has rejection reason as a parameter but does not have rejection indicator EKPO ABSKZ. Please let me know if there are any BAPIs or any other method to update the rejection indicator field in ME4.