Posts

Showing posts from June, 2022

New Syntax(ABAP ON HANA)

1.  Inline Declaration: Before 7.4 New syntaxes were not introduced the variable needs to be declared before using it, now using inline declaration  variable can we declare and use at the same time, Below are Whenever data is to be moved to a variable, can be declared at the same instance, Old Syntax.   DATA var1 TYPE char5.   var1 = ‘ABC’. New Syntax.   DATA(var1) = ‘ABC’. 2. Select Single From DataBase Table into Work Area Old Syntax. DATA wa TYPE .... SELECT SINGLE fld1 fld2 FROM  (TableName) INTO wa  WHERE fld1 = var1 AND      fld2 = var2. New Syntax. SELECT SINGLE fld1, fld2, FROM (TableName)  INTO @DATA(wa) WHERE fld1 = @var1  AND fld2 = @var2. 3. Selecting Data From DataBase Table Into Internal Table, Old Syntax.      DATA itab TYPE TABLE OF TableName. SELECT fld1 fld2 FROM (TableName) INTO TABLE itab WHERE fld1 = var1 AND fld2 = var2. New Syntax. SELECT fld1, fld2 FROM (TableName) INTO TABLE @DATA(itab) W...

ABAP - Debugging

Image
  ABAP debugging   Debugging is a process to understand program behavior in runtime. SAP has a inbuilt debugger which is part of the ABAP workbench.  Debugging steps There are two possible strategies for starting the Debugger in the ABAP Workbench:   By running the program in debugging mode. By setting breakpoints then running the program   Running a Program in Debugging Mode From the Object Navigator -> select a program and choose Test/Execute from the Development Object menu. The Choose Execution Type dialog box appears. Choose Debugging From the initial screen of the ABAP Editor Choose Program -> Execute ->Debugging (or the Debugging pushbutton). From any screen Choose System ® Utilities ® Debug ABAP. From any screen Enter " /h " in the command field. Breakpoints.   There are two types of breakpoints Static Dynamic  Static Break points Addition of a break point statement in your program. Static breakpoints are not normally user-specific. Ho...