cancel
Showing results for 
Search instead for 
Did you mean: 

Decide button name after it is clicked

former_member208808
Active Participant
0 Kudos

Hello everyone,

I am using toolbar buttons on ipad Screen, these buttons will come into popup menu on toolbar.

<Pop Up Menu>

---Button 1

---Button 2

---Button 3

---Button 4

When i am clicking first button it will call an action and there i want to decide which button i clicked...

depending on it next transaction processing will happen..

When i am clicking second button it should call same action and again decide which button i clicked..

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

Right now i am using following,

call separate actions for separate buttons---->fill dummy transaction to save button name in object--->process it on next transaction screen

(since "Button1" will always call "Action1" i am saving hardcoded name from transaction and it is working)

But this solution required to create those many number of actions and transactions for number of buttons..

like in above case....4 Buttons--->4 Actions--->4 Transactions

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

Is there any better approach to solve this problem..?

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

AK,

No, you are doing it correctly.  There is no way to know which button was pressed if you run the same action for each one.  I agree it is labor intensive, but there is no other way.

Jason Latko - Senior Product Developer at SAP

former_member208808
Active Participant
0 Kudos

Hi Jason,

Thank you for your reply,

and yes that's the only problem that it is "labor intensive"....

so i was trying to find out, may be some better way of doing it...

But i think its the only way to achive this

Answers (2)

Answers (2)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

AK,

Maybe I am missing something, what is the business case for this?  If each button will ultimately call a different transaction why not just create actions corresponding to each different transaction and tie them directly to the buttons?  Why go though an extra step of determining the button only to in turn use that to call a specific transaction?

--Bill

former_member208808
Active Participant
0 Kudos


HI Bill,

Thanks for your reply,

The solution that i am using seems like a trick or may be this is the only way of doing it..

Its doing my functionality as expected but it is "labor intensive" (may be the word to describe this)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

AK,

Yes it will be labor intensive but I am not sure why you are going through the effort rather than just mapping individual actions to the various buttons to directly call the correct transactions.

However, if it is working great.

--Bill

agentry_src
Active Contributor
0 Kudos

Moved Discussion to SAP for Mobile community.  Not an SMP related question, but rather application developement in Agentry.

Regards, Mike (Moderator)