Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC_INSERT, session not open

Former Member
0 Likes
4,071

Hi All,

I was executing a BDC and got this error, 'BDC_INSERT, session not open'.

Please help me how to correct it.

Thanks

Veni.

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
2,068

Hi Veni,

Did you close the session with FM BDC_CLOSE_GROUP?

Regards,

Ferry Lianto

Please reward points if helpful.

9 REPLIES 9
Read only

Former Member
0 Likes
2,068

Hi,

Did you call the FM BDC_OPEN_GROUP before BDC_INSERT..

THanks,

Naren

Read only

Former Member
0 Likes
2,068

Use FM for BDC OPEN GROUP first if it is not called in you rprogramm earlier. Reply if this is not the case.

reward points if it is correct.

Message was edited by: Geeta Yash

Read only

ferry_lianto
Active Contributor
0 Likes
2,068

Hi Veni,

Please check this sample code using the BDC_INSERT functions perhaps it may help.

http://www.sap-basis-abap.com/sapac003.htm

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
2,068

Hi,

The batch input program must not open a session until it has closed the preceding session. so check is there any sesion in the process with the same name.

Regards

Sudheer

Read only

0 Likes
2,068

Hi,

Thank you all for the reply. First I forgot to put oprn_group. Now I added it , but getting another error saying,

'BDC_OPEN_GROUP, create session .S1. not allo

as last session is still active'.

Please help me.

Thanks

Veni.

Read only

0 Likes
2,068

Hi

AT the end you have to close the session by fm BDC_CLOSE_GROUP

Your flow should be:

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = E_GROUP

USER = E_USER

KEEP = E_KEEP.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = _TCODE

TABLES

DYNPROTAB = BDCDATA.

CALL FUNCTION 'BDC_CLOSE_GROUP'.

Max

Read only

ferry_lianto
Active Contributor
0 Likes
2,069

Hi Veni,

Did you close the session with FM BDC_CLOSE_GROUP?

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

0 Likes
2,068

Yes! I did.

Read only

0 Likes
2,068

Now it is running. Small mistake. I got it now.

Thank you all for your immediate help.

I greatly appritiate all of your help.