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

about BDCDATA structure?

Former Member
0 Likes
11,905

what is BDCDATA structure?

6 REPLIES 6
Read only

marcelo_ramos1
SAP Mentor
SAP Mentor
4,159

Hi,

BDCDATA is used for call transaction (BATCH INPUT) as follow.

DATA: BDCDATA TYPE TABLE OF BDCDATA.              
                                                  
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.              
                                                  
DATA: PROGRAM LIKE SY-REPID,                      
      WA_BDCDATA TYPE BDCDATA.                    
                                                  
WA_BDCDATA-PROGRAM  = 'SAPMS38M'.                 
WA_BDCDATA-DYNPRO   = '0100'.                     
WA_BDCDATA-DYNBEGIN = 'X'.                        
APPEND WA_BDCDATA TO BDCDATA.                     
CLEAR WA_BDCDATA.                                 
WA_BDCDATA-FNAM     = 'RS38M-PROGRAMM'.           
WA_BDCDATA-FVAL     = PROGRAM.                    
APPEND WA_BDCDATA TO BDCDATA.                     
...                                               
"Here you use BDCDATA 
CALL TRANSACTION 'SE38'  USING BDCDATA  MODE 'N'  
                         MESSAGES INTO ITAB.      

Regards.

Marcelo Ramos

Read only

varma_narayana
Active Contributor
0 Likes
4,159

Hi..

BDC is a Data migration technique to transfer legacy data into SAP by processing the Respective transaction (For Customer master XD01).

But to process a transaction all the relevant data (PROGRAM NAME, SCREEN NOS, SCREEN FIELDS , SCREEN FIELD VALUES)

BDCDATA is a structure which consists of these fields for the processing of a transaction. So we have to declare an internal table of BDCDATA to store all this data.

BDCDATA fields:

PROGRAM -> Name of the Program

DYNPRO -> Screen No

DYNBEGIN -> At the start of a new screen we have to set it to 'X' or else ' '.

FNAM -> Name of the Screen field where data has to be entered

FVAL -> Value for Screen field

<b>Reward if Helpful</b>

Read only

Former Member
4,159

Hi,

In BDC while we call the transaction we need to pass the data. The data should be of some structure. This structure is BDCDATA.

It has Program name, Screen No, Starting screen, Field name and value

Regards

Arun

Read only

Former Member
0 Likes
4,159

hi,

For uploading data using BDC we have to upload data to internal table first

Then the data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for <b>batch input structure</b>.

The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.

This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:

• Create a BDCDATA structure

• Write the structure out to a session or process it with CALL TRANSACTION USING; and then

• Create a BDCDATA structure for the next transaction that is to be processed.

Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.

The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:

• Data that is entered into screen fields.

• Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.

The BDCDATA structure contains the following fields:

• PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.

• DYNPRO: Screen Number. Set this field only in the first record for the screen.

• DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘ ‘ (blank) for all other records.)

• FNAM: Field Name. The FNAM field is not case-sensitive.

• FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.

Read only

Former Member
0 Likes
4,159

• PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.

• DYNPRO: Screen Number. Set this field only in the first record for the screen.

• DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen.

• FNAM: Field Name. The FNAM field is not case-sensitive.

• FVAL: Value for the field named in FVAL.

Field NameTypeDescription

PROGRAMCHAR(8)Program Name

DYNPRONUMC(4)Screen No.

DYNBEGINCHAR(1)Begin a screen (If yes then equal ’X’)

FNAMCHAR(35)Field Name

FVALCHAR(80)Field Value

<b>

also do refer

http://help.sap.com/saphelp_40b/helpdata/en/fa/0970a4543b11d1898e0000e8322d00/content.htm</b>;

https://www.allsapinfo.com/files/bdcconcept.pdf

regards,

srinivas

<b>*reward for useful answers*</b>

Read only

4,159

Hi,

The purpose of BDCDATA structure, which is used to Capture the Screen Handling (SHBD) Data into a BDC internal table. The BDC internal table type is BDCDATA structure.

The structure of BDCDATA consist five fields:

1. PROGRAM - BDC Program name

2. DYNPRO - BDC Screen Number

3. DYNBEGIN - BDC Screen start

4. FNAM - Field name

5. FVAL - Field value.

regards,

Nasreen