Skip to main content

Posts

Showing posts from July, 2023

radio button

 # radio button ~~~~~~~~~~~~~~ --> takes only one value example ------- REPORT ZAJAY_PRACTICE. PARAMETERS: r1 RADIOBUTTON GROUP g1,             r2 RADIOBUTTON GROUP g1,             r3 RADIOBUTTON GROUP g1. PARAMETERS: r11 RADIOBUTTON GROUP g2,             r12 RADIOBUTTON GROUP g2. --> r1,r2,r3 comes under g1 group that means select either r1 or r2 or r3. --> r11,r12, comes under g2 group that means select either r11 or r12 .

check box

 # check box ~~~~~~~~~~ --> it takes mutlple values. > example  ---------- REPORT ZAJAY_PRACTICE. PARAMETERS: r1 AS CHECKBOX,                 r2 AS CHECKBOX,                   r3 AS CHECKBOX.

abort message

 # abort message ~~~~~~~~~~~~~~~ program --------- data p_var type i VALUE 200. if p_var = 100.     MESSAGE 'if block ' type 'A'.     write : / 'if block executed'. ELSE.     MESSAGE 'ELSE block ' type 'E'.     write : / 'else block executed'. ENDIF. output ------- > p_var= 100 then adds cancel button. > p_var != 100 then only execute message.

sucess message and warning message

 # sucess message and warning message ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ program --------- data p_var type i VALUE 200. if p_var = 100.     MESSAGE 'if block ' type 'S'.     write : / 'if block executed'. ELSE.     MESSAGE 'ELSE block ' type 'W'.     write : / 'else block executed'. ENDIF. output ------- > p_var= 100 then execute two statemenst at a atime [message and write statements]. > p_var != 100 then only execute message.

error message & information message

  # error message & information message ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ program --------- data p_var type i VALUE 200. if p_var = 100.     MESSAGE 'if block ' type 'I'.     write : / 'if block executed'. ELSE.     MESSAGE 'ELSE block ' type 'E'.     write : / 'else block executed'. ENDIF. output ------- > p_var= 100 then execute message and write statements. > p_var != 100 then only execute message.

exit statement

 # exit ~~~~~~~ REPORT ZAJAY_PRACTICE. parameters: p_num type i. data var type i value 1. DO p_num TIMES.   if var eq 5.     exit.   ENDIF.   write : / 'loop',var.   var = var + 1. ENDDO. output      --> if var is equals to 5 then exit the program.

do statement

 # do.....enddo. ~~~~~~~~~~~~    > example program    ------------------- REPORT ZAJAY_PRACTICE. parameters: p_num type i. data var type i value 1. DO p_num TIMES.   write : / 'loop',var.   var = var + 1. ENDDO. output:  prints 1 to 10 loops.

case statement

 # case...endcase. ~~~~~~~~~~~~~    > example program    ------------------ REPORT ZAJAY_PRACTICE. CASE 'true'.   when 'true'.     write 'true'.   when 'false'.     write 'false'.   when others.     write 'other word'.   ENDCASE. output :  true

if condition

  # conditional ~~~~~~~~~~~~ --> if.....endif   > example program   ----------------- REPORT ZAJAY_PRACTICE. PARAMETERS: p_number type i . if p_number mod 2 eq 0.   write 'even number'. else.   write 'odd number'. ENDIF. input :    10. output:   even number

obligatory and default

 # obligatory and default ~~~~~~~~~~~~~~~~~~~~~ obligatory --> required filed default --> takes by default example prog ---------------- REPORT ZAJAY_PRACTICE. PARAMETERS: number1 type i OBLIGATORY,number2 type i DEFAULT 50. data result type i. result = number1 + number2. WRITE: 'result is',result. input ------               10 50 output --------               result is 60.

Selection screen

 # selection screen ~~~~~~~~~~~~~~~ --> to generate ss with one input use parameters. example ---------- REPORT ZAJAY_PRACTICE. PARAMETERS: p_number type i . if p_number mod 2 eq 0.   write 'even number'. else.   write 'odd number'. ENDIF. --> more-->text elements --> selection text -->in selection text 'enter the positive number' output ------- enter the positive number [ ]

basics of abap

  write statement -------------------- Tcode --> se38 program --> starts with z or y ex:zajay_prog. title --> prints in output screen title type --> most may be executable program. example: ~~~~~~~~ REPORT ZAJAY_PROG. write 'hello world'. output: hello world ------ ______________________________________________ chain operator [:] ---------------------- actual program ~~~~~~~~~~~~~~~ write / 'heelo'. write / 'ajay babu'. write / 'bye'. using chain operator ~~~~~~~~~~~~~~~~~~~~~ write : 'hello', / 'ajay babu',/  'bye'. _____________________________________________________________________ write : 'heelo', / 'ajay babu',/  'bye'. skip 5. write : 10 'heelo', / 'ajay babu',/  'bye'. / --> indicates new line skip 5 --> indicates skips 5 lines gap. 10 --> horizontal space line. __________________________________________________ format color --------...