2010 Jun 02 5:11 AM
Hi All,
I have a program which creates a BDC Session. The Session is processed in the program by calling SUBMIT RSBDCSUB.
The issue is that the submitted session goes to error state in SM35 with error "Session XXXX is being processed by user XXXX in mode N on server XXXX". If I don't submit the session using RSBDCSUB in the program and process the created session manually throgh SM35, it works fine. What could be the reason that it goes to error state while submitting through RSBDCSUB?
Thanks & Regards,
Soumya.
Hi All,
I have a program which creates a BDC Session. The Session is processed in the program by calling SUBMIT RSBDCSUB.
The issue is that the submitted session goes to error state in SM35 with error "Session XXXX is being processed by user XXXX in mode N on server XXXX". If I don't submit the session using RSBDCSUB in the program and process the created session manually throgh SM35, it works fine. What could be the reason that it goes to error state while submitting through RSBDCSUB?
Thanks & Regards,
Soumya.
2010 Jun 02 5:28 AM
Hi,
The error message you are getting suggests that User XXX is using that Program. Is that the same user you belong to?
And can you send your code so that a clear picture will come..
Cheers,
Sany
2010 Jun 02 5:42 AM
Hi,
Below is the piece of code which creates and submits the BDC Session
*Create BDC Session if not run in test mode.
IF g_answer EQ g_c_true AND p_test NE g_c_x.
PERFORM bdc_open_group.
CLEAR g_s_pernr.
LOOP AT g_t_pernr INTO g_s_pernr.
PERFORM create_bdc_session.
CLEAR g_s_pernr.
ENDLOOP.
ENDIF.
IF p_test NE g_c_x AND g_open_group = g_c_true.
PERFORM bdc_close_group.
ENDIF.
* Perform For Submitting the BDC Session in background
IF p_bdc_bg = 'X' and p_test NE g_c_x AND
g_answer EQ g_c_true.
PERFORM submit_bdc.
ENDIF.
FORM bdc_open_group .
CONSTANTS: l_c_user(12) TYPE c VALUE 'BATCH'.
* Check Condition For BDC session is Created or Not.
IF g_open_group EQ g_c_false.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = g_c_group " Session Name
keep = g_c_x " Keep Session
user = l_c_user "User
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE e016(z7) WITH text-009.
CLEAR g_open_group.
ELSE.
* When session is created move value '1' to G_GROUP_OPEN.
g_open_group = g_c_true.
ENDIF.
ENDIF.
ENDFORM. " BDC_OPEN_GROUP
The user specified in the error message is "BATCH" which is given as user in FM 'BDC_OPEN_GROUP'.
Thanks,
Soumya.
2010 Jun 02 6:00 AM
HI,
In the program the function BDC_CLOSE_GROUP is not functioning
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = g_c_group " Session Name
keep = g_c_x " Keep Session
user = l_c_user "User
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
IF sy-subrc 0.
MESSAGE e016(z7) WITH text-009.
CLEAR g_open_group.
ELSE.
* When session is created move value '1' to G_GROUP_OPEN.
g_open_group = g_c_true.
ENDIF.
ENDIF.
IF p_test NE g_c_x AND g_open_group = g_c_true.
PERFORM bdc_close_group.
ENDIF.as in above code if sy-subrc is not 0 then g_open_group = g_c_true.
if this condition is satisfied then BDC_CLOSE_GROUP will function.
and i n this cas i guess the SY_SUBRC value is gettin 0 .
you need to close the group.I guess this is reason its showing the error.
Please debug your code and check.
Sany..
2010 Jun 02 6:04 AM
Hi,
Got the solution. The issue is because the tcode 'PO13' cannot be run in background mode as per SAP note 721791.
Need to use PP02 tcode instead.
Thanks,
Soumya.
2010 Jun 02 6:16 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |