‎2011 Jan 16 8:30 AM
Hi Abaper's,
I am using BAdi definition NOTIF_EVENT_SAVE for sending mail notification to user.
Under CHANGE_DATA_AT_SAVE method I have called an RFC enabled function module and written code here for mail notification.I used cl_bcs class for sending file.On executing this I am getting a mail box wherein we can enter user id and send mail.But I don't want to use cl_bcs for sending mail now.So I modified the code by including SO_NEW_DOCUMENT_SEND_API1 function.
My requirement is I want to enable select-options in this function module so that user can get a popup wherein he can select user name from master.On activating I am getting following error:
Local SELECT-OPTIONS are not allowed (FORM routine or GET event is active).
Can any one help me how to resolve this error?
I am using this customized function module for mail notification.If I hardcode mail id,notification is working properly.
Regards,
Sam
‎2011 Jan 16 6:35 PM
>
> My requirement is I want to enable select-options in this function module so that user can get a popup wherein he can select user name from master
Hi Sam,
in the function groups TOP include, you can define a selection-screen:
SELECTION-SCREEN BEGIN OF SCREEN 9786 [TITLE title].
select-options: s_uname for ...
SELECTION-SCREEN END OF SCREEN 9786.and in the function use
CALL SELECTION-SCREEN dynnr
[STARTING AT col1 lin1
[ENDING AT col2 lin2]]
Everything declared in the function body source code is local.
But you must make sure that CHANGE_DATA_AT_SAVE is not processed in update task.
Regards,
Clemens
Edited by: Clemens Li on Jan 16, 2011 7:36 PM
‎2011 Jan 16 6:35 PM
>
> My requirement is I want to enable select-options in this function module so that user can get a popup wherein he can select user name from master
Hi Sam,
in the function groups TOP include, you can define a selection-screen:
SELECTION-SCREEN BEGIN OF SCREEN 9786 [TITLE title].
select-options: s_uname for ...
SELECTION-SCREEN END OF SCREEN 9786.and in the function use
CALL SELECTION-SCREEN dynnr
[STARTING AT col1 lin1
[ENDING AT col2 lin2]]
Everything declared in the function body source code is local.
But you must make sure that CHANGE_DATA_AT_SAVE is not processed in update task.
Regards,
Clemens
Edited by: Clemens Li on Jan 16, 2011 7:36 PM
‎2011 Jan 17 12:19 PM
Hi Clemens Li,
Thanx a lot for your input.Its working fine now.When I execute this function module I am getting a separate screen.When the user opens 6 screens already,my newl popup screen is not coming as system shows Maximum number of sessions opened.Can I overcome this problem?
Regards,
Sam
‎2011 Jan 17 1:00 PM
Hi sam,
no, not really.
Do not worry: The average user will close every session after using it - just to open up again afterward.
You could catch the error, issue a message (TYPE S DISPLAY LIKE 'E') asking the user to close unused open session and try again in a loop.
Regards,
Clemens.
‎2011 Jan 18 6:47 AM
Hi Clemens Li,
Thanx for your valuable inputs.
My problem is resolved.
I really appreciate you guys for the Endeavour for making this forum a colossal success.
Regards,
Sam
Edited by: sam24 on Jan 18, 2011 7:52 AM