Thursday, December 6, 2012
MS Excel: REPLACE Function
In Microsoft Excel, the REPLACE function replaces a sequence of characters in a string with another set of characters.
Syntax
start is the position in old_text to begin replacing characters.
number_of_chars is the number of characters to replace in old_text.
new_text is the replacement set of characters
In Microsoft Excel, the REPLACE function replaces a sequence of characters in a string with another set of characters.
Syntax
REPLACE( old_text, start, number_of_chars, new_text )
old_text is the original string value.start is the position in old_text to begin replacing characters.
number_of_chars is the number of characters to replace in old_text.
new_text is the replacement set of characters
*&----------------------------------------------------------------------* "Form build_xls_data_table *&----------------------------------------------------------------------* FORM build_xls_data_table. "If you have Unicode check active in program attributes then "you will need to declare constants as follows. CLASS cl_abap_char_utilities DEFINITION LOAD. CONSTANTS: con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab, con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf. DATA: ld_store(50) TYPE c. "Leading zeros CONCATENATE 'PERNR' 'PERSG' 'PERSK' 'PLANS' 'STELL' INTO w_attachment SEPARATED BY con_tab. CONCATENATE con_cret w_attachment INTO w_attachment. APPEND w_attachment TO i_attachment. CLEAR w_attachment. LOOP AT i_emp_data INTO w_emp_data. CONCATENATE '=REPLACE("' w_emp_data-pernr '",1,5,"' w_emp_data-pernr '")' INTO ld_store . CONCATENATE ld_store w_emp_data-persg w_emp_data-persk w_emp_data-plans w_emp_data-stell INTO w_attachment SEPARATED BY con_tab. CONCATENATE con_cret w_attachment INTO w_attachment. APPEND w_attachment TO i_attachment. CLEAR w_attachment. ENDLOOP. ENDFORM. "build_xls_data_tableOutput
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
this is valuable information for learners.thanks
ReplyDeletesas online training
ReplyDeletesuch a good website and given to more information thanks! and more visit
sas online training
I feel thanks to you for posting such a good articles here, pls keep updates regularly
ReplyDeleteWebsphere Training In Hyderabad
great article
ReplyDeleteSAP GTS Training
Awesome post
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??
sap sd training
sap mm training