Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Returning data based on it's availability in the field

Hello again all,

Next issue I am having an issue resolving has to do with a field like this:


This is a custom field that is generated by another application.

Currently I am able to use a formula that looks for the existance of parameters IE

If ({tblRuns.SavePlan} like ["24Q|??|1|"] OR {tblRuns.SavePlan} like ["24Q|?|1|"]) then "24Q"

ELSE If ({tblRuns.SavePlan} like ["24Q|??|2|"] OR {tblRuns.SavePlan} like ["24Q|?|2|"]) then "ER24Q"

and have one formula for each of the first two numbers followed by a letter.

My next goal is to pull the 3915(unit) listed above and print it out next to the 24Q. Returns "24Q 3915" or "ER24Q 3915" but want to have it automaticlly pull the Unit number if it's there.

The problem is we have over 200 different units that might populate the field.

Thanks for any assistance.

Former Member
Former Member replied

You're looking for INSTR


as a formula will be 0 if 24Q is not in the field, or the start position if it is found..

If you get a positive number as a return then you can use MID(table.field},INSTR({table.field],"24Q")+3) to return what comes after it.

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question