SAP R/3
How to converts string number into integer without leading zeroes in ABAP/4
We can apply function module "CONVERSION_EXIT_ALPHA_OUTPUT’ to convert string number to integer without leading zeroes.
Example
DATA: lv_number TYPE I,
lv_string(10) TYPE C VALUE ’0000000012’.
CALL FUNCTION ’CONVERSION_EXIT_ALPHA_OUTPUT’
EXPORTING
INPUT = lv_string
IMPORTING
OUTPUT = lv_number
.
- thitima's blog
- Add new comment
- Read more
- 16500 reads
How to converts number into string with leading zeroes in ABAP/4
We can apply function module "CONVERSION_EXIT_ALPHA_INPUT’ to convert number into string with leading zeroes.
Example
DATA: lv_number TYPE I VALUE 12,
lv_string(10) TYPE C.
CALL FUNCTION ’CONVERSION_EXIT_ALPHA_INPUT’
EXPORTING
INPUT = lv_number
IMPORTING
OUTPUT = lv_string
.
- thitima's blog
- Add new comment
- Read more
- 4248 reads
How to read data from application server to internal table in ABAP/4
Normally, when you want to read the file from application server, you will have 5 steps:
- Open file in application server by statement:
OPEN DATASET file_name FOR INPUT IN TEXT MODE.
- Checking the file is opened sucessfully by SY-SUBRC = 0
- After checking, you can read data from file by statement:
READ DATASET file_name INTO itab.
Note: This statement should be in DO statement - Append data to internal table
- Close file by statement:
CLOSE DATASET file_name
Example
- thitima's blog
- 1 comment
- Read more
- 10692 reads
How to transfer data from internal table to application server in ABAP/4
Normally, when you want to transfer data the file to application server, you will
have 3 steps:
-
Open file in application server by statement:
OPEN DATASET file_name FOR OUTPUT IN TEXT MODE.
-
Transfer data from file by statement:
TRANSFER itab TO file_name.
Note: This statement should be in LOOP statement for Internal table -
Close file by statement:
CLOSE DATASET file_name.
Example
- thitima's blog
- Add new comment
- Read more
- 1660 reads
How to apply function module 'DATE_COMPUTE_DAY' in ABAP/4
The function module "DATE_COMPUTE_DAY" will return the day by 1...7 when you input date. If the date have day:
- Monday : System will return value = 1
- Tuesday : System will return value = 2
- Wednesday : System will return value = 3
- Thursday : System will return value = 4
- Friday : System will return value = 5
- Saturday : System will return value = 6
- Sunday : System will return value = 7
Example
CALL FUNCTION ’DATE_COMPUTE_DAY’
EXPORTING
date = l_date1
IMPORTING
DAY = l_day. "Return Value
- thitima's blog
- Add new comment
- Read more
- 2899 reads
How to upload PC file to internal table in ABAP/4
When you want to upload PC file to internal table in ABAP/4, you can apply function module "WS_UPLOAD".
Example
call function ’WS_UPLOAD’
exporting
filename = lv_name
filetype = lv_type
tables
data_tab = li_tab
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
others = 5.
- thitima's blog
- Add new comment
- Read more
- 1121 reads
Recent comments
3 years 33 weeks ago
3 years 38 weeks ago
3 years 39 weeks ago
3 years 39 weeks ago
3 years 40 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 43 weeks ago