Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

create record for condition table via upload file tcode vk14/ SD

former_member445510
Active Participant
0 Likes
3,838

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.


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.


17 REPLIES 17
Read only

former_member445510
Active Participant
0 Likes
3,696

Hello,

no one has idea about my question?

Read only

0 Likes
3,696

Go for BDC .

Record the Data with one set of data and right the program.

Read only

0 Likes
3,695

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.

Read only

0 Likes
3,695

Give Program Name

and select Transfer from Recording

Read only

0 Likes
3,695

But i need to do that from excel or text File.

Is that the same ?

Read only

0 Likes
3,695

Yes first record the data and you can upload data using excel file or tab delimited text file

Read only

0 Likes
3,695

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:

KSCHLKOTABNRVKORGVTWEGMATKLZZTRANSPORTMWSK1
ZMWS558BE2211GOOD_FERT_1AA
ZMWS558BE221105GOOD_FERT_1AK
ZMWS558BE221105GOOD_FERT_1AN
ZMWS558BE221105GOOD_FERT_1A0

Do you know the next step, I'm new here ...

Thank u.

Read only

0 Likes
3,695

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.

Read only

0 Likes
3,695

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

Read only

0 Likes
3,693

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.

Read only

0 Likes
3,693

2- question 2 i resolved by choosing text format.

For the first question, do you have any idea ?

Read only

0 Likes
3,693

Hi,

In the report section screen you can put the values as below.

Read only

0 Likes
3,692

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.

Read only

0 Likes
3,692

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.

Read only

0 Likes
3,692

Use application  server

Read only

0 Likes
3,691

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 ?

Read only

0 Likes
3,691

no idea.??.