0% found this document useful (0 votes)
62 views3 pages

Sap Abap Q & A

The document discusses various aspects of Business Data Connector (BDC) program structure and functionality in SAP including: 1. How to convert an Excel file to an internal table format using ALSM_EXCEL_TO_INTERNAL_TABLE for use in a BDC upload. 2. Different modes for BDC uploads including front-end, show only errors, and background and different update types including asynchronous, synchronous, and task updates. 3. How to create messages and call transactions using BDCDATA, specifying mode and update parameters and passing messages to BDCMSGCOLL for display.

Uploaded by

dhivya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views3 pages

Sap Abap Q & A

The document discusses various aspects of Business Data Connector (BDC) program structure and functionality in SAP including: 1. How to convert an Excel file to an internal table format using ALSM_EXCEL_TO_INTERNAL_TABLE for use in a BDC upload. 2. Different modes for BDC uploads including front-end, show only errors, and background and different update types including asynchronous, synchronous, and task updates. 3. How to create messages and call transactions using BDCDATA, specifying mode and update parameters and passing messages to BDCMSGCOLL for display.

Uploaded by

dhivya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Structure used in BDC program:


Bdcdata
Bdcmsgcoll
2. how to get the flat file in excel format?
Through the function module "ALSM_EXCEL_TO_INTERNAL_TABLE"
3. How to declare the input help for getting flat file?
Functional module: F4_FILENAME
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME
= 'P_FILE'
IMPORTING
FILE_NAME
= P_FILE.

"f4 help for file name

FORM EXCEL_UPLOAD .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME
= P_FILE
I_BEGIN_COL
= V_BCOL
I_BEGIN_ROW
= V_BROW
I_END_COL
= V_ECOL
I_END_ROW
= V_EROW
TABLES
INTERN
= TA_EXCEL
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE
= 2
OTHERS
= 3.
ENDFORM.
" EXCEL_UPLOAD

4. Write logic to convert the excel file to SAP file format?? why we need conversion???
Usually, while we are getting the file in excel format through the function module, the table is in the
format of row, column and value.
So we need to convert them in internal table format. for that below coding is used:

Sort ta_excel by row col.


Clear wa_excel.
Clear wa_flatfile.
Loop at ta_excel into wa_excel.
Move wa_excel-col to v_index.
Assign component v_index of structure wa_flatfile to <fs>.
If sy-subrc = 0.
Move wa_excel-value to <fs>.
Endif.
At end of row.
Append wa_flatfile to ta_flatfile.
Clear wa_flatfile.
Endat.

5. How to create a message?


Through coding: MESSAGE 'XXX' TYPE 'E'.
Through message class & call message through coding:
Se91 @ create messages @ message e000 (messageclass_name)
6. Code for BDC uploads:
Call transaction 'IW32' USING BDCDATA MODE 'N' UPDATE 'S' MESSAGES INTO BDCMSGCOLL.
7. Different types of mode in BDC:
i. front end - A
ii. show only errors -E
iii. Background-N
8. Different type of Update in BDC-call transaction:
i. Asynchronous update - A(default)
ii. Synchronous update - S
iii. Task update - L

9. How to display error messages in bdc upload?


While doing BDC, pass all the messages into bdcmsgcoll and format the messages using function module
'FORMAT MESSAGE' & Display using write statement.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy