‎2008 May 02 11:38 AM
Hi all,
Can anybody tell me the procedure (full) of writing the BDC program along with its recording.
Don't provide me the links..
Best Regards,
Aastha
‎2008 May 02 11:45 AM
Hi,
This is the step by step procedure of BDC Call Transaction with an simple example..
BDC CALL TRANSACTION METHOD:
Since we cannot modify the error record using direct input method, we go for call transaction method. Here, we create a screen to populate error records in input fields and from the screen, we can modify the error records and then insert into database table.
Steps to be followed in Call Transaction MEthod:
1. Analyze the flat file.
2. Create a screen for database table fields using MPP. Create a Transaction code for the screen.
3. Write the following code in SE38 editor:
DATA : BEGIN OF ITAB OCCURS 0,
STR(255),
END OF ITAB.
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'C:\KNA.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = ITAB.
DATA ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
DATA JTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
LOOP AT ITAB.
SPLIT ITAB-STR AT ',' INTO ITAB1-KUNNR ITAB1-NAME1 ITAB1-ORT01
ITAB1-LAND1.
APPEND ITAB1.
ENDLOOP.
LOOP AT ITAB1.
PERFORM PROGINFO USING 'SAPMZCALLTRANSACTION' '100'.
PERFORM FLDINFO USING 'KARTHIK-KUNNR' ITAB1-KUNNR.
PERFORM FLDINFO USING 'KARTHIK-NAME1' ITAB1-NAME1.
PERFORM FLDINFO USING 'KARTHIK-ORT01' ITAB1-ORT01.
PERFORM FLDINFO USING 'KARTHIK-LAND1' ITAB1-LAND1.
CALL TRANSACTION 'ZCALLTRANS' USING JTAB.
ENDLOOP.
FORM PROGINFO USING PROGNAME SCRNUM.
CLEAR JTAB.
REFRESH JTAB.
JTAB-PROGRAM = PROGNAME.
JTAB-DYNPRO = SCRNUM.
JTAB-DYNBEGIN = 'X'.
APPEND JTAB.
ENDFORM.
FORM FLDINFO USING FLDNAME FLDVALUE.
CLEAR JTAB.
JTAB-FNAM = FLDNAME.
JTAB-FVAL = FLDVALUE.
APPEND JTAB.
ENDFORM.Save -> Activate -> Execute.
In the above code,
BDCDATA is a structure used to populate the internal table records into the screen fields. The BDCDATA structure has following components:
PROGRAM - Holds the name of MPP program where the screen is created.
DYNPRO - Holds the screen number where the internal fields to be populated.
DYNBEGIN - Used to initiate the screen when the program is executed. The default value to be specified is 'X'.
FNAM - Specifies input field name in the screen where the data is to be populated.
FVAL - Specifies from which internal table field, the data should be passed to the screen field.
'CALL TRANSACTION' statement is used to call the screen created to populate error records.
SYNTAX:
CALL TRANSACTION <Tcode> USING <BDCDATA_itab> MODE <mode> UPDATE <update>.
MODE: This is used to specify which mode to be followed when calling transaction. The types of mode are:
A - Display the screen.
E - Display only error records from the flat file.
N - Background processing.
UPDATE: This is used to specify the update task of records in the database table. The types of update tasks are:
A - Asynchronous update
S - Synchronous update
L - Local update
Advantages of CALL TRANSACTION:
Error records can be modified.
This method can be used in support projects.
Reward If Helpful
‎2008 May 02 11:42 AM
Hi Aastha,
What is BDC?
Answer : Batch Data Communication or BDC is a batch interfacing technique that SAP developed. It is mainly used for uploading data into the SAP R/3 system. BDC works by simulating the user input from transactional screen via an ABAP program.
The data input data file will come in the form of a flat file which the user save as file type txt file or prn file from the Microsoft Excel program. An Abaper will create a program to read the text file and upload into the SAP system.
Normally, the tcode SHDB will be used to record the transaction code the user used. After, the simulation, the Abaper can generate a sample program and modify from there. It makes the programming easier and faster.
other related questions and answers:
What is recording?
As the word record implies, it mean recording the keystroke of the user input of a SAP transaction screen.
Why it is used?
It is normally used for mass update or uploading of data to the system.
What is its need?
It help to save time for the users who need to mass change the system data. For e.g. tax rate change announce by the country government.
How it is related with bdc?
It is related to bdc because bdc programming allows recording of user inputs.
Example:
To learn how to upload data using BDC. If I have a excel data file how will upload it using BDC, following are the Steps to do it:
For a BDC upload you need to write a program which created BDC sessions.
Steps:
1. Work out the transaction you would use to create the data manually.
2. Use transaction SHDB to record the creation of one material master data.
Click the New recording button or the Menu - Recording - Create
3. Save the recording, and then go back a screen and go to the overview.
4. Select the recording and click on Edit - Create Program. Give the program a Z name, and select transfer from recording.
5. Edit the program. You will see that all the data you entered is hard-coded into the program. You need to make the following changes:
5.1 After the start-of-selection, Call ws_upload to upload the file (the excel file needs to be saved as TAB separated).
5.2 After the open-group, Loop on the uploaded data. For each line, perform validation checks on the data, then modify the perform bdc_field commands to use the file data.
5.3. After perform bdc_transaction, add the endloop.
Execute the program. It will have options to create a batch session or to process directly.
These are all my finds . Might be it will be useful to you.
Direct call of transactions, session handling:
/nxxxx This terminates the current transaction, and starts transaction xxxx
/n This terminates the transaction. This generally corresponds to pressing F15 to go back.
/nend This termiantes all separate sessions and logs off (corresponds to System - Logoff).
/nex This terminates all separate sessions and logs off immediately (without any warning!).
/oxxxx This opens a new session and starts transaction xxxx in This session.
/o This lists existing sessions and allows deletion or opening of a new session.
/i This terminates the current session (corresponds to System End
/i1, /i2,... This terminates the session with the number given.
.xyzw Fast path: 'xyzw' refers to the underlined letters in the menus. This type of navigation is uncommon and is provided more for emergencies (such as a defective mouse).
Batch
The following commands can be entered in correction mode ('Process in foreground' or 'Display errors only') when processing a batch input session:
/n This terminates the current batch input transaction and characterizes it as
/bdel This deletes the current batch input transaction.
/bend This terminates batch input processing and sets the session to Failed
/bda This switches from Display errors only to Process in foreground
/bde This switches from Process in foreground to Display errors only
ABAP/4
/h This switches into debugging mode.
/hs This switches into debugging mode and activates the debugging of system functions.
Buffer
WARNING: Resetting buffers can significantly change the performance of the entire system for a long time.
It should therefore only be used where there is a good reason tdso. As of release 3.0B system administator authorization is required (authorization object (S_ADMI_FCD). The action is noted in the system log.
/$SYNC This resets all buffers of the application server
/$CUA This resets the CUA buffer of the application server
/$TAB This resets the TABLE buffers of the application server
/$NAM This resets the nametab buffer of the application server
/$DYNP This resets the screen buffer of the application server
Click Below Link to Download a PDF File which provides a Step-by-Step Procedure to Create a BDC Recording:
http://www.sap-img.com/bdc.htm
Regards,
Sunil.
‎2008 May 02 11:45 AM
Hi,
This is the step by step procedure of BDC Call Transaction with an simple example..
BDC CALL TRANSACTION METHOD:
Since we cannot modify the error record using direct input method, we go for call transaction method. Here, we create a screen to populate error records in input fields and from the screen, we can modify the error records and then insert into database table.
Steps to be followed in Call Transaction MEthod:
1. Analyze the flat file.
2. Create a screen for database table fields using MPP. Create a Transaction code for the screen.
3. Write the following code in SE38 editor:
DATA : BEGIN OF ITAB OCCURS 0,
STR(255),
END OF ITAB.
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'C:\KNA.TXT'
FILETYPE = 'ASC'
TABLES
DATA_TAB = ITAB.
DATA ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
DATA JTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
LOOP AT ITAB.
SPLIT ITAB-STR AT ',' INTO ITAB1-KUNNR ITAB1-NAME1 ITAB1-ORT01
ITAB1-LAND1.
APPEND ITAB1.
ENDLOOP.
LOOP AT ITAB1.
PERFORM PROGINFO USING 'SAPMZCALLTRANSACTION' '100'.
PERFORM FLDINFO USING 'KARTHIK-KUNNR' ITAB1-KUNNR.
PERFORM FLDINFO USING 'KARTHIK-NAME1' ITAB1-NAME1.
PERFORM FLDINFO USING 'KARTHIK-ORT01' ITAB1-ORT01.
PERFORM FLDINFO USING 'KARTHIK-LAND1' ITAB1-LAND1.
CALL TRANSACTION 'ZCALLTRANS' USING JTAB.
ENDLOOP.
FORM PROGINFO USING PROGNAME SCRNUM.
CLEAR JTAB.
REFRESH JTAB.
JTAB-PROGRAM = PROGNAME.
JTAB-DYNPRO = SCRNUM.
JTAB-DYNBEGIN = 'X'.
APPEND JTAB.
ENDFORM.
FORM FLDINFO USING FLDNAME FLDVALUE.
CLEAR JTAB.
JTAB-FNAM = FLDNAME.
JTAB-FVAL = FLDVALUE.
APPEND JTAB.
ENDFORM.Save -> Activate -> Execute.
In the above code,
BDCDATA is a structure used to populate the internal table records into the screen fields. The BDCDATA structure has following components:
PROGRAM - Holds the name of MPP program where the screen is created.
DYNPRO - Holds the screen number where the internal fields to be populated.
DYNBEGIN - Used to initiate the screen when the program is executed. The default value to be specified is 'X'.
FNAM - Specifies input field name in the screen where the data is to be populated.
FVAL - Specifies from which internal table field, the data should be passed to the screen field.
'CALL TRANSACTION' statement is used to call the screen created to populate error records.
SYNTAX:
CALL TRANSACTION <Tcode> USING <BDCDATA_itab> MODE <mode> UPDATE <update>.
MODE: This is used to specify which mode to be followed when calling transaction. The types of mode are:
A - Display the screen.
E - Display only error records from the flat file.
N - Background processing.
UPDATE: This is used to specify the update task of records in the database table. The types of update tasks are:
A - Asynchronous update
S - Synchronous update
L - Local update
Advantages of CALL TRANSACTION:
Error records can be modified.
This method can be used in support projects.
Reward If Helpful
‎2008 May 02 11:46 AM
Hi,
Follow the bellow steps.
Give the t-code shdb in the command field.
Click the new recording button.
Give a name to the recording and the t-code you want to record.
E.g.:
Recording : ZMAT_UPLOAD
Transaction code : MM01
When you click save, it takes you to t-code (MM01) you would like to do recording for upload.
Record carefully. Fill in the details you want to upload. In this case I have entered the material no, industry sector, material type, material description and basic unit of measure.
Then the Transaction recorder edit recording ZMAT_UPLOAD screen is displayed. You can edit your recording or just save it and click back button.
Select your recording and click create program button.
Enter the program name say ZMAT_UPLOAD.Select the transfer from recording option. Save it.Give the program title, type as executable program and click source code button at the bottom.
The following piece of code is generated automatically.
report ZMAT_UPLOAD
no standard page heading line-size 255.
include bdcrecx1.
start-of-selection.
perform open_group.
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-MATNR'
'MYMATERIAL10'.
perform bdc_field using 'RMMG1-MBRSH'
'P'.
perform bdc_field using 'RMMG1-MTART'
'ZOH'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
'MY MATERIAL10'.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
'G'.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_transaction using 'MM01'.
Perform close_group.
From the above code it is clear that recording has been created using matnr = mymaterial10 , industry sector = p , material type = zoh , description = my material10 , basic unit of measure = g. For our case I have assumed industry sector and material type to be constant and have not included in flat file.
The colored lines in the below code are the changes made to the sap generated program , to upload our data.
Programmed by : Kavitha Bhuvaneswaran..................................
Description : program to upload new materials...........................
Technique used : BDC recording.................................................
report ZMAT_UPLOAD
no standard page heading line-size 255.
types declaration..........................................................................
types : begin of t_mat,
matnr(20),
desc(50),
uom(5),
end of t_mat.
internal table and workarea declaration.......................................
data : i_mat type table of t_mat.
data : wa_mat type t_mat.
include bdcrecx1.
start-of-selection.
moving the flat file content to internal table................................
CALL FUNCTION 'UPLOAD'
EXPORTING
FILETYPE = 'DAT'
TABLES
data_tab = i_mat
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform open_group.
loop at i_mat into wa_mat.
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-MATNR'
wa_mat-matnr.
perform bdc_field using 'RMMG1-MBRSH'
'P'.
perform bdc_field using 'RMMG1-MTART'
'ZOH'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
wa_mat-desc.
perform bdc_field using 'BDC_CURSOR'
'MARA-MEINS'.
perform bdc_field using 'MARA-MEINS'
wa_mat-uom.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_transaction using 'MM01'.
endloop.
Perform close_group.
Test the above modified program. We get a selection screen as below.
We can choose either the session or call transaction method. In our case we continue with session method. Give a name to session say ZMAT_UPLOAD and execute. Then we get the prompt as below.
Enter your flat file name and click transfer.
We get the below list.
Then go to SM35 and select your session and click process.
You can process it in any of the 3 modes as shown below.
If you are using the call transaction method you can select the run mode in the initial screen itself. (see page 5).Then we must browse for the flat file.(see page 6).
Data gets uploaded.
Disclaimer & Liability Notice
This document may discuss sample coding, which does not include official interfaces and therefore is not supported. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing of the code and methods suggested here, and anyone using these methods, is doing it under his/her own responsibility.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of the technical article, including any liability resulting from incompatibility between the content of the technical article and the materials and services offered by SAP. You agree that you will not hold SAP responsible or liable with respect to the content of the Technical Article or seek to do so.
Reward,if useful.
Thanks,
Chandu
‎2008 May 02 11:53 AM
Step 1
Execute transaction recorder, transaction SHDB or recording button via transaction SM35.
Step 2
Enter name for recording (can be anything)
Step 3
Enter transaction to be executed
Step 4
The transaction will now be executed, simply perform the actions you want to record.
Step 5
Once you have finished the recording, select the save button. Then go back a screen and go to the overview. This details the screens and fields that have been processed during the recording and will be used as a basis to create BDC ABAP program. Select the recording and click on Edit - Create Program. Give the program a Z name, and select transfer from recording. Edit the program. You will see that all the data you entered is hard-coded into the program.
Below is the sample report:
REPORT ZBDC_EXAMPLE NO STANDARD PAGE HEADING
LINE-SIZE 132.
* Data declaration
TABLES: ekko, ekpo.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekko-ebeln,
waers TYPE ekko-waers,
netpr TYPE ekpo-netpr,
err_msg(73) TYPE c,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko,
it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_error TYPE t_ekko,
it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_success TYPE t_ekko.
DATA: w_textout LIKE t100-text.
DATA: gd_update TYPE i,
gd_lines TYPE i.
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
TITLE text-002. "New NETPR value
PARAMETERS: p_newpr(14) TYPE c obligatory. "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
*START-OF-SELECTION
START-OF-SELECTION.
* Retrieve data from Purchase order table(EKKO)
SELECT ekko~ebeln ekko~waers ekpo~netpr
INTO TABLE it_ekko
FROM ekko AS ekko INNER JOIN ekpo AS ekpo
ON ekpo~ebeln EQ ekko~ebeln
WHERE ekko~ebeln IN so_ebeln AND
ekpo~ebelp EQ '10'.
*END-OF-SELECTION
END-OF-SELECTION.
* Check data has been retrieved ready for processing
DESCRIBE TABLE it_ekko LINES gd_lines.
IF gd_lines LE 0.
* Display message if no data has been retrieved
MESSAGE i003(zp) WITH 'No Records Found'(001).
LEAVE TO SCREEN 0.
ELSE.
* Update Customer master data (instalment text)
LOOP AT it_ekko INTO wa_ekko.
PERFORM bdc_update.
ENDLOOP.
* Display message confirming number of records updated
IF gd_update GT 1.
MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
ELSE.
MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
ENDIF.
* Display Success Report
* Check Success table
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
* Display result report column headings
PERFORM display_column_headings.
* Display result report
PERFORM display_report.
ENDIF.
* Display Error Report
* Check errors table
DESCRIBE TABLE it_error LINES gd_lines.
* If errors exist then display errors report
IF gd_lines GT 0.
* Display errors report
PERFORM display_error_headings.
PERFORM display_error_report.
ENDIF.
ENDIF.
*&---------------------------------------------------------------------*
*& Form DISPLAY_COLUMN_HEADINGS
*&---------------------------------------------------------------------*
* Display column headings
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records updated successfully:'(013).
WRITE:/ sy-uline(42).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(004), sy-vline,
(11) 'Old Netpr'(005), sy-vline,
(11) 'New Netpr'(006), sy-vline.
WRITE:/ sy-uline(42).
ENDFORM. " DISPLAY_COLUMN_HEADINGS
*&---------------------------------------------------------------------*
*& Form BDC_UPDATE
*&---------------------------------------------------------------------*
* Populate BDC table and call transaction ME22
*----------------------------------------------------------------------*
FORM bdc_update.
PERFORM dynpro USING:
'X' 'SAPMM06E' '0105',
' ' 'BDC_CURSOR' 'RM06E-BSTNR',
' ' 'RM06E-BSTNR' wa_ekko-ebeln,
' ' 'BDC_OKCODE' '/00', "OK code
'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'EKPO-NETPR(01)',
' ' 'EKPO-NETPR(01)' p_newpr,
' ' 'BDC_OKCODE' '=BU'. "OK code
* Call transaction to update customer instalment text
CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
MESSAGES INTO messtab.
* Check if update was succesful
IF sy-subrc EQ 0.
ADD 1 TO gd_update.
APPEND wa_ekko TO it_success.
ELSE.
* Retrieve error messages displayed during BDC update
LOOP AT messtab WHERE msgtyp = 'E'.
* Builds actual message based on info returned from Call transaction
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = messtab-msgid
msgnr = messtab-msgnr
msgv1 = messtab-msgv1
msgv2 = messtab-msgv2
msgv3 = messtab-msgv3
msgv4 = messtab-msgv4
IMPORTING
message_text_output = w_textout.
ENDLOOP.
* Build error table ready for output
wa_error = wa_ekko.
wa_error-err_msg = w_textout.
APPEND wa_error TO it_error.
CLEAR: wa_error.
ENDIF.
Clear bdc date table
CLEAR: bdc_tab.
REFRESH: bdc_tab.
ENDFORM. " BDC_UPDATE
FORM dynpro USING dynbegin name value.
IF dynbegin = 'X'.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-program,
value TO bdc_tab-dynpro,
'X' TO bdc_tab-dynbegin.
APPEND bdc_tab.
ELSE.
CLEAR bdc_tab.
MOVE: name TO bdc_tab-fnam,
value TO bdc_tab-fval.
APPEND bdc_tab.
ENDIF.
ENDFORM. " DYNPRO
&----
*& Form DISPLAY_REPORT
&----
Display Report
FORM display_report.
FORMAT COLOR COL_NORMAL.
Loop at data table
LOOP AT it_success INTO wa_success.
WRITE:/ sy-vline,
(10) wa_success-ebeln, sy-vline,
(11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
(11) p_newpr, sy-vline.
CLEAR: wa_success.
ENDLOOP.
WRITE:/ sy-uline(42).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. " DISPLAY_REPORT
&----
*& Form DISPLAY_ERROR_REPORT
&----
Display error report data
FORM display_error_report.
LOOP AT it_error INTO wa_error.
WRITE:/ sy-vline,
(10) wa_error-ebeln, sy-vline,
(11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
(73) wa_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
ENDFORM. " DISPLAY_ERROR_REPORT
&----
*& Form DISPLAY_ERROR_HEADINGS
&----
Display error report headings
FORM display_error_headings.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Purchase Order'(009), sy-vline,
(11) 'Netpr'(010), sy-vline,
(73) 'Error Message'(012), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. " DISPLAY_ERROR_HEADINGS
I hope it helps.
Best Regards,
Vibha
Please mark all the helpful answers