2014 Feb 19 3:51 PM
Hi Masters!
In My program i have to use parameters and i have to declare a value, in the program itself using initialization.
Now my problem is, while executing the program the value in the parameters should be displayed but we should not able to change the value.
Can any one guide me please.
2014 Feb 19 3:58 PM
Hi Ganesh,
Try with this code:
PARAMETERS: pg_par1(5) .
INITIALIZATION.
pg_par1 = 'hello'.
LOOP AT SCREEN.
IF screen-name = 'PG_PAR1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Best Regards
Hi Masters!
In My program i have to use parameters and i have to declare a value, in the program itself using initialization.
Now my problem is, while executing the program the value in the parameters should be displayed but we should not able to change the value.
Can any one guide me please.
2014 Feb 19 3:58 PM
Hi Ganesh,
Try with this code:
PARAMETERS: pg_par1(5) .
INITIALIZATION.
pg_par1 = 'hello'.
LOOP AT SCREEN.
IF screen-name = 'PG_PAR1'.
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Best Regards
2014 Feb 19 4:50 PM
Hi Ganesh
what says its correct, please refer to this link to read about modifying the selection screen
Setting Attributes Dynamically (SAP Library - ABAP Programming (BC-ABA))
Regards
MC
2014 Feb 19 6:27 PM
Hi Ganesh,
You can set screen-input value to '0' and modify screen inside the loop at screen.
INITIALIZATION.
p_val = 'SAP'.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if screen-name = 'P_VAL'.
screen-input = '0'.
modify screen.
endif.
endloop.
Regards
Deeksha
2014 Feb 20 5:02 AM
For that value you want to execute your program, make it default while declaring parameter.
PARAMETERS : p TYPE c DEFAULT 'A'.
AT SELECTION-SCREEN OUTPUT.
IF p is NOT INITIAL.
LOOP AT SCREEN.
IF screen-name = 'P'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.