04-20-2011 9:03 PM
hi
I want to send a popup to another user and this user has to make a decision.
For example:
Customer Service enters a sales order, but the price is too cheap - so I want to inform the head of customer service immediately (because the customer is waiting) and he has to make a decision - if the price in the sales order is correct...
Function module TH_POPUP is not really useful as there is no decision possible...
Who knows another function module ? or any other ideas?
thanks have fun
Flo
04-20-2011 10:55 PM
Hi,
The problem with using a workflow is that it will not create an immediate popup. Besides, the manager could be offline... what happens then?
I think you need to redesign the business process. Let them save the underpriced Sales Order, then start a workflow to lock the sales order and alert the manager. He/she can then approve or reject the Sales Order, and unlock it for further processing.
By using workflow you can tap into all of its cool functionality, like sending the workitem to multiple agents, substitution if the boss is on holidays, enforcing deadlines, audit trails, etc.
Give it a go!
cheers
Paul
04-20-2011 9:37 PM
You can think to create a workflow that allows more users to be engaged to this business scenario.
When the price is too cheap (under a defined limit) the workflow can start and send a SAP message in the inbox of the user related to the customer service, advising about the situation.
The message goes into the SAP inbox, but it can be forwarded to an email address, either by a specific functionality to send emails, or by using the extended notifications.
Workflow are just used to go towards these kinds of requirement.
I hope it has been useful.
04-20-2011 10:55 PM
Hi,
The problem with using a workflow is that it will not create an immediate popup. Besides, the manager could be offline... what happens then?
I think you need to redesign the business process. Let them save the underpriced Sales Order, then start a workflow to lock the sales order and alert the manager. He/she can then approve or reject the Sales Order, and unlock it for further processing.
By using workflow you can tap into all of its cool functionality, like sending the workitem to multiple agents, substitution if the boss is on holidays, enforcing deadlines, audit trails, etc.
Give it a go!
cheers
Paul
04-20-2011 11:15 PM
Surely the process has to foresee that the answer cannot come right after.
I heard that it's possibile to integrate the workflow emails (sap/outlook) with the smartphone technologies.
So it could be possilbe to receive a push on the phone when some mail is sent.
What do you think about?
04-21-2011 8:11 AM
this can only be achivied with cpi-c communication.
see abap help -> communication
example out of help:
PROGRAM p1.
DATA: d TYPE c LENGTH 8,
id TYPE c LENGTH 8,
b TYPE c LENGTH 10,
len TYPE x LENGTH 4,
dat TYPE xstring,
stat TYPE xstring,
BEGIN OF connect,
header TYPE c LENGTH 12 VALUE 'CONNCPIC1',
client TYPE c LENGTH 3 VALUE '001',
user TYPE c LENGTH 12 VALUE 'BONDJ',
password TYPE c LENGTH 8 VALUE '007',
language TYPE c LENGTH 1 VALUE 'E',
corr TYPE c LENGTH 1 VALUE ' ',
program TYPE c LENGTH 8 VALUE 'P2',
routine TYPE c LENGTH 30 VALUE 'CPIC_START',
END OF connect,
connect_str TYPE c LENGTH 75,
connect_xstr TYPE x LENGTH 75,
connect_ret TYPE x LENGTH 75,
converter TYPE REF TO cl_abap_conv_out_ce.
connect_str = connect.
converter = cl_abap_conv_out_ce=>create( encoding = '0101' ).
converter->write( data = connect_str ).
connect_xstr = converter->get_buffer( ).
d = ...
COMMUNICATION INIT
DESTINATION d
ID id.
COMMUNICATION ALLOCATE
ID id.
COMMUNICATION SEND
BUFFER connect_xstr
ID id.
PROGRAM p2.
DATA:
id TYPE c LENGTH 8,
b TYPE c LENGTH 10,
len TYPE x LENGTH 4,
dat TYPE xstring,
stat TYPE xstring.
FORM cpic_start.
COMMUNICATION ACCEPT
ID id.
COMMUNICATION RECEIVE
BUFFER connect_ret
DATAINFO dat
STATUSINFO stat
RECEIVED len
ID id.
b = 'Request'.
COMMUNICATION SEND
BUFFER b
ID id.
COMMUNICATION RECEIVE
BUFFER b
RECEIVED len
DATAINFO dat
STATUSINFO stat
ID id.
IF b = 'Request'.
b = 'Answer'.
ENDIF.
COMMUNICATION SEND
BUFFER b
ID id.
ENDFORM.
CLEAR b.
COMMUNICATION RECEIVE
BUFFER b
DATAINFO dat
STATUSINFO stat
RECEIVED len
ID id.
WRITE / b.
COMMUNICATION DEALLOCATE ID id.
04-21-2011 9:16 AM
Hello Oliver!
Thanks for the answer - unfortunately we have very poor developers in our company....
Can you please go more into details - or can you please post the link for documentation....
Or is there a standard report already using your coding?
thanks
Flo
04-21-2011 10:17 AM
JUst to be honest: your idea is not useful. You dont know if the other user has a sap gui open, nor do you know if he is logged on the correct client nor do you know if he's in e meeting, taking lunch or is in vacation.
The only possibility is to invoke a windows command from cl_gui_frontend_services to send a message to aonther user - works only if you know the machine/username and thes rest of above is always guilty.
Informing a user like this is more then weired.