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
Narra
Using 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
Similar Messages
-
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 -
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 -
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. -
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 -
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 -
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 -
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. -
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 meDear 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. -
Problem when recording the data using BDC for Tcode CJ02.
Dear Experts,
When i am trying to record the data for TCODE : CJ02 i need to enter the project Definition and enter the WBS element it takes me to the screen then i should select the WBS element and attach a file for that selected WBS element . The option for me to attach the attachment of file will be available on the application area(Services for the Object).
Now the problem when i try to do recording in SHDB this option like create attachement is not visible in the recodring . Kindly suggest me what can i do such that i attach the file for the particular project def and WBS element.
Either suggest any function module or other procedure .......
Regards,
Sana.Hi,
in BDC each and every action is recording. If your press enter in same screen that also recorded once aging may be this is your case repeating field values will appear. we can solve the problem for repeat fields like below.
suppose in your excel having repeated field X1 X2 X3 the X2 contains repeated field X3 means delete the X3 field.
Now In your itab having X1 and X2 fields. While in the LOOP the ITAB pass the X2 field to repeated the fields.
LOOP at ITAB to WA.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'RM08M-EBELN'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." 1st time pass the X2 fields
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." pass the same value to repeated field
APPEND bdcdata_wa TO bdcdata_tab.
Endloop.
Hope you can understand.
Regards,
Dhina.. -
Upload data using bapi for migo
dear all,
i 'm faching froblem with migo
my requriment is : if u give one PO,is the input. under one PO we have a 1....N Bom s under one BOM we have a 1...N line items OK but quenty field was chaning accourding to our requriment. we need FOR BOM QNTY and LINE ITEM QNTY was chnging how it is possible or not please give me possiblites to me
i will be waiting for reply.
regards
eswarIssue is Fixed!
-
Problem with uploading data from excel using BDC for tcode f-02
Hi All,
I am uploading data from excel using BDC for tcode f-02. The problem here is, while recording, the values of some fields are recording twice. I dont know why it's happening so. But if I run my abap program, I have to give those fields twice in my excel sheet. Otherwise data does not upload. But it is not the feasible way. We must give those fields once in excel. Please tell me, how I can solve the issue.
With regards,
Rosaline.Hi,
in BDC each and every action is recording. If your press enter in same screen that also recorded once aging may be this is your case repeating field values will appear. we can solve the problem for repeat fields like below.
suppose in your excel having repeated field X1 X2 X3 the X2 contains repeated field X3 means delete the X3 field.
Now In your itab having X1 and X2 fields. While in the LOOP the ITAB pass the X2 field to repeated the fields.
LOOP at ITAB to WA.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'RM08M-EBELN'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." 1st time pass the X2 fields
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." pass the same value to repeated field
APPEND bdcdata_wa TO bdcdata_tab.
Endloop.
Hope you can understand.
Regards,
Dhina.. -
Upload data into bdc throu word files for this which fm use
upload data through bdc from word file which function module use.
insert new field into standard table. can we create it using append structure.
-
For transaction code MD61, I want to upload data using BAPI
Hi,
for transaction code MD61, I want to upload data using BAPI.
Which BAPi I ll call ?
Can anyone suggest me how to do it with any simple example program ?Refer the thread for details about coding-
BAPI_REQUIREMENTS_CREATE
Reards,
Amit -
Which method is easiest for uploading data using LSMW?
which method is easiest for uploading data using LSMW (Direct method or batch input method) bcs I am facing lot of problem using batch input method while recording.Even I cannot use direct method using standard program.can anyone tell me some other easiest way for uploading MM01.?
I personally used the direct input way 6 years ago and it was a little bit of a struggle cause I was very new to SAP at the time. But it worked out to be ok in the end. You just have to keep messing with it till the errors are clear and then you can upload for real. The test mode is a nice touch, you can get rid of all of the errors before actually uploading the data.
Regards,
Rich Heilman
Maybe you are looking for
-
It could cover the features or technical aspects of Cisco Jabber
-
Bridge CS6 Crashes each time I'm trying to open a file
When in browse mode in Bridge CS6, I double click on any file type and Bridge crashes. When working in mini bridge in Photoshop all works well. Any workaround for this problem? Thanks, Yaron
-
Touch ID - Biometric reader with problems and no solutions
I have an Iphone 5s Model 1457, after upgraded to iOS version 7.1.2 the biometric reader stopped working. I upgraded to IOS 8.0.2 and continues in the same situation. Already reset all settings and not solved. What should I do? Does the apple can sol
-
WIndow scrolling and refresh issues.
I am having problems with intermittent window scrolling and refreshing. I noticed it first in Safari but I have confirmed it is happening in other applications as well. Typically I have no problems with window scrolling and refreshing. At times howev
-
Formulas aren't calculating immediately
I have created my first form and everything seems to be working okay except for one of my formulas. I have essentially created a sales order and need it to calculate the subtotal, apply a user-supplied discount and then calculate tax and come up wit