cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Language Dependent Element in Workflow Container

Former Member
0 Likes
2,098

Hi Experts,

I have create a new workflow with a decision item for a certain step. This item has the following text:

As you can see it uses several Tokens as placeholders. While CONTRACT_ID and LICENSEE are just numbers PERIOD should be language dependent text. To achieve this I added attributed PERIOD in the global workflow container and filled it programatically when the workflow is started:

Methode "GET_PERIOD_TOKEN" delivers an identifiert like "APR", "NOV" etc.

Now I was looking for a user exit during the query/read process of workflows (e.g. when the item is shown in Tx. SBWP) to replace that identifiert by the correct language dependent text. Unfortunately I could not find any appropriate place to do that.

Is this approach correct? Is there even a solution for such an issue? Thanks in advance!

Regards

Tobias

View Entire Topic
pokrakam
Active Contributor
0 Likes

You could use classes with functional methods, which will generate your text on the fly. I don't know if they will work in a decision node in the WF builder (suspect not). If not then you will have to insert the decision as a regular step. In the task description you should be able to use things like &CONTRACT.GET_PERIOD( )&. But it won't work in the task body text, because that uses the ancient SapScript.

If that doesn't work, a more restricted fallback could be to generate it according to the recipient's language during binding.

&CONTRACT.GET_PERIOD( &AGENT.GET_LANGUAGE( )& )& ==> &PERIOD&

Former Member
0 Likes

Hi Mike,

thanks again for your help. I didn't know that such expressions can be used since I am not that familiar with workflow modelling. I think this is the right direction to go for my problem.

I still have one question. In the task of my decision item I already use the standard BOR Object "DECISION":

I guess this object has some decision specific logic that is needed and I cannot easily replace it with my own class. So, I tried to add a new element in my global workflow container of type class just to have some utility methods (I think you called it "functional methods" above). But it seems that this approach needs an implementation of the BI_PERSISTENT interface. I don't want to model a new object. I just want to have some utility access in my container. Isn't that simply possible by just adding static methods to my class that implements IF_WORKFLOW and add this class as a container element?

Another approach I could think of is indead replacing the DECISION Bor Object with my own class and use the standard object in my class as described in Jocelyn Dart's Blog:

https://blogs.sap.com/2007/07/16/referencing-bor-objects-in-abap-oo-classes/

Thanks for any help in advance.

Regards

Tobias