How to upload data useing BDC
hI SAP Guru's
here i have to upload non-sap data to sap , in the controling how to MAP the fileds and which T.code have use to please guide me
Dear Purna,
You would first need to identify the transaction for which you want to upload the data. For example KE51 to Create Profit Center. You could use BDC or BAPI methods. You can use LSMW tool as well.
you would need to map SAP fields with the corresponding legacy field. You would prepare a layout for the legacy file and accordingly design BDC.
Steps:
1. Fetch Data (Download/Read Dataset/Select from Tables)
3. Massage data as per SAP format.
3. Validation Check
4. Pass valid data to BDC (Call Transaction/Session) or BAPI
5. In case of session method - session log is generated. In case of Call transaction you can use an internal table with structure BDCMSGCOLL to get messages. In case of BAPI the messages will be returned in return table (strcutre BAPIRET2/BAPIRETTAB).
Hope this will help.
Regards,
Naveen.
Similar Messages
-
In RFC how to uploading data using bdc
Hi, Experts
In RFC how to use bdc program for uploading data
any example plz.
my requrement for tcode ME21.
thank you in advance.
with best regards
saiThank u reply
my requirement is in function moudle
( Program will be called from non-sap system with the data in the form of table as per the structure given above. Then the program will do the some validation for the data. If data validated correct, BDC will be run for creating DO
condition is )
ex:
if T_itab KNTTP = K,
Run BDC for transaction ME21.
( in that you should not use upload and ws_upload )
in put paramer is taking value for structure (non- sap ) run the bdc update in sap system.
plz any sample program
regards
sai -
Hi Expert,
How to upload data using BDC. I have uploaded using LSMW....now want to know how to upload data using BDCHI
Ask your Abapper.
First you have to record in SHDB. then you have to generate the program and write the code in SE38
For more details please make a search
regards
Prashanth -
UPload data useing BDC for cost element allocation
Hi ALL,
i have to upload data useing BDC , have to upload data for cost centre accloction table ,What is the T.code and how to do it, i have knows LSMW,
very useful for me
Advance Thanks
NarraUsing BDC means...use theTCODE: SHDB + ABAPer help, it requires program need to create for this....you can have options in BDC is...u can test the data validity before you upload the data
VVR -
Can anyone list problems/errors when uploading data using BDC's and BAPI's?
Can anyone list the problems/errors when uploading data using BDC's and BAPI's?
Hi,
If you are actually creating a BDC to load data pls be more specific.
Data format incorrect. Tab delimited/ etc
Dates in wrong formats
Currency incorrect formats
Missing screens
Wrong transaction code
File not found,
Missing Mandatory fields,
Screen resoultion.
You should always use refresh for your Bdcdata table.
Loop at internal table.
refresh Bdcdata.
regards,
sowjanya. -
Difference between uploading data using BDC,CATT
Dear experts,
what is the difference between uploading the data using BDC and CATT tool?
is it only the coding or something else.
and can you explain the situations where we prefer to upload the data using CATT tool.
thanks in advance.Check this thread -
Differences between BDC , LSMW, BAPI,CATT
Regards,
Amit -
Flat file to upload data using BDC for transaction MM01
Hi
I am trying to update data using bdc code has been attached below using a txt file.
It is updating the first set of data into the table mara ,but for the rest it is not
All the data from txt file has being loaded to internal table , but the problem is it does not gets updated from internal table to the database .
Only the first set of data has been loaded ,<u><b> rest of the data is not loaded</b></u>
<u><b>content of txt file</b></u>
zsc zsc kg
zsv zsv kg
zsb zsb kg
<u><b>Actual code</b></u>
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.Hi Sumant,
just concentrate on bold one
report ZMAT_UPLOAD
no standard page heading line-size 255.
types declaration..........................................................................
<b>
data : begin of t_mat occurs 0,
matnr(20),
desc(50),
uom(5),
end of t_mat.</b>
internal table and workarea declaration.......................................
<b>*data : i_mat type table of t_mat.
*data : wa_mat type t_mat.</b>
include bdcrecx1.
start-of-selection.
moving the flat file content to internal table................................
CALL FUNCTION 'UPLOAD'
EXPORTING
FILETYPE = 'DAT'
TABLES
<b>data_tab = i_mat.---> t_mat.</b>
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.
<b>loop at i_mat into wa_mat.------>loop at t_mat.</b>
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'
<b>wa_mat-matnr.---->t_mat-matnr(change in this for ur wa to t_mat.</b>
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.
Reward points for helpful answers.
Thanks
Naveen khan
Message was edited by:
Pattan Naveen
Message was edited by:
Pattan Naveen -
How to upload data using SXDA Transaction
HI,
Can any one explain step by step procedure to upload data using SXDA transaction.
I have already uploaded to txt file in Application server.
I have created a project and entered into the sub-project wizard and selected the object type as BKPF and then pressed continue, then i enter into task tab....
There i see convert data , Check file,File split,load data,
In convert data i have selected the program name as RFBIBL00.
In check file i have selected the file type as Physical file and selected the file name from F4 button.
I am fasing the probelm in load data ....
Can any one please explain how to proceed further..Hi Yogesh,
Use this function module
ALSM_EXCEL_TO_INTERNAL_TABLE to upload the excel sheet data into internal table.
Then from the internal table data use KE13 transaction to upload data.
Regards
Arun -
How to upload data using utl_file when you dont know the exact file name
Hi
i want to upload data from a flat file to a table.
i dont know the exact file name. i want to make a search for filename. like i want to make a search on file (say test*) which will give me all the files with test.
i want to upload data using these files.
how can i do this by using UTL_FILE.
Regards
ManishThank you very much.
Thing is previously we are using sqlloader and shell script for loading the data.
now i am creating a procedure (if possible without parameters).
Is there any other way i can do that.
can i make a wild card search using utl_file.
Thanks n Regards
Manish -
How to upload data using idoc in lsmw
plz let me know how to upload material using idoc using lsmw. urgent
Hi Vrishali,
refer to the link below:
http://www.****************/Tutorials/LSMW/IDocMethod/IDocMethod1.htm
Hope this helps.
Reward if helpful.
Regards,
Sipra -
Is it possible upload data using BDC for creation of Quotation
Dear All ,
Scenario is such that details in teh quotaion is entered in three steps by three departments, weh ave planned that all three departments would work on single excel sheet enter the details over there and when it is ready we will create quotaion by uploading it through BDC,
First of all is it possible to upload the data in quotaion through BDC , Kindly suggest
Regards
SunainaHi Sunaina,
Yes its possible to load the data through BDC.
But I would suggest to go for BAPI instead of BDC.
BAPI_QUOTATION_CREATEFROMDATA Or BAPI_SALESDOCU_CREATEFROMDATA can be used to create a quotation .
Regs.
Sai -
Problem during uploading data Using BDC
While I'm trying to upload data for T.Code J1IS using BDC, Value for the field Net.***.value ( J_1IASSVAL-J_1IVALNDP) is not getting populated on the screen.
Pls help.Hi,
This is a Currency Field so you need to pass this to a Char field first and then pass to BDCTAB-FVAL.
" This is a common problem with BDC with other data types even with Date and Quantity and Numeric types
Please note while passing values to BDCTAB all the values should be passed in CHAR form only
Cheerz
Ram. -
How to upload Data using Transaction 'KE13'
Hi friends ,
please explain how to upload excel file data using transaction code 'KE13'.
HOW TO CREATE Excel pleaseexplain.
Regards,
YogeshHi Yogesh,
Use this function module
ALSM_EXCEL_TO_INTERNAL_TABLE to upload the excel sheet data into internal table.
Then from the internal table data use KE13 transaction to upload data.
Regards
Arun -
How to upload data using CATT ?
These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.
I KNOW ONLY THIS ABOUT CATT but i wanna complete in details with an example. its better if anyone can further explain in detail with examplehi,
1) Start tcode SCAT
2) Give the test case name and create
3) Give title, component then save and come back
4) Select the test case and go to change mode
5) Start record and provide the tcode to be recorded
1st button is for normal record (button with arrow key)
2nd button is for remote (to record in remote server of our landscape)
Give all the mandatory fields in the transaction without errors and without using f4 and f1 just like recording
After entering entire data click save button
Then click end recording
Then double click on the test case TCD
Then double click on the first report (SAPMF02D)
It will open the recorded transaction code
Import all the fields which we are going to provide in flatfile
There should not be any default values in the fields after importing
Click on next screen button
Same way import for all screens
Finally it should come to the below screen
Then go back and click save then go to GOTO -> VARIANTS -> EXPORT DEFAULT
Then give the path to be transferred in our local sys and transfer as excel file (save with .xls type)
Then open the excel file
Select 1st 2 columns right click and delete
It should contain only the field headings and description as shown in the below excel snapshot
Leave one empty line and enter our records from 4th row onwards
Enter all the records and save the excel file
Then execute our test case
Then select the type of mode (foreground/background) and variants from external file
Select our excel file and then execute (click remote execution if its a remote server)
Finally check the data is uploaded or not
END
gIVE ME YOUR MAILid so tha i can fwd the atachment to you
Regards, -
How to upload datas in excel sheet through BDC
Hi,
I know how to upload datas in Text format through BDC...Suppose even when datas are in .xls format,I saved that file as Text(tab delimited) format...then file become text format and it can be easily uploaded....
So, I want to know How to upload datas in excel sheet through BDChi,
try this Example, hope useful to u, assign me point.
report ZMSV1_BDC_CALL
no standard page heading line-size 255.
*include bdcrecx1.
*parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: BUKRS
BUKRS_001(004),
data element: KTOKK
KTOKK_002(004),
data element: NAME1_GP
NAME1_003(035),
data element: SORTL
SORTL_004(010),
data element: ORT01_GP
ORT01_005(035),
data element: LAND1_GP
LAND1_006(003),
data element: SPRAS
SPRAS_007(002),
data element: BANKS
BANKS_01_008(003),
data element: BANKK
BANKL_01_009(015),
data element: BANKN
BANKN_01_010(018),
end of record.
End generated data section ***
data: itab like record occurs 0 .
data: it_bdc type bdcdata occurs 0 with header line.
data: it_msg type bdcmsgcoll occurs 0 with header line.
parameter p_file type rlgrap-filename default 'c:\vendor.txt' obligatory
start-of-selection.
perform open_dataset using p_file.
perform open_group.
*perform close_group.
*perform close_dataset using dataset.
*& Form open_dataset
text
-->P_P_FILE text
form open_dataset using p_p_file.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = p_file
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " open_dataset
*& Form open_group
text
--> p1 text
<-- p2 text
form open_group .
loop at itab into record.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-BUKRS'
record-BUKRS_001.
perform bdc_field using 'RF02K-KTOKK'
record-KTOKK_002.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-ORT01'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
record-NAME1_003.
perform bdc_field using 'LFA1-SORTL'
record-SORTL_004.
perform bdc_field using 'LFA1-ORT01'
record-ORT01_005.
perform bdc_field using 'LFA1-LAND1'
record-LAND1_006.
perform bdc_field using 'LFA1-SPRAS'
record-SPRAS_007.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-KOINH(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'LFBK-BANKS(01)'
record-BANKS_01_008.
perform bdc_field using 'LFBK-BANKL(01)'
record-BANKL_01_009.
perform bdc_field using 'LFBK-BANKN(01)'
record-BANKN_01_010.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0215'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0220'.
perform bdc_field using 'BDC_CURSOR'
'LFB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
call transaction 'FK01' using it_bdc mode 'A' update 'S'
messages into it_msg.
write:/ sy-subrc.
perform message_formatwrite.
refresh it_bdc.
clear it_bdc.
endloop.
endform. " open_group
*& Form message_formatwrite
text
--> p1 text
<-- p2 text
form message_formatwrite .
data:l_msg(10).
loop at it_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = sy-langu
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = l_msg
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endloop.
endform. " message_formatwrite
*& Form bdc_dynpro
text
-->P_0112 text
-->P_0113 text
form bdc_dynpro using value(p_0112)
value(p_0113).
it_bdc-program = p_0112.
it_bdc-dynpro = p_0113.
it_bdc-dynbegin = 'X'.
append it_bdc.
clear it_bdc.
endform. " bdc_dynpro
*& Form bdc_field
text
-->P_0117 text
-->P_0118 text
form bdc_field using value(p_0117)
value(p_0118).
it_bdc-fnam = p_0117.
it_bdc-fval = p_0118.
append it_bdc.
clear it_bdc.
endform. " bdc_field
Regards
fareedas
Maybe you are looking for
-
I just tried to install the iTunes update 11.4.1 and keep getting error messages. I have never had this issue before over many years of using iTunes and getting updates to the software. I have removed the iTunes from my computer and reinstalled it
-
How do I process a large number of rows using ADO?
I need to iterate through a table with about 12 million records and process each row individually. The project I'm doing cannot be resolved with a simple UPDATE statement. My concern is that when I perform the initial query that so much data will
-
Error in Assignment of Text Elements of Report to Transport
Hi All, I have transported few reports to Quality system however the texts elements associated with those reports have not transported to Quality system . Now I am trying to assign these text elements to new Transport however I am getting error while
-
Gettting rid of the bookmarks section under url bar??
hey guys i want to keep all my bookmarks, but only access them buy going to the bookmarks tab at the very top of the computer screen (in between history and window) under the url and google bar and refresh button there is that whole bar with the quic
-
How to run java progarm like jbuilder in windows
hi, I had writed a java program with JBuilder6. After i deploy it, I can only run it in the DOS window using command line in the windows OS, and when it is running , there is always a DOS window opened. JBuilder6 is a pure java program, but when it i