2013 Nov 13 1:32 PM
Hello Every one,
i create manually a records for the my created condition table Axxx via tcode vk14/ vk11.
I want to create those records for my condition table via uploading file(XML or EXCEL or TEXT..) and not manually.
Example of my file :
| ShipFrom | ShipTo | CustomerCountry | TaxCode |
| BE | FR | BE | A1 |
| BE | BE | BE | A0 |
| BE | CH | BE | A2 |
There is no ABAP code/prog to create for example a upload input, when i select my upload file, i click on execute, and than i find my condition table(s) axxx filled in with data, like we doing via vk11 / 14?
Hope my question is clear ... Thanks for your help.
Yes first record the data and you can upload data using excel file or tab delimited text file
2013 Nov 14 8:40 AM
2013 Nov 14 8:52 AM
Go for BDC .
Record the Data with one set of data and right the program.
2013 Nov 14 1:03 PM
Thank u Hanumanth for you reply.
When i create a program via SHDB, i receive the flowing screen:
I have text file en xls file, but i don't know how to upload my file?
Wish extension i have to use? txt or xls ?
Where can i make my locale file? in C:/.... ?
Do you have any idea ?
Thank u.
2013 Nov 14 1:24 PM
2013 Nov 14 1:30 PM
But i need to do that from excel or text File.
Is that the same ?
2013 Nov 14 1:44 PM
Yes first record the data and you can upload data using excel file or tab delimited text file
2013 Nov 14 1:51 PM
ok good.
This is my received code:
report ZZ_RECORD_UPLOAD
no standard page heading line-size 255.
include bdcrecx1.
start-of-selection.
perform open_group.
perform bdc_dynpro using 'SAPMV13A' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RV13A-KOTABNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RV13A-KSCHL'
'zmws'.
perform bdc_field using 'RV13A-KOTABNR'
'558'.
perform bdc_dynpro using 'SAPMV13A' '1558'.
perform bdc_field using 'BDC_CURSOR'
'KOMG-ZZTRANSPORT(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KOMG-VKORG'
'BE22'.
perform bdc_field using 'KOMG-VTWEG'
'01'.
perform bdc_field using 'KOMG-MATKL'
'00105'.
perform bdc_field using 'KOMG-ZZTRANSPORT(01)'
'GOOD_FERT_1'.
perform bdc_dynpro using 'SAPMV13A' '1558'.
perform bdc_field using 'BDC_CURSOR'
'KONP-MWSK1(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KONP-MWSK1(01)'
'AK'.
perform bdc_dynpro using 'SAPMV13A' '1558'.
perform bdc_field using 'BDC_CURSOR'
'KOMG-ZZTRANSPORT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_transaction using 'VK15'.
perform close_group.
****************************************************************************
And this is my file data:
| KSCHL | KOTABNR | VKORG | VTWEG | MATKL | ZZTRANSPORT | MWSK1 |
| ZMWS | 558 | BE22 | 1 | 1 | GOOD_FERT_1 | AA |
| ZMWS | 558 | BE22 | 1 | 105 | GOOD_FERT_1 | AK |
| ZMWS | 558 | BE22 | 1 | 105 | GOOD_FERT_1 | AN |
| ZMWS | 558 | BE22 | 1 | 105 | GOOD_FERT_1 | A0 |
Do you know the next step, I'm new here ...
Thank u.
2013 Nov 14 3:36 PM
I created this program, it's woks but i have to click on enter every time to create a records.
There is no anther way to upload this file without every doing this enter?
because i have more data.
thanks.
2013 Nov 15 5:25 AM
Dear Roukbi,
Do below steps.
1. Get data from Excel file to internal Table using 'TEXT_CONVERT_XLS_TO_SAP'
2. Now loop this internal table with the above code.
3. collect the erros in BDCmsgcoll
2013 Nov 15 9:18 AM
Hi Hanumanth,
It's works but not 100 %.
I have to small problems:
1- i want to upload the excel file without clicking every time on enter?
2- in Excel the numbers entered (like Distr. Channel) are 01 for example, but when i upload i find 1 instead 01.
example of my excel file:
ZMWS 558 BE22 01 00105 GOOD_FERT_1 AA
ZMWS 558 BE22 01 02004 GOOD_FERT_1 AK
ZMWS 558 BE22 01 02004 GOOD_FERT_1 AN
ZMWS 558 BE22 01 02004 GOOD_FERT_1 A0
i deed it with cell format:
any idea ?
Thank u very mach.
2013 Nov 15 9:28 AM
2- question 2 i resolved by choosing text format.
For the first question, do you have any idea ?
2013 Nov 15 9:42 AM
Hi,
In the report section screen you can put the values as below.
2013 Nov 15 9:46 AM
Thank u for replaying.
Is that for my first question? (1- i want to upload the excel file without clicking every time on enter? )
this is my first output screen.
2013 Nov 15 10:11 AM
Hi,
In this case you have to place all your files in application server(AL11) directory and run the program in back ground.
Thanks,
Kiran.
2013 Nov 15 10:58 AM
2013 Nov 15 2:19 PM
I convert my xls file to csv :
i deed in ABAP code the following:
DATA: filename type string,
wa_string TYPE string.
filename = 'D:\usr\sap\put\record_vk15_conv.csv'.
open dataset filename for output in text mode encoding default.
DO.
read DATASET filename INTO wa_string.
ENDDO.
CLOSE DATASET filename.
Here i transfer no data, wish code can i add to transfer data to server ?
2013 Nov 15 3:34 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |