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 Session Does Not get created

Former Member
0 Likes
2,171

Hi Guys,

I am trying to execution a transaction using Session method. I am not getting any errors in any of the Function Modules "BDC_OPEN_GROUP", "BDC_INSERT" or "BDC_INSERT". Everything is fine but ultimately when I go to SM35 transaction I don't find the sessions available.

could someone let me know what could be the problem.

Thanks,

ABAP'er.

9 REPLIES 9
Read only

Former Member
0 Likes
1,274

Hi,

Just check whether you have enabled the<b> keep</b> option in BDC_OPEN_GROUP FM.

If you do no do so, after processing the session, the session name is removed from the log.

Hope this resolves your query.

Reward all the helpful answers.

Regards

Read only

Former Member
0 Likes
1,274

Hi,

1. Make sure u finally use

BDC_CLOSE

2. Only after we use the above FM, the session really gets created.

regards,

amit m.

Read only

0 Likes
1,274

Hi Both,

I have used BDC_CLOSE_GROUP. I don't have problem in that.

I have even used KEEP = 'X'. I don't have problem in that but finally session does not get created.

Regards,

ABAP'er.

Read only

0 Likes
1,274

Hi again,

1. Then make sure sy-subrc is zero,

after each FM.

regards,

amit m.

Read only

0 Likes
1,274

Hi All,

It works find on the Development System and when it is Transported to Acceptance it does not work. Not able to figure out the reason.

I don't get any Error or SY-SUBRC <> 0.

Thanks,

ABAP'er.

Read only

0 Likes
1,274

Hello Abaper,

I am having the exact same issue. I get subrc eq 0 during creation of the session, but during close group it says session not created. Did u manage to solve the issue. It worked for me in dev and also in test before. but now when i test again its not working....do you have the solution yet?

thnx

salman

Read only

Former Member
0 Likes
1,274

Hi friend,

I think u did mistake when ur providing the perameters.

Plz go through this u can check ur coding.

• Open Batch Input group

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = GROUP

USER = USER

KEEP = KEEP.

• Fill in the Data for Transaction in an internal table 'BDCDATA'

FORM INSERT_SCREEN USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

FORM INSERT_FIELD USING FNAM FVAL.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDFORM.

• Insert Transacton

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'ME21'

TABLES

DYNPROTAB = BDCDATA.

• Close Batch Input group

CALL FUNCTION 'BDC_CLOSE_GROUP'.

Finally to process Batch Input Session, first execute the BDC ABAP. This will create

a BDC session. Run transaction 'SM35' & processes the BDC session.

Some useful URLs

http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm

http://www.sap-img.com/abap/learning-bdc-programming.htm

http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm

The difference between CallTransaction and Sessionmethod.

In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in

Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.

difference between batch input and call transaction in BDC

Session method.

1) synchronous processing.

2) can tranfer large amount of data.

3) processing is slower.

4) error log is created

5) data is not updated until session is processed.

Call transaction.

1) asynchronous processing

2) can transfer small amount of data

3) processing is faster.

4) errors need to be handled explicitly

5) data is updated automatically

regards,

P.Nag

Read only

Former Member
0 Likes
1,274

Hi....

did you close the session with the FM <b>BDC_CLOSE_GROUP</b>.

Please check it once....

Regards,

Suresh.......

Read only

Former Member
0 Likes
1,274

Hi Joseph

I faced the same problem. Please follow this link

http://http://scn.sap.com/thread/2078029

In SM35 select the session which is coming as being created and then press shift+f4. If it gets created now then the above mention thread will help.

Regards

Shivam Maurya