10-13-2008 5:41 PM
Hi all,
i need to concatenate the field itab-vbeln with '|' and place in one of the field in itab-text.
My field length of itab-text(250) type c and if this field exceeds vbeln of 250 char it should go to next field of itab-text1(250) type c.
can anyone help me.
regards,
r.singh.
10-13-2008 5:47 PM
concatenate itab-vbeln '|' in itab-text.
length = strlen(itab-vebeln).
if length gt 250.
itab-vbeln+250 = itab-text1.
endif.
10-13-2008 5:47 PM
hey,
CONCATENATE itab-vbeln itab-txt INTO var1 SEPARATED BY '|'.
Regards,
Midhun Abraham
10-13-2008 5:48 PM
Vbeln is going to be always 10 characters long? (are you going to save it with leading zeros?).
If you want only complete vbeln's, the element is 10 characters long plus the "|" charachter, so you can only fill the text with 22 numbers, so place a counter and every 22 loops append the text.
If you want them not complete like this:
000001|00004|00
003|00005|0006
Then I think I have an algorith somewhere that I can modify and see if it works
10-13-2008 5:49 PM
Hi
I hope I've understood your issue:
DATA: LEN_TEXT TYPE I.
LEN_TEXT = STRLEN( ITAB-TEXT ).
IF LEN_TEXT <= 139.
MOVE VBELN TO ITAB-TEXT+LEN_TEXT(10).
LEN_TEXT = LEN_TEXT + 10.
MOVE '|' TO ITAB-TEXT+LEN_TEXT(1).
ELSE.
MOVE VBELN TO ITAB-TEXT1(10).
MOVE '|' TO ITAB-TEXT1+10(1).
ENDIF.
Max