Abap basics

structure of  abap program

Hi
See this sample report and note down the structure
REPORT zm_reservation_alert
       NO STANDARD PAGE HEADING
       MESSAGE-ID zm_msg.
       D A T A B A S E  T A B L E S   D E C L A R A T I O N
               T Y P E S  D E C L A R A T I O N S
Reservations Main Structure
TYPES: BEGIN OF s_res,
         rsnum TYPE rsnum,                   " Reservation No
         rspos TYPE rspos,                   " Item No
         usnam TYPE usnam,                   " User Name
         bwart TYPE bwart,                   " Movement Type
         aufnr TYPE aufnr,                   " Order Number
         rsart TYPE rsart,                   " Record Type
         bdart TYPE bdart,                   " Reservation Type
         matnr TYPE matnr,                   " Material No
         bdter TYPE bdter,                   " Req Date
         menge TYPE menge_d,                 " Quantity
         kostl TYPE kostl,                   " Cost Center
         usrid TYPE sysid,                   " User ID
       END OF s_res.
Output Main Structure
TYPES: BEGIN OF s_rep,
         usnam TYPE usnam,                   " User Name
         rsnum TYPE rsnum,                   " Reservation No
         rspos TYPE rspos,                   " Item No
         matnr TYPE matnr,                   " Material No
         bdter TYPE bdter,                   " Req Date
         menge TYPE menge_d,                 " Quantity
         kostl TYPE kostl,                   " Cost Center
         aufnr TYPE aufnr,                   " Order Number
       END OF s_rep.
User Dept Details
TYPES: BEGIN OF s_dept,
         pernr TYPE persno,                  " Personal No
         usrid TYPE sysid,                   " User ID
         orgeh TYPE orgeh,                   " Orgn Unit
         orgtx TYPE orgtx,                   " Dept Name
       END OF s_dept.
For Send Mail Purpose
DATA : i_doc_data LIKE sodocchgi1.
DATA : BEGIN OF i_pack_list OCCURS 0.
        INCLUDE STRUCTURE sopcklsti1.
DATA : END OF i_pack_list.
DATA : BEGIN OF i_receivers OCCURS 0.
        INCLUDE STRUCTURE somlreci1.
DATA : END OF i_receivers.
DATA : BEGIN OF i_contents OCCURS 0.
        INCLUDE STRUCTURE solisti1.
DATA : END OF i_contents.
DATA : BEGIN OF i_header OCCURS 0.
        INCLUDE STRUCTURE solisti1.
DATA : END OF i_header.
DATA : BEGIN OF i_att OCCURS 0.
        INCLUDE STRUCTURE solisti1.
DATA : END OF i_att.
Internal table for bdcdata
DATA : it_bdcdata  LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Internal table to handle messages
DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
           D A T A  D E C L A R A T I O N S
DATA: gv_lines  TYPE sy-index,           " Total Lines int Table
      gv_days   TYPE i,                  " Difference Days
      gv_date   TYPE sy-datum,           " Date
      gv_date1  TYPE sy-datum,           " Date
      gv_date2  TYPE sy-datum,           " Date
      gv_text(85),                       " Text Field
      gv_mesg(70),                       " Error Messages
      gv_bdc,                            " BDC Flag
      gv_flag TYPE i,                    " Flag
      gv_ernam TYPE ernam.               " User ID
            C O N S T A N T S     D E C L A R A T I O N S
CONSTANTS: c_x                VALUE 'X',         " Flag
           c_endda TYPE endda VALUE '99991231'.  " Date
     I N T E R N A L  T A B L E S  D E C L A R A T I O N S
DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE,  " Reservns
      i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
      i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE.  " Output
               S T A R T - O F - S E L E C T I O N                   *
START-OF-SELECTION.
Fetch main data
  PERFORM fetch_data.
Process data
  PERFORM process_data.
*&      Form  fetch_data
Fetching the Reservations related data from Database Tables
FORM fetch_data .
  CLEAR: gv_date, gv_date1, gv_date2.
  gv_date = sy-datum.
  gv_date1 = sy-datum - 10.
  gv_date2 = sy-datum + 10.
  CLEAR i_res.
  REFRESH i_res.
  SELECT a~rsnum                    " Reservation No.
         b~rspos                    " Reservation Item
         a~usnam                    " User Name
         a~bwart                    " Movement Type
         a~aufnr                    " Order Number
         b~rsart                    " Record Type
         b~bdart                    " Reservation Type
         b~matnr                    " Material No
         b~bdter                    " Req Date
    INTO TABLE i_res
    FROM rkpf AS a JOIN resb AS b
    ON arsnum = brsnum
    WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
          b~xloek EQ ' '.
  SORT i_res BY rsnum rspos.
  DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
Add userid into the i_usr int table
  LOOP AT i_res.
    i_res-usrid = i_res-usnam.
    MODIFY i_res INDEX sy-tabix.
  ENDLOOP.
  IF NOT i_res[] IS INITIAL.
Get the User Dept Name
    CLEAR i_dept.
    REFRESH i_dept.
    SELECT a~pernr                    " Personal No
           a~usrid                    " User ID
           b~orgeh                    " Orgn Unit
           c~orgtx                    " Dept Name
      INTO TABLE i_dept
      FROM pa0105 AS a JOIN pa0001 AS b
      ON apernr = bpernr JOIN t527x AS c
      ON borgeh = corgeh
      FOR ALL ENTRIES IN i_res
      WHERE a~usrid = i_res-usrid AND
            a~endda EQ c_endda AND
            b~endda EQ c_endda.
  ENDIF.
  SORT i_dept BY pernr.
  DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
Move the Creator of Reservation to a diff table
  LOOP AT i_res.
    MOVE-CORRESPONDING i_res TO i_rep.
    APPEND i_rep.
    CLEAR i_rep.
  ENDLOOP.
  SORT i_rep BY usnam rsnum rspos.
ENDFORM.                               " Fetch_Data
*&      Form  process_data
Process the Reservations related data for Expiry Date
FORM process_data .
  DATA: lv_date1 LIKE sy-datum,
        lv_date2 LIKE sy-datum,
        lv_date3(10),
        lv_menge(13),
        lv_tabix LIKE sy-tabix.
  LOOP AT i_rep.
    CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
    lv_tabix = sy-tabix.
    AT NEW usnam.
Populate the Contents Table
      CLEAR i_att.
      REFRESH i_att.
      i_att = 'Reservations Reminder'(014).
      APPEND i_att.
      i_att = '----
      APPEND i_att.
      i_att-line = '     '.
      APPEND i_att.
      READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
      CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
      INTO i_att-line SEPARATED BY space.
      APPEND i_att.
      i_att-line = '     '.
      APPEND i_att.
      i_att = 'Please find the List of expiring Reservations'(004).
      APPEND i_att.
      i_att-line = ' '.
      APPEND i_att.
      CONCATENATE '--' '' '--
' INTO
      i_att-line SEPARATED BY space.
      APPEND i_att.
    CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
    'Due Date'(008) 'Work Center/CC'(005) INTO
    i_att-line SEPARATED BY space.
      APPEND i_att.
      CONCATENATE '--' '' '--
' INTO
      i_att-line SEPARATED BY space.
      APPEND i_att.
      i_att-line = ' '.
      APPEND i_att.
    ENDAT.
    gv_days  = i_rep-bdter - gv_date.
    lv_date1 = i_rep-bdter + 5.
    lv_date2 = i_rep-bdter + 10.
    MOVE i_rep-menge TO lv_menge.
    WRITE i_rep-bdter TO lv_date3.
    IF gv_days = 10.
      IF i_rep-aufnr <> space.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
         i_rep-aufnr 'is due for 10 days. Please collect'(009)
         INTO gv_text SEPARATED BY space.
      ELSE.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
         i_rep-kostl 'is due for 10 days. Please collect'(009)
         INTO gv_text SEPARATED BY space.
      ENDIF.
      i_att-line = gv_text.
      APPEND i_att.
      CLEAR i_att.
      CLEAR gv_text.
    ENDIF.
    IF gv_days = 5.
      IF i_rep-aufnr <> space.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
        i_rep-aufnr 'is due for 5 days. Please collect'(010)
        INTO gv_text SEPARATED BY space.
      ELSE.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
        i_rep-kostl 'is due for 5 days. Please collect'(010)
        INTO gv_text SEPARATED BY space.
      ENDIF.
      i_att-line = gv_text.
      APPEND i_att.
      CLEAR i_att.
      CLEAR gv_text.
    ENDIF.
    IF gv_date = lv_date1.
      IF i_rep-aufnr <> space.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
        i_rep-aufnr 'is getting cancelled on'(011) lv_date2
        INTO gv_text SEPARATED BY space.
      ELSE.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
        i_rep-kostl 'is getting cancelled on'(011) lv_date2
        INTO gv_text SEPARATED BY space.
      ENDIF.
      i_att-line = gv_text.
      APPEND i_att.
      CLEAR i_att.
      CLEAR gv_text.
    ENDIF.
    IF gv_date = lv_date2.
      IF i_rep-aufnr <> space.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
        i_rep-aufnr 'is being cancelled'(012)
        INTO gv_text SEPARATED BY space.
      ELSE.
        CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
        i_rep-kostl 'is being cancelled'(012)
        INTO gv_text SEPARATED BY space.
      ENDIF.
      i_att-line = gv_text.
      APPEND i_att.
      CLEAR i_att.
      CLEAR gv_text.
Mark the Reservation Item 'DELETED' using BDC.
     UPDATE resb SET xloek = c_x.
      PERFORM delete_item_resb.
    ENDIF.
    AT END OF usnam.
      IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
           gv_date = lv_date2 ).
Read the User who creates the Reservn and send a mail alert to him
        CLEAR : i_receivers,gv_ernam.
        REFRESH: i_receivers.
        READ TABLE i_rep INDEX lv_tabix.
        gv_ernam = i_rep-usnam.
        IF gv_ernam <> space.
Send mail Alert to PR Creator(SAP inbox)
          PERFORM send_alert_data.
Send Mail to External Mail ID of the SAP USER
          PERFORM send_mail_external.
        ENDIF.
      ENDIF.
    ENDAT.
  ENDLOOP.
ENDFORM.                              " Process_data
*&      Form  delete_item_resb
Set the Deletion Indicator for the Res. Item in RESB
FORM delete_item_resb.
  gv_bdc = 'N'.
Perform to fill it_bdcdata.
  PERFORM fill_it_bdcdata.
Call the Transaction MB22
  CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
                                MESSAGES INTO it_messages.
  IF sy-subrc <> 0.
    gv_flag = 1.
If error occurs in transaction mode run bdc session for that data
    PERFORM bdc_process.
  ENDIF.
Handles error messages
  PERFORM error_messages.
  CLEAR   : it_bdcdata, it_messages.
  REFRESH : it_bdcdata, it_messages.
  IF gv_bdc = 'O'.
close bdc if it is open
    PERFORM close_bdc.
  ENDIF.
ENDFORM.             "delete_item_resb
*&      Form  FILL_IT_BDCDATA
Filling Bdcdata structure with data
FORM fill_it_bdcdata.
  PERFORM bdc_dynpro      USING 'SAPMM07R' '0560'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RM07M-RSPOS'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM bdc_field       USING 'RM07M-RSNUM'
                                i_rep-rsnum.
  PERFORM bdc_field       USING 'RM07M-RSPOS'
                                i_rep-rspos.
  PERFORM bdc_dynpro      USING 'SAPMM07R' '0510'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RESB-XLOEK'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM bdc_field       USING 'RESB-XLOEK'
                                 c_x.
  PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'COBL-KOSTL'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=ENTE'.
  PERFORM bdc_dynpro      USING 'SAPMM07R' '0510'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'RESB-ERFMG'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=BU'.
  PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
  PERFORM bdc_field       USING 'BDC_CURSOR'
                                'COBL-KOSTL'.
  PERFORM bdc_field       USING 'BDC_OKCODE'
                                '=ENTE'.
ENDFORM.                    " FILL_IT_BDCDATA
*&      Form  BDC_DYNPRO
Filling the it_bdcdata table with program name & screen number
FORM bdc_dynpro USING    program LIKE bdcdata-program
                         dynpro LIKE bdcdata-dynpro.
  it_bdcdata-program = program.
  it_bdcdata-dynpro = dynpro.
  it_bdcdata-dynbegin = 'X'.
  APPEND it_bdcdata.
  CLEAR it_bdcdata.
ENDFORM.                    " BDC_DYNPRO
*&      Form  BDC_FIELD
  Filling it_bdcdata with field name and field value
FORM bdc_field USING fnam LIKE bdcdata-fnam
                     fval.
  it_bdcdata-fnam = fnam.
  it_bdcdata-fval = fval.
  APPEND it_bdcdata.
  CLEAR it_bdcdata.
ENDFORM.                    " BDC_FIELD
*&      Form  ERROR_MESSAGES
Displaying error messages
FORM error_messages.
  CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
      id        = sy-msgid
      lang      = sy-langu
    IMPORTING
      msg       = gv_mesg
    EXCEPTIONS
      not_found = 1
      OTHERS    = 2.
  LOOP AT it_messages WHERE msgtyp = 'E'.
    WRITE : / 'Message :'(001) ,gv_mesg.
    CLEAR it_messages.
  ENDLOOP.
ENDFORM.                    " ERROR_MESSAGES
*&      Form  BDC_PROCESS
Open bdc session if call transaction fails
FORM bdc_process.
  IF gv_bdc = 'N'.
open bdc session
    PERFORM open_bdc.
    gv_bdc = 'O'.
  ENDIF.
  IF gv_bdc = 'O'.
insert data into bdc session
    PERFORM insert_bdc.
  ENDIF.
ENDFORM.                    " BDC_PROCESS
*&      Form  OPEN_BDC
  Calling function module to open bdc session
FORM open_bdc.
  CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
      client              = sy-mandt
      group               = 'ZMM'
      keep                = 'X'
      user                = sy-uname
    EXCEPTIONS
      client_invalid      = 1
      destination_invalid = 2
      group_invalid       = 3
      group_is_locked     = 4
      holddate_invalid    = 5
      internal_error      = 6
      queue_error         = 7
      running             = 8
      system_lock_error   = 9
      user_invalid        = 10
      OTHERS              = 11.
ENDFORM.                    " OPEN_BDC
*&      Form  INSERT_BDC
  Insert it_bdcdata into bdc by calling function module bdc_insert
FORM insert_bdc.
  CALL FUNCTION 'BDC_INSERT'
    EXPORTING
      tcode            = 'MB22'
    TABLES
      dynprotab        = it_bdcdata
    EXCEPTIONS
      internal_error   = 1
      not_open         = 2
      queue_error      = 3
      tcode_invalid    = 4
      printing_invalid = 5
      posting_invalid  = 6
      OTHERS           = 7.
ENDFORM.                    " INSERT_BDC
*&      Form  CLOSE_BDC
Closing bdc session
FORM close_bdc.
  CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
      not_open    = 1
      queue_error = 2
      OTHERS      = 3.
ENDFORM.                    " CLOSE_BDC
*&      Form  send_alert_data
    Send Alert for the Expired Contract
FORM send_alert_data .
  CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
  REFRESH : i_receivers,i_header,i_contents.
  DESCRIBE TABLE i_att LINES gv_lines.
  i_receivers-receiver = gv_ernam.
i_receivers-receiver = 'SSHEIK'.
  i_receivers-rec_type = 'B'.
i_receivers-rec_date = sy-datum.
i_receivers-express = 'X'.
i_receivers-com_type = 'INT'.
i_receivers-notif_del = 'X'.
  APPEND i_receivers.
  i_doc_data-obj_name = 'SAPoffice'(013).
  i_doc_data-obj_descr = 'Reservations Reminder'(014).
  i_doc_data-obj_langu = 'E'.
  i_doc_data-no_change = c_x.
  i_doc_data-obj_prio = 1.
  i_doc_data-priority = 1.
  i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
  i_pack_list-transf_bin = c_x.
  i_pack_list-head_start = '1'.
  i_pack_list-head_num = '1'.
  i_pack_list-body_start = '1'.
  i_pack_list-body_num = gv_lines.
  i_pack_list-doc_type = 'DOC'.
  i_pack_list-obj_name = 'SAPoffice'(013).
  i_pack_list-obj_descr = 'Reservations Reminder'(014).
  i_pack_list-obj_langu = 'E'.
  i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
  APPEND i_pack_list.
i_header-line = 'Header'. APPEND i_header.
Data for contents
  i_contents-line = 'Please find the Reservations Due List'(016).
  APPEND i_contents.
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data                    = i_doc_data
     PUT_IN_OUTBOX                    = 'X'
IMPORTING
  SENT_TO_ALL                      =
  NEW_OBJECT_ID                    =
    TABLES
      packing_list                     = i_pack_list
      object_header                    = i_header
      contents_bin                     = i_att
      contents_txt                     = i_contents
      receivers                        = i_receivers
   EXCEPTIONS
     too_many_receivers               = 1
     document_not_sent                = 2
     document_type_not_exist          = 3
     operation_no_authorization       = 4
     parameter_error                  = 5
     x_error                          = 6
     enqueue_error                    = 7
     OTHERS                           = 8.
  IF sy-subrc = 0.
    MESSAGE i000 WITH 'Mail Sucessfully sent'(017).
  ELSE.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.                    " send_alert_data
*&      Form  send_mail_external
Send mail to External MAIL ID of the PR Creator
FORM send_mail_external.
  DATA : lv_str(24), lv_str1(40),
         lv_pernr LIKE adr6-persnumber,
         lv_adrnr LIKE adr6-addrnumber,
         lv_usrid LIKE pa0105-usrid,
         lv_mail  LIKE adr6-smtp_addr,
         lv_sendor   TYPE syuname,
         lv_receiver TYPE string,
         lv_header   TYPE string,
         lv_body     TYPE string.
  CLEAR: lv_pernr, lv_usrid, lv_adrnr,
         lv_mail, lv_sendor, lv_receiver,
         lv_header, lv_body .
  lv_usrid = gv_ernam.
  SELECT SINGLE persnumber addrnumber FROM usr21
         INTO (lv_pernr,lv_adrnr)
         WHERE bname = lv_usrid.
  IF sy-subrc = 0.
    SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
           WHERE addrnumber = lv_adrnr AND
                 persnumber = lv_pernr.
    IF sy-subrc <> 0.
      CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
      lv_receiver =  lv_mail.
    ELSE.
      lv_receiver =  lv_mail.
    ENDIF.
   lv_receiver =  '[email protected]'.
    lv_sendor = 'JALKHATAM'.
    lv_header = 'Reservations Reminder'(014).
    lv_str  = 'Pls check your SAP Inbox'(019).
    lv_str1 = 'for the status of Reservations Due List'(020).
    CONCATENATE lv_str lv_str1 INTO lv_body
    SEPARATED BY space.
Call Function Module To send mail
    CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
      EXPORTING
        id_header           = lv_header
        id_body             = lv_body
        id_receiver         = lv_receiver
        id_sender           = lv_sendor
  ID_HTML_MAIL         =
       id_commit_work       = 'X'
     EXCEPTIONS
       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.
  ENDIF.
ENDFORM.                    " send_mail_external
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • "ABAP Basics" Book - arithmetic expression error in the sample code

    Hi all,
    I have just started learning ABAP on mini SAP system (NW7.01) by following "ABAP Basics" book.
    This question might be a FAQ, but I have spent a few days searching a right answer without success.
    I appreciate if you could help me on this.
    On the page 162, there is a function module sample, which contains the line as following:
    e_amount = i_km * '0.3'.
    Here l_km (import) is type of i, and e_amount (export) is type of f.
    Though I do not think of any problem with this line, it throws an arithmetic expression error when executed directly for testing as well as when called from a program.
    When I tried a similar thing in a program, it was fine.
    However within a function module it throws this error.
    Thanks in advance.
    Terry

    Like I said before, I do not think any problem about the code itself.
    I suspect some environmental things?
    I should have mentioned SAP mini system NW7.01 is running on Vista Business?
    To be specifc, I receive this message:
    Arithmetic operations are only expected for operands that can be converted to numbers.
    (numeric operands). - (numeric operands). - - - -
    with the following function module:
    [code]
    FUNCTION ZPTB00_CALCULATE_TRAVEL_EXPENS.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_KM) TYPE REF TO  I
    *"  EXPORTING
    *"     VALUE(E_AMOUNT) TYPE REF TO  F
    *"  EXCEPTIONS
    *"      FAILED
    e_amount = i_km * '0.3'.
    IF sy-subrc <> 0.
      RAISE failed.
    ENDIF.
    ENDFUNCTION.
    [/code]

  • HR-ABAP basic questions

    1) What is the reason for using infotypes with different way(not the same way as in ABAP) of saving the records the database is used in the ABAP-HR Programming?
    2) What is the some reason for using Logical Database more ABAP-HR?
    3) What is the reason for using precoded macro's in ABAP-HR?

    Matt,
      I am trying to learn ABAP-HR and found that many things that sound different in HR-ABAP can be achieved through normal ABAP below are the some
        1) Infotypes - I had read some where that records get saved horizantally (record1 record2 record3) instead in a vertial save ( record1
                                                          recordn).
           Why is that this type of database design is adapted. Ofcourse these are called repeate structures I guess.
           Why is that infotype need to have self built database table, internal table and structure?
           This is being already handled in Normal ABAP by creating internal table refering database table/structure.
          So my 1st question in the previous to know what is making infotype different than normal way of having a internal table.
        2) Macro - is the precoded select query but that is already coded in TRMAC. My question over this when we can have select query what is the need for the precoded stuff?.
          For example why to have "RP-READ-INFOTYPE" on some Infotype when this can done through  Select * from TABLE pA0*** where field1 = 'xxxx'  .
    Any ways Thanks for your response,I have 2 years of experience in ABAP and want to shift my self to ABAP-HR. I always try to have strong foundation/understanding of the basics and post the questions to know the differents views (approach of thinking of other ABAPER's). Many times the response provide me very...very valuable stuff and this is the frist time  that I have a response that is different from Grath & Sameer. But I guess any response that posted to question which is related always related to  ABAP is definitely going to be helpful in one or the other way (may for having good understanding  or for preinterview..or some thing else) . 
          If the post is found to be non sense there is responsible person "MODERATOR" to block the post. I Dont know what made these two guys bother them much.
         That's great! that you gave me a repsonse that I was always expecting
    Ty
    SDN Powered

  • Abap basics material documents

    Hi Gurus,
    i am intrested to learn basic in Abap i want to make my carrrier in  it so i kindky request you to plz send material  my [email protected]
    Thanks in Advance,
    Edited by: Krishna on Apr 23, 2008 2:16 PM
    Edited by: Krishna on Apr 23, 2008 2:17 PM

    Hi....
    Go for Siemens material. Check the following link:
    http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
    additional info
    ABAP is one of many application-specific fourth-generation languages (4GLs) first developed in the 1980s. It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting. ABAP used to be an abbreviation of Allgemeiner Berichtsaufbereitungsprozessor, the German meaning of "generic report preparation processor", but was later renamed to Advanced Business Application Programming. ABAP was one of the first languages to include the concept of Logical Databases (LDBs), which provides a high level of abstraction from the basic database level.
    The ABAP programming language was originally used by SAP developers to develop the SAP R/3 platform. It was also intended to be used by SAP customers to enhance SAP applications – customers can develop custom reports and interfaces with ABAP programming. The language is fairly easy to learn for programmers but it is not a tool for direct use by non-programmers. Good programming skills, including knowledge of relational database design and preferably also of object-oriented concepts, are required to create ABAP programs.
    ABAP remains the language for creating programs for the client-server R/3 system, which SAP first released in 1992. As computer hardware evolved through the 1990s, more and more of SAP's applications and systems were written in ABAP. By 2001, all but the most basic functions were written in ABAP. In 1999, SAP released an object-oriented extension to ABAP called ABAP Objects, along with R/3 release 4.6.
    SAP's most recent development platform, NetWeaver, supports both ABAP and Java.
    edit Implementation
    edit Where does the ABAP Program Run?
    All ABAP programs reside inside the SAP database. They are not stored in separate external files like Java or C++ programs. In the database all ABAP code exists in two forms: source code, which can be viewed and edited with the ABAP workbench, and "compiled" code ("generated" code is the more correct technical term), which is loaded and interpreted by the ABAP runtime system. Code generation happens implicitly when a unit of ABAP code is first invoked. If the source code is changed later or if one of the data objects accessed by the program has changed (e.g. fields were added to a database table), then the code is automatically regenerated.
    ABAP programs run in the SAP application server, under control of the runtime system, which is part of the SAP kernel. The runtime system is responsible for processing ABAP statements, controlling the flow logic of screens and responding to events (such as a user clicking on a screen button). A key component of the ABAP runtime system is the Database Interface, which turns database-independent ABAP statements ("Open SQL") into statements understood by the underlying DBMS ("Native SQL"). The database interface handles all the communication with the relational database on behalf of ABAP programs; it also contains extra features such as buffering of frequently accessed data in the local memory of the application server.
    Basis
    Basis sits between ABAP/4 and Operating system.Basis is like an operating system for R/3. It sits between the ABAP/4 code and the computer's operating system. SAP likes to call it middleware because it sits in the middle, between ABAP/4 and the operating system. Basis sits between ABAP/4 and the operating system. ABAP/4 cannot run directly on an operating system. It requires a set of programs (collectively called Basis) to load, interpret, and buffer its input and output. Basis, in some respects, is like the Windows environment. Windows starts up, and while running it provides an environment in which Windows programs can run. Without Windows, programs written for the Windows environment cannot run. Basis is to ABAP/4 programs as Windows is to Windows programs. Basis provides the runtime environment for ABAP/4 programs. Without Basis, ABAP/4 programs cannot run. When the operator starts up R/3, you can think of him as starting up Basis. Basis is a collection of R/3 system programs that present you with an interface. Using this interface the user can start ABAP/4 programs. To install Basis, an installer runs the program r3inst at the command-prompt level of the operating system. Like most installs, this creates a directory structure and copies a set of executables into it. These executables taken together as a unit form Basis.
    To start up the R/3 system, the operator enters the startsap command. The Basis executables start up and stay running, accepting requests from the user to run ABAP/4 programs.
    ABAP/4 programs run within the protective Basis environment; they are not executables that run on the operating system. Instead, Basis reads ABAP/4 code and interprets it into operating system instructions. ABAP/4 programs do not access operating system functions directly. Instead, they use Basis functions to perform file I/O and display data in windows. This level of isolation from the operating system enables ABAP/4 programs to be ported without modification to any system that supports R/3. This buffering is built right into the ABAP/4 language itself and is actually totally transparent to the programmer.
    Basis makes ABAP/4 programs portable. The platforms that R/3 can run on are shown in Table. For example, if you write an ABAP/4 program on Digital UNIX with an Informix database and an OSF/Motif interface, that same program should run without modification on a Windows NT machine with an Oracle database and a Windows 95 interface. Or, it could run on an AS/400 with a DB2 database using OS/2 as the front-end.
    SAP also provides a suite of tools for administering the Basis system. These tools perform tasks such as system performance monitoring, configuration, and system maintenance. To access the Basis administration tools from the main menu, choose the path Tools->Administration.
    Platforms and Databases Supported by R/3
    Operating Systems Supported Hardware Supported Front-Ends Supported Databases
    AIX SINIX IBM SNI SUN Win 3.1/95/NT DB2 for AIX
    SOLARIS HP-UX Digital HP OSF/Motif Informix-Online
    Digital-UNIX Bull OS/2 Oracle 7.1
    Windows NT AT&T Compaq Win 3.1/95/NT Oracle 7.1
    Bull/Zenith OSF/Motif SQL Server 6.0
    HP (Intel) SNI OS/2 ADABAS D
    OS/400 AS/400 Win95 OS/2 DB2/400
    edit SAP Systems and Landscapes
    All SAP data exists and all SAP software runs in the context of an SAP system. A system consists of a central relational database and one or more application servers ("instances") accessing the data and programs in this database. A SAP system contains at least one instance but may contain more, mostly for reasons of sizing and performance. In a system with multiple instances, load balancing mechanisms ensure that the load is spread evenly over the available application servers.
    Installations of the Web Application Server (landscapes) typically consist of three systems: one for development, one for testing and quality assurance, and one for production. The landscape may contain more systems, e.g. separate systems for unit testing and pre-production testing, or it may contain fewer, e.g. only development and production, without separate QA; nevertheless three is the most common configuration. ABAP programs are created and undergo first testing in the development system. Afterwards they are distributed to the other systems in the landscape. These actions take place under control of the Change and Transport System (CTS), which is responsible for concurrency control (e.g. preventing two developers from changing the same code at the same time), version management and deployment of programs on the QA and production systems.
    The Web Application Server consists of three layers: the database layer, the application layer and the presentation layer. These layers may run on the same or on different physical machines. The database layer contains the relational database and the database software. The application layer contains the instance or instances of the system. All application processes, including the business transactions and the ABAP development, run on the application layer. The presentation layer handles the interaction with users of the system. Online access to ABAP application servers can go via a proprietary graphical interface, the SAPGUI, or via a Web browser.
    edit Transactions
    We call an execution of an ABAP program using a transaction code a transaction. There are dialog, report, parameter, variant, and as of release 6.10, OO transactions. A transaction is started by entering the transaction code in the input field on the standard toolbar, or by means of the ABAP statements CALL TRANSACTION or LEAVE TO TRANSACTION. Transaction codes can also be linked to screen elements or menu entries. Selecting such an element will start the transaction.
    A transaction code is simply a twenty-character name connected with a Dynpro, another transaction code, or, as of release 6.10, a method of an ABAP program. Transaction codes linked with Dynpros are possible for executable programs, module pools, and function groups. Parameter transactions and variant transactions are linked with other transaction codes. Transaction codes that are linked with methods are allowed for all program types that can contain methods. Transaction codes are maintained in transaction SE93.
    So, a transaction is nothing more than the SAP way of program execution—but why is it called “transaction”? ABAP is a language for business applications and the most important features of business applications were and still are are transactions. Since in the early days of SAP, the execution of a program often meant the same thing as carrying out a business transaction, the terms transaction and transaction code were chosen for program execution. But never mix up the technical meaning of a transaction with business transactions. For business transactions, it is the term LUW (Logical Unit of Work) that counts. And during one transaction (program execution), there can be many different LUW’s.
    Let’s have a look at the different kind of transactions:
    edit Dialog Transaction
    These are the most common kind of transactions. The transaction code of a dialog transaction is linked to a Dynpro of an ABAP program. When the transaction is called, the respective program is loaded and the Dynpro is called. Therefore, a dialog transaction calls a Dynpro sequence rather than a program. Only during the execution of the Dynpro flow logic are the dialog modules of the ABAP program itself are called. The program flow can differ from execution to execution. You can even assign different dialog transaction codes to one program.
    edit Parameter Transaction
    In the definition of a parameter transaction code, a dialog transaction is linked with parameters. When you call a parameter transaction, the input fields of the initial Dynpro screen of the dialog transaction are filled with parameters. The display of the initial screen can be inhibited by specifying all mandatory input fields as parameters of the transaction.
    edit Variant Transaction
    In the definition of a variant transaction code, a dialog transaction is linked with a transaction variant. When a variant transaction is accessed, the dialog transaction is called and executed with the transaction variant. In transaction variants, you can assign default values to the input fields on several Dynpro screens in a transaction, change the attributes of screen elements, and hide entire screens. Transaction variants are maintained in transaction SHD0.
    edit Report Transaction
    A report transaction is the transaction code wrapping for starting the reporting process. The transaction code of a report transaction must be linked with the selection screen of an executable program. When you execute a report transaction, the runtime environment internally executes the ABAP statement SUBMIT—more to come on that.
    edit OO Transaction
    A new kind of transaction as of release 6.10. The transaction code of an OO transaction is linked with a method of a local or global class. When the transaction is called, the corresponding program is loaded, for instance methods an object of the class is generated and the method is executed.
    edit Types of ABAP programs
    In ABAP, there are two different types of programs:
    edit Report programs(Executable pools)
    A Sample ReportReport programs AKA Executable pools follow a relatively simple programming model whereby a user optionally enters a set of parameters (e.g. a selection over a subset of data) and the program then uses the input parameters to produce a report in the form of an interactive list. The output from the report program is interactive because it is not a passive display; instead it enables the user, through ABAP language constructs, to obtain a more detailed view on specific data records via drill-down functions, or to invoke further processing through menu commands, for instance to sort the data in a different way or to filter the data according to selection criteria. This method of presenting reports has great advantages for users who must deal with large quantities of information and must also have the ability to examine this information in highly flexible ways, without being constrained by the rigid formatting or unmanageable size of "listing-like" reports. The ease with which such interactive reports can be developed is one of the most striking features of the ABAP language.
    The term "report" is somewhat misleading in the sense that it is also possible to create report programs that modify the data in the underlying database instead of simply reading it.
    A customized screen created using Screen Painter,which is one of the tool available in ABAP workbench(T-code = SE51).
    edit Online programs
    Online programs (also called module pools) do not produce lists. These programs define more complex patterns of user interaction using a collection of screens. The term “screen” refers to the actual, physical image that the users sees. Each screen also has a “flow logic”; this refers to the ABAP code invoked by the screens, i.e. the logic that initializes screens, responds to a user’s requests and controls the sequence between the screens of a module pool. Each screen has its own Flow Logic, which is divided into a "PBO" (Process Before Output) and "PAI" (Process After Input) section. In SAP documentation the term “dynpro” (dynamic program) refers to the combination of the screen and its Flow Logic.
    Online programs are not invoked directly by their name, but are associated with a transaction code. Users can then invoke them through customizable, role-dependent, transaction menus.
    Apart from reports and online programs, it is also possible to develop sharable code units such as class libraries, function libraries and subroutine pools.
    edit Subroutine Pools
    Subroutine pools, as the name implies, were created to contain selections of subroutines that can be called externally from other programs. Before release 6.10, this was the only way subroutine pools could be used. But besides subroutines, subroutine pools can also contain local classes and interfaces. As of release 6.10, you can connect transaction codes to methods. Therefore, you can now also call subroutine pools via transaction codes. This is the closest to a Java program you can get in ABAP: a subroutine pool with a class containing a method – say – main connected to a transaction code!
    edit Type Pools
    Type pools are the precursors to general type definitions in the ABAP Dictionary. Before release 4.0, only elementary data types and flat structures could be defined in the ABAP Dictionary. All other types that should’ve been generally available had to be defined with TYPES in type pools. As of release 4.0, type pools were only necessary for constants. As of release 6.40, constants can be declared in the public sections of global classes and type pools can be replaced by global classes.
    edit Class Pools
    Class pools serve as containers for exactly one global class. Besides the global class, they can contain global types and local classes/interfaces to be used in the global class. A class pool is loaded into memory by using one of its components. For example, a public method can be called from any ABAP program or via a transaction code connected to the method. You maintain class pools in the class builder.
    edit Interface Pools
    Interface pools serve as containers for exactly one global interface—nothing more and nothing less. You use an interface pool by implementing its interface in classes and by creating reference variables with the type of its interface. You maintain interface pools in the class builder.
    edit ABAP Workbench
    The ABAP Workbench contains different tools for editing Repository objects. These tools provide you with a wide range of assistance that covers the entire software development cycle. The most important tools for creating and editing Repository objects are:
    ABAP Editor for writing and editing program code
    ABAP Dictionary for processing database table definitions and retrieving global types
    Menu Painter for designing the user interface (menu bar, standard toolbar, application toolbar, function key assignment)
    Screen Painter for designing screens (dynamic programs) for user dialogs
    Function Builder for displaying and processing function modules (routines with defined interfaces that are available throughout the system)
    Class Builder for displaying and processing ABAP Objects classes
    edit The ABAP Dictionary
    Enforces data integrity
    Manages data definitions without redundancy
    Is tightly integrated with the rest of the ABAP/4 Development Workbench.
    Enforcing data integrity is the process of ensuring that data entered into the system is logical, complete, and consistent. When data integrity rules are defined in the ABAP/4 Dictionary, the system automatically prevents the entry of invalid data. Defining the data integrity rules at the dictionary level means they only have to be defined once, rather than in each program that accesses that data.
    The following are examples of data lacking integrity:
    A date field with a month value of 13
    An order assigned to a customer number that doesn’t exist
    An order not assigned to a customer
    Managing data definitions without redundancy is the process of linking similar information to the same data definition. For example, a customer database is likely to contain a customer’s ID number in several places. The ABAP Dictionary provides the capability of defining the characteristics of a customer ID number in only one place. That central definition then can be used for each instance of a customer ID number.
    The ABAP Dictionary’s integration with the rest of the development environment enables ABAP programs to automatically recognize the names and characteristics of dictionary objects.
    Additionally, the system provides easy navigation between development objects and dictionary definitions. For example, as a programmer, you can double-click on the name of a dictionary object in your program code, and the system will take you directly to the definition of that object in the ABAP/4 Dictionary.
    When a dictionary object is changed, a program that references the changed object will automatically reference the new version the next time the program runs. Because ABAP is interpreted, it is not necessary to recompile programs that reference changed dictionary objects.
    edit ABAP Syntax
    The syntax of the ABAP programming language consists of the following elements:
    Statements
    An ABAP program consists of individual ABAP statements. Each statement begins with a keyword and ends with a period.
    edit "Hello World" PROGRAM
    WRITE 'Hello World'.
    This example contains two statements, one on each line. The keywords are PROGRAM and WRITE. The program displays a list on the screen. In this case, the list consists of the line "My First Program".
    The keyword determines the category of the statement. For an overview of the different categories, refer to ABAP Statements.
    edit Formatting ABAP Statements
    ABAP has no format restrictions. You can enter statements in any format, so a statement can be indented, you can write several statements on one line, or spread a single statement over several lines.
    You must separate words within a statement with at least one space. The system also interprets the end of line marker as a space.
    The program fragment
    PROGRAM TEST.
    WRITE 'This is a statement'.
    could also be written as follows:
    PROGRAM TEST. WRITE 'This is a statement'.
    or as follows:
    PROGRAM
    TEST.
    WRITE
    'This is a statement'.
    Use this free formatting to make your programs easier to understand.
    edit Special Case: Text Literals
    Text literals are sequences of alphanumeric characters in the program code that are enclosed in quotation marks. If a text literal in an ABAP statement extends across more than one line, the following difficulties can occur:
    All spaces between the quotation marks are interpreted as belonging to the text literal. Letters in text literals in a line that is not concluded with quotation marks are interpreted by the editor as uppercase. If you want to enter text literals that do not fit into a single line, you can use the ‘&’ character to combine a succession of text literals into a single one.
    The program fragment
    PROGRAM TEST.
    WRITE 'This
    is
    a statement'.
    inserts all spaces between the quotation marks into the literal, and converts the letters to uppercase.
    This program fragment
    PROGRAM TEST.
    WRITE 'This' &
    ' is ' &
    'a statement'.
    combines three text literals into one.
    edit Chained Statements
    The ABAP programming language allows you to concatenate consecutive statements with an identical first part into a chain statement.
    To concatenate a sequence of separate statements, write the identical part only once and place a colon ( after it. After the colon, write the remaining parts of the individual statements, separating them with commas. Ensure that you place a period (.) after the last part to inform the system where the chain ends.
    Statement sequence:
    WRITE SPFLI-CITYFROM.
    WRITE SPFLI-CITYTO.
    WRITE SPFLI-AIRPTO.
    Chain statement:
    WRITE: SPFLI-CITYFROM, SPFLI-CITYTO, SPFLI-AIRPTO.
    In the chain, a colon separates the beginning of the statement from the variable parts. After the colon or commas, you can insert any number of spaces.
    You could, for example, write the same statement like this:
    WRITE: SPFLI-CITYFROM,
    SPFLI-CITYTO,
    SPFLI-AIRPTO.
    In a chain statement, the first part (before the colon) is not limited to the keyword of the statements.
    Statement sequence:
    SUM = SUM + 1.
    SUM = SUM + 2.
    SUM = SUM + 3.
    SUM = SUM + 4.
    Chain statement:
    SUM = SUM + : 1, 2, 3, 4.
    edit Comments
    Comments are texts that you can write between the statements of your ABAP program to explain their purpose to a reader. Comments are distinguished by the preceding signs * (at the beginning of a line) and " (at any position in a line). If you want the entire line to be a comment, enter an asterisk (*) at the beginning of the line. The system then ignores the entire line when it generates the program. If you want part of a line to be a comment, enter a double quotation mark (") before the comment. The system interprets comments indicated by double quotation marks as spaces.
    PROGRAM SAPMTEST *
    WRITTEN BY KARL BYTE, 06/27/1995 *
    LAST CHANGED BY RITA DIGIT, 10/01/1995 *
    TASK: DEMONSTRATION *
    PROGRAM SAPMTEST.
    DECLARATIONS *
    DATA: FLAG " GLOBAL FLAG
    NUMBER TYPE I " COUNTER
    PROCESSING BLOCKS *
    Advantages of ABAP over Contemporary languages
    ABAP OBJECTS
    Object orientation in ABAP is an extension of the ABAP language that makes available the advantages of object-oriented programming, such as encapsulation, interfaces, and inheritance. This helps to simplify applications and make them more controllable.
    ABAP Objects is fully compatible with the existing language, so you can use existing statements and modularization units in programs that use ABAP Objects, and can also use ABAP Objects in existing ABAP programs.
    edit ABAP Statements – an Overview
    The first element of an ABAP statement is the ABAP keyword. This determines the category of the statement. The different statement categories are as follows:
    edit Declarative Statements
    These statements define data types or declare data objects which are used by the other statements in a program or routine. The collected declarative statements in a program or routine make up its declaration part.
    Examples of declarative keywords:
    TYPES, DATA, TABLES
    edit Modularization Statements
    These statements define the processing blocks in an ABAP program.
    The modularization keywords can be further divided into:
    · Defining keywords
    You use statements containing these keywords to define subroutines, function modules, dialog modules and methods. You conclude these processing blocks using the END statements.
    Examples of definitive keywords:
    METHOD ... ENDMETHOD, FUNCTION ... ENDFUNCTION, MODULE ... ENDMODULE.
    · Event keywords
    You use statements containing these keywords to define event blocks. There are no special statements to conclude processing blocks - they end when the next processing block is introduced.
    Examples of event key words:
    AT SELECTION SCREEN, START-OF-SELECTION, AT USER-COMMAND
    edit Control Statements
    You use these statements to control the flow of an ABAP program within a processing block according to certain conditions.
    Examples of control keywords:
    IF, WHILE, CASE
    edit Call Statements
    You use these statements to call processing blocks that you have already defined using modularization statements. The blocks you call can either be in the same ABAP program or in a different program.
    Examples of call keywords:
    CALL METHOD, CALL TRANSACTION, SUBMIT, LEAVE TO
    Operational Statements These keywords process the data that you have defined using declarative statements.
    Examples of operational keywords:
    MOVE, ADD
    edit Unique Concept of Internal Table in ABAP
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
    Like all elements in the ABAP type concept, internal tables can exist both as data types and as data objects A data type is the abstract description of an internal table, either in a program or centrally in the ABAP Dictionary, that you use to create a concrete data object. The data type is also an attribute of an existing data object.
    edit Internal Tables as Data Types
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    edit Line type
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    edit Key
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    edit Table type
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be unique or not. Standard tables and sorted tables are known generically as index tables.
    Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    edit Generic Internal Tables
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols and the interface parameters of procedures . You cannot use them to declare data objects.
    edit Internal Tables as Dynamic Data Objects
    Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    edit Choosing a Table Type
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
    edit Standard tables
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.
    edit Sorted tables
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERT statement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHERE condition.
    edit Hashed tables
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    edit Advanced Topics
    edit Batch Input: Concepts
    Processing Sessions
    The above figure shows how a batch input session works.A batch input session is a set of one or more calls to transactions along with the data to be processed by the transactions. The system normally executes the transactions in a session non-interactively, allowing rapid entry of bulk data into an R/3 System.
    A session records transactions and data in a special format that can be interpreted by the R/3 System. When the System reads a session, it uses the data in the session to simulate on-line entry of transactions and data. The System can call transactions and enter data using most of the facilities that are available to interactive users.
    For example, the data that a session enters into transaction screens is subject to the same consistency checking as in normal interactive operation. Further, batch input sessions are subject to the user-based authorization checking that is performed by the system.
    edit Advantages of ABAP over Contemporary languages
    ABAP Objects offers a number of advantages, even if you want to continue using procedural programming. If you want to use new ABAP features, you have to use object-oriented interfaces anyway.
    Sharing Data: With ABAP shared objects, you can aggregate data once at a central location and the different users and programs can then access this data without the need for copying.
    Exception Handling: With the class-based exception concept of ABAP, you can define a special control flow for a specific error situation and provide the user with information about the error.
    Developing Persistency: For permanent storage of data in ABAP, you use relational database tables by means of database-independent Open SQL, which is integrated in ABAP. However, you can also store selected objects transparently or access the integrated database or other databases using proprietary SQL.
    Connectivity and Interoperability: The Exchange Infrastructure and Web services are the means by which developers can implement a service-oriented architecture. With Web services, you can provide and consume services independently of implementation or protocol. Furthermore, you can do so within NetWeaver and in the communication with other systems. With the features of the Exchange Infrastructure, you can enable, manage, and adapt integration scenarios between systems.
    Making Enhancements: With the Enhancement Framework, you can enhance programs, function modules, and global classes without modification as well as replace existing code. The Switch Framework enables you activate only specific development objects or enhancements in a system.
    edit Considerable Aspects
    It follows a list of aspects to be considered during development. The list of course is not complete.
    edit Dynpro persistence
    When implementing dynpros one has to care for himself to read out and persist the necessary fields. Recently it happened to me that I forgot to include a field into the UPDATE-clause which is an error not so easy to uncover if you have other problems to be solved in the same package. Here, tool-support or built-in mechanisms would help.
    The developer could help himself out by creating something like a document containing a cookbook or guide in which parts of a dynpro logic one has to care about persistence. With that at hand, it would be quite easy finding those bugs in short time. Maybe a report scanning for the definition of the dynpro fields to be persisted could scan the code automatically, too.
    edit Memory Cache
    It should be common-sense that avoiding select-statements onto the database helps reducing the server load. For that the programmer either can resort to function modules if available. This maybe is the case for important tables. Or the programmer needs to implement his own logic using internal tables. Here, the standard software package could provide the developer with a tool or a mechanism auto-generating memory cached tables resp. function modules implementing this.
    Sometimes buffering of database tables could be used, if applicable. But that would require an effort in customizing the system and could drain down system performance overall, especially if a table is involved that has a central role.
    edit Interfaces
    It should be noticed that some function modules available have an incomplete interface. That means, the interface does not include all parameters evaluated by the logic of the function module. For example, global variables from within the function group could be read out, which cannot be influenced by the general caller. Or memory parameters are used internally to feed the logic with further information.
    One workaround here would be copying the relevant parts of the logic to a newly created function module and then adapt it to the own context. This sometimes is possible, maybe if the copied code is not too lengthy and only a few or no calls to other logic is part of it.
    A modification of the SAP code could be considered, if the modification itself is unavoidable (or another solution would be not justifiable by estimated effort to spend on it) and if the location of the modification seems quite safe against future upgrades or hot fixes. The latter is something that could be evaluated by contacting the SAP hotline or working with OSS message (searching thru existing one, perhaps open a new one).
    edit Example
    'From SAP NetWeaver:'
    set an exclusive lock at level object-type & object-id
    IF NOT lf_bapi_error = true.
    IF ( NOT istourhd-doc_type IS INITIAL ) AND
    ( NOT istourhd-doc_id IS INITIAL )
    CALL FUNCTION 'ENQUEUE_/DSD/E_HH_RAREF'
    EXPORTING
    obj_typ = istourhd-doc_type
    obj_id = istourhd-doc_id
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc 0.
    terminate processing...
    lf_bapi_error = true.—
    ...and add message to return table
    PERFORM set_msg_to_bapiret2
    USING sy-msgid gc_abort sy-msgno
    sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
    gc_istourhd gc_enqueue_refdoc space
    CHANGING lt_return.
    ENDIF.
    ENDIF.
    ENDIF. " bapi error
    edit Example Report(Type - ALV(Advanced List Viewer))
    REPORT Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB .
    *Simple example to use ALV and to define the ALV data in an internal
    *table
    *data definition
    tables:
    marav. "Table MARA and table MAKT
    Data to be displayed in ALV
    Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
    matically determine the fieldstructure from this source program
    Data:
    begin of imat occurs 100,
    matnr like marav-matnr, "Material number
    maktx like marav-maktx, "Material short text
    matkl like marav-matkl, "Material group (so you can test to make
    " intermediate sums)
    ntgew like marav-ntgew, "Net weight, numeric field (so you can test to
    "make sums)
    gewei like marav-gewei, "weight unit (just to be complete)
    end of imat.
    Other data needed
    field to store report name
    data i_repid like sy-repid.
    field to check table length
    data i_lines like sy-tabix.
    Data for ALV display
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV.
    select-options:
    s_matnr for marav-matnr matchcode object MAT1.
    start-of-selection.
    read data into table imat
    select * from marav
    into corresponding fields of table imat
    where
    matnr in s_matnr.
    Check if material was found
    clear i_lines.
    describe table imat lines i_lines.
    if i_lines lt 1.
    Using hardcoded write here for easy upload
    write: /
    'No materials found.'.
    exit.
    endif.
    end-of-selection.
    To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
    The fieldcatalouge can be generated by FUNCTION
    'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
    report source, including this report.
    Store report name
    i_repid = sy-repid.
    Create Fieldcatalogue from internal table
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = i_repid
    I_INTERNAL_TABNAME = 'IMAT' "capital letters!
    I_INCLNAME = i_repid
    CHANGING
    CT_FIELDCAT = int_fcat
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3.
    *explanations:
    I_PROGRAM_NAME is the program which calls this function
    I_INTERNAL_TABNAME is the name of the internal table which you want
    to display in ALV
    I_INCLNAME is the ABAP-source where the internal table is defined
    (DATA....)
    CT_FIELDCAT contains the Fieldcatalouge that we need later for
    ALV display
    IF SY-SUBRC 0.
    write: /
    'Returncode',
    sy-subrc,
    'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
    ENDIF.
    *This was the fieldcatlogue
    Call for ALV list display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = i_repid
    IT_FIELDCAT = int_fcat
    TABLES
    T_OUTTAB = imat
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    *explanations:
    I_CALLBACK_PROGRAM is the program which calls this function
    IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains
    now the data definition needed for display
    I_SAVE allows the user to save his own layouts
    T_OUTTAB contains the data to be displayed in ALV
    IF SY-SUBRC 0.
    write: /
    'Returncode',
    sy-subrc,
    'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
    ENDIF.
    first learn basic programing afterwards
    go through commands, statements , events, functional modules.....etc.
    and implement these stuff, in programing,. and do practising.
    Check the following links:
    http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
    http://sap-img.com/
    http://sapabaplive.blogspot.com/2007/07/download-abap-in-21-days.html
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ABAP_tutorial.html
    http://www.esnips.com/web/SAPAbapCertificationDocs/
    Start with this.Refer this
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm

  • Web DynPro for ABAP Basics

    Hello Seniors,
    I am new to Web DynPro for ABAP. Could you please give me some information or send some basic documents for Web DynPro for ABAP. Please send some basic scenarios also.
    Thank you,
    Chaitanya.C.N

    Hi Chaitanya,
    Here is some information about Webdynpro for ABAP.
    1) This is basic Info of WD ABAP
    As the name suggests Web Dynpro for ABAP uses exactly the same meta model as its cousin Web Dynpro for Java. A Web Dynpro component, a Web Dynpro view, a Web Dynpro model, a Web Dynpro controller have the same semantics both for ABAP and Java. The main difference is the designtime environment, the development infrastructure and the runtime environment.
    The designtime environment is properly embedded in the ABAP Workbench where Web Dynpro artifacts are simply a new category like BSP applications or classical dynpro based applications before. Also no surprises regarding the development infrastructure. The correction and transport system keeps track on all changes that are done, versions them and helps to propagate the Web Dynpro application from development to production like you would do with ordinary BSP or dynpro-based applications.
    Last not least the execution platform is the ABAP server that produces application content ready to be integrated in the NetWeaver Portal seamlessly. Features like portal eventing can be used between applications written in ABAP or applications developed with Java.
    2 ) I can give you links that can help you a lot.
    First of all start doing SAP SDN tutorials .
    Create some compenents with BAPI , Component usage and ALV .
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
    /people/marilyn.pratt/blog/2005/12/20/web-dynpro-for-abap
    Try to Download demo tutorials from SDN library & Try to search WebDynpro ABAP WebLogs .
    Also, SAP has provided you with ample demo example of WD ABAP already bundled with SAP . Just Try out Components starting with WDR . I can tell you few like WDR_TEST_EVENTS ( It shows how every UI elments to use )
    See packages like SWDP_DEMO , SALV_WD_DEMO
    there are many more .
    We can call BAPI through a service call in web dynpro application. Thus automatically backgroud code for BAPI execution will be generated.
    To start with Web dynpro ABAP you can try following tutorial:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a282c952-0801-0010-1eb5-87953e036712
    You can start with tutorials and all. There are around six tutorials in SDN library.
    Web Dynpro for ABAP
    http://help.sap.com/saphelp_erp2005/helpdata/en/a5/1a1e3e7181b60ae10000000a114084/frameset.htm
    best tutorials in wbdynpro for ABAP to start with :
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/fed073e5-0901-0010-4eb4-c9882aac7b11 [original link is broken] [original link is broken]
    Have a look at the following SDN WDA Wiki . There you can find all relevant information.
    https://wiki.sdn.sap.com/wiki/display/WDABAP/Main
    Also you can search weblogs on web dynpro ABAP.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
    /people/marilyn.pratt/blog/2005/12/20/web-dynpro-for-abap
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
    http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdabap/main&
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a282c952-0801-0010-1eb5-87953e036712
    You can start with tutorials and all. There are around six tutorials in SDN library.
    Web Dynpro for ABAP
    http://help.sap.com/saphelp_erp2005/helpdata/en/a5/1a1e3e7181b60ae10000000a114084/frameset.htm
    best tutorials in wbdynpro for ABAP to start with :
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/fed073e5-0901-0010-4eb4-c9882aac7b11 [original link is broken] [original link is broken]
    http://www.****************/Tutorials/WebDynproABAP/TextRadioButton/page1.htm
    reward points for helpful answers.
    Thanks,
    Raghava Vakada.

  • ABAP BASIC INFORMATION

    Hi..,
    I am nwe to abap and i completed my sd. So i want to learn basic points of abap
    like(/.,:,=,SKIP,parameters, if conditions, logical informations...etc...
    Eagerly waiting for ur help.
    Thank you gurus..
                                                                                    RAMA SHARMA.

    1)http://help.sap.com/saphelp_nw2004s/helpdata/en/c9/5472f6787f11d194c90000e8353423/content.htm
      From this u can navigate thru all the info whatever u want..
    2) Goto se38 -> Environment menu -> Examples -> U can find many sample code examples.
    Regards,
    Kalai
    (Award points if helpful..)

  • Regarding BAPI   and OOPS ABAP  Basic Study Material...................

    Hi....Can u please  send me  any  Basic Study material of  BAPI 's  and  OOP's ABAP
    to my email id  [email protected] ...
    thanks in advance......

    Hi,
    Check these links:
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    ooops abap:
    Have a look at below link and go to page 1291. It will give you good info abt OO ABAP.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Also have a look at below links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    Please do check transaction ABAPDOCU to learn more about ABAP OO. There are lots of examples and explanations there. Also, do check sapgenie.com for more examples(under their ABAP OO link).
    A very good option would be "ABAP Objects" written by Horst Keller.
    Regards

  • ABAP BASIC

    Hello Experts,
    I am new to ABAP and would like to know the use of different terminologies in ABAP.Can i have docs & PDFS which can help me to understand the terminologies & would help me in Programming.
    Thanks in advance.
    Regards,
    Aparna
    Message was edited by: Aparna Vankar
    I m unable to give points so i m editing this as qt.
    Regards ,
    Aparna

    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    Weblog for receive email and processing it through ABAP
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    For Logical database
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    very useful
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Useful link to websites
    http://www.hernangn.com.ar/sap.htm
    Useful for background
    http://www.sappoint.com/basis/bckprsng.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    For posting weblog,
    /people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
    Dynamic Internal table -weblog in sdn
    /people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
    Smartforms
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Workflow
    http://www.sap-img.com/workflow/sap-workflow.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
    For examples on WorkFlow...check the below link..
    http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
    http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
    http://www.workflowing.com/id18.htm
    http://www.e-workflow.org/
    http://web.mit.edu/sapr3/dev/newdevstand.html
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Mail
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    BOM Explosion
    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
    BOM
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    OLE
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    ALVGRID with refresh
    http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
    For language setting and decimal separator
    /people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
    Oracle queries
    http://sqlzoo.net/
    To format SQL
    http://www.sqlinform.com/
    SCOT settings
    http://www.sap-img.com/basis/basis-faq.htm
    Status Icon [ALV,Table Control,Tab Strip]
    http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    For multiMedia
    /people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
    Uploading LOGO in SAP
    http://www.sap-img.com/ts001.htm
    LSMW
    http://www.sap-img.com/sap-data-migration.htm
    http://www.sapgenie.com/saptech/lsmw.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
    Here are the two links which contains lots of PDFS:
    http://www.easymarketplace.de/online-pdfs-q-s.php
    http://www.consolut.de/saphelp/sap_online_help.html
    pls reward points if helpful

  • ABAP- Basic requirement

    Hi Team,
    Presently am working as a key user in SAP (MM,HCM,SD &APO) ..now I would like to do training in ABAP..but I don’t have any programming back ground. Will it be easy for to do ABAP though I don’t have any experience in programming area?
    Thanks for the advise.

    Hello Vijesh,
    If you are like  to learn ABAP then it will take some more time to you becoz you have do not have knowledge of programming. But you Definitely can learn just you have to give more time for this module.Its not very tough once you get idea and your logic getting build up.
    I hope this will be helpful.
    Regards,
    Ameya Karadkhedkar

  • Abap basic list .

    My requirement is as below .
    For every new sales org /Distribution Channel /Division  Combination of these three . I have to display the basic list .Can some one guide me on this .
    Required output
    Sales Area: <KONA-VKORG>/ <KONA-VTWEG>/ <KONA-SPART>
    Document no   date              Validity date
    Thanks in advance
    -padma

    go through this report
                     TABLES DECLARATION
    type-pools: slis.
    data: it_fieldcat type slis_t_fieldcat_alv,
           wa_fieldcat like line of it_fieldcat.
    tables:vbak,        "Sales Document Header Details
            vbap,        "Sales Document Item Details
            kna1.        "Customer Master Details
                        INTERNAL TABLES DECLARATION
    data:begin of it_vbak occurs 0,
         vbeln like vbak-vbeln,     "Sales Document
         erdat like vbak-erdat,     "Date on which the record was created
         erzet like vbak-erzet,     "Entry time
         ernam like vbak-ernam,     "Name of Person who Created the Object
         auart like vbak-auart,    "Sales Document Type
         end of it_vbak.
    data: begin of it_vbap occurs 0,
           vbeln like vbap-vbeln,
           posnr like vbap-posnr,
           matnr like vbap-matnr,
           matwa like vbap-matwa,
           matkl like vbap-matkl,
           arktx like vbap-arktx,
           end of it_vbap.
    data:begin of it_finaltable occurs 0,
          vbeln like vbak-vbeln,     "Sales Document
          erdat like vbak-erdat,     "Date on which the record was created
          erzet like vbak-erzet,     "Entry time
          ernam like vbak-ernam,     "Name of Person who Created the Object
          auart like vbak-auart,
          posnr like vbap-posnr,
          matnr like vbap-matnr,
          matwa like vbap-matwa,
          matkl like vbap-matkl,
          arktx like vbap-arktx,
          end of it_finaltable.
                              SELECTION-SCREEN
    selection-screen begin of block b1.
    select-options:s_vbeln for vbak-vbeln.
    selection-screen end of block b1.
    selection-screen begin of block b2.
    select-options:s_erdat for vbak-erdat.
    selection-screen end of block b2.
    selection-screen begin of block b3.
    select-options:s_erzet for vbak-erzet,
                   s_ernam for vbak-ernam,
                   s_auart for vbak-auart.
    selection-screen end of block b3.
                 START-OF-SELECTION
    start-of-selection.
    perform get_vbak.
    perform alv_datas.
    perform alv_displays.
                 END-OF-SELECTION
    end-of-selection.
    form alv_datas .
    wa_fieldcat-fieldname = 'VBELN'.
    wa_fieldcat-seltext_l = 'SALES DOCUMENT NUMBER'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'ERDAT'.
    wa_fieldcat-seltext_l = 'DATE ENTERED'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'ERZET'.
    wa_fieldcat-seltext_l = 'TIME CREATED'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'ERNAM'.
    wa_fieldcat-seltext_l = 'Person Created'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'AUART'.
    wa_fieldcat-seltext_l = '----
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'POSNR'.
    wa_fieldcat-seltext_l = 'Item Number'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-seltext_l = 'Material Number'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'MATKL'.
    wa_fieldcat-seltext_l = 'Order Qty'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'ARKTX'.
    wa_fieldcat-seltext_l = 'Order Unit'.
    append wa_fieldcat to it_fieldcat.
    wa_fieldcat-fieldname = 'POSAR'.
    wa_fieldcat-seltext_l = 'Net Qty'.
    append wa_fieldcat to it_fieldcat.
    endform.                    " ALV_DATAS
    *&      Form  GET_VBAK
          text
    -->  p1        text
    <--  p2        text
    form get_vbak .
    if not it_vbak is initial.
    select vbeln
           erdat
           erzet
           ernam
           auart from vbak
           into table it_vbak
           for all entries in it_vbap
           where vbeln = it_vbap-vbeln.
    endif.
    endform.
           " GET_VBAK
    *&      Form  ALV_DISPALYS
          text
    -->  p1        text
    <--  p2        text
    form alv_displays .
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = I_GRID_TITLE
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
      IS_LAYOUT                         = IS_LAYOUT
       it_fieldcat                       = it_fieldcat
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
      IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      IT_EVENTS                         = IT_EVENTS
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
      tables
        t_outtab                          = it_finaltable
    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_DISPLAYS
    reward points if helpful.....

  • ABAP Basics: FUNCTION 'DYNP_VALUES_UPDATE'

    Hi,
    in a selection-screen-event (AT SELECTION-SCREEN ON RADIOBUTTON GROUP dest.) I want to modify another screen field depending on the input for the 2 radiobutton fields.
    The exit is only processed after I declared the first parameter with addition "USER-COMMAND dest". I don't understand why, but it's OK.
    Now comes the dilemma:
    When changing the radiobutton first, the event is processed and the value on the selection screen replaced.
    When I do it again, the event is processed, but the replament does not work.
    I'm using DYNP_VALUES_UPDATE as shown below:
    <pre>
    FORM dynp_values_update  USING    pv_field TYPE fieldname
                                      pv_value TYPE any.
      DATA:
        lv_dyname TYPE  d020s-prog,
        lv_dynumb TYPE   d020s-dnum,
        lt_dynpfields TYPE STANDARD TABLE OF dynpread WITH DEFAULT KEY,
        ls_dynpfields TYPE dynpread.
      FIELD-SYMBOLS:
        <dynpfields> TYPE dynpread.
      lv_dyname = sy-repid.
      lv_dynumb = sy-dynnr.
      ls_dynpfields-fieldname = pv_field.
      ls_dynpfields-fieldvalue = pv_value.
      APPEND ls_dynpfields TO lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname               = lv_dyname
          dynumb               = lv_dynumb
        TABLES
          dynpfields           = lt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          OTHERS               = 8.
      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.                    " dynp_values_update
    </pre>
    Sy-Subrc is zero - what's wrong? Obviously the update takes place only if the screen field is empty.
    Please help me, thank you.
    Regards,
    Clemens

    Please check this sample program,  here there is no need to use the DYNPRO_VALUE_UPDATE.
    report zrich_0001 .
    parameters: p_rad1 radiobutton group dest user-command chk,
                p_rad2 radiobutton group dest,
                p_file type localfile.
    <b>
    * Comment out this event
    *at selection-screen on radiobutton group dest.</b>
    <b>at selection-screen output.
      if p_rad1 = 'X'.
        p_file =  'C:/TestFile1.txt'.
      elseif p_rad2 = 'X'.
        p_file =  'C:/TestFile2.txt'.
      endif.</b>
    Regards,
    Rich Heilman

  • Abap development book

    dear sir,
         plz send abap development book my mail id.
                      thank you.
    Edited by: Moderator on Mar 11, 2008 1:57 PM

    These are some books which is best to study for ABAP.
    ABAP/4: Programming the SAP R/3 System (SAP Press) by Bernd Matzke
    ABAP Objects: Introduction to Programming SAP Applications (SAP Press) by Horst Keller
    ABAP Basics by Gunther Farber and Julia Kirchner
    Next Generation ABAP Development by Rich Heilman and Thomas Jung
    Sams Teach Yourself ABAP/4 in 21 Days by Ken Greenwood
    The Official ABAP Reference by Horst Keller and Joachim Jacobitz
    These are some best books for ABAP.
    You can get lot of e-books in the
    www.****************
    www.sapbrainsonline.com
    www.sapdevelopment.co.uk
    Reward if useful

  • Showing Image in Web Dynpro using ABAP

    Hi All,
    I am new to Web Dynpro ABAP , basically my requirement is to show a image , could any one please tell me the steps to do that , i have already uploaded the image in application server using T-code smw0 , and in the layout i have taken the element IMAGE.
    I have also made the context node as Image and under that i have made three attributes named as :-
    IMAGE (Context Node)
    source (Attibute type string)
    tooltip (Attribute type string)
    visible (Attribute type WDUI_VISIBILITY)
    In the WDDOINIT  method i have written the following code.
    DATA:
    context_node TYPE REF TO if_wd_context_node,
    context_elem TYPE REF TO if_wd_context_element,
    stru_image TYPE if_image_view=>element_image.
    fill structure with values
    stru_image-source = 'abc.gif'.
    stru_image-tooltip = 'Image Tooltip!!'.
    stru_image-visible = '02'. "=visible
    navigate to <IMAGE> via lead selection
    context_node = wd_context->get_child_node( name = `IMAGE` ).
    get element via lead selection
    context_elem = context_node->get_element( ).
    bind structure to context element image
    CALL METHOD context_elem->set_static_attributes
    EXPORTING
    static_attributes = stru_image.
    But I am getting the error if_image_view does not exist.
    Please help me and guide me if I am proceeding in a wrong way.
    Thanks and Regards,
    Rachit Khanna

    Hi ,
    Its very simple ....
    Dont use any transaction to upload image.
    right click on component and select
    create->mime_object->import
    suppose ur image is on desktop...
    So select the path of desktop select the image and click ok.
    U will see an MIMEs named folder in ur component and under which u will have ur image.
    now add image element into UI and there u will have source name property ...just write the name of ur image file and test ur application.
    U can see the image in output..
    (Also there are different properties of image element to set the position and other things)
    any queries ..feel free to ask
    regards
    panky

  • Genaral abap

    1)most commonly used command in Interactive Reporting?
    2)Can you create a field without data element domain?  
    3)How can you change the style of Logo or type of Logo?
    4)What the Object will be created when upload a Logo?
    5)How did you upload Logo using RSTXCDMC which format you upload TIF? 
    6)What are the select-option fields?
    7)in Between events you can use loop Say Yes or No?
    8)In Interactive How you see 5 to 9th sec -list?
    9)How to insert data in ternal table?
    10)Give the syntax of Inner,outer Join?
    11) In Dialog program Syntax of Synchronous and Asynchronous?
    12) tell me some of FI/CO tables How will you process the Session method in 13)Background? What are the FM you used in Session method

    Hi,
    one thing u have to know while douing SAP-ABAP u must practice it with more interest u must explore each and every option
    Here r few links for knowledge sharing..
    Refere the below link.
    ABAP book
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    ABAP in 21 days
    http://cma.zdnet.com/book/abap/index.htm
    ABAP BASIC
    You can also check for documentation in pdf files
    http://www.easymarketplace.de/online-pdfs.php
    ABAP in 21 days
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm SAP Online Help For Dictionary.
    http://sappoint.com/abap/
    http://help.sap.com/saphelp_45b/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
    database table update:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm
    database DML link:
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/5440f9b4f07f42a451b310f958690d/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/f46cabaa874bc9a82234e8cf1d0696/frameset.htm
    selection screen link:
    http://help.sap.com/saphelp_nw70/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    loop links:
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3564358411d1829f0000e829fbfe/frameset.htm
    DDIC LINKS:
    http://help.sap.com/saphelp_erp2004/helpdata/EN/cf/21ea0b446011d189700000e8322d00/frameset.htm
    tables link:
    http://help.sap.com/saphelp_erp2004/helpdata/EN/cf/21ea9e446011d189700000e8322d00/frameset.htm
    Some more....
    go through the links
    Start with this.Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Reports
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    Debugging Document.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    BAPI
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    List of all BAPIs
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Remote Function Call:
    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
    RFCs manage the communication process, parameter transfer and error handling.
    http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    http://www.techinterviews.com/?p=198
    http://www.techinterviews.com/?p=326
    http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
    http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
    http://www.sap-img.com/abap/abap-interview-question.htm
    http://www.allinterview.com/Interview-Questions/ABAP.html
    Thanks,
    Sachin.

  • ABAP program flow.

    Hi,
    whenever i write abap program, i usually maintain following program flow.  is it right from performance tuning point of view?
    1) include statements
    2) DATABASE TABLES
    3)  VARIABLE DECLARATIONS
    4) SELECTION-SCREEN
    5) FIELD SYMBOLS
    6) INITIALIZATION
    7) AT SELECTION SCREEN
    8) TOP OF PAGE
    9) END OF PAGE
    10) START OF SELECTION
    11) END OF SELECTION
    Please advise
    Regards,
    Santosh

    Hello,
    Just to add to Kathick's explanation. ABAP is an event-driven programming language. The general flow of an ABAP program is controlled by events.
    It is a good -practice to code event processing blocks in the order in which they will be triggered during execution.  However, they do not have to be coded in a sequential order. 
    This is the first thing i learnt in ABAP basics class )
    BR,
    Suhas

Maybe you are looking for