10-01-2014 10:13 PM
Hi Experts.
I'm working with BAPI for customers and it returns the field street with numbers of house_num1 and house_num2
Example:
Field street = street mark hughies 2000 ,123.
2000 is house_num1 and 123 is house_num2
I need send that fileds in diferent fields of interface data.
I know i could pass to string and use CA '1234567890' but it gets all numbers 2000123 and I want 2000 in one variable and 123 in other variable.
How can I do it?
Thanks
10-01-2014 10:37 PM
Hi,
Do they always have a comma between them? If so, use the split command.
Eg
SPLIT lv_street AT '.' INTO lv_street_1 lv_street_2.
cheers
Paul
10-02-2014 5:14 AM
Hi Ronaldo,
Please split the street as suggested by Former Member.
Add the below code after splitting to replace characters with space.
Check lv_street_1 and lv_street_2 after executing below statements.
REPLACE ALL OCCURRENCES OF REGEX '[^\d]' IN lv_street_1 WITH ''.
REPLACE ALL OCCURRENCES OF REGEX '[^\d]' IN lv_street_2 WITH ''.
Thanks.
10-02-2014 5:50 PM
Hi Ronaldo,
Try.
Using the length of the field get the value.
house_num1(20) = lv_street_1.
Regards,
Venkat.