Creating MS- Access data base from the Internal tables data of an ABAP Prog
Hi,
I have a requirement where I have to create Access tables from the Internal tables of ABAP program.
The tables are like Project systems Header data, WBS elements data, Netwrok data, Activity data, Milestone data and Project revunes. I will have the internal tables for these. I want to transfer these tables data into MS-Access tables onto Users desktop.
Please adivce me how to do this.
Thanks,
Prabhakar
HI,
I am trying to create a DB table in the access but I am not successful. The following is the format of the table needs to be created from the ABAP program.
I have created a table with the following format in MS-Access with the name tblHeader. Is it neccessary to create a DB table ( MS-Access) in advance or by using the FM STRUCTURE_EXPORT_ TO_MSACCESS we need to create a structure in MS-Access?
False tblHeader
Field Name Type Length
ProjectDef Text 255
ProjectDes Text 255
Created Text 50
Change Text 50
RespPerson Text 255
Profile Text 255
Plant Text 255
ObjNo Text 255
OverheadKey Text 255
I have created a Z table ZTAB1 with the same format from the SAP fields.
MS-Access Table name : tblHeader
ABAP program Internal table : t_tblheader
Z table Name : ZTAB1.
First I am trying to create a structure in MS-Access with the following FM.
CALL FUNCTION 'STRUCTURE_EXPORT_ TO_MSACCESS'
EXPORTING
dbname = 'D:\test\db2'
LANGU = SY-LANGU
dest = 'PS_ACCESS_1'
TABLES
tabname = ttblheader
EXCEPTIONS
system_failure = 1
comm_failure = 2
OTHERS = 3
Table ttblheader type is DFIES and I am filling the table with only one record and one field i.e TABNAME and the value is ZTAB1.
The source code of the FM is using another FM
CALL FUNCTION 'MSACCESS_STRUCT_ EXPORT_RFC' DESTINATION DEST
Here I am getting the Error message Object required. I can't able to create a table structure in MS-Access.
Next I am going to Use the FM
'TABLE_EXPORT_ TO_MSACCESS'
and it will create the records in the MS-access table.
CALL FUNCTION 'TABLE_EXPORT_ TO_MSACCESS'
EXPORTING
dbname = 'D:\test\db2'
langu = sy-langu
dest = 'PS_ACCESS_2'
tabname = 'ZTAB1'
reftable = 'tblheader'
FLG_NO_DOWNLOAD = ' '
FLG_APPEND = ' '
FLG_POPUP = ' '
TABLES
dtab = t_tblheader
here t_tblheader is the internal table.
Reftable = tblheader is the table which i have created in advance. ( not by using the First FM)
In this FM i am getting a error message : Unable to connect to Database D:\test\db2.
Please help me how to create the MS-Access database.
Similar Messages
-
I have made a burn folder with photos exported from I-photo. It now shows in information, that the date created and modified is different from the original digitized date. How can I get the original date to show in the info from Finder?
The Finder reports File information. The date and time of the photo are in the Photo's Exif metadata. The Finder has no awareness of this. All photos apps on any system do.
Regards
TD -
How to pass the internal table data to smartforms
Hi Gurus,
I have a problem in passing the internal table data to the smartforms. In the print program
I get the data into one internal table "LT_PRDLBL1". I am passing this internal table to the other in print program by calling the FM_NAME.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = T_SSFCTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = T_SSFCOMPOP
USER_SETTINGS = ' '
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
LT_PRDLBL = LT_PRDLBL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
In the print program I had defined the internal tables like
Data: lt_prdlbl type standard table of zprdlbl.
Data: Begin of lt_prdlbl1 occurs 0.
include structure zprdlbl.
Data: End of lt_prdlbl1.
How do I define the internal table in the smartform to get the values printed in the smartform?.
<REMOVED BY MODERATOR>
Thanks,
Edited by: Alvaro Tejada Galindo on Apr 21, 2008 1:01 PMNehal,
Thanks for quick response.
In the smartform under the Form Interface->Tables tab
I had defined
LT_PRDLBL LIKE ZPRDLBL. If I define TYPE instead of LIKE I get the error message saying "FLAT TYPES may only be referenced using LIKE for table parameters".
In the main window I have created LOOP, in which I have ticked the internal table and
LT_PRDLBL INTO LT_PRDLBL. In the text node I am passing the values of this internal table
<_PRDLBL-XXXX&.
I am able to get the print but the data is not printing.
Please help me with this.
Thanks, -
Moving data in all the internal tables to the final table t_data
hi all,
how to data in all the internal tables to the final table t_data
*selecting fields from bkpf table
SELECT bukrs
belnr
gjahr
bldat
xblnr
usnam
FROM bkpf
INTO TABLE t_bkpf
WHERE bukrs EQ po_bukrs AND
belnr IN so_belnr AND
budat IN so_budat AND
blart IN so_blart.
IF t_bkpf[] IS INITIAL.
MESSAGE a999(zfi_ap_gl) WITH text-011.
STOP.
ELSE.
*selecting fields from bseg table.
SELECT bukrs
belnr
gjahr
koart
shkzg
dmbtr
zuonr
sgtxt
kostl
hkont
lifnr
prctr
FROM bseg
INTO TABLE t_bseg
FOR ALL ENTRIES IN t_bkpf
WHERE bukrs EQ t_bkpf-bukrs AND
belnr EQ t_bkpf-belnr AND
gjahr EQ t_bkpf-gjahr AND
lifnr IN so_lifnr.
ENDIF.
IF t_bseg[] IS INITIAL.
MESSAGE a999(zfi_ap_gl) WITH text-011.
STOP.
ELSE.
*selecting the companies address from adrc table
SELECT SINGLE addrnumber street str_suppl2 city1
region post_code1
FROM adrc
INTO wa_adrc
WHERE addrnumber EQ w_adrnr.
*selecting adrnr from the lfa1 table
SELECT lifnr adrnr name1 ort01 regio pstlz
FROM lfa1
INTO TABLE t_adrnr
FOR ALL ENTRIES IN t_bseg
WHERE lifnr EQ t_bseg-lifnr.
IF NOT t_adrnr[] IS INITIAL.
*populating the t_vaddress table.
SELECT addrnumber
street
str_suppl2
FROM adrc
INTO TABLE t_vaddress
FOR ALL ENTRIES IN t_adrnr
WHERE addrnumber EQ t_adrnr-adrnr.
*populating the t_vendor table with the vendor address
SELECT lifnr
adrnp_2
namev
name1
INTO TABLE t_vendor
FROM knvk
FOR ALL ENTRIES IN t_adrnr
WHERE lifnr EQ t_adrnr-lifnr AND
adrnp_2 EQ t_adrnr-adrnr.
ENDIF.
ENDIF.Loop the internal table which is having the maximum number of records,then use read table....for other internal tables....in that loop and then append them into final internal table.
Ex-LOOP AT IT_VBRP INTO WA_VBRP.
WA_FINAL-WERKS = WA_VBRP-WERKS_I.
WA_FINAL-KUNAG = WA_VBRP-KUNAG.
WA_FINAL-AEDAT = WA_VBRP-AEDAT.
READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_VBRP-KNUMV
KPOSN = WA_VBRP-POSNR_I.
IF SY-SUBRC EQ 0.
WA_FINAL-KSCHL = WA_KONV-KSCHL.
CLEAR WA_KONV.
ENDIF.
READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_VBRP-KUNAG.
IF SY-SUBRC EQ 0.
WA_FINAL-NAME1 = WA_KNA1-NAME1.
CLEAR WA_KNA1.
ENDIF.
ENDIF.
APPEND WA_FINAL TO IT_FINAL.
CLEAR: WA_FINAL,WA_KONV,wa_kna1.
ENDLOOP. -
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 -
Creating the spool request for the internal table data
Hi..
I am little confused with the function module used for creating the spool request.
well...I am practicing the ALV report and sending the that report to the spool.
I ve used the FM SLVC_TABLE_PS_TO_SPOOL.
this is the way i defined the internal table.
Data:
begin of imat occurs 0,
matnr like marav-matnr,
maktx like marav-maktx,
matkl like marav-matkl,
ntgew like marav-ntgew,
gewei like marav-gewei,
end of imat.
data i_lines type sy-tfill
and i declared..
describe table imat lines i_lines.
then i given the value for i_file_length as i_lines in the export paramet of the FM SLVC_TABLE_PS_TO_SPOOL.
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = i_lines
IMPORTING
E_SPOOLID = spoolid
tables
it_textdata = imat
when i executed it shows the list and wen going back it shows the runtime error as
CALL_FUNCTION_CONFLICT_LENG - Type conflict when calling a function module (field length).
please provide me some solutions.
thanks in advance.
etienne.Hi satyajit,
Thanks for your response....but the fields in my internal table "IMAT" is not compatible with the structure LVC_S_1022 as it has it componenrt - LINE.
so how can i define my internal table IMAT as type lvc_s_1022 as you suggested.
thanks in advance.
etienne. -
PDF File from an internal table data
I have an internal table ready for grid display of a report. But according to the new requirement, it shouldn't create a Spool request as it is affecting the performance of the system (because its a huge file with 3000+ pages).
So, now we want to create a (non-editable) PDF File and store it in an application server.
From the forum, i see that i have only one option, which is to Convert internal table data to OTF Format and then to PDF.
Right now i am using PRINT_TEXT to convert to OTF file and FM CONVERT_OTF for PDF file.
The challenges i am facing right now is..
1. After getting the OTF file from PRINT_TEXT, i couldn't get the correct PDF File. It shows random characters instead..
2. My internal table has 103 columns. So how should i accommodate data from all these columns into a single row on a PDF?
3. I couldn't create a table kind of view/display in PDF
Please help/advice me on the above issue.
Thanks,
SaradaHi,
103 columns need to be seen in at least 7 pages or more. Cant display in just 1 page.
I guess that better to create a smartforms and pass all the information from the table to the smartforms.
There you can create multipages.
Probably, that huge table need to separete it in 7 tables, so each page will get the information from one table...
i will try to do sth like that.
Regards
Miguel -
How to get the Data type of the Internal Table.
How can i get the data types used to create an internal table
TYPES : BEGIN OF t_makt,
matnr TYPE matnr,
maktx TYPE maktx,
END OF t_makt.
Like this some function will give me which data types i have used for the internal table at run time.Use the FM ..
data : int_fcat type SLIS_T_FIELDCAT_ALV.
REUSE_ALV_FIELDCATALOG_MERGE ..
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'IMAT' <-- this is your internal table
I_INCLNAME = sy-repid
CHANGING
CT_FIELDCAT = int_fcat <--- this contains all the fields along with their characteristics ...
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3. -
Data overflow in the internal table
Hi Friends,
I am hitting table CDHDR and getting a huge data based on date range and the problem is the internal table is not able to hold the entire data selected and hence it is going for run time error. Could you please suggest an idea to overcome this?
Thanks in advance,
RamHi,
here is the code i have written...
Get all changes to materials in the given date range
SELECT objectclas " Object Class
objectid " Object Value
changenr " Change Document Number
udate " Changed Date
utime " Changed Time
FROM cdhdr
INTO TABLE gt_cdhdr
WHERE objectclas EQ c_clas_material
AND udate IN s_date.
Regards,
Ram -
How to Pass the internal table data?
DearAll,
How to pass the Data of one internal table on a 1.html page to another html page for output, in BSP Application.
regards.Hi ,
In the onInputProcessing event of the first page , write the following code...
call method NAVIGATION->SET_PARAMETER exporting
name = 'it_filt_cur'
value = it_filt_cur.
Here it_filt_cur is internal table.
NAVIGATION->GOTO_PAGE('next.htm').
In the next page , you can make the internal table as auto in the attributes.
Since you have made the itab as auto transfer , you can directly access the itab in the initialization event of the next page if it is stateless.
Regards,
Laxman Nayak.
Message was edited by: Laxman Nayak -
Logical table with data restrictions from the physical table
Hello, I have a question about the relationships between the Logical Tables in Business Model and Mapping and The Physical table in the physical layer. The problem is the next one:
I have a Physical Table named T1 that contains the attributes: Id, DateChangeState, State,…
T1
DateChangeState| ID |State | Other columns….
01/01/2011 | 1 | 03 | …
02/01/2011 | 1 | 11 | …
03/01/2011 | 1 | 02 | …
02/02/2011 | 2 | 01 | …
03/02/2011 | 2 | 02 | …
I need filter this table and extract only one row per ID. The row that I need is the row who contains the Max(DateChangeState) per ID. I don’t know how extract only the rows selected from the physical table to the Logical Table.
I need that the logical table contains the next rows:
T1_Logical
DateChangeState |ID | State Other columns….
03/01/2011 | 1 | 02 | …
03/02/2011 | 2 | 02 | …
How can I extract only the rows with the Max(DateChangeState) grouped by ID in the BMM?
I thought put this condition in the column mapping (CASE WHEN DateChangeState=Max(DateChangeState)) but the Max(DateChangeState) was not grouped by ID.
Any idea about how solve this problem?
I can not use the group by in the answer and I can not change the physical layer.
Thank you,
Best Regards.Hi Rajeevagrl your solution is very good but I dont´t know why obiee is applying twice the max condition, The select is the next one:
select distinct D1.c1 as c1,
D1.c2 as c2,
D1.c1 as c3
from
(select D1.c1 as c1,
D1.c2 as c2
from
(select D1.c1 as c1,
D1.c2 as c2,
max(D1.c3) over () as c3
from
(select T379.ID as c1,
T379.DATE as c2,
max(T379.DATE) as c3
from
T1 T379
group by T379.ID, T379.DATE
) D1
) D1
where ( D1.c2 = D1.c3 )
) D1
order by c2
Edited by: 848497 on 14-abr-2011 3:58 -
Regarding the internal table data by using read table it_mard into wa_mard
hi,
i am reading the internal table it_mard with key matnr .
my code is like this.
*loop at it_final into wa_final.*
*wa_second-matnr = wa_final-matnr.*
wa_second-bwart = wa_final-bwart.
wa_second-bwtar = wa_final-bwtar.
*read table it_mard into wa_mard with key matnr = wa_final-matnr*
*binary search.*
*if sy-subrc = 0.*
*wa_second-labst = wa_mard-labst.*
*endif.*
*append wa_second to it_second.*
clear :wa_final.
*endloop.*
final internal table haveing duplicate values because this table it_final having movement types
so that i am not using delete statement .
is there any logic for handling the duplicate values inside the loop statement
by using read table statement.
could u plz explain clearly \[removed by moderator\]
Edited by: Jan Stallkamp on Jul 11, 2008 2:11 PMthis is my code could u plz explain regarding duplicate material number .
LOOP AT IT_MSEG INTO WA_MSEG.
WA_FINAL-MBLNR = WA_MSEG-MBLNR.
WA_FINAL-MATNR = WA_MSEG-MATNR.
WA_FINAL-BWART = WA_MSEG-BWART.
WA_FINAL-BWTAR = WA_MSEG-BWTAR.
WA_FINAL-MENGE = WA_MSEG-MENGE.
WA_FINAL-SOBKZ = WA_MSEG-SOBKZ.
COLLECT WA_FINAL INTO IT_FINAL.
CLEAR WA_FINAL.
ENDLOOP.
LOOP AT IT_FINAL INTO WA_FINAL.
READ TABLE IT_MARD INTO WA_MARD WITH KEY MATNR = WA_FINAL-MATNR
BINARY SEARCH.
this is reading the duplicate records i need to control duplicate records here .
the labst value is repeating the number of times because of the meterial number duplication
how can i restrict plz explain
IF SY-SUBRC = 0.
WA_FINAL-LABST = WA_MARD-LABST.
ENDIF.
READ TABLE IT_MKPF INTO WA_MKPF WITH KEY MBLNR = WA_FINAL-MBLNR
BINARY SEARCH.
IF SY-SUBRC = 0.
WA_FINAL-BUDAT = WA_MKPF-BUDAT.
ENDIF.
MODIFY IT_FINAL FROM WA_FINAL.
CLEAR WA_FINAL.
ENDLOOP.
LOOP AT IT_FINAL INTO WA_FINAL.
WA_SECOND-BWTAR = WA_FINAL-BWTAR.
IF WA_FINAL-BWART = '101' OR WA_FINAL-BWART = '501' OR WA_FINAL-BWART = '561'.
WA_SECOND-MENGE11 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '201'.
WA_SECOND-MENGE12 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '541' AND WA_FINAL-SOBKZ = 'O' .
WA_SECOND-MENGE13 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '601'.
WA_SECOND-MENGE14 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '543'.
WA_SECOND-MENGE15 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '702'.
WA_SECOND-MENGE16 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '313'.
WA_SECOND-MENGE17 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '315'.
WA_SECOND-MENGE18 = WA_FINAL-MENGE.
ENDIF.
IF WA_FINAL-BWART = '122' OR WA_FINAL-BWART = '161'.
WA_SECOND-MENGE19 = WA_FINAL-MENGE.
ENDIF.
COLLECT WA_SECOND INTO IT_SECOND.
CLEAR WA_SECOND.
ENDLOOP. -
Getting the last record from the internal table
When we use a READ statement it always picks up the first record which fulfill its condition but in my case I want to pick up the last record that fulfills it condition
I have a internal table like
id type
N1 A
N1 T
N1 A
N1 6 ----> LAST RECORD
my code is
read table itab wIth key id = netobjid.
for eg if netobjid = N1 , then I want to read the last record that corresponds to N1 ie ID N1 TYPE - 6...
How to do that?HI
actually i have done same requirement like this ...
Take one count variable into your internal table ..you pass the number of records into cont variable for every time u enter the loop .
Sort the internal table with count variable descending . ( AS we cant sort the internal table with sy-tabix)
Then use read statement with sy-index = 1 .
USe below logic ,............
data : count type i value '0'.
LOOP at int .
count = count + 1 .
endloop.
sort int count descending .
read int with index = 1 . -
Problem with Emailing the Internal table data as an excel attachment
Hi Friends,
I am facing problem with Emailing an internal table data as an excel file. I am using standard function module "SO_NEW_DOCUMENT_ATT_SEND_API1" which is using SOLI structure can have record with 255 character length. But my Internal table having each record means after concatenating all the fields it is going to be morethan 450 characters. so i t is not displaying all the data in excel file.
Can somebody help me if there is any other function module or any other way that i need to follow.
thanks for help
venkat.You must use the the :
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as a field seperator and
CL_ABAP_CHAR_UTILITIES=>CR_LF as a record seperator.
Check this example:
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
Regards,
Naimesh Patel
Maybe you are looking for
-
IWeb 09 - Bug Report with album and html fragment
I create an album with iPhoto and I insert it in a existent album page. Publish the site in a local directory. Navigate the page from the local directory and the page works. Publish the site using Cyberduck FTP and navigate the page from the www Resu
-
I no longer have cell phone service but I still use my iphone every day for apps and imessage. Now someone has my old phone number. It seems that this person does not have a iphone. Everytime one of their friends with an iphone tries to text them the
-
How can i create a dir chooser with jdk 1.1.4?
Hi, I am wrote an applet that must be compatible with jdk 1.1.4, it is responsible for downloading files from a server to the clients computer. I wanted some kind of directory chooser that only lists the directories, but java.awt.FileDialog didn't gi
-
Symbol net vision integration with AVVID
All Need help! I have a client that needs Symbol Netvision integration with CCM 3.0(9). I hv tried to look thru the CCO but no concrete solution .Do anyone in the forum can help me in this integration.What should I configure in CCM and the gateway.I
-
FrontRow says I am not connected to the Internet, But I am
My first time with FrontRow. I am connected to the net using Airport Extreme. I tried to play the movie trailers and was told I was not connected to the internet. How dare "they" Anyone have a suggestion? The other content works and is available, iTu