04-22-2008 6:25 AM
04-22-2008 6:28 AM
There is only one structure for BDC either in session or in call transaction...which is:
program
dynpro
dynbegin
fnam
fval
Reward if useful.
Dara.
04-22-2008 6:28 AM
There is only one structure for BDC either in session or in call transaction...which is:
program
dynpro
dynbegin
fnam
fval
Reward if useful.
Dara.
04-22-2008 6:29 AM
Hi,
SESSION METHOD:
In this method you transfer data from internal table to database table through sessions.
In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
Unless session is processed, the data is not transferred to database table.
BDC_OPEN_GROUP
You create the session through program by BDC_OPEN_GROUP function.
Parameters to this function are:
User Name: User name
Group: Name of the session
Lock Date: The date on which you want to process the session.
Keep: This parameter is passed as X when you want to retain session after
processing it or to delete it after processing.
BDC_INSERT
This function creates the session & data is transferred to Session.
Parameters to this function are:
Tcode: Transaction Name
Dynprotab: BDC Data
BDC_CLOSE_GROUP
This function closes the BDC Group. No Parameters.
Some additional information for session processing
When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
BDC structure
FIELD TYPE DESCRIPTION
Program CHAR(8) Program name of transaction
DynPro CHAR(4) Screen number of transaction
DynBegin CHAR(1) Indicator for new screen
Fnam CHAR(35) Name of database field from Screen
Fval CHAR(80) Value to submit to field
Regards,
Satish
04-22-2008 11:34 AM
Hi,
1. Session Method:
Open a session by calling the following functional module
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = session_name
keep = p_keep
user = sy-uname
2. Call the following FM and pass the BDCDATA table and the transaction code.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = MM01'
TABLES
dynprotab = i_bdcdata
EXCEPTIONS
..
3 . Close the Session
CALL FUNCTION 'BDC_CLOSE_GROUP'
Regards,
Raj.
04-22-2008 11:40 AM
Hi,
Welcome To SDN!!
Refer
https://forums.sdn.sap.com/click.jspa?searchID=11012958&messageID=3544102
Regards
Kiran