Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Showing Attribute in the Workflow.

Former Member
0 Kudos

Hi

I have created a attribute in my object zbasicpay. There was already some other created attribute in that object i just added one.

now in my workflow i need to show the value of that attribute in a email

here is the code in the email:

New pay rate for employee Personal Number: &ZBASICPAY.EMPLOYEENUMBER& Name: &ZBASICPAY.FULLNAME& is greater than $ &STDPAYRATE& standard.

Pay rate is changing from $ &ZBASICPAY.PREVPAY& to $ &NEWPAYRATE&.

But when the email is actually send this is what it shows:

New pay rate for employee Personal Number: 00124647 Name:

&ZBASICPAY.FULLNAME& is greater than $ 5.50 standard.

Pay rate is changing from $ 13.40 to $ 15.40.

As you can see the Employee full name is not showing instead its showing the code or tag.

Please help me what and where i am doing something wrong. And is there any way to check if my object is giving me the right answer or not?

Thanks

Message was edited by:

Anwarul Kabir

15 REPLIES 15

Former Member
0 Kudos

I think you may have just typed in &ZBASICPAY.FULLNAME& instead of hitting the 'Insert Expression' button and typing &ZBASICPAY.FULLNAME& into the pop-up window.

0 Kudos

you are right about typing it in. But I can't find the button you are talking about. Could you please tell me how to get that button.

Thanks

0 Kudos

Well, when I go to a Send Mail step in the Workflow Builder, I see a yellow button near the bottom of the Mail tab. If you mouse over the button it says 'Insert Expression'.

Be sure you are in Change mode. Transaction PFTC_CHG.

Message was edited by:

Matt Nagel

0 Kudos

its still giving me the same output.

0 Kudos

Be sure to Activate the workflow after you make the change.

0 Kudos

Did that

TO chk if i am getting any value from the attribute i had my code in the email like this

New pay rate for employee ( &ZBASICPAY.EMPLOYEENUMBER& ) is greater than $ &STDPAYRATE& standard.

Pay rate is changing from $ &ZBASICPAY.PREVPAY& to $ &NEWPAYRATE&.

Name:

&ZBASICPAY.FULLNAME&

And I am getting the answer like this:

New pay rate for employee ( 00124647 ) is greater than $ 5.50 standard.

Pay rate is changing from $ 6.40 to $ 7.50.

Name:

..........................

And here is the code in the zbasicpay object

GET_PROPERTY FULLNAME CHANGING CONTAINER.

DATA: hold-name LIKE PA0002-CNAME.

DATA: BEGIN OF RECT OCCURS 0,

CNAME LIKE PA0002-CNAME.

DATA: END OF RECT.

select CNAME from PA0002 into RECT

where pernr eq OBJECT-KEY-EMPLOYEENUMBER.

if sy-subrc eq 0.

MOVE: RECT-CNAME TO hold-name.

endif.

endselect.

MOVE: hold-name TO OBJECT-FULLNAME.

SWC_SET_ELEMENT CONTAINER 'FullName' OBJECT-FULLNAME.

END_PROPERTY.

0 Kudos

You may need to check the binding in your Send Mail step.

0 Kudos

hi

could you tell me how to do or check the binding? i am very new at this so no clue...

0 Kudos

In the Workflow Builder, double click on your Send Mail step.

Go to the Control tab, this is where the Binding is defined.

You can try to automatically define the Binding by hitting the red and white button.

Or you can look at/manually change the Binding by hitting the Binding button.

I'm not sure exactly what you need to do in your step, but this could be the place that is causing your problem.

0 Kudos

You are right again. what i figure out that i need to create a Element so that i can bind that with my attribute. Can you tell me how and where I should go to create one?

0 Kudos

I would check how the other elements are being handled (the ones that are displaying correctly).

0 Kudos

how do u create a new container element? For some they have assigned a container element to pass the attribute. so I need to create one for my FullName.

Can u help. Please.

0 Kudos

In the Workflow Builder, on the left hand side about half way down the page you should see the Workflow Container. This is where you can create an element in the Workflow Container.

0 Kudos

Ok I created the Element but

When I try to bind it one left menu i have container and right i have Step to notify the VP.

I get both my zbasicpay.fullname and my element fullname from the left menu ( in the source)but on the right(target) i can see only the zbasicpay.fullname.

From the others that is working I see on the left(source) they have zbasicpay.something and on the right(target) they have the element name.

So my question is how do i create a element on the right side (target). I guess what I found out that i may need to create the element in the task. but when i try to open it it only opens in display mode. How do i open a task in change mode?(if that's the way i should/need to go)

Message was edited by:

Anwarul Kabir

0 Kudos

If I understand you correctly, all you need to do is to hit the Display<->Change button.