Query abourt 'REPLACE' statement in SAP 4.7
hello,
I have developed one program in SAP 4.7 version.Now i have copied it to 4.6C in SAP.When i tried to run this program it gives me error in
REPLACE ALL OCCURRENCES OF ':' IN l_col_time WITH ' '.
this statement.this statement is working in 4.7 but not in 4.6C.What should i do to eliminate this replace statement?should i use any function module that replaces off occurrences of particular character with specified character.
hi,
try this
DO.
REPLACE ':' IN l_col_time WITH ' '.
IF SY-INDEX <> 0.
EXIT.
ENDIF.
ENDDO.
or
CLEAR lv_length.
lv_length = STRLEN( lv_format_sdata ).
DO lv_length TIMES.
REPLACE ',""' WITH ',' INTO lv_format_sdata.
IF sy-subrc <> 0.
EXIT.
ENDIF.
ENDDO.
This will solve ur problem.
<b>Mark Helpful answers</b>
Regards
Similar Messages
-
How to fit results of the select query into next REPLACE statement
Hello All,
example:--
select @DBName = Name from sys.sysdatabases WHERE dbid = DB_ID('DBA')
PRINT @DBName (Answer is DBA)
Now, I want to use this @DBName result in the following statement EVERYTIME:--
SET @NewDBName = SELECT REPLACE('DBA ' ,' DBA', 'DBANew') ----------i need help with this syntex...
HOW CAN I WRITE ABOVE REPLACE STATEMENT CORRECTLY, WHICH EVERYTIME USE THE RESULT OF THE FIRST SELECT QUERY?
Thank you in advance....Thank you for quick reply.
how about this situation:--
i want to replace 'Z' with '\\sqlserver\Z$', how can i do this?
DECLARE @OriginalBackupFile VARCHAR(100)
SET @OriginalBackupFile = 'Z'
DECLARE @cmd VARCHAR(100)
SET @cmd = (SELECT REPLACE (@OriginalBackupFile, @OriginalBackupFile,????????)
PRINT @cmd -
Doubt in using replace statement
Hi all,
I have a requirement where user will enter more than 1 label no in a screen, which will be populated internally in a table by SAP with ## for every ENTER button pressed by the user. the internal table populated by SAP will be having values like this. 11111111111##22222222222##3333333333
I need to separate the values from ## and move it to another internal table. I used replace statement to replace ##. But its not working. I dont know what could be the problem. Can any one suggest me in doing this.
POINTS PROMISED
Regards,
BuvanaYou will need to use the replace, but you need to be searching for cl_abap_char_utilities=>CR_LF in the REPLACE statement, the ## is an internal representation of the CR_LF, so use
replace cl_abap_char_utilities=>CR_LF with .....
Regards,
RIch Heilman -
Explain me the following replace statement
Hi guys,
Please explain me the following replace statement with an example :
REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc WITH ''''''.
Please explain me the purpose of the above statement by showing the input and output.
Regards,
Vishu.Hi Rob,
It's working fine .Thank you.But I just want to know the purpose of it as the functionality in one of the programs I have seen is as below :
Requirement :
Need to get all the material groups and description2 based on the material descriptions we enter in the selection-screen .
The program is coded in such a way that all the single quotes are replaced with double quotes :
The following 3 statements are written in the code :
REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc WITH ''''''.
REPLACE ALL OCCURRENCES OF '*' IN materialgroup_desc WITH '%'.
REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc WITH ''''''.
and finally the result string is concatenated between quotes again to query the data.
For instance if we give MAT'ER*IAL as the input it is converted to 'MAT''''ER%IAL'
and by querying with a select statement using
materialgroup_desc LIKE 'MAT''''ER%IAL' we are getting the required data.
Hope you understand mny question.Please explain me why we are replacing the single quotes with double quotes 2 times.Is it a way to skip the special characters.
Regards,
Vishu shetty. -
Replacing BC with SAP XI-URGENT
Hi Experts ,
I have a query related to a case in which we want to replace SAP BC with SAPXI.
The client is going for an upgradation from SAP R/3 4.6 c to ECC 6.0 and they have architecture like 4.6c--- BC-SAP Adapter--- Customized Adapters(Third party).
The customized adapters make synchronous RFC calls to 4.6 c through SAP Adapter and BC.
Basically MQ series flow is there between customized adapter and SAP ADAPTER which further updates R/3 through BC.
Now they want to upgrade from 4.6c to ecc 6.0 and replace BC with SAP XI without making any changes to SAP Adapter and customized adapters
Now my questions are :-
1) If i replace BC with SAP XI will there be any development changes required or it will be only configuration changes that can be done by BASIS?
2)Is it possible that Third Party continues to make RFC calls to XI and XI make RFC calls to R/3.
3) In XI we will be configuring JMS adapter for MQ series or MQ series adapter.
4) What difficulties can be faced during replacement of BC with SAP XI ? What can be the impact of replacement?
I would appreciate an early response as this is very urgent.
Regards
Saras Jain> Hi Experts ,
> I have a query related to a case in which we want to
> replace SAP BC with SAPXI.
> The client is going for an upgradation from SAP R/3
> 4.6 c to ECC 6.0 and they have architecture like
> 4.6c--- BC-SAP Adapter--- Customized
> Adapters(Third party).
>
> The customized adapters make synchronous RFC calls to
> 4.6 c through SAP Adapter and BC.
> Basically MQ series flow is there between customized
> adapter and SAP ADAPTER which further updates R/3
> through BC.
> Now they want to upgrade from 4.6c to ecc 6.0 and
> replace BC with SAP XI without making any changes to
> SAP Adapter and customized adapters
> Now my questions are :-
>
> 1) If i replace BC with SAP XI will there be any
> development changes required or it will be only
> configuration changes that can be done by BASIS?
Only some parts of the SAP BC can be migrated to SAP XI like xslt mappings
refer this : https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b4f3755a-0401-0010-b6b3-9b65bb7d4503
> 2)Is it possible that Third Party continues to make
> RFC calls to XI and XI make RFC calls to R/3.
yes, 3rd party can make calls to XI and XI will make RFC calls to R/3 calls using the RFC adapter in XI.
> 3) In XI we will be configuring JMS adapter for MQ
> series or MQ series adapter.
you will have to configure the JMS adapter in XI.
> 4) What difficulties can be faced during replacement
> of BC with SAP XI ? What can be the impact of
> replacement?
>
Refer this for more info:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a8424011-0d01-0010-e19d-e5bd8ca52244
>
> I would appreciate an early response as this is very
> urgent.
>
> Regards
> Saras Jain -
Dynamic Query and Collect Statement.
Hi Gurus....
Please explain me how to write dynamic Query,,, Pl. give me with example.
Also would like to know basics of Collect statement and it's use..
Thanks
RiteshHi Ritesh,
COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab . If all non-numeric fields are same in the internal table then it will add numeric fields and maintains a single entry
If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.
Check this link to know about COLLECT statement
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm
Dynamic query can be built in SAP with the help of () values.
DATA:
V_TABNAME TYPE DDO2L-TABNAME,
V_CONDTION TYPE STRING.
V_TABNAME = 'MARA'.
V_CONDTION = 'MATNR LIKE 'S*'.
SELECT MATNR
FROM <b>(V_TABNAME)</b>
INTO TABLE ITAB
WHERE <b>(V_CONDTION)</b>.
Thanks,
Vinay -
Hi All,
I have written the below If statement in SAP scripts but when i execute the same the controll doent check the second line entries. If firtst line doesnot satisfy it goes to the else part. Kindly suggest what is wrong in this..
/: IF &T156T-BWART& = '321' OR &T156T-BWART& = '322' OR
/: &T156T-BWART& = '349' OR &T156T-BWART& = '350' OR
/: &T156T-BWART& = '312' OR &T156T-BWART& = '326' OR
/: &T156T-BWART& = '343' OR &T156T-BWART& = '344'.
/: ELSE
/: ENDIF.Hi neha,
Try to use the '/E' fo rnext line
/E->Extended line
Here is a code:
/: IF &T156T-BWART& = '321' OR &T156T-BWART& = '322' OR
/E &T156T-BWART& = '349' OR &T156T-BWART& = '350' OR
/E &T156T-BWART& = '312' OR &T156T-BWART& = '326' OR
/E &T156T-BWART& = '343' OR &T156T-BWART& = '344'.
/: ELSE
/: ENDIF.
Hope this helps you.
Regards,
Rajani -
Use of IF statement in SAP Scripts
Can u tell me how to use IF statement in SAP Scripts.
The problem is
if &sy-tabix& eq '1'
total
else
total1.
endif.
this sy-tabix is not workingi think sy-tabix will not work here....
do like this..
data : vtabix type i.
loop at itab.
vtabix = sy-tabix.
write_form...for the text element..
endloop.
in form layout
/: if &vtabix(c)& eq 1
/:endif
regards
shiba dutta -
How to use perform statements in sap scripts
how to use perform statements in sap scripts . and pls send me one progam for this
thnaks
rajaHi Raja,
<b>PERFORM</b> key work is used to include subroutine in sapscript form...
But the processing is lttle bit different form the one we use in ABAP.
Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
Check out the example below to see how this is used..
<b>Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
<b>Coding of the calling ABAP program:</b>
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this is clear to understand...
Enjoy SAP.
Pankaj Singh. -
How to debugg particular statement in sap script
hi friends,
i want to know How to debugg particular statement in sap script.
plz reply.
thanks in advance,
regards
bhaskarhi
execute rstxdbug to activate script debugger...once the driver program reaches open_form, a popup box will come where u can mention the name of a command, call functinon, text element, etc to place a break point...once it gets into the debugging mode, double click on any line to set a break point, after that pressing f8 will get you to that line
if helpful, reward
Sathish. R -
Follow-Up and Replacement Articles in SAP Retail
Hi everybody,
Iu2019m using SAP Retail and I need to maintain Follow-Up and Replacement Articles.
Iu2019ve created the Follow-Up Categories in the customizing and Iu2019ve assigned replacement article to the original article in transaction WRFFUART.
Does anyone know how the subsequent process works? If I create a Purchase Order or a Sales Order to the original article, does the system automatically replace it by the replacement Article? Iu2019ve tested this but there was no substitution.
Thanks in advance,
SNHi Barbara,
I am analysing the functions for Follow-Up and Replacement Articles in SAP Retail ECC 6.0 Ehp. 3. I created Substitution profiles (SPRO: Logistics u2013 General -> Material Master -> Retail-Specific Settings -> Settings for Follow-Up/Replacement Material -> Maintain Follow-Up Categories) and assigned replacement article to the original article in transaction (WRFFUART). I also activated Substitution Processing and Start Replacement logic in Background (SPRO: Logistics u2013 General -> Substitution Processing -> Activate/Process Substitution Processing).
I tested the process steps you posted (ME21N, VL10B, WSUBST_WORKLIST). There was no automatically substitution after creating the outbound delivery. And the transaction WSUBST_WORKLIST just shows u201CNo data available for selectionu201D.
I analysed the application and found the table WSUBST_WORKLIST. It handles the entries for substitutions. It was empty. When I fill the table manually with data and run the WSUBST_WORKLIST the outbound delivery and the purchase order have a new position with the follow-up article but the original article is still there, unchanged.
Why did the substitution not start automatically in background and why is the original article still in the purchase order and outbound delivery?
It is also interesting, that the material quantity changed. The purchase order includes five units of the original article and the substituted article has a quantity of eight. I guess the reason is a rounding value for procurement.
The ERP 2005 documentation on help.sap.com ([Assigning Follow-Up and Replacement Articles ERP 2005|http://help.sap.com/erp2005_ehp_02/helpdata/en/a2/7c936660dc4da09a3a1d08ee7eeca2/frameset.htm]) describes a conversation factor for the units of measure of the original article and substitution article for each assignment. In the ECC 6.0 documentation ([Assigning Follow-Up and Replacement Articles ECC 6.0|http://help.sap.com/saphelp_erp60_sp/helpdata/en/a2/7c936660dc4da09a3a1d08ee7eeca2/frameset.htm]) this is missing. In the system I also could not find any type of conversation factor for Follow-Up and Replacement Articles.
Is this option not available in ECC 6.0 or where can I find it? -
Problem with Replace statement?
Hi Guys,
I am using Replace statement for replacing '%20' in a partucular field like given below
" Replace All occurrences of REGEX '%20' in I_ZSTR_BPSITEUSER-FIRSTNAME with space ."
But the problem is if Firstname = " Gopi%20%20%20A " after using this replace i am getting as
" GopiA " but what my req is i need like "Gopi A"(i want spaces in %20 place)so how to get it?
Thanks,
GopiHi,
Try this..
DATA: patt TYPE string VALUE '%20',
text TYPE char100 VALUE 'Gopi%20%20%20A'.
DATA: result_tab TYPE match_result_tab.
DATA: v_length TYPE i.
FIELD-SYMBOLS <match> LIKE LINE OF result_tab.
* Find
FIND ALL OCCURRENCES OF patt IN
text
RESULTS result_tab.
SORT result_tab BY offset DESCENDING.
* Replace
LOOP AT result_tab ASSIGNING <match>.
v_length = <match>-length - 1.
text+<match>-offset(v_length) = space.
SHIFT text+<match>-offset LEFT DELETING LEADING space.
text+<match>-offset(1) = space.
ENDLOOP.
WRITE: / text.
Thanks
Naren -
How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal of SAP 7.3
Dear All,
Please let me know the process how to Increase the Rows and Columns Size of Bex Query in Enterprise Portal of SAP 7.3 .
Currently I am getting Only 4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100 and row length more than 10000.
Please suggest me a suitable solution to over come this issue.
Please find the Below screen shot.
Thanks
Regards,
SaiDear All,
Please find the attached screen shot.
The report be open with 4 or 5 columns and 5 or 6 rows.
So, please let me know how to increase the length of the table.
Do the needful for me to over come this issue.
Thanks
Regards,
Sai. -
Unwanted Line Breaks in PL/SQL CODE after 'CREATE OR REPLACE' statements
Does anybody know how to keep SQL Developer from automatically editing PL/SQL code and adding line breaks after 'CREATE OR REPLACE' statements?
It keeps taking:
CREATE OR REPLACE PACKAGE DEVELOPER AUTHID DEFINER
And turns it into:
create or replace
package developer AUTHID DEFINER
This unwanted linebreak causes our autodeployment processes to break.
Thanks,
Michael Dunn
University of Notre Dame
Edited by: user9133268 on Feb 21, 2012 8:00 AMHi Michael,
I believe nothing for this issue has progressed since it was asked here:
2.1 RC Extra Line Breaks
As there may be approval for some planned improvements to the SQL Formatter feature in 3.2, I logged an enhancement request for you:
Bug 13744858 - FORUM: UNWANTED LINE BREAK AFTER CREATE OR REPLACE SYNTAX
Regards,
Gary
SQL Developer Team
Edited by: Gary Graham on Feb 21, 2012 4:19 PM
But if you have control over your auto-deployment process code, it might be quicker to enhance that to deal with CREATE OR REPLACE on the same or the preceding line. Also, note that if you edit the package DDL to put the CREATE OR REPLACE on the same line with the package name in the code editor, then immediately use Export or Save Package Spec and Body to save it to disk, then PACKAGE <name> will appear on the same line as the CREATE OR REPLACE syntax. -
Is it possible to see cash flow statement in sap fico ? ;How
Is it possible to see cash flow statement in sap fico ? ;How
Re: Cash Flow statement
Forum Rule: Please search the forum before posting a thread.
Maybe you are looking for
-
Is there a way to import photos stored in iPhoto into Adobe Bridge CS6?
I am having a problem opening my iPhotos in Adobe Bridge or Photoshop. Any help would be appreciated.
-
Is it possible to have an html link in a pure java application ???
can you put click me in a java component, say, a dialog? i tried and the link appeared blue and underlined but it didn't respond to clicks (nothing happened when clicked). thanks.
-
I need help I changed my credit card information to a card that active, now I can't even get a free app, it's telling my that I need to verify my information before I can make a purchase.... What's going on and how do I fix it??
-
Retriving user details from user rofile in portal database
HI all, any one knows how to retrive user details from user rpofile in portal database. I am using webdynpro appliction.Please reply. Thank you Maruthi
-
Lion no longer available on Mac App store....
So what do we do if we need to download Lion again? If we have Mac's which do not support Mountain Lion, but are currently running Snow Leopard, then how do we get Lion? If we need to reinstall Lion, or create a bootable USB Key for Lion, then how ca