Oops concepts in abap - please help me

Hi ,
   can any one help me how to move ahead in abap with oops concepts.
   Please explain me concepts with small example program.
Regards
Vijaya

Hi learn the concepts of oops and then the syntax 
of the statements. Find the pgrm if it useful for u                                                                               
*& Report  Z_CLASS_DEMO1                                               *
REPORT  Z_CLASS_DEMO1                           .
      CLASS vehicle DEFINITION
class vehicle definition.
  public section.
    methods: create.
    events: vehicle_created.
endclass.                    "vehicle DEFINITION
      CLASS vehicle IMPLEMENTATION
class vehicle implementation.
  method create.
   break-point.
   write:/ 'vehicle is created'.
   raise event vehicle_created.
  endmethod.
endclass.                    "vehicle IMPLEMENTATION
      CLASS reg_office DEFINITION
class reg_office definition.
  public section.
    methods: add_vehicle FOR EVENT vehicle_created of VEHICLE.
endclass.                    "reg_office DEFINITION
      CLASS reg_office IMPLEMENTATION
class reg_office implementation.
  method add_vehicle.
    write:/ 'Vehicle is created and is ready for registration'.
  endmethod.                    "reg_office
endclass.                    "reg_office IMPLEMENTATION
start-of-selection.
  data: r_vehicle type ref to vehicle,
        r_reg_office type ref to reg_office.
  create object r_vehicle.
  create object r_reg_office.
  set handler r_reg_office->add_vehicle for all instances.
  r_vehicle->create( ).

Similar Messages

  • HOW TO CREATE AUTHORISATION OBJECT IN ABAP PLEASE HELP

    HOW TO CREATE AUTHORISATION OBJECT IN ABAP PLEASE HELP

    You can Use Transaction code: RSSM
    Check the following link
    http://www.sap-img.com/bc042.htm
    In SU20 you will have to create a CLass.
    After saving this double click this and you will taken to another screen where you can create Auth Object.
    You can create authorization fields in SU21 or use existing ones.
    You can also do above thru tcode SE80 Edit -> Other Object. In one the tabs you will see Auth. Objects .

  • Oops consept in abap

    hi
      i just want to know abt oops consept  usage in abap...

    Hi Venkat,
    Welcome to SDN.
    Check the below links u will find lot of info on oops concept in abap....
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    If ou find it useful plz mark the points
    ~~Guduri

  • Oops concepts

    Hi everybody!
    How are u?
    I have knowlege on C++,but Im new to oops concept in abap,Im very interested
    to learn oops concepts in abap ,so..
    can anyone provide me good documentations related to oops concepts and explanation of  how the business scenario ( applications ...etc) will be .
    Thanks,
    Regards,
    Reddy.

    Hi,
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Regards,
    Priyanka.

  • I need  information  about  oops  concept  programming  in abap

    Hi  ,
    I need  information  about  oops  concept  programming  in abap
    Thanks,
    Asha

    Of course, the best place to start is help.sap.com.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    There are a couple good books out there as well.  You can get them at www.amazon.com
    Regards,
    Rich Heilman

  • How to create authorisation object for save button please help in abap

    how to create authorisation object for save button please help in abap

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Regards
    ANJI

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

  • How to port a ABAP report into ITS? Please help!

    Hi Experts,
              I have a ABAP report that contains a selection screen with 3 select-option elements and a search button. On pressing search button an ALV grid opens with data from a SAP table based on selection screen criteria.
    I want to web enable it so that it can be accessed from Enterprise Portal. i will be using IAC iview in Portal.
    Now the IAC iview needs my ABAP report to be ported to ITS?
    1.How to port it to ITS? What are the steps?
    2.In order to port in to ITS do I need to change my ABAP code?
    3.Are there any known limitations of porting ABAP reports in ITS? For example Performance, ALV not supported, Table control not supported etc.
    4. Does it handle dynamic programming?
    5. Are there any documentation for porting report to ITS?
    6. How much time effort it will be for porting ABAP reportys to ITS?
    To add some more points. SAP transaction iview is not allowed in my organization. Webdynpro/BSP is also not supported. Thats why I am using IAC iview which needs ITS.
    Please help
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    hi,
      step1.create a transaction for ABAPreport in SE93.
      step2.Go to transaction SICF and create a service in the following path sap/bc/gui/sap/its.
    Check the following Url to create a service.
    /people/durairaj.athavanraja/blog/2005/08/21/running-your-first-its-webgui-application-in-sap-netweaver-04-abap-edition--nsp
      step3. create a system object setting the following property categories.
       1.Connector
       2.Usermanagement
       3.ITS
       4.WAS
    In the usermanagement do the user mapping.
    step4. While creating  an IAC iview, in the third step for the <b>Internet Application Component (IAC)</b> property give the service name you have created in SICF.
    you need not change the abap code. The only limitation while porting abap report in ITS is you cannot view the icons in the tool bar, instead you view the buttons.
    ALV is supported. Functionality wise nothing will change except the appearance mainly with the icons.
    Regards,
    Gopi

  • How can I call a ABAP proxy class from BADI? PLease help

    hi Experts,
        I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
    Please help.
    Thanks
    Gopal

    Hi,
       You can call a method of a class from BADI. Here are the steps.
       1) In the BADI implementation create a object for the proxy class.
       2) Call the Execute_Synchronous method.
        You can define a BADI by using SE18 and you can implement it by using SE19.
    Sample code...
    ================================================
      METHOD ZIF_EX_VBADI~CONVERTUPPER.
      DATA: OBJ TYPE REF TO ZTESTCLASS.
      DATA: IT_DATA  TYPE ZIN_MT,
                IT_RES   TYPE ZOUT_MT,
                SEXCEPTION TYPE REF TO CX_AI_SYSTEM_FAULT.
      TRY.
          CREATE OBJECT OBJ
             EXPORTING
                 LOGICAL_PORT_NAME = 'TESTPORT'.
      CATCH CX_AI_SYSTEM_FAULT INTO SEXCEPTION.
      ENDTRY.
    ENDMETHOD.
    ================================================
    Thanks,
    Vivek LR

  • Please help......ABAP Runtime Errors DYNPRO_FIELD_CONVERSION

    Hi everyone,
    I don't know what's wrong with my code.  It says the error in the subject line and it only applies to selected records. 
    A conversion error occurred.                                                  
    What happened?
    The current screen processing was terminated, since a situation               
    occurred from which it could not continue processing.                         
    This is probably due to an error in the current screen of the ABAP            
    program.                                                                      
    What can you do?
    Please make a note of the actions and input which caused the error.           
    Please make a note of the actions and input which caused the error.                                                                               
    To resolve the problem, contact your                                          
    SAP system administrator.                                                                               
    Choose "Print" for a hard coopy of the termination message. You can           
    display and adminster short dump messages using Transaction ST22.             
    Error analysis
    The program flow was interrupted and could not be resumed.                    
    Program "ZADC_PGSPOSTING" tried to display fields on screen 1000. However, an 
    error occurred while this data was being converted.                           
    How to correct the error
    A conversion error occurred while the program was trying to                   
    display data on the screen.                                                                               
    The ABAP output field and the screen field may not have the                   
    same format.                                                                               
    Some field types require more characters on the screen than                   
    in the ABAP program. For example, a date field on a screen needs              
    two characters more than it would in the program. Attemting to display                                                                               
    Screen name.............. "ZADC_PGSPOSTING"                     
                  Screen number............ 1000                                  
                  Screen field............. "JTAB-GSAMT"                          
                  Error text............... "FX020: Data lost."                   
    Further data:                                                                               
    I don't know why it prompts this error, when in fact I usually pass the "JTAB-GSAMT" field to a variable.  Please help me with my problem.  I'm having a hard time deciphering it when in fact my program is easy to understand.  I must have overlooked something.  Thanks so much in advance.
    Regards,
    Anna

    PROCESS BEFORE OUTPUT.
      MODULE STATUS_1000.
      MODULE get_name.
      MODULE get_psgs.
      LOOP AT JTAB WITH CONTROL CTRLPSGS CURSOR CTRLPSGS-TOP_LINE.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT JTAB.
        MODULE SET_LINE_COUNT.
      ENDLOOP.
      MODULE EXIT01 AT EXIT-COMMAND.
      MODULE USER_COMMAND_1000.
    *&      Module  GET_NAME  OUTPUT
          text
    MODULE GET_NAME OUTPUT.
      siptot = 0.
      data: kostl like pa0001-kostl, H_EMPNO(8) TYPE C.
      IF zemp ne itab-pernr.
         move: itab-pernr to zemp.
         move: zemp to itab-pernr.
      ELSEIF zemp EQ itab-pernr.
         move: itab-pernr to zemp.
         clear: itab.
         refresh: jtab.
         move: zemp to itab-pernr.
      ENDIF.
         clear: kostl.
         SELECT SINGLE * FROM pa0002 WHERE pernr = itab-pernr
                           AND endda = '99991231'.
          IF sy-subrc = 0.
            CONCATENATE: pa0002-nachn ',' INTO itab-name.
            CONCATENATE: itab-name pa0002-vorna INTO itab-name
                         SEPARATED BY SPACE.
          ENDIF.
          SELECT kostl into kostl FROM pa0001 WHERE pernr = itab-pernr
                           AND endda = '99991231'.
          ENDSELECT.
          SELECT ltext into itab-ltext FROM cskt WHERE kostl = kostl
                           AND datbi = '99991231' and spras eq 'EN'.
          ENDSELECT.
          WRITE ITAB-PERNR TO EMPNO.
          shift empno left deleting leading '0'.
      SELECT SINGLE * FROM zamc_mstr WHERE pernr = itab-pernr.
      IF sy-subrc = 0.
        SELECT sum( diff_sip ) INTO itab-siptot FROM zamc_deduction
            WHERE amc_no = zamc_mstr-amc_no.
        siptot = itab-siptot.
      ENDIF.
      IF zemp <> '00000000'.
        APPEND itab.
      ENDIF.
      CLEAR itab.
    ENDMODULE.                 " GET_NAME  OUTPUT
    *&      Module  GET_PSGS  OUTPUT
          text
    MODULE GET_PSGS OUTPUT.
    pstot = 0.
    gstot = 0.
    ectot = 0.
    diff = 0.
    REFRESH jtab.
      SELECT * FROM zppsgsec WHERE pernr = zemp.
        MOVE-CORRESPONDING zppsgsec TO jtab.
        COLLECT jtab.
      ENDSELECT.
      CLEAR jtab.
      SORT jtab BY datum.
      LOOP AT jtab.
        pstot = pstot + jtab-psamt.
        gstot = gstot + jtab-gsamt.
        ectot = ectot + jtab-ecamt.
        AT LAST.
          diff = gstot - siptot.
        ENDAT.
      ENDLOOP.
    By the way, I'm using table viewer to display my results.  Thanks.
    Regards,
    Anna

  • How to implement drop down list in WDP Abap....very urgent...please help me

    Hi Gurus,
    I wanted to implement the drop down list button in the WDP Abap interactive form. Once the users clicks on the drop down button, an RFC should be called and display the details under the drop down button. Please give me the logic with code. Its very urgent...please help me. Please note that it is in WDP Abap interactive forms. We are using NW2004S, ECC6.0.

    Hello,
    you have to use ZCI form to use DDLB in WD-ABA. The content of the DDLB has to be present at rendering time, there is no dinamic call when you click the "dropdown".
    The attribut you map to the DDLB has to be an element with a value-set, and the value set has to contain the text / value pairs.
    >> this will be displayed when you click the dropdown.
    Best regards,
    Dezso

  • Using flat file to upload in ABAP. Please help. Urgent

    Hi all,
    I am using a CSV excel file to upload some data to my ABAP program. Thje file contains material numbers as one of the fields. But if I enter the material number 11910892E80, excel converts it to  1.19E+87. Since I am using this file in the program to extract some fields from MARA, i am getting an error 'Material number does not exist'.
    I know that we can avoid this problem by changing the format type of the cell to 'text' in excel. I want to know if there is any other way to rectify this problem. I have to use an excel file for upload. Notepad will not do.
    Please help me solve this problem. It is urgent.
    Thanks and regards,
    Swaminath

    Hi
    If it is comma delimited file (CSV format) you can directly read the whole file and into a table with one field.
    Loop at that table.
    Use split a comma into fields of your internal table.
    endloop.
    Sample code
    move pcfile to v_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = v_file
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = 'X'
        TABLES
          DATA_TAB                = in_rec
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      if sy-subrc ne 0.
        write:/5 'Error with PC file'.
      endif.
      loop at in_rec.
        if in_rec(4) ca number.
          split in_rec at p_del into
            itab-tcode  itab-tcodet
            itab-saknr
            itab-waers1 itab-waers2
            itab-amt1   itab-amt2
            itab-gl itab-kostl
            itab-prctr itab-obukrs
            itab-otcode itab-otcodet.
          if itab-amt1 = '0.00' or itab-amt1 = space.      "skip this line
            continue.
          endif.
          move-corresponding itab to fitab.
          append fitab.
          clear: itab, fitab.
         append itab.
        endif.
      endloop.

  • Soap - ABAP ----  Urgent PLease help ...

    hi experts ,
    Im trying to use Soap classes to tranfer an internal table from ABAP to a Java Web service....
    i am making use of RSVSOAP4 and RSVSOAP7 standard sap reports for this....
    the problem im facing is that i can send one one records at but when it comes to an itab its not goin into ma web service ...
    ne one who has worked on it ...please help me out ...
    i'll post the code if required .....
    working on SAP Web AS Release 620.

    how do i check the compatibility ?
    the web service i have created is having an input field of as an auxillary class of array type ....
    n the itab also is a deep structure type
    kindly help me out with this .....

  • How to use webdynpro abap? need separate software? or please help me.. :-)

    How to use webdynpro abap? need any separate software? if no, please help me with Transaction Codes..
    Thanks in Advance
    -Parthi
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Oct 19, 2011 8:18 PM

    I don't think you quite understand how hibernation mode works.
    "The state of a computer is stored into its main memory, which is also called RAM. When a
    computer is powered off, the contents of this memory are irremediably wiped out. Hiberna-
    tion works in the following way: before being powered off, the computer saves all the con-
    tents of the memory to a file on the hard disk drive. On wake up, data stored in this file is
    read out and restored to the memory. Therefore, the RAM contents are the same before
    and after the hibernation process, and the state of the computer is also the same. The
    saved file is named sleepimage, and is located in the /private/var/vm directory. Hi-
    bernation is sometimes also called “software suspend” or “suspend to disk”.
    The default suspension feature of Mac OS X, called sleep works in a different way. When
    entering sleep, every subsystem of the computer is shut down, except the main memory
    which is still powered. This process preserves the contents of the memory, and allows the
    computer to wake up quickly. However, a sleeping computer still consumes a small
    amount of power. Sleep is sometimes also called “hardware suspend” or “suspend to
    RAM”.
    Apple introduced the safe sleep feature in Mac OS X 10.4.3 for the Powerbook HD line of
    laptops. This feature is a variation of the default suspension behavior. The main memory is
    still powered during the sleep, but the contents of the memory are also saved to the disk at
    the beginning of the operation. The saved file will only be used if the laptop runs out of bat-
    tery power while sleeping, in order to restore the original state of the computer.
    This safe sleep feature is what makes hibernation possible in Mac OS X 10.4.3 and above."
    Quoted from *Deep Sleep v. 0.7 documentation*
    Matthieu Beaumel, 10/03/2006

  • Question on security in ABAP. Please help!

    Hi Experts,
            I have a question on security in ABAP program.
    I have a ABAP program which has a transaction attached.
    I have added authorization check in ABAP program(Progran level security).
    I have also attached the authorization object to the transaction.(Transaction level security)
    If an end user runs the transactionm, then which authorization check will fire first? Will it be transaction level?
    If I have web enabled my ABAP program via SICF (in other words, ITS). Then when I try to run my ITS service in the browser will the transaction level authorization fire? or Will the program level authorization fire?
    Please help me understand this security aspect.
    Thanks
    Gopal

    Hi gopalkrishna,
    1. if an end user runs the transactionm, then which authorization check will fire first? Will it be transaction level?
    Yes, transaction level first !
    2. In ITS scenario also,
      a) first tcode level,
      b) then, program level
    regards,
    amit m.

Maybe you are looking for

  • How to input text in the SAP ERP intial screen.

    Hello. How to input text when I load the SAP ERP system. before log in. (this screen show me only the ID and password input fields) I saw the initial screen inclued some user-customized text. I can not find any information about initial scrren, as be

  • Please, Help Embedding Fonts in TextArea , TextInput and Alert Components

    Please, forgive my bad english. Here is my problem (using Flash CS3 ActionScript 2). I have on the stage : • an instance of TextArea with Instance Name : message_ta • an instance of TextInput with instance Name : name_ti • and I have in the library a

  • "Add Printer" not functioning

    Hello- I've been experiencing a weird problem within my Printer Setup Utility. When i click the "Add +" icon to add a printer to my queue(sp?), nothing happens... nothing. I first tried it with a laser printer connected vis ethernet to my wireless Be

  • PO in negative value

    Hi all Is there any setting to enable posting Purchase Order in negative value. This is possible in AP Invoice. Kedalene Chong

  • HP8500 909g now refuses to print 2-sided

    My printer, operating with Windows 7, has suddenly decided not to print 2-sided. It did fine before; I don't know of any change I made to the printer, although I have used a different computer with it. I have installed the HP software for the printer