Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2878

Re: upload data from EXCEL sheet inot Z Table

$
0
0

Hi Yaso.

 

nice to hear that ..

 

code snippet :

 

DATA : IT TYPE TABLE OF ALSMEX_TABLINE,

              WA LIKE LINE OF IT.

CALL FUNCTION  'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

FILENAME = 'C:\DESKTOP'.      <--- YOUR FILE PATH.

I_BEGIN_COL = P_BC               <--PARAMETER P_BC TYPE I

I_BEGIN_ROW = P_BR              <-- //

I_END_COL = P_EC                    <-- //

I_END_ROW = P_ER                   <-- //

 

TABLES

INTERN = IT.

 

LOOP AT IT INTO WA.

IF WA-COL = '0001'.

     WA_T001-BUKRS = WA-VALUE.  <---your 1 column of ur excel/table field

ELSEIF WA-COL = '0002'.

         WA_T001-BUTXT = WA-VALUE.     <---your 2 column of ur excel/table field

ELSEIF WA-COL = '0003'.

          WA_T001-ORT01 = WA-VALUE.   <---your 3 column of ur excel/table field

ENDIF.

AT END OF ROW.

APPEND WA_T001   T0    IT_T001.

ENDAT.

ENDLOOOP.

 

LOOP AT IT_T001 INTO WA_T001.

then here you have to insert the data from ur internal table to ztable..

 

i hope this helps..

please reward if useful.

 

regards

santosh


Viewing all articles
Browse latest Browse all 2878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>