1) to change the date formate
data : date like sy-datum,
data1(10) type c.
data1(10) type c.
call function 'CONVERT_DATE_TO_INTERNAL'
exporting
date_external = date1
importing
date_internal = date
exceptions
date_external_is_invalid = 1
others = 2.
exporting
date_external = date1
importing
date_internal = date
exceptions
date_external_is_invalid = 1
others = 2.
http://anu-sapdiary.blogspot.com.au/2008/03/function-modules-for-date-conversion.html
2) to divide the string into 2.
CALL FUNCTION 'HR_HK_STRING_INTO_2_LINES'
EXPORTING
source_str = ldf_pay_terms
len_of_1st_line = lcf_thirty
len_of_2nd_line = lcf_thirty
IMPORTING
1st_line_str = ldf_pay_terms1
2nd_line_str = ldf_pay_terms2
EXCEPTIONS
error = 1
OTHERS = 2.
CONDENSE: ldf_pay_terms1,
ldf_pay_terms2.
ldf_length = STRLEN( ldf_pay_terms1 ).
ldf_length1 = STRLEN( ldf_pay_terms2 ).
2) to divide the string into 2.
CALL FUNCTION 'HR_HK_STRING_INTO_2_LINES'
EXPORTING
source_str = ldf_pay_terms
len_of_1st_line = lcf_thirty
len_of_2nd_line = lcf_thirty
IMPORTING
1st_line_str = ldf_pay_terms1
2nd_line_str = ldf_pay_terms2
EXCEPTIONS
error = 1
OTHERS = 2.
CONDENSE: ldf_pay_terms1,
ldf_pay_terms2.
ldf_length = STRLEN( ldf_pay_terms1 ).
ldf_length1 = STRLEN( ldf_pay_terms2 ).
No comments:
Post a Comment