Application Development 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: 

bdc

Former Member
0 Kudos
75

hi,

it was said that session method used to transfer data for multiple transaction.how to do it.plz explain

4 REPLIES 4

shishupalreddy
Active Contributor
0 Kudos
45

hai ,

we can do BDC for mutiple tcodes using session method.

case1.

having single session for multiple tcodes .

in this .

first create the session using bdc_open_group.

populate FIRST tcode bdcdata.

call bdcinsert.

refresh bdcdata.

populate bdcdata for second tcode.

call bdcinsert.

refresh bdcdata.

call bdc_close_group.

case2.

having different session for multiple tcode.

in this .

first create the session using bdc_open_group.

populate FIRST tcode bdcdata.

call bdcinsert.

refresh bdcdata.

call bdc_close-group.

creat the session for second tcode.

call bdec_open_group.

populate bdcdata for second tcode.

call bdcinsert.

refresh bdcdata.

call bdc_close_group.

regards,

Former Member
0 Kudos
45

Hi,

1.Recoed your BDC and fill the BDC structure with the data .

2. Now open the BDC session using FM BDC_OPEN_GROUP.

2. Insert the Transactions data in BDC table using BDC_INSERT Group. You will use as many Function module calls as number odf transactions used.

3. Now call function module BDC_CLOSE_GROUP.

Hope this helps.

Former Member
0 Kudos
45

In FM BDC_OPEN_GROUP, u need to mention the session name.

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = 'SESSION1'

USER = SY-UNAME

KEEP = 'X'.

In BDC_INSERT, mention the tcode and after that in BDC_CLOSE_GROUP, close the session.

Create another session in same manner.

Best Regards,

Vibha

*Please mark all the helpful answers

Former Member
0 Kudos
45

hi

good

go through this i hope this ll give you detail idea about the bdc session

The Batch Input is a SAP technic that allows automating the input in transactions. It lies on a BDC (Batch Data Commands) scenario.

BDC functions:

· BDC_OPEN_GROUP : Opens a session group

· BDC_CLOSE_GROUP : Closes a session

· BDC_INSERT : Insert a BDC scenario in the session

· The ABAP statement "CALL TRANSACTION" is also called to run directly a transaction from its BDC table.

It runs the program RSBDCSUB in order to launch automatically the session. The session management is done through the transaction code SM35.

The object itself is maintanable through the transaction SE24.

BDC methods:

Method

Description

Parameters

OPEN_SESSION

Opens a session

SUBRC (Return Code – 0 OK)

SESSIONNAME (Session to be created)

CLOSE_SESSION

Closes a session

None

RESET_BDCDATA

Resets the BDC Internal Table...

None. Normally, for internal purpose…

BDC_DYNPRO

Handles a new screen

PROGNAME (Name of the program)

DYNPRONR (Screen Number)

BDC_FIELD

Puts a value on the screen

FIELDNAME (Name of the field)

FIELDVALUE (Value to be passed)

CONSTRUCTOR

Constructor - Initializes NO_DATA

NODATA (No data character). The constructor is called automatically when the object is created.

RUN_SESSION

Launches a session with RSBDCBTC

None

CALL_TRANSACTION

Calls a transaction with the current BDC Data

MODE (Display Mode)

UPDATE (Update Mode)

TCODE (Transaction to be called)

BDC_INSERT

Inserts the BDC scenario in the session

TCODE (Transaction to be called)

BDC techniques used in programs:

1) Building a BDC table and calling a transaction,

2) Building a session and a set of BDC scenarios and keeping the session available in SM35,

3) Building a session and lauching the transaction right after closing the session.

http://www.planetsap.com/bdc_main_page.htm

thanks

mrutyun^