‎2009 Apr 16 8:08 AM
Hi,
I am able to create the the BDC Session but when I goto transaction and select my session and click on process then it gives an information message that 'The requested session cannot be processed' .
My code used for creating BDC Session is given below :
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = c_session_name
user = sy-uname
EXCEPTIONS
OTHERS = 11.
CHECK sy-subrc <> 0.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = c_pa30
TABLES
dynprotab = it_bdcdata[]
EXCEPTIONS
OTHERS = 7.
CHECK sy-subrc <> 0.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
I have not used BDC sessions before. Please suggest solution to it.
Regards,
Nibha
‎2009 Apr 16 8:14 AM
HI,
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = c_session_name
user = sy-uname
EXCEPTIONS
OTHERS = 11.
CHECK sy-subrc 0.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = c_pa30
TABLES
dynprotab = it_bdcdata[]
EXCEPTIONS
OTHERS = 7.
* CHECK sy-subrc 0. " Comment this line if you BDC session through's error
" then below FM will not get executed and session will not be closed.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
‎2009 Apr 16 8:14 AM
HI,
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = c_session_name
user = sy-uname
EXCEPTIONS
OTHERS = 11.
CHECK sy-subrc 0.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = c_pa30
TABLES
dynprotab = it_bdcdata[]
EXCEPTIONS
OTHERS = 7.
* CHECK sy-subrc 0. " Comment this line if you BDC session through's error
" then below FM will not get executed and session will not be closed.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
‎2009 Apr 16 8:19 AM
Hi,
I have commented that line but I am still getting the same error.
Regards,
Nibha
‎2009 Apr 16 8:26 AM
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = c_session_name
prog = sy-cprog " Porgram name
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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'TCODE'
TABLES
dynprotab = t_bdc
* EXCEPTIONS
* INTERNAL_ERROR = 1
* NOT_OPEN = 2
* QUEUE_ERROR = 3
* TCODE_INVALID = 4
* PRINTING_INVALID = 5
* POSTING_INVALID = 6
* OTHERS = 7
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Also try to catch the execptions and check wether there is any issue with creating Session.
Regards,
Gurpreet
‎2009 Apr 16 8:18 AM
Hi,
Might be be data ur passing to internal table it_BDCdata is not correct or check out t-code ur passing to function module
‎2009 Apr 16 8:33 AM
Hi,
U hv deleted the3 exceptions in the FM 'BDC_INSERT' except '7'.
Add all the exceptions & find out which exception is getting triggered ...
regards,
ajit.
‎2009 Apr 16 10:02 AM
Hi,
There was some problem with data. I am able to process that session now but that session name disappears from the list after being processed.
Also, after processing I receive a message 'Processing of batch input session completed' and the change is updated in the database too .
Am I proceeding correctly ? and where does that session name goes?
‎2009 Apr 16 10:07 AM
Just in the Parameters of 'BDC_OPEN_GROUP':
Pass KEEP = 'X'.
If you dont set KEEp ='X' once the session is completed succesfully it will not be in the list.
I SM35 Just check the logs(Logs Button)you will find the session listed there.
Regards,
gurpreet