ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

Archive for the ‘ABAP Programs’ Category

Create a Program in SAP ABAP

Print This Post Email This Post Written by admin on Nov 21st, 2011 | Filed under: ABAP, ABAP Programs

You can navigate to the ABAP Editor through the Menu. You can also create favorites for certain transactions and put it into your custom menu. You can type SE38 from anywhere in the SAP environment to redirect you to the ABAP editor (must come out to a Area Menu or prefix transaction code with /n). Tools such as the Function Builder, Data Dictionary, Screen Painter and Menu Painter are integrated to the ABAP editor and you can navigate to the Editor and load the corresponding program by double-clicking on a program name on a Program field. The ABAP Editor can be used to create Programs of different types (Module Pool, Report, Include, Subroutine Pool, etc.) Continue Reading …


GET REFERENCE: ABAP Keyword a Day

Print This Post Email This Post Written by admin on Jun 29th, 2011 | Filed under: ABAP Programs

GET REFERENCE

Gets a data reference.

Syntax

GET REFERENCE OF <obj> INTO <dref>.

Writes a data reference to an existing data object to the data reference variable .

TYPES c1 TYPE c LENGTH 1. 
 
DATA: dref TYPE REF TO c1, 
      dref_tab LIKE TABLE OF dref. 
 
DATA: text TYPE c LENGTH 10 VALUE '0123456789', 
      off TYPE i. 
 
DO 10 TIMES. 
  off = sy-index - 1. 
  GET REFERENCE OF text+off(1) INTO dref. 
  APPEND dref TO dref_tab. 
ENDDO. 
 
LOOP AT dref_tab INTO dref. 
  WRITE / dref->*. 
ENDLOOP.

GET LOCALE LANGUAGE: ABAP Keyword a Day

Print This Post Email This Post Written by admin on Jun 15th, 2011 | Filed under: ABAP Keywords, ABAP Programs

GET LOCALE LANGUAGE

Gets the current text environment.

Syntax

GET LOCALE LANGUAGE <lg> COUNTY <c> MODIFIER <m>.

Returns the current language, country ID and any modifier into the corresponding variables

DATA: lang  TYPE tcp0c-langu, 
      cntry TYPE tcp0c-country, 
      mod   TYPE tcp0c-modifier. 
 
GET LOCALE LANGUAGE lang COUNTRY cntry MODIFIER mod. 
... 
SET LOCALE LANGUAGE lang COUNTRY cntry.

GET DATASET: ABAP Keyword a Day

Print This Post Email This Post Written by admin on Jun 8th, 2011 | Filed under: ABAP Keywords, ABAP Programs

GET DATASET:  Retrives the arrtibutes of the file.

GET DATASET  [POSITIONS ] [ATTRIBUTE ].

Gets the attributes of a file opened using OPEN DATASET. The POSITIONS additions writes the current read/write position to the field <pos>. The ATTRIBUTE addition writes the attributes to a structure, <attr>, of the type DSET_ATTRIBUTES.

DATA: file TYPE string VALUE 'test.dat', 
      pos TYPE I, 
      text TYPE string. 
 
OPEN DATASET file FOR OUTPUT IN TEXT MODE 
                             ENCODING DEFAULT 
                             WITH SMART LINEFEED. 
TRANSFER '1234567890' TO file. 
GET DATASET file POSITION pos. 
TRANSFER 'ABCDEFGHIJ' TO file. 
CLOSE DATASET file. 
 
OPEN DATASET file FOR INPUT IN TEXT MODE 
                            ENCODING DEFAULT 
                            WITH SMART LINEFEED 
                            AT POSITION pos. 
READ DATASET file INTO text. 
CLOSE DATASET file.

GET: ABAP Keyword a day

Print This Post Email This Post Written by admin on Jun 6th, 2011 | Filed under: ABAP Keywords, ABAP Programs

GET: Event keyword for defining event blocks for reporting events.

GET <node> [FIELDS <fi> <f 2>...].
GET node LATE [FIELDS f1 f2 ...].

Only occurs in executable programs. When the logical database has passed a line of the node to the program, the runtime environment triggers the GET event, and the corresponding event block is executed. You can use the FIELDS option to specify explicitly the columns of a node that the logical database should read.

Here is a sample ABAP program using GET.

REPORT Zdemo_get. 
NODES: spfli.
 
START-OF-SELECTION. 
GET spfli FIELDS carrid connid cityfrom cityto. 
  SKIP. 
  ULINE. 
  WRITE: / 'Carrid:', spfli-carrid, 
           'Connid:', spfli-connid, 
         / 'From:  ', spfli-cityfrom, 
           'To:    ', spfli-cityto. 
  ULINE.