2007 Jul 10 7:28 AM
Hi,
How do I remove all Line breaks from a String?
For e.g... <b>Source String:</b>
The synopsis creation is done when the user clicks the Synopsis button or when a document is, saved, approved or released. Any one of these actions creates an object of the corresponding Synopsis Class (e.g. /SAPPSSRM/CL_SYNOPSIS_CTR) and calls the methods checkStatusForSynopsis and maptoSynopsisStructures. The method checkSynopsisStatus checks whether the BO is active or not, whether the synopsis is sent or not and what is the status of the document for which the synopsis need to be sent.
The method maptoSynopsisStructures calls the function modules /SAPPSSRM/MAP_CTR _TO SYNOPSIS (for contract) or /SAPPSSRM/MAPPO _TO SYNOPSIS (for PO) or /SAPPSSRM/MAPBINV _TO SYNOPSIS (for Bid Invitation) which maps the fields of the document to the corresponding Synopsis (e.g. /SAPPSSRM/SFBSOLICIT_DETAILS) structure. After this the method createSynopsisData is called and in the method a function module SDIXML_DATA_TO_DOM is called to convert the document to XML document. Then the function module for sending the e-mail 'SO_NEW_DOCUMENT_ATT_SEND_API1' is called to send the document (if the data is send by e-mail). The pre-requisite is that the internet mail gateway of SAP is set in the SRM system.
<b>THEN RESULT STRING SHOULD BE:</b>
The synopsis creation is done when the user clicks the Synopsis button or when a document is, saved, approved or released. Any one of these actions creates an object of the corresponding Synopsis Class (e.g. /SAPPSSRM/CL_SYNOPSIS_CTR) and calls the methods checkStatusForSynopsis and maptoSynopsisStructures. The method checkSynopsisStatus checks whether the BO is active or not, whether the synopsis is sent or not and what is the status of the document for which the synopsis need to be sent. The method maptoSynopsisStructures calls the function modules /SAPPSSRM/MAP_CTR _TO SYNOPSIS (for contract) or /SAPPSSRM/MAPPO _TO SYNOPSIS (for PO) or /SAPPSSRM/MAPBINV _TO SYNOPSIS (for Bid Invitation) which maps the fields of the document to the corresponding Synopsis (e.g. /SAPPSSRM/SFBSOLICIT_DETAILS) structure. After this the method createSynopsisData is called and in the method a function module SDIXML_DATA_TO_DOM is called to convert the document to XML document. Then the function module for sending the e-mail 'SO_NEW_DOCUMENT_ATT_SEND_API1' is called to send the document (if the data is send by e-mail). The pre-requisite is that the internet mail gateway of SAP is set in the SRM system.
2007 Jul 10 7:33 AM
The source string you've posted is same as result string as displayed on this web page of SDN. What exactly you mean? I could not see any difference between source and target strings!
Regards,
Sougata.
Hi,
How do I remove all Line breaks from a String?
For e.g... <b>Source String:</b>
The synopsis creation is done when the user clicks the Synopsis button or when a document is, saved, approved or released. Any one of these actions creates an object of the corresponding Synopsis Class (e.g. /SAPPSSRM/CL_SYNOPSIS_CTR) and calls the methods checkStatusForSynopsis and maptoSynopsisStructures. The method checkSynopsisStatus checks whether the BO is active or not, whether the synopsis is sent or not and what is the status of the document for which the synopsis need to be sent.
The method maptoSynopsisStructures calls the function modules /SAPPSSRM/MAP_CTR _TO SYNOPSIS (for contract) or /SAPPSSRM/MAPPO _TO SYNOPSIS (for PO) or /SAPPSSRM/MAPBINV _TO SYNOPSIS (for Bid Invitation) which maps the fields of the document to the corresponding Synopsis (e.g. /SAPPSSRM/SFBSOLICIT_DETAILS) structure. After this the method createSynopsisData is called and in the method a function module SDIXML_DATA_TO_DOM is called to convert the document to XML document. Then the function module for sending the e-mail 'SO_NEW_DOCUMENT_ATT_SEND_API1' is called to send the document (if the data is send by e-mail). The pre-requisite is that the internet mail gateway of SAP is set in the SRM system.
<b>THEN RESULT STRING SHOULD BE:</b>
The synopsis creation is done when the user clicks the Synopsis button or when a document is, saved, approved or released. Any one of these actions creates an object of the corresponding Synopsis Class (e.g. /SAPPSSRM/CL_SYNOPSIS_CTR) and calls the methods checkStatusForSynopsis and maptoSynopsisStructures. The method checkSynopsisStatus checks whether the BO is active or not, whether the synopsis is sent or not and what is the status of the document for which the synopsis need to be sent. The method maptoSynopsisStructures calls the function modules /SAPPSSRM/MAP_CTR _TO SYNOPSIS (for contract) or /SAPPSSRM/MAPPO _TO SYNOPSIS (for PO) or /SAPPSSRM/MAPBINV _TO SYNOPSIS (for Bid Invitation) which maps the fields of the document to the corresponding Synopsis (e.g. /SAPPSSRM/SFBSOLICIT_DETAILS) structure. After this the method createSynopsisData is called and in the method a function module SDIXML_DATA_TO_DOM is called to convert the document to XML document. Then the function module for sending the e-mail 'SO_NEW_DOCUMENT_ATT_SEND_API1' is called to send the document (if the data is send by e-mail). The pre-requisite is that the internet mail gateway of SAP is set in the SRM system.
2007 Jul 10 7:32 AM
Hi Jeba
Try using the FM "<b>BM_LINE_BREAK".</b>
reward points if useful.
Thanks & regards
Ravish Garg
2007 Jul 10 7:33 AM
The source string you've posted is same as result string as displayed on this web page of SDN. What exactly you mean? I could not see any difference between source and target strings!
Regards,
Sougata.
2007 Jul 10 7:37 AM
Hi Sougata,
I guess the line breaks got deleted from the Source string:
The synopsis creation is done when the user clicks the Synopsis button or when a document is, saved, approved or released. Any one of these actions creates an object of the corresponding Synopsis Class (e.g. /SAPPSSRM/CL_SYNOPSIS_CTR) and calls the methods checkStatusForSynopsis and maptoSynopsisStructures. The method checkSynopsisStatus checks whether the BO is active or not, whether the synopsis is sent or not and what is the status of the document for which the synopsis need to be sent.
The method maptoSynopsisStructures calls the function modules /SAPPSSRM/MAP_CTR _TO SYNOPSIS (for contract) or /SAPPSSRM/MAPPO _TO SYNOPSIS (for PO) or /SAPPSSRM/MAPBINV _TO SYNOPSIS (for Bid Invitation) which maps the fields of the document to the corresponding Synopsis (e.g. /SAPPSSRM/SFBSOLICIT_DETAILS) structure. After this the method createSynopsisData is called and in the method a function module SDIXML_DATA_TO_DOM is called to convert the document to XML document. Then the function module for sending the e-mail 'SO_NEW_DOCUMENT_ATT_SEND_API1' is called to send the document (if the data is send by e-mail). The pre-requisite is that the internet mail gateway of SAP is set in the SRM system.
2007 Jul 10 10:24 AM
data: sorucestring type string .
replace all occurrences of cl_abap_char_utilities=>CR_LF in sourcestring with '' .
replace all occurrences of cl_abap_char_utilities=>NEWLINE in sourcestring with '' .
Raja
2007 Jul 10 10:33 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |