Regarding Uploading of internal Table - Its Urgent.
Hi All,
I want to upload the data from an Excel File into Interna Table.
GUI_UPLOAD is used for Flat File but for Excel Which FM should I use?
Can Any One give me the sample code for this ?
Points will be rewarded.
Thanks in Advance.
Regards
Jitendra Gujarathi
hi
REPORT zupload_excel_to_it NO STANDARD PAGE HEADING.
TYPES: BEGIN OF t_datatab ,
col1(25) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
col4(30) TYPE c,
col5(30) TYPE c,
col6(30) TYPE c,
col7(30) TYPE c,
col8(30) TYPE c,
col9(30) TYPE c,
col10(30) TYPE c,
col11(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
wa_datatab TYPE t_datatab.
DATA : gd_scol TYPE i VALUE '1',
gd_srow TYPE i VALUE '1',
gd_ecol TYPE i VALUE '256',
gd_erow TYPE i VALUE '65536'.
DATA: it_tab TYPE filetable,
gd_subrc TYPE i.
*Selection screen definition
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename
DEFAULT 'c:\test.xls' OBLIGATORY. " File Name
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
REFRESH: it_tab.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = '*.xls'
multiselection = ' '
CHANGING
file_table = it_tab
rc = gd_subrc.
LOOP AT it_tab INTO p_file.
so_fpath-sign = 'I'.
so_fpath-option = 'EQ'.
append so_fpath.
ENDLOOP.
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM upload_excel_file TABLES it_datatab
USING p_file
gd_scol
gd_srow
gd_ecol
gd_erow.
END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3,
wa_datatab-col4,
wa_datatab-col5,
wa_datatab-col6,
wa_datatab-col7,
wa_datatab-col8,
wa_datatab-col9,
wa_datatab-col10,
wa_datatab-col11.
ENDLOOP.
*& Form UPLOAD_EXCEL_FILE
upload excel spreadsheet into internal table
-->P_TABLE Table to return excel data into
-->P_FILE file name and path
-->P_SCOL start column
-->P_SROW start row
-->P_ECOL end column
-->P_EROW end row
FORM upload_excel_file TABLES p_table
USING p_file
p_scol
p_srow
p_ecol
p_erow.
DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
Has the following format:
Row number | Colum Number | Value
i.e. 1 1 Name1
2 1 Joe
DATA : ld_index TYPE i.
FIELD-SYMBOLS : .
Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = p_scol
i_begin_row = p_srow
i_end_col = p_ecol
i_end_row = p_erow
TABLES
intern = lt_intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'Error Uploading file'.
EXIT.
ENDIF.
IF lt_intern[] IS INITIAL.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'No Data Uploaded'.
EXIT.
ELSE.
SORT lt_intern BY row col.
LOOP AT lt_intern.
MOVE lt_intern-col TO ld_index.
ASSIGN COMPONENT ld_index OF STRUCTURE p_table TO <fs>.
MOVE lt_intern-value TO .
AT END OF row.
APPEND p_table.
CLEAR p_table.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. "UPLOAD_EXCEL_FILE
plz reward points!
rgds
Similar Messages
-
Delete duplicate entriess from the internal table its urgent pls help.
Hi friends,
Hope everybody is doing good,Here is m query on delete duplicate data from the intenal table.
I have an internal table which contain data in the following format.
Doc No Comp Cod Vendor Assignment
1500000009 JM11 00000000
1500000008 JM11 20070212(Repeating)
1500000007 JM11 20070212
1500000006 JM11 00000000
1500000005 JM11 00000000
1500000004 JM11 00000000(Repeating)
1500000003 JM11 00000000 (Repeating)
1500000002 JM11 00000000
1500000001 JM11 20050302
1500000000 JM11 00000000
1500000003 JM11 10000088
1500000001 JM11 10000088
1500000030 JM11 10006260
1500000010 JM11 10006269
1500000008 JM11 10006269
1500000006 JM11 10006269
1500000004 JM11 10006269
if you see the document numbers,there are some document number which are repeating here,there are some document numer which contain vendor number but not the assignments,some of the document numbers contain the assignments but not the vendors.
If my internal table contain this kind of data with repeted document numbers than i want the document number which contains only the vendor number.
Pls help me with the appropriate logic,its urgent.
Thanks a lot
mrutyun^Hi,
<u><b>Deleting Adjacent Duplicate Entries</b></u>
To delete adjacent duplicate entries use the following statement:
DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>
[COMPARING <f1> <f2> ...
|ALL FIELDS].
The system deletes all adjacent duplicate entries from the internal table <itab>. Entries are
duplicate if they fulfill one of the following compare criteria:
Without the COMPARING addition, the contents of the key fields of the table must be
identical in both lines.
If you use the addition COMPARING <f1> <f2> ... the contents of the specified fields <f1>
<f2> ... must be identical in both lines. You can also specify a field <fi> dynamically as
the contents of a field <ni> in the form (<ni>). If <ni> is empty when the statement is
executed, it is ignored. You can restrict the search to partial fields by
specifying offset and length.
If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines
must be identical.
You can use this statement to delete all duplicate entries from an internal table if the table is
sorted by the specified compare criterion.
If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4.
Examples
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
INSERT LINE INTO TABLE ITAB.
ENDDO.
LINE-COL1 = 1.
DELETE TABLE ITAB: FROM LINE,
WITH TABLE KEY COL1 = 3.
LOOP AT ITAB INTO LINE.
WRITE: / LINE-COL1, LINE-COL2.
ENDLOOP.
The output is:
2 4
4 16
The program fills a hashed table with a list of square numbers. The DELETE
statement delete the lines from the table where the key field COL1 has the contents 1 or 3.
Regards,
Bhaskar -
FM to upload the Internal table data into application server.
Hi,
Could you please give me Function module to Upload the Internal table data into Application server ie., in Tcode AL11.
I know for downloading the Application server file into itab is "SUBST_GET_FILE_LIST" FM and using open dtaa set we get the data.
Regards,
deepthi.Hi Deepthi
Incase you are looking to upload data in the AL11 through a program , then you can make use of OPEN DATASET...CLOSE DATASET statements.
Here's the code snippet:
IF tb_alvdisplay[] IS INITIAL.
MESSAGE e999(/dcsea/zais_msg) WITH text-e01.
ELSE.
IF NOT cb_ufile IS INITIAL "Download to file
AND sy-pagno = 0. "Only down page headers for first page
PERFORM fm_concatenate_path_name USING p_path
p_file
CHANGING v_file.
*Open file for download.
PERFORM fm_open_file USING v_file .
ENDIF.
LOOP AT tb_alvdisplay.
IF NOT cb_ufile IS INITIAL.
*Passing the values of the respective headings to the structure.
ws_rec-vend_no = tb_alvdisplay-vendno.
ws_rec-vend_nm = tb_alvdisplay-vendnm.
ws_rec-title = tb_alvdisplay-vendtl.
ws_rec-add = tb_alvdisplay-add.
ws_rec-city1 = tb_alvdisplay-city1.
ws_rec-region = tb_alvdisplay-region.
ws_rec-country = tb_alvdisplay-country.
ws_rec-pobox = tb_alvdisplay-po.
ws_rec-phone = tb_alvdisplay-telf1.
ws_rec-extn = tb_alvdisplay-extn.
ws_rec-fax = tb_alvdisplay-telfx.
ws_rec-zterm = tb_alvdisplay-zterm.
ws_rec-remark = tb_alvdisplay-remark.
ws_rec-email = tb_alvdisplay-email.
*Passing the separator 'PIPE' to the structure.
ws_rec-sep01 = co_sep.
ws_rec-sep02 = co_sep.
ws_rec-sep03 = co_sep.
ws_rec-sep04 = co_sep.
ws_rec-sep05 = co_sep.
ws_rec-sep06 = co_sep.
ws_rec-sep07 = co_sep.
ws_rec-sep08 = co_sep.
ws_rec-sep09 = co_sep.
ws_rec-sep10 = co_sep.
ws_rec-sep11 = co_sep.
ws_rec-sep12 = co_sep.
ws_rec-sep13 = co_sep.
TRANSFER ws_rec TO v_file.
ENDIF.
AT LAST.
IF NOT cb_ufile IS INITIAL.
*Closing the DATASET file.
CLOSE DATASET v_file.
IF sy-subrc <> 0.
*Failure Message.
MESSAGE e999(/dcsea/zais_msg) WITH text-t04 text-t06.
ELSE.
*Success message.
MESSAGE s999(/dcsea/zais_msg) WITH text-t05.
ENDIF.
ENDIF.
ENDAT.
ENDLOOP.
ENDIF.
Also as Gautham suggested you can use tcode CG3Z or CG3Y incase you are looking to upload the data directly.
FInally, you can search SCN using the keywords, "Upload to AL11" and you'll get loads of results.
Hope this helps.
Harsh -
how to upload two internal tables at a time using standard class methods in to
internal tables. help requiredAre three tables are of same type ?
-
Excel upload to internal table in 3.1i system?
Hi all,
I have 5 fields each varying 5-20 chars length. How to upload the excel from desktop to internal table in 3.1 system.
Thanks,
Krishiii
you can use following FM
*Upload data from Excel to internal table.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_pfile
i_begin_col = 1
i_begin_row = 2
i_end_col = 13
i_end_row = 8
TABLES
intern = it_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Populate data to internal tables and structructures
SORT it_excel BY row col.
LOOP AT it_excel INTO ls_excel.
CASE ls_excel-col.
WHEN 1.
ls_data-documentnumber = ls_excel-value.
WHEN 2.
ls_data-documenttype = ls_excel-value.
WHEN 3.
ls_data-documentpart = ls_excel-value.
WHEN 4.
ls_data-documentversion = ls_excel-value.
WHEN 5.
ls_data-wsapplication1 = ls_excel-value.
WHEN 6.
ls_data-datacarrier1 = ls_excel-value.
WHEN 7.
ls_data-docfile1 = ls_excel-value.
WHEN 8.
ls_data-matnr = ls_excel-value.
ENDCASE.
regards
twinkal -
Read Application server file and upload into internal table
Another help needed guys,
My file in the application server is of format
Name Marks 1 Marks 2 Marks 3............
A 10 15 20
The only thing separating the columns is space.
Actually this file was downloaded from an internal table into the app server.
Now I want to load it back into the internal table.
How do I load this into internal table so that each column goes in separate internal table field.
Currently am using cl_abap_char_utilities=>HORIZONTAL_TAB but I can get only the first column name in my field1 of the internal table.
How should I applroach this?
Points will be awarded for useful answers.
Regards
AnkitHi ankit,
i think u have uploaded the tab delimited file in the application sever.
then suppose see if u r file is in the format of name#marks1#marks2#marks3.
then in the program u do like this..
first declare one internal table with one filed.
data:
c_hextab(1) TYPE x VALUE '09'.
data:
begin of t_data occurs 0,
line(256) type c,
endof t_data.
and declare one more intternal table
data:
begin of t_itab occurs 0,
name(15) type c,
marks1(4) type c,
marks2(4) type c,
marks3(4) type c,
endof t_itab.
then
open the file with
OPEN DATASET p_file FOR INPUT IN TEXT MODE.
then between do and endo do like this..
DO.
clear t_data.
READ DATASET p_file INTO t_data.
if sy-subrc ne 0.
exit.
else.
split t_data at c_hextab
into t_itab-name
t_itab-marks1
t_itab-marks2
t_itab-marks3.
append t_itab.
endif.
enddo.
i think it will be helpful to u
Please let me know wht type of file has been uploaded into application server.(tab deleimted, comma separated or something else).
Regards,
Sunil Kumar Mutyala. -
Data populated in internal Table its not diplay in result
Hi ABAPers,
i have one doubt in internal table one field data is populated but in result its diplayed. can any one tell me the solution for this
regards,
kishore.hi this is a simple report on internal table.
REPORT zvenkattest0.
TABLES:pa0002,pa0008.
data:begin of it_pa0002 occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of it_pa0002.
SELECT-OPTIONS: S_pernr FOR pa0002-pernr.
START-OF-SELECTION.
SELECT pernr
begda
endda
vorna
nachn
FROM pa0002
INTO TABLE IT_pa0002
WHERE pernr IN S_pernr.
sort it_pa0002 by pernr begda descending.
loop at it_pa0002.
write:/ it_pa0002-pernr,
it_pa0002-begda,
it_pa0002-endda,
it_pa0002-vorna,
it_pa0002-nachn.
endloop.
reward points if useful,
venkat. -
Excel file upload to internal table
Hi Guys,
I want to upload excel file into an internal table in BW. I am using the FM TEXT_CONVERT_XLS_TO_SAP in the code below.
REPORT ZUPLOAD_EXCEL_TO_ITAB.
TYPE-POOLS: truxs.
PARAMETERS: p_file TYPE rlgrap-filename.
TYPES: BEGIN OF t_datatab,
col1(30) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab,
wa_datatab TYPE t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
****START-OF-SELECTION******
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_raw "WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = it_datatab[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 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-smgv4.
ENDIF.
*****END-OF-SELECTION*******
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3.
ENDLOOP.
But I am getting the error "The TYPE-POOL "TRUXS" is unknown.
Can somebody please tell me the mistake in the code?
Thanks in advanceHi azeem,
Regarding ur case ..
Why don't u make ur own function ??
I also used it here as MD data upload ..
The steps as follows to make it :
1. Create RFC: it will be called by ur Excel.
- Since my purpose was to upload MD, so in the RFC, i called Process Chain.
- This RFC is made as ur purpose.
2. You create Code in Excel by Macro.
The techniques to make it as follows:
Accessing SAP Functions from Excel using Visual Basic Applications
Hopefully it can help you a lot.
Best regards,
Niel. -
Uploading into internal tables
Do you know of a function module I can use to uplaod multiple sheets to internal tables? Please provide sample codes if possible. Thanks.
Hi Chakradhar,
ABAP code for uploading an Excel document into an internal table. See code below for structures. The
code is base on uploading a simple Excel spreadsheet.
*& Report UPLOAD_EXCEL *
*& Upload and excel file into an internal table using the following *
*& function module: ALSM_EXCEL_TO_INTERNAL_TABLE *
REPORT UPLOAD_EXCEL no standard page heading.
*Data Declaration
data: itab like alsmex_tabline occurs 0 with header line.
Has the following format:
Row number | Colum Number | Value
i.e. 1 1 Name1
2 1 Joe
TYPES: Begin of t_record,
name1 like itab-value,
name2 like itab-value,
age like itab-value,
End of t_record.
DATA: it_record type standard table of t_record initial size 0,
wa_record type t_record.
DATA: gd_currentrow type i.
*Selection Screen Declaration
PARAMETER p_infile like rlgrap-filename.
*START OF SELECTION
call function ALSM_EXCEL_TO_INTERNAL_TABLE
exporting
filename = p_infile
i_begin_col = 1′
i_begin_row = 2′ Do not require headings
i_end_col = 14′
i_end_row = 31′
tables
intern = itab
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. Problem uploading Excel Spreadsheet
endif.
Sort table by rows and colums
sort itab by row col.
Get first row retrieved
read table itab index 1.
Set first row retrieved to current row
gd_currentrow = itab-row.
loop at itab.
Reset values for next row
if itab-row ne gd_currentrow.
append wa_record to it_record.
clear wa_record.
gd_currentrow = itab-row.
endif.
case itab-col.
when 0001′. First name
wa_record-name1 = itab-value.
when 0002′. Surname
wa_record-name2 = itab-value.
when 0003′. Age
wa_record-age = itab-value.
endcase.
endloop.
append wa_record to it_record.
*!! Excel data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop.
Regards,
Chandru -
XLS multiple Sheet Data Upload to Internal Tables
Hi All,
Required one help.
There are many FMs which are Uploading XLS to Internal Tables.
But is there any function module, which picks up the data from All the sheets available in XLS file,
and Upload it to Internal Table.
Thanks,
Jimit Vadherhi Vinodh,
I m not getting any value.
Pl. find the code.
DATA : value TYPE string.
DATA : e_value TYPE UAB_TEXT.
TRY.
CALL METHOD CL_UA_EXCEL_TOOLS=>READ_CELL_FROM_LOCAL_FILE
EXPORTING
ID_PATH = 'D:\Approved BP 10-11.xls'
ID_SHEET =
ID_CELL =
ID_ALIAS =
RECEIVING
ED_VALUE = e_value.
CATCH CX_UA_FORMULA_EXCEPTION .
ENDTRY.
WRITE : e_value.
pl. guide.
thanks,
Jimit -
Regarding joining two internal tables
Hi All,
Tell me how to use 'UNION' in different ways.
Thank you,
RohitHi,
If its internal table joining then best is to use APPEND LINES.... statement.
You can also append internal tables to index tables using the following statement:
APPEND LINES OF itab1 TO itab2.
This statement appends the whole of ITAB1 to ITAB2. ITAB1 can be any type of table, but its line type must be convertible into the line type of ITAB2.
When you append an index table to another index table, you can specify the lines to be appended as follows:
APPEND LINES OF itab1 [FROM n1] [TO n2] TO itab2.
n1 and n2 specify the indexes of the first and last lines of ITAB1 that you want to append to ITAB2.
This method of appending lines of one table to another is about 3 to 4 times faster than appending them line by line in a loop. After the APPEND statement, the system field SY-TABIX
contains the index of the last line appended. When you append several lines to a sorted table, you must respect the unique key (if defined), and not violate the sort order. Otherwise, a runtime error will occur.
thanx. -
Regarding Passing two internal Tables from Driver Program to Smartform
hi all,
I am Passing Two Internal Tables from Driver Program to Smartform it is going to dump and message is showing like this " one of the parameters eded according to the interface description was not specified ".
When i am passing one Internal Table Output is coming Perfectly. Is there any restriction for passing of internal tables.
Regards
RamiHI,
Check the names specified in the smartfrom and FM whcih you are calling in the driver program. Both might be different.... -
Regarding passing an internal table from print program to smartform....
Hi All,
can any body let me how to pass an internal table to the smartform, i have processed the data in the print program then i want to pass the final internal table from the print program to smartform and with that data in the internal table i have to process it in the smartform (i want to get some more data based on the internal table data from the print program) and then i will display finally.
for example: i have it_qals which contains all the lot numbers which is processed in teh printprogram, now i want to pass all these (it_qals) lotnumbers to smartform , and in the smartform i will use the lotnumbers in the it_qals table and will process other data accordingly
can any body help me plzz.. its very urgentChek this code i am coping my whole program here.
REPORT ZDP_SMARTFORMS_REPORT3 .
TABLES: MARA,
MAKT.
DATA: FNAME TYPE RS38L_FNAM.
DATA: BEGIN OF ITJOIN OCCURS 0.
INCLUDE STRUCTURE ZDP_JOIN__IN_SMARTFORM.
INCLUDE STRUCTURE MARA.
INCLUDE STRUCTURE MAKT.
data: END OF ITJOIN.
*DATA: BEGIN OF ITJOIN OCCURS 0,
MATNR LIKE MARA-MATNR,
END OF ITJOIN.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: MAT FOR MARA-MATNR.
SELECTION-SCREEN END OF BLOCK B1.
SELECT MARA~MATNR MAKTX "UP TO 5 ROWS
FROM MARA JOIN MAKT ON MARAMATNR = MAKTMATNR
INTO TABLE ITJOIN
WHERE MARAMATNR IN MAT and maktspras eq 'EN'.
into corresponding fields of table it
*SELECT MATNR UP TO 5 ROWS FROM MARA INTO TABLE ITJOIN
WHERE MATNR IN MAT.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZDP_SMARTFORMS_3'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FNAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
not necessar y above function if u copy function name from
**- smartforms>environment>function name
CALL FUNCTION '/1BCDWB/SF00000037'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITJ = ITJOIN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Also check these links
Check out this link,
http://www.erpgenie.com/abap/smartforms.htm
and also refer these threads,
Passing table to smartform
PASSING INTERNAL TABLE IN SMARTFORM
Hope this helps.
ashish -
To find sum in an internal table - Bit urgent
Hi SAP experts,
I have an internal table with the following fields and data :
Emp_number Section Days
1 A 10
1 B 20
3 A 20
3 B 10
2 A 20
2 B 10
Now I want to calculate the total days for each employee which is a sum of days of section A and days of section B.
I want the data as below into another internal table
Emp_number Total_days
1 30
2 30
3 30
Could any one tell the code for the same.
Useful answers wud be rewarded.
Vishnu.Hi Vishwanath,
In this case you have to use CONTROL BREAK STATEMENTS.
1.At first
2.At new
3.At end
4.At last
1.At first is going to trigger at the 1st loop of the internal table.From the 2nd loop it is not going to trigger.
It is mainly used for sub headings.
2.At new is going to trigger at the new value of the internal table.
3. At end is going to trigger at the end of the new value of a particular field.
It is mainly use for subtotals.
4.At last is going to trigger at the last loop of the internal table.
It is mainly use for grand totals.
So you gothrough the above 4 statements.
In your case you have to use the third statement i.e., At end.
At end
ur logic
endat. -
HOW TO ADD DETAILS TO MULTIPLE TABLE(its urgent)
Hi All,
I have created one table called employee_master which records all the details of employee.
The problem which i am facing is if the employee wants to update the details then it is over writing the original record in the master table.
what i want to do is if the employee is updating a record then it should be updated and stored in the different table and should not over write the original record of employee master table. and in future the modified data should be available to the employee.
to do this what i need to do. whether i need to create one more table or it can be done in employee master only. I am new to this application so don't know how to do it.
need help urgently.
Regards,
RafiHi,
This is your third message on the exact same question. Why don't you stick to one thread instead of duplicating the same question over and over.
its urgentPeople on here are volunteers and will help you when they get a chance. So that comment is unnecessary.
I believe your second thread, the responses presented gave the options to you. Anyway, the correct technique instead of creating a new thread when you have a reply, is to reply in the actual thread you created. Incase you can't find it, here is the URL: can we keep the original record as it is and create a version for it
Ta,
Trent
Maybe you are looking for
-
Gmail crashing Safari 2.0.4
every time i try to access my gmail account.. im not able to because safari does a crash and burn routine on me.. it says "loading" then just freezes and the spinning beachball appears on the screen.. i tried on a different user account on my compute
-
Greetings. Since updating to iTunes 7.7, none of my purchased songs are showing that they can be created into ringtones. I checked my View Options and Ringtones is selected. Despite this, a handful do allow me to create a ringtone when I right click
-
The App Switcher of Mac OS X Lion doesn't display properly after waking up from sleep
Hey guys, I have a MacBook Pro15 inch Core2Duo 2.66GHz running Mac OS X 10.7.2. When my Mac woke up from sleep, sometime the Application Switcher doesn't show the iconc properly like this. Other time, it shows the dark icon. The color profile setting
-
I have an external usb hard drive which has ntfs file system. Recently for a wrong reason I downgraded the ntfs version from 3.1 to 3.0 with Partition Magic. I want to upgrade it back to 3.1 since ntfs 3.0 doesn't support sparse files. I want to crea
-
Is there a solution to years old error message "Cannot create a system restore point [service cannot be started in Safe Mode (0x8007043c)]" I have been trying to create a restore point or image on an external hard drice, but I get the quoted message