Report output from memory to internal table (corresponding fields)
How can we pick any standard report output such as
RM07DOCS on to memory and from memory to an internal
table.Here by internal table ,i do not mean of type c
containing complete report but data should go from output to corresponding fields of internal table structure of whom is defined as same of the output.
SUBMIT rfbila00 AND RETURN
EXPORTING LIST TO MEMORY
WITH sd_ktopl-low = ' '
WITH sd_bukrs IN s_bukrs
WITH sd_prctr IN s_prctr
WITH bilavers = p_fsv
WITH bilaspra = 'EN'
WITH bilbjahr = p_fyear
WITH b-monate IN s_per
WITH bilvjahr = v_cfyear
WITH v-monate = l_per
WITH bilagvar = P_LAYOUT
WITH bilagrid = 'X'
WITH bilabkon = '2'
WITH bilagkon = '3'
WITH bilasumm = '0'
WITH bilavart = '1'
WITH bilaskal = '3/0'.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_list
EXCEPTIONS
not_found = 1.
REFRESH t_ascii.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_ascii " list converted to ASCII
listobject = t_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
u will get the output in t_list...u have to split as per ur requir......
this will help u.....
Reward IF...........
Regards
Anbu
Similar Messages
-
Logic for retreiving the values from a dynamic internal table
Hi all,
I have an issue with the logic to fetch data from a dynamic internal table into fields. let me give you guys an example the sy-tfill = 9 (subject to vary). I need to populate the fields.
Regards,
SukumarHi,
this is for printing out the info in a dynamic table,
it will work likewise to insert data.
PARAMETERS:
p_tabnam TYPE tabname DEFAULT 'DB_TABLE_NAME'.
DATA:
lv_dref TYPE REF TO data,
ls_dd03l LIKE dd03l,
lt_fieldname TYPE TABLE OF fieldname,
ls_fieldname TYPE fieldname.
FIELD-SYMBOLS:
<fs> TYPE STANDARD TABLE,
<wa_comp> TYPE fieldname,
<wa_data> TYPE ANY,
<wa_field> TYPE ANY.
REFRESH lt_fieldname.
SELECT * FROM dd03l INTO ls_dd03l
WHERE as4local = 'A'
AND as4vers = '0000'
AND tabname = p_tabnam
ORDER BY position.
ls_fieldname = ls_dd03l-fieldname.
APPEND ls_fieldname TO lt_fieldname.
ENDSELECT.
IF NOT ( lt_fieldname[] IS INITIAL ).
CREATE DATA lv_dref TYPE TABLE OF (p_tabnam).
ASSIGN lv_dref->* TO <fs>.
SELECT * FROM (p_tabnam) INTO TABLE <fs>.
WRITE:
/ 'CONTENTS OF TABLE', p_tabnam.
LOOP AT <fs> ASSIGNING <wa_data>.
SKIP.
WRITE:
/ 'LINE', sy-tabix.
ULINE.
LOOP AT lt_fieldname ASSIGNING <wa_comp>.
ASSIGN COMPONENT sy-tabix OF STRUCTURE <wa_data> TO <wa_field>.
WRITE:
/ <wa_comp>, <wa_field>.
ENDLOOP.
ENDLOOP.
ENDIF.
grtz
Koen -
To fetch selective fields from DATABASETABLE into Internal TABLE
Hi Friends,
I have declared an internal table with fields for e.g. A , B , C , D.
This does not have any records as of now.
I have to fetch data from a DATABASE TABLE with fields A , B , X , Y , Z having records .
I only need records for fields A B fron DB table.Can any one pls tell how can I do that with performance issues in mind as lots of records are there.
I had written a query where:
SELECT A B from dbtab
into CORRESPONDING FIELDS of table it_table.
It_table i had defined with only two fields A B.
Is this correct?
Please tell wats the way to do it as I am new to ABAP.
THANKS in ADVANCE..Hi.....
What mentioned in all above answers is very helpful for ur requirement...
and...
Here some Steps to increase the performence of your programs...
>Use Select Single when only one row is expected
>Use Select Where rather than Selectu2026Check
>Use Select with aggregate functions (SUM, MAX, MINu2026)
>Use a View instead of nested Selects
>Use Select column specific instead of select * for few fields
>Use Selectu2026Into Table rather than Select...Move Corru2026Apend
>Use Join extension with Select if possible
>Use special operators (CO, CA, CS) rather than code your own
>Use Delete Adjacent Duplicates rather than manual processing
>Specify key fields for Readu2026Binary Search
>Use Loop At Where rather than Loop Atu2026Check
>Copy Internal Tables with TAB_DEST() = TAB_SRC()
>Specify the sort key as restrictively as possible
>Use Append To, Insert Into, Collect Into rather than Move
>Compare tables with If Tab1() = Tab2()u2026
>Use Delete ITAB Whereu2026 instead of Loop At ITAB Whereu2026Delete..
>Use Case statements instead of If-constructions
>Use Call Functions wisely, Performs use less memory
>Use While instead of Do Exit
>Use Type I for Indices
>Keep Occurs clause realistic or use 0
>Use COMMIT WORK as appropriate to free the Data Base and preserve work
>
>Avoid:
>Using Shift inside a While-loop
>Leaving unneeded declarations in your program
>Using Move-corresponding for just a few fields
>Excessive nested includes within function calls
>Using DB field names if the value will be changed
>Using Occurs clause if only the header is needed
Thanks,
Naveen.I -
Discoverer report - Output from Discoverer plus is not the same as Discoverer desktop
As a part of Upgrade project we are migrating the discoverer reports from 11i (11.5.10.2) to R12 (12.1.3) .After migrating to R12, for a custom discoverer report the output given by discoverer desktop is correct (24 rows for a scenario). But the report output from Discoverer plus does not show the credit transactions (2 rows). The output from Discoverer plus shows only 22 rows (24 - 2), which is incorrect. The query is the same in Discoverer desktop and Discoverer plus.
Please let me know why these transactions that are appearing when the report is run from discoverer desktop are not appearing in discoverer plus. Is there any setup in discoverer plus for this?
Regards,
BrajeshPretty hard to answer a question like this. Best bet would be to copy the existing discoverer plus book and start removing conditions, fields, etc until those two rows from desktop show up and see if you can work it out.
-
Upload data from Excel to Internal table in ECC
Hello SDN,
Here I am facing a problem for uploading the data from excel sheet to internal table in ECC6.0
Main problem is we don't have any FM ALSM_EXCEL_TO_INTERNAL_TABLE.
Please provide me the solution how to upload the data from excel to internal table through class. If possible please provide me the sample code so that it will be very helpful for me.
Waitingfor your valuable response.
Thanks & Regards,
Kumar.Hi,
you can use OLE to acces (not only) excel, but this will only work in dialog processing.
regards,
Hans -
In SRM How to upload data from Excel to Internal Table
Hello Experts,
As seen the Function Module 'ALSM_EXCEL_TO_INTERNAL_TABLE' does not exists in SRM.
Is there any alternative to upload the data direct from excel to Internal table using any other FM. As seach did't get any relevant FM.
Please advice..
Thanks..did u try this
TEXT_CONVERT_XLS_TO_SAP
in this manner
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_line_header = 'X'
i_tab_raw_data = lt_raw
i_filename = p_path
TABLES
i_tab_converted_data = gt_output
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
this FM works on DOI
so
SAP document about DOI:
http://help.sap.com/saphelp_nw2004s/helpdata/EN/e9/0be775408e11d1893b0000e8323c4f/frameset.htm
SAP Demo Program about DOI: SAPRDEMOEXCELINTEGRATION.
the fm you mentioned works on OLE
so you could refer,
SAP document about OLE:
http://help.sap.com/saphelp_46c/helpdata/EN/59/ae3c98488f11d189490000e829fbbd/frameset.htm
Also you can refer this post
Download of SRM Contracts in Excel - Unit of Measurement Missing
Let me know if this works ..
Regards
Manthan.
Edited by: Manthan_R on Feb 23, 2010 12:18 PM -
To upload data from excel to internal table
hi
in excel sheet it contains 4 tabs.to upload data from excel to internal table i have used this fm
text_convert_xls_to_sap .but error wil comeing.that error in tables parameter.iternal table does not contain data.ple help me.(v 6.0) ple give me one example with codingHello,
Take a look on this: [ABAP - Upload data from Excel to Sap using OO|https://wiki.sdn.sap.com/wiki/x/xOw].
Regards. -
Changing the seeded rdf report output from text to PDF
Hi All,
I am trying to change the seeded report "Print Requisition Report" output from text to PDF. I changed the output format in the concurrent program definition from text to pdf. The report is now getting displayed in pdf format, but the alignment of the fields are changed. The output is not printing as it was printing while in the text output format. The output looks very sloppy, with uneven fonts and too much of text wrapping.
I tried some formatting and fields are somehow getting displayed but doesnt look in proper format. I am not able to change the font style in the report builder 6i, even if i change it is printing in the same font style with uneven font size. I think reducing the font size might help, but i am unable to change.We are on 11.5.10.2. Please provide your valuable suggestions on how to go about.
Thanks
SarveshHi Hussein,
Thanks for the information. After the adjustments in the layout and the font change the report is now getting displayed without any clipping when clicked on view output. But when the same report is printed some characters on the left and and right side is getting clipped. Please help on how to solve this issue.
Thanks,
Sarvesh -
How to transfer data from a dynamic internal table
Hi All
I want to transfer data from a dynamic internal table<dyn_table>
to a non dynamic internal table itab which should have the same structure as <dyn_table>.
How can this be done?
Regards,
Harshit RungtaAs stated earlier this can be done only through field symbols...
You cannot create an non dynamic internal table with ANY structure...using DATA statement
If the strucutre is defined well and good...you can create an non-dynamic internal table...
If you do not know the structure then the internal table has to be dynamic...and to be generated using field symbols
DATA: lv_ref TYPE REF TO data.
FIELD-SYMBOLS: <fs_dyn_table> TYPE STANDARD TABLE.
* You create a dynamic internal table...
CREATE DATA lv_ref LIKE (your_dynamic_internal_table).
ASSIGN lv_ref->* TO <fs_dyn_table>.
Now...do the transfer.
<fs_dyn_table> = "your_dynamic_internal_Table
Hope it helps! -
How to store output of SQ01 into internal table.
Hello Experts
How to store output of SQ01 into internal table.
Thanks,
UmeshYou can't store the sq01 output into internal table.
Once you create the query it will generate the abap program, in that program you can see the contents.
Regards
Sasi -
How to Read records from structure to internal table
HI,
Can any body know how to read the records from structure to internal table at runtime.
please give me sample program if possible.
thanks in advance
KPif your internal table is having the same structure as the structure you are reading the values from then you can directly assign like..
internatable table work area or header line = structure.
or else if they are different assign field by field like
internal table-field1 = structure-field1.
internal table-field2 = structure-field2.
award points if it helps. -
How to pass the values from internal table to field groups
hi all,
how can i pass the internal table values to field groups?
already field groups are holding some values.. INSERT STATEMENT IS NOT WORKING as it is ovewriting the existing values..
Use full answers will be rewared.
Thanks.
Moderator message - duplicate post locked
Edited by: Rob Burbank on Jun 23, 2009 9:51 AMHi,
You can use INSERT statement to put a work area of an Internal table in Field-group
and use Extract to get info out of it.
Hope it helps,
Raj -
Delete row from internal table using field symbol.
Hi friends,
I created dynamic internal table using field symbol. I want to delete some data using where clause.
for example. i want to use like,
DELETE <FS> WHERE KUNNR = WA_KNA1-KUNNR.
Like the above statment it won't work. How i can use delete with where clause in field symbols.
Hope any one can help me.
Thanks and regards
Srikanth. Shi Srikanth,
I think you have to LOOP through the whole internal table and check each line and decide to delete or not:
LOOP at <itab> INTO <wa>.
ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <wa> TO <field>.
CHECK <field> IS ASSIGNED.
IF <field> EQ WA_KNA1-KUNNR.
DELETE ...
ENDIF.
UNASSIGN <field>.
ENDLOOP.
hope this helps
ec -
Accessing Global Internal Table in Field Routine Level
I am working on a transformation. I have created a Global Internal Table with the structure of my Source Target + extra fields not in my source target. In the start routine of the transformation I am first copying all corresponding fields from SOURCE_PACKAGE to internal table and then finally doing a lot of manipulations and modifying and appending the internal table with data now ready for populating to target.
I want to populate the target fields at field routine level by the data present in the Global internal table. Can you please tell me how to code here. If data was being read by SOURCE_PACKAGE, I would have read the value of SOURCE_FIELDS - (Value). But incase of value to be read from Global Internal Table, can I refer to the internal table work area directly. Thanks.
Global Internal Table - G_ITAB
Work Area - WA_G_ITAB
Is the below correct ?
Result = WA_G_ITAB-(Field Name).Let me understand this with an example as I am still not clear. Suppose I am loading to a DSO having 17 Key Fields say K1, K2, K3.........K17.
And if the 3.5x logic is
DATA : L1 LIKE COMM_STRUCTURE-amt.
CLEAR L1 .
IF COMM_STRUCTURE-CHK = '222'
OR COMM_STRUCTURE-CHK = '333' .
L1 = COMM_STRUCTURE-amt .
ENDIF.
RESULT = L1 .
Can you tell me the code of the above in BI7 at field level routine now. Please note I need to take data from G_ITAB internal table and that the DSO has 17 key fields? -
Uploading excel file into internal table with field length more than 255
I am trying to upload the data from an excel file through function module 'TEXT_CONVERT_XLS_TO_SAP'.
I have tested by changing the field type from string, and char2000.
But it is accepting only 255 chars from the cell content.
How to get the total content of the field if it is more than 255 char.hi,
you can use any of the following procedures:
For uploading data from excel to internal table refer standard report RC1TCG3Z in se38 :
or
You can use the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' itself. Please check if you have done it this way . But, this FM can be a little time consuming if the excel has large data, so you can use the FM u2018GUI_UPLOADu2019.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file1
i_begin_col = l_b1
i_begin_row = l_c1
i_end_col = l_b2
i_end_row = l_c2
TABLES
intern = lt_data
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE e018 DISPLAY LIKE 'i'.
ENDIF.
*---Removing the first heading fields from the file.
IF NOT lt_data[] IS INITIAL.
LOOP AT lt_data INTO lwa_data WHERE row = '0001'.
DELETE lt_data.
CLEAR lwa_data.
ENDLOOP.
*---Inserting the data from file the internal table
LOOP AT lt_data INTO lwa_data.
CASE lwa_data-col.
WHEN 1.
wa_file_wicopa-serial = lwa_data-value.
WHEN 2.
wa_file_wicopa-blart = lwa_data-value.
WHEN 3.
wa_file_wicopa-bldat = lwa_data-value.
WHEN 4.
wa_file_wicopa-budat = lwa_data-value.
ENDCASE.
AT END OF row.
APPEND wa_file_wicopa TO gt_file_wicopa.
CLEAR wa_file_wicopa.
ENDAT.
CLEAR lwa_data.
ENDLOOP.
ENDIF.
ENDIF.
or
DATA: it_test TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE.
DATA :v_start_col TYPE i VALUE '1',
v_start_row TYPE i VALUE '1',
v_end_col TYPE i VALUE '256',
v_end_row TYPE i VALUE '65536',
v_text TYPE repti.
* Funtion Module to upload values from excel to the Internal table
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = v_start_col
i_begin_row = v_start_row
i_end_col = v_end_col
i_end_row = v_end_row
TABLES
intern = it_test
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.
Or
You can use FM u201CTEXT_CONVERT_XLS_TO_SAPu201D.
DATA : i_raw TYPE truxs_t_text_data.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_tab_raw_data = i_raw
i_filename = p_path
TABLES
i_tab_converted_data = itab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2
hope it will help u
regards
rahul
Maybe you are looking for
-
One of the best things about firefox on my desktop is the way I could group bookmarks into folders per subject or task,then open them all in tabs. On my Asus tablet I can see my desktop bookmark folders, but I don't see how to open them all in tabs.
-
LINKED SERVER ISSUE on ORACLE DATABASE
Hi everyone I have SQL 2008 R2 Running on Windows server 2003 R2 OS. I have created a linked server to ORACLE 11 I have may jobs running process against this linked server and thy work fine But soddenly I receive this error : Cannot initialize the da
-
Bogus emails that delete everything in the mail in box
I have receive two emails today that delete everything in my in box when I delete it. My way round this (the second time) is to put it in the junk mail box and then delete. Is there a way to stop this mail arriving in the first place? Help appreciate
-
How to insert GMT in ORACLE.
Hi All, select TO_TIMESTAMP_TZ('Tue May 24 20:11:20 +05:30 2011', 'DY MON DD HH24:MI:SS TZH:TZM YYYY') from dual; I am able to get the output for above select query. But my requirement is to have *"GMT"* as in the following query, which doesnt work.
-
Hello all, We are currently looking at using SAP WAS 6.40 in an enterprise web service context. We have investigated the development environment and we found quite some stuffs. We are continuing and are currently looking at the change management proc