I have a string variable that contains some value. I want to know if its value begins with the word "Location" or "Unit". Is there a business function that will do this?
You can use B952334 - Find String in a String or B0500690 - Is String In String for check if string contain word. Next, if string contain word, then you can create a substring from pos 0 to length of word and compare with a if for example (or find B7900008 BSFN or other for for compare strings).
I often look in F9862 for words and then use ObjectBrowser.exe to try them out
B96701 Find String in String
1 = not found
B952334 Find A String in a String
1 = not found
What these don't do it start from the beginning. So you may want to concat the first 8 for location and test and repeat for Unit
As if a var = testtestunit, both BSFNs above would tell you I found it.
You're after it starting with
So if your variable text is 'delimited' with spaces use this baby P98220D Parse String
Text is only 200 though (so copy it and change szinputObjectID to be greater)
Or B79A2000 Extract Segment from String
Extract segment 0 (is it location or unit)