1 / 7

ABAP/4 Assignments, Conversions and Calculations

ABAP/4 Assignments, Conversions and Calculations. User Defaults System>User Profile>Own Data Defaults tab 176 system variables available Use DDIC table Syst Finding System Variables Assignment Statements Assigns a value to a variable or field string Clear Move Move-corresponding.

sakura
Download Presentation

ABAP/4 Assignments, Conversions and Calculations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ABAP/4 Assignments, Conversions and Calculations • User Defaults • System>User Profile>Own Data • Defaults tab • 176 system variables available • Use DDIC table Syst • Finding System Variables • Assignment Statements • Assigns a value to a variable or field string • Clear • Move • Move-corresponding

  2. ABAP/4 Assignments, Conversions and Calculations • Clear v1 [with v2 with ‘A’ with Null] • Zeros or blanks (Default values) • Write v1 no-gap, v2. • No intervening space • Move v1 [+N(L) ] to v2 • Operators & Operands separated by spaces • v2 = v1. • V2 = v1 = vn… • Move-corresponding fs1 to fs2.

  3. ABAP/4 Assignments, Conversions and Calculations • Performing calculations • Compute • Add Add-corresponding • Subtract Subtract-corresponding • Multiply Multiply-corresponding • Divide Divide-corresponding. • Dynamic Assignment • Field-symbols <f>. • Pointer assigned to a field • Use ASSIGN to assign a field to it (ASSIGN f1 to <dnf>

  4. Common Control Statements • IF exp. ELSEIF exp. ELSE. ENDIF. • Every IF must have matching ENDIF. • CASE var. WHEN var or…. --------- WHEN var or… ENDCASE • EXIT statement – has varying effects depending on where it appears in the code.

  5. Common Control Statements • DO Statement • DO 5 times. …. ENDDO. • Sy-index contains current iteration number • DO 5 TIMES VARYING var1 from t-t1 NEXT T-t2. (pg 118) • Modifying values with DO..VARYING (pg 119) • WHILE…ENDWHILE • CONTINUE statement Only coded within a loop Has no additions and causes a jump to the end of the current loop. • CHECK statement – • Same as CONTINUE but can accept logical expressions

  6. Common Control Statements • Comparison of EXIT, CONTINUE and CHECK

  7. Common Control Statements • Position and Length Specifications for the WRITE statement • WRITE /10(2) ……. • 10= 10th position on current line • (2) = number of bytes (characters) to output • /10(2) – must be coded without intervening spaces • Any part can be left out.

More Related