‎2007 Jun 22 5:51 AM
Dear All,
In table EDIDS there is a status test field (STATXT). That field is having having values like &&&&. There are other fields in the table EDIDS like parameter1 (STAPA1), parameter2 (STAPA2), parameter3 (STAPA3) and parameter4 (STAPA4).
Now I want to replace the values of &&&& with the values in the field STAPA1 to STAPA4. So that instead of &&&& it will be STAPA1STAPA2STAPA3STAPA4.
Please guide me how to go on this.
Warm Regards,
N.Jain
‎2007 Jun 22 6:03 AM
Hi Nishu ,
Use the REPLACE command.
Here is a sample code for the same
data : v_test type string.
v_test = '&&&&'.
replace '&' with 'STAPA1' into v_test.
write / v_test.
replace '&' with 'STAPA2' into v_test.
write / v_test.
replace '&' with 'STAPA3' into v_test.
write / v_test.
replace '&' with 'STAPA4' into v_test.
write / v_test.
Regards,
Arun
‎2007 Jun 22 6:03 AM
Hi Nishu ,
Use the REPLACE command.
Here is a sample code for the same
data : v_test type string.
v_test = '&&&&'.
replace '&' with 'STAPA1' into v_test.
write / v_test.
replace '&' with 'STAPA2' into v_test.
write / v_test.
replace '&' with 'STAPA3' into v_test.
write / v_test.
replace '&' with 'STAPA4' into v_test.
write / v_test.
Regards,
Arun
‎2007 Jun 22 7:42 AM
hi arun,
if suppose in STATXT field there is a value like "Vendor &, Customer&, Party&, Address&" and now i want to fill the values of first & with STAPA1 value then second & with STAPA2 value etc. thn how to go for that.
Warm Regards,
N.Jain
‎2007 Jun 22 7:44 AM
Hi Nishu ,
The all you need to do is remove ' , then it will take the value in the varaible.
So your statement will look like this
replace '&' with STAPA1 into v_test.
replace '&' with STAPA2 into v_test.
replace '&' with STAPA3 into v_test.
replace '&' with STAPA4 into v_test.
Assign points if helpful
Regards,
Arun
‎2007 Jun 22 10:53 AM