on 10-28-2008 7:25 PM
Hi experts,
I have created a BDC to update the consumption profiles of all locations in the system.
Code is as follows:
bdcdata-program = '/SAPAPO/SAPLLOC_MASTER'
bdcdata-dynpro = '1900'
bdcdata-dynbegin = X
bdcdata-fnam = 'BDC_OKCODE'
bdcdata-fval = '=CHANGE'
bdcdata-fnam = '/SAPAPO/LOCIO-LOCNO'
bdcdata-fval = lv_locno
bdcdata-program = '/SAPAPO/SAPLLOC_MASTER'
bdcdata-dynpro = '2000'
bdcdata-dynbegin = X
bdcdata-fnam = 'BDC_OKCODE'
bdcdata-fval = '=FC15'
bdcdata-program = '/SAPAPO/SAPLLOC_MASTER'
bdcdata-dynpro = '2000'
bdcdata-dynbegin = X
bdcdata-fnam = 'BDC_OKCODE'
bdcdata-fval = '=SAVE'
bdcdata-fnam = '/SAPAPO/LOCIO-PROBICONS'
bdcdata-fval = lv_profile
Then I use Call Transaction /SAPAPO/LOC3.
This is a batch program. When this runs I get following dump:
Exception condition "CNTL_ERROR" raised.
Error Analysis:
A RAISE statement in the program "CL_GUI_CUSTOM_CONTAINER=======CP" raised the exceptioncondition "CNTL_ERROR"
Since the exception was not intercepted by a superior program, processing was terminated.
Transaction......... "/SAPAPO/LOC3 "
Transactions ID..... "AC141E6C443708102717050016880400" Program............. "CL_GUI_CUSTOM_CONTAINER=======CP"
Screen.............. "/SAPAPO/SAPLLOC_MASTER 2000" Screen line......... 6
Termination occurred in the ABAP program "CL_GUI_CUSTOM_CONTAINER=======CP" -in "CONSTRUCTOR".
The main program was "/SAPAPO/SAPLLOC_MASTER ".
-
|Source Code Extract
Line SourceCde 32 WHEN 1. 33 RAISE CNTL_SYSTEM_ERROR. |
| 34| WHEN 2.
35 | RAISE CNTL_ERROR. |
| 36| WHEN 3.
| 37| class cl_gui_cfw definition load.
| 38| message id 'DC' type 'W' number cl_gui_cfw=>reason_no_init
| 39| raising create_error.
| 40| WHEN 4.
| 41| RAISE LIFETIME_ERROR.
| 42| WHEN 5.
| 43| RAISE LFETIME_DYNPRO_DYNPRO_LINK.
| 44| WHEN OTHERS.
| 45| RAISE CNTL_ERROR.
46 | ENDCASE. 47 |
| 48| m_container_type = CONTAINER_TYPE_CUSTOM.
49 |
| 50 | CALL METHOD SET_VISIBLE
| 51| EXPORTING
| 52| VISIBLE = '1'
| 53| EXCEPTIONS
| 54| CNTL_SYSTEM_ERROR = 1
| 55| CNTL_ERROR = 2.
56 |
| 57| CASE SY-SUBRC.
| 58| WHEN 0.
| 59| WHEN 1.
| 60| RAISE CNTL_SYSTEM_ERROR.
| 61| WHEN 2.
|>>>>>| RAISE CNTL_ERROR.
| 63| WHEN OTHERS.
| 64| RAISE CNTL_ERROR.
| 65| ENDCASE. 66| | 67| m_name = container_name.
| 68| call method set_window_property
| 69| exporting property_id = property_name 70| value = m_name
| 71| keep_cache = 'X'
| 72| exceptions others = 1.
| 73| if sy-subrc ne 0.
| 74| clear m_name.
| 75| raise cntl_error.
76 | endif. 77 |
| 78| CALL METHOD ME->REGISTER_CACHED_W_PROPERTY
| 79| EXPORTING
| 80| PROPERTY_ID = property_height
| 81| EXCEPTIONS
I couldn't find any SAP Note. I found one note 1032057 and applied it. But it didn't have any effect. I am still getting the dump.
Pl help.
Regards,
Reema.
Hi Reema,
LOCATION_HEAD parameter of BAPI_LOCSRVAPS_SAVEMULTI2 allows to change the consumption Profile.
I hope you would have a valid reason for using BDC than using a BAPI which is available to change Location master.
I think BAPI is always reliable than going for a BDC.
Cheers,
KD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I opened a location in change mode and then updated the same location using the BAPI.
I expected the bapi to return a lock error, but it did not.
What should be the import parameters of the BAPI (Commit control and Save options ) particularly.
If I use commit control A or E, the location is still getting updated. (inspite of being open in edit mode)
Reema.
Edited by: Reema Shahbazkar on Oct 30, 2008 12:55 AM
Dear Reema,
this is quite normal behaviour - not all controls technically are capable for the background. Please, refer to the SAP note #311440 - Batch input and controls - about causes and prerequisities and for solutions.
Recommendation is to use in your code a background capable controls.
Regards,
Tibor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reema,
I believe this is related to F&R process. This looks like a GUI error to me. Is your GUI up to date? which version are you using the most recent is 710 Patch 7.
Not sure if this solves your issue...but please check.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.