Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

need to concatenate

Former Member
0 Kudos

i am concatenating g_txt04 like tj02t-txt04.

into a string field

CONCATENATE G_S_TXT04 G_TXT04 INTO G_S_TXT04

SEPARATED BY ','.

what happens is that , appears in front of the text.

for eg.

,text1,text2.text3.

i need to remove the , infront of text1.

i am trying to use offset command , i am getting an runtime error. pls can u provide me with a coding that

removes the , in front of the text.

1 ACCEPTED SOLUTION

former_member186741
Active Contributor
0 Kudos

I think Renjith's idea is the best solution but there is a slight typo, it should be:

Shift g_s_txt04 left deleting leading wa_comma...

... or...

Shift g_s_txt04 left deleting leading ','.

5 REPLIES 5

Former Member
0 Kudos

Try this...

Data : wa_comma value ','.

Shift g_s_txt04 left deleting leading comma.

Thanks,

Renjith

Former Member
0 Kudos

if G_S_TXT04+0(1) = ','.

G_S_TXT04 = G_S_TXT04+1(specify the length of G_S_TXT04

).

endif.

Former Member
0 Kudos

Hi Anitha,

Try this code...

if G_S_TXT04+0(1) = ','.

v_len = strlen( G_S_TXT04 ).

v_len = v_len - 1.

G_S_TXT04 = G_S_TXT04+1(v_len).

endif.

Regards,

Raj

former_member186741
Active Contributor
0 Kudos

I think Renjith's idea is the best solution but there is a slight typo, it should be:

Shift g_s_txt04 left deleting leading wa_comma...

... or...

Shift g_s_txt04 left deleting leading ','.

0 Kudos

Thanks Neil for pointing out the typing mistake...

Regards,

Renjith