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

Steps in BDC

Former Member
0 Likes
1,717

Hi,

I`m new to SDN. I`d like to know more about the steps involved in BDC. Can anyone explain that in detail?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,573

Hi Farhana,

Step1:

Create a BDC Recording using transaction SHDB.

Step2:

Create a ZProgram from the Recording (from tcode SHDB).

Step3:

Upload the legacy data.. Use FM GUI_UPLOAD.

Step4:

Loop at the internal table (with legacy data)

Put the BDC code inside the loop and replace the values which you gave while recording with the internal table fields respectively.

Step5:

Activate the program and execute.

For more help refer to the link<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/61/04683ce9e7572ae10000000a11405a/frameset.htm">Transaction Recording</a>

Hope it helps....

Lokesh

pls. reward appropriate points

Hi,

I`m new to SDN. I`d like to know more about the steps involved in BDC. Can anyone explain that in detail?

7 REPLIES 7
Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,573

&----


*& Application : MM *

*& Copied From Program Version : *

*& Original Program : *

&----


*& Functional : Niranjan.K *

*& Developer : Hymavathi Oruganti *

*& Created On : 04-02-2005 *

*& Title : Confirmation Upload *

*& Report Name : ZMM_BDC_CONFIRMATION_UPLOAD *

*& Development Id : EXBCMCLHY *

*& Transport Request : D98K989741 *

*& Related Information : *

&----


REPORT ZMM_BDC_CONFIRMATION_UPLOAD

NO STANDARD page heading

message-id ZV.

include bdcrecx1.

TABLES: EKPO,EKES.

data : begin of t_itab occurs 0,

ebeln like ekko-ebeln,

ebelp like ekpo-ebelp,

bstae like ekpo-bstae,

ebtyp like ekes-ebtyp ,

eindt(10),

menge like ekes-menge,

xblnr like ekes-xblnr,

end of t_itab.

DATA: BEGIN OF record,

ebeln type ebeln,

ebelp type ebelp,

END OF record.

      • creating an internal table containg the Items***

DATA : t_tab LIKE record OCCURS 0 WITH HEADER LINE.

PARAMETER : filename LIKE rlgrap-filename OBLIGATORY.

***declaring temporary variables

DATA :

v_cnt(2) TYPE n,

v_bst(2) TYPE n,

v_bn type i,

v_bstpo(25),

v_ebtyp(25),

v_menge(25),

v_eeind(25),

v_xblnr(25),

v_xblnr1(25),

v_ebelp(2) type n,

v_ebelpt(2),

v_menge1(11),

v_ebt type i,

v_vebtyp like ekes-ebtyp,

V_EB(2) TYPE N,

v_tcselflag(40),

v_tem(2) type n,

v_file type string.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

field_name = filename

CHANGING

file_name = filename.

START-OF-SELECTION.

v_file = filename.

***uploading from flat file into internal table

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = v_file

filetype = 'ASC'

has_field_separator = 'X'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

data_tab = t_itab.

loop at t_itab.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = t_itab-ebeln

IMPORTING

OUTPUT = t_itab-ebeln

.

modify t_itab.

clear t_itab.

endloop.

      • checking the item numbers in the flat file.

loop at t_itab.

select ebeln ebelp from ekpo into table t_tab

where ebeln = t_itab-ebeln.

endloop.

IF t_tab[] is not initial.

perform open_group.

***looping at purchase order level.

LOOP at t_itab.

clear v_bn.

clear v_ebt.

perform bdc_dynpro using 'SAPMM06E' '0105'.

perform bdc_field using 'BDC_CURSOR'

'RM06E-BSTNR'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RM06E-BSTNR'

t_itab-ebeln.

**Changing alphanumeric fields and quantity fields to character type**

v_ebelp = t_itab-ebelp.

clear v_ebelpt.

v_menge1 = t_itab-menge.

v_ebelpt = v_ebelp.

**End Of Changing**

**Checking for the exact number of the item**

loop at t_tab where ebeln = t_itab-ebeln.

if t_tab-ebelp = t_itab-ebelp.

exit.

else.

v_bn = v_bn + 1.

endif.

endloop.

v_bst = v_bn + 1.

**End Of Checking**

**Mapping items**

v_tem = 1.

CONCATENATE 'RM06E-BSTPO(' v_bst ')' INTO v_bstpo.

CONCATENATE 'RM06E-TCSELFLAG(' v_tem ')' INTO v_tcselflag.

perform bdc_dynpro using 'SAPMM06E' '0120'.

perform bdc_field using 'BDC_CURSOR'

v_bstpo.

perform bdc_field using 'BDC_OKCODE'

'=DETA'.

perform bdc_field using 'RM06E-EBELP'

v_ebelpt.

perform bdc_dynpro using 'SAPMM06E' '0111'.

perform bdc_field using 'BDC_CURSOR'

'EKPO-BSTAE'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_dynpro using 'SAPMM06E' '0120'.

perform bdc_field using 'BDC_CURSOR'

v_bstpo.

perform bdc_field using 'BDC_OKCODE'

'=BSTA'.

perform bdc_field using 'RM06E-EBELP'

v_ebelpt.

perform bdc_field using v_tcselflag

'X'.

**Checking weather Confirmation category already exists**

select ebtyp from ekes into v_vebtyp where ebelp =

t_itab-ebelp and ebeln = t_itab-ebeln.

endselect.

if sy-dbcnt > 0.

v_ebt = sy-dbcnt.

endif.

V_EB = V_EBT + 1.

**End Of Checking**

**For Line items**

CONCATENATE 'EKES-EBTYP(' v_eb ')' INTO v_ebtyp.

CONCATENATE 'EKES-MENGE(' v_eb ')' INTO v_menge.

CONCATENATE 'RM06E-EEIND(' v_eb ')' INTO v_eeind.

CONCATENATE 'EKES-XBLNR(' v_eb ')' INTO v_xblnr.

**End**

perform bdc_dynpro using 'SAPLEINB' '0200'.

perform bdc_field using 'BDC_CURSOR'

v_xblnr.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using v_ebtyp

t_itab-ebtyp.

perform bdc_field using v_eeind

t_itab-eindt.

perform bdc_field using v_menge

v_menge1.

perform bdc_field using v_xblnr

t_itab-xblnr.

**End Of Mappings**

perform bdc_transaction using 'ME22'.

ENDLOOP.

**End Of Purchase Order Loop**

perform close_group.

ELSE.

MESSAGE I083(zv).

ENDIF.

Read only

Former Member
0 Likes
1,573

Pls.dont post the same question twice.

Read only

0 Likes
1,573

Hi,

BDC is used to mass upload records for a certain transaction(for example F-02). The records are from a text file and uploaded via the BDC program and from there it inserts the data on each screen of that particular transaction. Hope it helps. Please reward points accordingly...

Read only

Former Member
0 Likes
1,574

Hi Farhana,

Step1:

Create a BDC Recording using transaction SHDB.

Step2:

Create a ZProgram from the Recording (from tcode SHDB).

Step3:

Upload the legacy data.. Use FM GUI_UPLOAD.

Step4:

Loop at the internal table (with legacy data)

Put the BDC code inside the loop and replace the values which you gave while recording with the internal table fields respectively.

Step5:

Activate the program and execute.

For more help refer to the link<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/61/04683ce9e7572ae10000000a11405a/frameset.htm">Transaction Recording</a>

Hope it helps....

Lokesh

pls. reward appropriate points

Read only

0 Likes
1,573

hi Farhana,

here is the brief description of the same...

The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called “batch input” or “batch data communication”.

1. SESSION METHOD

2. CALL TRANSACTION

3. DIRECT INPUT

Advantages offered by BATCH INPUT method:

1. Can process large data volumes in batch.

2. Can be planned and submitted in the background.

3. No manual interaction is required when data is transferred.

4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.

To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a “data transfer” program must map the data from the external system into the data structure required by the SAP batch input program.

The batch input program must build all of the input to execute the SAP transaction.

Two main steps are required:

• To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.

• To pass the table to SAP for processing.

Prerequisite for Data Transfer Program

Writing a Data Transfer Program involves following prerequisites:

Analyzing data from local file

Analyzing transaction

Analyzing transaction involves following steps:

• The transaction code, if you do not already know it.

• Which fields require input i.e., mandatory.

• Which fields can you allow to default to standard values.

• The names, types, and lengths of the fields that are used by a transaction.

• Screen number and Name of module pool program behind a particular transaction.

To analyze a transaction::

• Start the transaction by menu or by entering the transaction code in the command box.

(You can determine the transaction name by choosing System – Status.)

• Step through the transaction, entering the data will be required for processing your batch input data.

• On each screen, note the program name and screen (dynpro) number.

(dynpro = dyn + pro. Dyn = screen, pro = number)

• Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.

The technical info pop-up shows not only the field information but also the program and screen.

• For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.

Note the following information:

- The field name for batch input, which you’ll find in its own box.

- The length and data type of the field. You can display this information by double clicking on the Data Element field.

• Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).

Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.

In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.

You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.

Once you have program name, screen number, field name (screen field name), you can start writing.

DATA TRANSFER program.

Declaring internal table

First Integral Table similar to structure like local file.

Declaring internal table like BDCDATA

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 batch input structure.

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.

Transferring data from local file to internal table

Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.

Population of BDCDATA

For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.

All these five initial steps are necessary for any type of BDC interface.

DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.

First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.

<b>SESSION METHOD</b>

About 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.

<b>BDC_OPEN_GROUP</b>

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.

<b>BDC_INSERT</b>

This function creates the session & data is transferred to Session.

Parameters to this function are:

• Tcode: Transaction Name

• Dynprotab: BDC Data

<b>BDC_CLOSE_GROUP</b>

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.

<b>CALL TRANSACTION</b>

About CALL TRANSACTION

A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by

Call transaction <tcode> using <BDCTAB>

Mode <A/N/E>

Update <S/A>

Messages into <MSGTAB>.

Parameter – 1 is transaction code.

Parameter – 2 is name of BDCTAB table.

Parameter – 3 here you are specifying mode in which you execute transaction

A is all screen mode. All the screen of transaction are displayed.

N is no screen mode. No screen is displayed when you execute the transaction.

E is error screen. Only those screens are displayed wherein you have error record.

Parameter – 4 here you are specifying update type by which database table is updated.

S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.

A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).

Parameter – 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:

1. Tcode: Transaction code

2. Dyname: Batch point module name

3. Dynumb: Batch input Dyn number

4. Msgtyp: Batch input message type (A/E/W/I/S)

5. Msgspra: Batch input Lang, id of message

6. Msgid: Message id

7. MsgvN: Message variables (N = 1 - 4)

For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).

<b>Steps for CALL TRANSACTION method</b>

1. Internal table for the data (structure similar to your local file)

2. BDCTAB like BDCDATA

3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)

4. Loop at itab.

Populate BDCTAB table.

Call transaction <tcode> using <BDCTAB>

Mode <A/N/E>

Update <S/A>.

Refresh BDCTAB.

Endloop.

(To populate BDCTAB, You need to transfer each and every field)

The major differences between Session method and Call transaction are as follows:

SESSION METHOD CALL TRANSACTION

1. Data is not updated in database table unless Session is processed. Immediate updation in database table.

2. No sy-subrc is returned. Sy-subrc is returned.

3. Error log is created for error records. Errors need to be handled explicitly

4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.

<b>Error Handling in CALL TRANSACTION</b>

When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:

Steps for the error handling in CALL TRANSACTION

1. Internal table for the data (structure similar to your local file)

2. BDCTAB like BDCDATA

3. Internal table BDCMSG like BDCMSGCOLL

4. Internal table similar to Ist internal table

(Third and fourth steps are for error handling)

5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)

6. Loop at itab.

Populate BDCTAB table.

Call transaction <tr.code> using <Bdctab>

Mode <A/N/E>

Update <S/A>

Messages <BDCMSG>.

Perform check.

Refresh BDCTAB.

Endloop.

7 Form check.

IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).

Call function Format_message.

(This function is called to store the message given by system and to display it along with record)

Append itab2.

Display the record and message.

hope it helps,

Santosh P

Read only

Former Member
0 Likes
1,573

Hi Farhana,

This link would help you:

Best Regards,

Anjali

Read only

naimkhans_babi
Active Participant
0 Likes
1,573

Hi...

you can create bdc in diffrent ways. most popular way is record transaction.

1). go to shdb or System-services-batch input-recorder.

2). Specify the name and transactio code for example MM01, MM01 is the transaction code for creating materials, what you are doing here is creating a material and record it through shdb transaction of by system menu. save the recording, insert that recording into the abap program, after inserting the recording into your program you need to call several function modules that helps the program to understand the screen flow and its task. they should be in sequesnce...

1). call function from pattern "UPLOAD" here give the file name which is you text file, then file type which is "ASC" then tables which is your internal table.

2). create a subroutine

according to example mention below.

save, activate the program it is ready to use,

mention below example is used to upload material master data from excel file, this program is not used text fiel to upload data.

please give me some points as my account is yet nil...as you can see, I hope this will help you to understand the bdc process, you can see dynpro details from status these are the screen numbers only which is used during the recording.

&----


report ZMM_BDC_MATERIAL_MASTER no standard page heading line-size 255.

data :itbdc like bdcdata occurs 0 with header line.

data: it_excel type alsmex_tabline occurs 0 with header line.

data: begin of itab occurs 0,

mbrsh like rmmg1-mbrsh,

mtart like rmmg1-mtart,

werks like rmmg1-werks,

lgort like rmmg1-lgort,

aennr like rmmg1-aennr,

bismt like mara-bismt,

meins like mara-meins,

matkl like mara-matkl,

maktx like makt-maktx,

iprkz like mara-iprkz,

peinh like mbew-peinh,

verpr like mbew-verpr,

bklas like mbew-bklas,

end of itab.

endif.

parameter : path like rlgrap-filename default 'C:\' .

AT SELECTION-SCREEN ON VALUE-REQUEST FOR Path.

CALL FUNCTION 'F4_FILENAME'

IMPORTING

FILE_NAME = path.

condense path.

if path ne ''.

perform upload using path.

endif.

&----


*& Form upload

&----


form upload using path.

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

exporting

filename = path

i_begin_col = 1

i_begin_row = 2

i_end_col = 12

i_end_row = 5

tables

intern = it_excel

exceptions

inconsistent_parameters = 1

upload_ole = 2

others = 3 .

if sy-subrc <> 0.

write:/ 'PATH OF EXCEL FILE IS NOT CORRECT'.

exit.

endif.

loop at it_excel .

case it_excel-col.

when '0001'.

itab-mbrsh = it_excel-value.

when '0002'.

itab-mtart = it_excel-value.

when '0003'.

itab-werks = it_excel-value.

when '0004'.

itab-lgort = it_excel-value.

when '0005'.

itab-bismt = it_excel-value.

when '0006'.

itab-meins = it_excel-value.

when '0007'.

itab-matkl = it_excel-value.

when '0008'.

itab-maktx = it_excel-value.

when '0009'.

itab-iprkz = it_excel-value.

when '0010'.

itab-peinh = it_excel-value.

when '0011'.

itab-verpr = it_excel-value.

when '0012'.

itab-bklas = it_excel-value.

endcase.

at end of row.

append itab.

clear itab.

endat.

clear it_excel.

endloop.

endform. " upload

&----


*& Form bdc_dynpro

&----


form bdc_dynpro using program dyn_pro .

itbdc-program = program.

itbdc-dynpro = dyn_pro.

itbdc-dynbegin = 'X'.

endform. " bdc_dynpro

&----


*& Form bdc_field

&----


form bdc_field using fname fval.

itbdc-fnam = fname.

itbdc-fval = fval.

append itbdc.

clear itbdc.

endform. " bdc_field

&----


*& Form open_group

&----


form open_group.

call function 'BDC_OPEN_GROUP'

exporting

client = sy-mandt

group = 'MM01'

user = sy-uname

keep = 'X'

exceptions

client_invalid = 0

destination_invalid = 0

group_invalid = 0

group_is_locked = 0

holddate_invalid = 0

internal_error = 0

queue_error = 0

running = 0

system_lock_error = 0

user_invalid = 0

others = 0.

endform. " open_group

&----


*& Form insert

&----


*form insert.

*

*call function 'BDC_INSERT'

  • exporting

  • tcode = 'MM01'

  • tables

  • dynprotab = itbdc

  • exceptions

  • internal_error = 0

  • not_open = 0

  • queue_error = 0

  • tcode_invalid = 0

  • printing_invalid = 0

  • posting_invalid = 0

  • others = 0.

*

*endform. " insert

&----


*& Form close_group

&----


form close_group.

call function 'BDC_CLOSE_GROUP'

exceptions

not_open = 0

queue_error = 0

others = 0.

endform. " close_group

form bdc_transaction using tr.

call transaction tr using itbdc mode 'E'.

endform.

start-of-selection.

perform open_group.

loop at itab.

perform bdc_dynpro using 'SAPLMGMM' '0060'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-MATNR'.

perform bdc_field using 'BDC_OKCODE'

'=AUSW'.

perform bdc_field using 'RMMG1-MBRSH'

  • 'M'.

itab-mbrsh.

perform bdc_field using 'RMMG1-MTART'

  • 'CESG'.

itab-mtart.

perform bdc_dynpro using 'SAPLMGMM' '0070'.

perform bdc_field using 'BDC_CURSOR'

'MSICHTAUSW-DYTXT(12)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'MSICHTAUSW-KZSEL(01)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(03)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(04)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(09)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(12)'

'X'.

perform bdc_dynpro using 'SAPLMGMM' '0080'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-LGORT'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'RMMG1-WERKS'

  • 'GNR'.

itab-werks.

perform bdc_field using 'RMMG1-LGORT'

  • 'ADPL'.

itab-lgort.

perform bdc_dynpro using 'SAPLMGMM' '3005'.

perform bdc_field using 'BDC_OKCODE'

'=NEBE'.

perform bdc_field using 'BDC_CURSOR'

'MARA-BISMT'.

perform bdc_field using 'MARA-MEINS'

  • '"'.

itab-meins.

perform bdc_field using 'MARA-MATKL'

  • '00101'.

itab-matkl.

perform bdc_field using 'MARA-BISMT'

  • '123456'.

itab-bismt.

perform bdc_dynpro using 'SAPLMGMM' '3005'.

perform bdc_field using 'BDC_OKCODE'

'=NEBE'.

perform bdc_field using 'BDC_CURSOR'

'SKTEXT-MAKTX(01)'.

perform bdc_field using 'SKTEXT-MAKTX(01)'

'test'.

perform bdc_field using 'MARA-MEINS'

  • '"'.

itab-meins.

perform bdc_field using 'MARA-MATKL'

  • '00101'.

itab-matkl.

perform bdc_field using 'MARA-BISMT'

  • '123456'.

itab-bismt.

perform bdc_dynpro using 'SAPLMGMM' '3006'.

perform bdc_field using 'BDC_OKCODE'

'=NEBE'.

perform bdc_field using 'MAKT-MAKTX'

  • 'test'.

itab-maktx.

perform bdc_field using 'BDC_CURSOR'

'MARA-XCHPF'.

perform bdc_field using 'MARA-MEINS'

itab-meins.

*perform bdc_field using 'MARC-EKGRP'

    • '001'.

perform bdc_field using 'MARA-MATKL'

  • '00101'.

itab-matkl.

perform bdc_field using 'MARA-XCHPF'

'X'.

perform bdc_dynpro using 'SAPLMGMM' '3050'.

perform bdc_field using 'BDC_OKCODE'

'=NEBE'.

perform bdc_field using 'MAKT-MAKTX'

  • 'test'.

itab-maktx.

perform bdc_dynpro using 'SAPLMGMM' '3000'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using 'BDC_CURSOR'

'MAKT-MAKTX'.

perform bdc_field using 'MAKT-MAKTX'

  • 'test'.

itab-maktx.

perform bdc_field using 'MARA-MEINS'

  • '"'.

itab-meins.

perform bdc_field using 'MARA-XCHPF'

'X'.

perform bdc_field using 'MARA-IPRKZ'

  • 'D'.

itab-iprkz.

perform bdc_transaction using 'MM01'.

endloop.

perform close_group.