2009 Jun 24 12:39 PM
Presently I am having
010000012830DP_SPRNGBD
From 1-8-----Account number
From 9-12----sub account number
and From 13 to ramaining is the product_id
I already cancatenate above 3 fields.
Now I need to cancatenate anoyher two constants in between account number and sub account number and second in between subaccount and product_id.
Constants are return_indicator = y
Hivol indicator = N
Then after this my output will be 01000001Y2830NDP__SPRNGBD
I have taken the account number to product_id fields from one loop.
So How can concatenate these constants in to this loop.
2009 Jun 24 12:44 PM
within in your loop.
data : l_newvalue type string.
concatenate string+0(8)
c_return_indicator
string+8(3)
c_Hivol_indicator
string 11(24)
into l_newvalue.
condense l_new_value.
2009 Jun 24 12:44 PM
within in your loop.
data : l_newvalue type string.
concatenate string+0(8)
c_return_indicator
string+8(3)
c_Hivol_indicator
string 11(24)
into l_newvalue.
condense l_new_value.
2009 Jun 24 12:46 PM
Hi,
If the statement using concatenate variable1 constant1 into result_variable1 is not sucessful, then use the constant in the tild symbol. i.e. CONSTANT
Now it will work.
Regards,
Santhosh.
2009 Jun 24 12:47 PM
hi,
try this,
var1 = '010000012830DP_SPRNGBD'
cons1 = 'Y'
Cons2 = '_'
data v_final type string.
concatenate var10(8) cons1 var19(3) cons2 var1+13 into v_final.
write v_final.
regards
padma
2009 Jun 24 12:48 PM
well, this depends on the type of your constants.
concatenate works just for character based types e.G. char or string.
if you have variables constants of other types you need to concatenate, then slope them through a char variable.