2016 May 15 9:10 AM
Dear Experts,
While executing bapi for updating delivery some standard pop-up is blocking the screen and the code written below the Bapi is not getting executed because unless an user interaction is done the control is not going to the next code.
Please let me know how to supress these standard pop-ups and how to handle these messages by using this Bapi.
Thanks in advance
2016 May 15 10:47 AM
Dear Nihar,
Pls check the SCN blog post. Suppressing unwanted SAP GUI screens from BAPI/... | SCN
You can also check the another way of suppressing the messages detailed in the post. Suppress Messages in BAPI | SCN
Another trick ABAP - Suppressing BAPI Messages - Paper Street Enterprises
Thanks,
Sanjay
Dear Experts,
While executing bapi for updating delivery some standard pop-up is blocking the screen and the code written below the Bapi is not getting executed because unless an user interaction is done the control is not going to the next code.
Please let me know how to supress these standard pop-ups and how to handle these messages by using this Bapi.
Thanks in advance
2016 May 15 10:47 AM
Dear Nihar,
Pls check the SCN blog post. Suppressing unwanted SAP GUI screens from BAPI/... | SCN
You can also check the another way of suppressing the messages detailed in the post. Suppress Messages in BAPI | SCN
Another trick ABAP - Suppressing BAPI Messages - Paper Street Enterprises
Thanks,
Sanjay
2016 May 15 3:49 PM
To sum up these posts:
Either this popup is a standard message popup (statement MESSAGE of TYPE 'I', 'W',or 'E'), then you may call the function module by intercepting the special classic exception "ERROR_MESSAGE", which will get rid of popups for message type 'I' or 'W' (and messages 'E' will be intercepted).
Otherwise, for other types of screens, as Thomas Jung used to say, "BAPIs are supposed to be safe to call without dynpro." and "I would encourage you to open an OSS problem with SAP when you find something like this"
As a workaround, if the symtom happens while you're executing the BAPI in dialog, but it works in background, then the BAPI has been written to allow 2 behaviors, one with SAP GUI, one without SAP GUI, then you may run the BAPI in background. In case the BAPI is called from a non-ABAP program, then an RFC connection may be started with dialog mode off.
2016 May 15 5:52 PM
Hi Sandra,
Thanks for your response.
If I will create a copy of the standard Bapi and implement the error_message exception will it work?
The problem here is that copying the Bapi will not copy the enhancements used.
Thanks
2016 May 15 5:54 PM
Dear Sanjay,
I checked in the system and found that active x control is already set.
Is there any other options?
Thanks for your valuable input.
2016 May 16 7:09 AM
Hi Nihar,
Try to use exception ERROR_MESSAGE in your bapi call as follow and check:
CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
EXPORTING
I_BAPI_VIEW = BAPI_VIEW
TABLES
SALES_DOCUMENTS = SALES_DOCUMENTS
.....................................................................
EXCEPTIONS
ERROR_MESSAGE = 1.
2016 May 16 7:49 AM
In fact, I've read the threads mentioned by Sanjay Kumar, and saw that their contents was not so explicit/not all correct, it's why I posted what I considered was correct. You can see I'm not talking about a copy of the standard BAPI. If the popup is a standard message (MESSAGE TYPE 'I'), do handle the error_message exception of the standard BAPI, as Pranay Patel suggests. For more information, please read the ABAP documentation of this special exception.
.
2016 May 16 8:30 AM
Dear Pranay,
Do I need to create a copy of the standard bapi and then add the exception in the custom code ?
Or if I write the syntax "exceptions" as per you said after the bapi call will it work ?
Thanks
2016 May 16 8:32 AM
No need to create a copy, just try writing the exceptions after bapi call.
2016 May 16 8:37 AM
2016 May 16 4:32 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |