Internal Table ! Accessing Issue!
Hello Guys!
Internal table
Sorted, Hashed, Standard
For accesing itab uses,
Standard---> uses Linear Search
Sorted ---> Binary Search
Hashed-----> Hash Algorithm
Can u pls tell me what is linear search, binary search, hash algorithm?
And also,
Why we mostly go for standard table?
PLs give ur suggestions,
Thanks for your answers
<b><REMOVED BY MODERATOR></b>
Thanks
Rahul.
Message was edited by:
Alvaro Tejada Galindo
TABKIND - Internal Table Types
Alternatives:
1. STANDARD TABLE
2. SORTED TABLE
3. HASHED TABLE
4. INDEX TABLE
5. ANY TABLE
Effect
The table type - set in the DATA, TYPES, orCREATE DATA statement, specifies how the system accesses entries in the internal table in generic key operations.
(READ TABLE itab, DELETE TABLE itab, INSERT TABLE itab, MODIFY TABLE itab, COLLECT itab). As a general rule, the runtime required for key operations depends on the total length of the key.
The various table types have the following hierarchy:
ANY TABLE
|
| |
INDEX TABLE HASHED TABLE
|
| |
STANDARD TABLE SORTED TABLE
Alternative 1
STANDARD TABLE
Effect
Defines the table as a standard table. Key access to a standard table uses a linear search. This means that the timne required for a search is in linear relation to the number of table entries.
You should use index operations to access standard tables.
For the sake of compatibility, you can use TABLE as a synonym of STANDARD TABLE.
Alternative 2
SORTED TABLE
Effect
Defines the table as one that is always saved correctly sorted. Key access to a sorted table uses a binary key. If the key is not unique, the system takes the entry with the lowest index. The runtime required for key access is logarithmically related to the number of table entries.
You can also access sorted tables by index operations. When you insert using an index, the system checks to ensure that the sort sequence has been correctly maintained. For this reason, it takes longer than inserting entries in a standard table. As a rule, you should only access sorted tables using their key.
Alternative 3
HASHED TABLE
Effect
Defines the table as one that is managed with an internal hash procedure. You can imagine a hashed table as a set, whose elements you can address using their unique key. Unlike standard and sorted tables, you cannot access hash tables using an index. All entries in the table must have a unique key. Access time using the key is constant, regardless of the number of table entries.
You can only access a hashed table using the generic key operations or other generic operations ( SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM oe INSERT itab within a LOOP) are not allowed.
Alternative 4
INDEX TABLE
Effect
Standard and sorted tables belong to the generic class index tables. An index table is one that you can access using an index. You can currently only use the table type INDEX TABLE to specify the type of generic parameters in a FORM or a FUNCTION. Hashed tables are not index tables, and cannot therefore be passed to parameters defined as INDEX TABLE.
Alternative 5
ANY TABLE
Effect
Like INDEX TABLE, you use ANY TABLE to specify the type of any generic table parameter. The set of permitted operations for a table with type ANY TABLE consists of the intersection of all permitted operations for STANDARD, SORTED and HASHED TABLEs, and so is identical to the set of operations permitted for hashed tables.
Note in particular that you cannot use index access for tables with this type.
Similar Messages
-
Short dump-internal table size issue
Hi,
I get the following message in the short dump analysis for a report.
No storage space available for extending table "IT_920".
You attempted to extend an internal table, but the required space was not available.
Error Analysis:
The internal table "IT_920" could not be enlarged further.
To extend the internal table, 9696 bytes of storage space was
needed, but none was available. At this point, the table "IT_920" has
1008240 entries.
Its an old report and I saw the internal table declaration using the "OCCURS" clause in the internal table declaration.
begin of itab occurs 100.
end of itab.
I tried the option of changing to "OCCURS 0", still issue persists.
Any help would be highly appretiated
CMHello CMV,
This is basic problem with SAP internal tables. For every internal table memory is alocated ( Max..256K)...once you cross the memory size/limit of the internal table it resuls in short dump.
Only way to overcome this problem is handle limited number of records at a time..
Please refer following sample code which will help you to avoid short dump while processing large number of records....
SORT TAB_RESULT.
DESCRIBE TABLE TAB_RESULT LINES W_RECORDS.
W_LOW = 1.
W_UP = 1000.
*Spliting the records from tab_result1 by pakage of 1000 at a time
*to avoid short dump in case of more records
WHILE W_LOW <= W_RECORDS.
R_PKUNWE-SIGN = 'I'.
R_PKUNWE-OPTION = 'EQ'.
R_WERKS-SIGN = 'I'.
R_WERKS-OPTION = 'EQ'.
LOOP AT TAB_RESULT FROM W_LOW TO W_UP.
MOVE TAB_RESULT-PKUNWE TO R_PKUNWE-LOW.
MOVE TAB_RESULT-WERKS TO R_WERKS-LOW.
APPEND R_PKUNWE.
APPEND R_WERKS.
ENDLOOP.
*fetch sold to party
SELECT KUNNR NAME1
FROM KNA1
APPENDING CORRESPONDING FIELDS OF TABLE TAB_KNA1
WHERE KUNNR IN R_PKUNWE.
*fetch plant
SELECT WERKS NAME1
FROM T001W
APPENDING CORRESPONDING FIELDS OF TABLE TAB_T001W
WHERE WERKS IN R_WERKS.
REFRESH: R_PKUNWE,
R_WERKS.
W_LOW = W_LOW + 1000.
W_UP = W_UP + 1000.
ENDWHILE.
Hope this will help you to solve problem.
Cheers,
Nilesh -
Internal table Memory Issue Exception TSV_TNEW_PAGE_ALLOC_FAILED
Hi experts,
I am working on a conversiojn programme. This programme is dealing with 4 input files.
Each of these files is having more than 50,000 records. I am reading the corresponding application server files to fill
the internal tables related to these files.
The files are being read properly and internal tables are being filled.
However when i try to assign any of these 4 internal tables to other temproray internal tables in programme(requirement)
i get a dump TSV_TNEW_PAGE_ALLOC_FAILED.
The dump is related to memory issue.
I think The memory available in the programme at this point is not sufficient for table assignment.
Please suggest any alternatives where i can save any memory .
Changig of basis setting is not an option.
Regards,
Abhishek KokateHi Kiran,
I am not agree with you , I am agree with Hermann.
While writting file you restrict the record max 5,000 to 10,000 records and process don't store the mutch data into internal table.
After every used refresh the internal table, Declare table where necessary.
But you can try to avoid the copy cost.
Rgds
Ravi Lanjewar -
Hi All,
I have one logical issue related to internal table manipulation.
I have one internal table :
I_DAT - This is related to Loading/Unloading of Goods.
for example with 3 fields
VSTEL, KUNNA, KMMANG.
Now suppose my data looks like this after sorting:
VSTEL KUNNA KMMANG
100 - -
200 - -
300 - -
400 - -
- 500 X
- 600 X
- 700 X
- 800 X
Here 100,200,300,400 are Loading points.
ANd 500,600,700,800 are unloading points.
Now what i want is For loading & Unloading points i need to pick up Address and print one after other.
But how they need to print is:
FOR INITIAL LOADING OF
ADDRESS- For 100
FIRST STOP: FOR LOADING OF
ADDRESS- For 200
SECOND STOP: FOR LOADING OF
ADDRESS- For 300
Etc .....
Then
FOR UNLOADING OF:
ADDRESS- For 400
FIRST STOP: FOR UNLOADING OF
etc.
FINAL STOP: FOR FINAL UNLOADING OF
We might get as many records :
Can any body give me the logic:
Printing Address is not a problem:
But Above every address we need to print FIRST STOP, SECOND etc like that.
For this i need logic.
Can anybody give the solution!
Thanks in advance.
Thanks & Regards,
Prasad.Try this.I think you want output like this......
DATA: BEGIN OF LINE,
CARRID TYPE SBOOK-CARRID,
CONNID TYPE SBOOK-CONNID,
FLDATE TYPE SBOOK-FLDATE,
CUSTTYPE TYPE SBOOK-CUSTTYPE,
CLASS TYPE SBOOK-CLASS,
BOOKID TYPE SBOOK-BOOKID,
END OF LINE.
DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY TABLE LINE.
SELECT CARRID CONNID FLDATE CUSTTYPE CLASS BOOKID
FROM SBOOK INTO CORRESPONDING FIELDS OF TABLE ITAB.
LOOP AT ITAB INTO LINE.
AT FIRST.
WRITE / 'List of Bookings'.
ULINE.
ENDAT.
AT NEW CARRID.
WRITE: / 'Carrid:', LINE-CARRID.
ENDAT.
AT NEW CONNID.
WRITE: / 'Connid:', LINE-CONNID.
ENDAT.
AT NEW FLDATE.
WRITE: / 'Fldate:', LINE-FLDATE.
ENDAT.
AT NEW CUSTTYPE.
WRITE: / 'Custtype:', LINE-CUSTTYPE.
ENDAT.
WRITE: / LINE-BOOKID, LINE-CLASS.
AT END OF CLASS.
ULINE.
ENDAT.
ENDLOOP.
This is also helpful......
LOOP AT <itab>.
AT FIRST. ... ENDAT.
AT NEW <f1>. ...... ENDAT.
AT NEW <f2 >. ...... ENDAT.
<single line processing>
AT END OF <f2>. ... ENDAT.
AT END OF <f1>. ... ENDAT.
AT LAST. .... ENDAT.
ENDLOOP.
Regards
Abhishek -
i have a internal table i_final in program 1 and this internal table data need to be input of other program, so how i need to pass the i_final data to other program.
this is the code in program 1:
ENDIF.
**appending work area to internal table.
APPEND wa_final TO i_final.
ENDLOOP.
EXPORT i_final to memory id 'zfinal'.
this is the code in program 2:
TYPES: BEGIN OF t_final,
bukrs TYPE bkpf-bukrs,
belnr TYPE bkpf-belnr,
blart TYPE bkpf-blart,
xblnr TYPE bkpf-xblnr,
ebeln TYPE ekbe-ebeln,
ebelp TYPE ekbe-ebelp,
belnr1 TYPE ekbe-belnr,
xblnr1 TYPE ekbe-xblnr,
ebeln1 TYPE ekko-ebeln,
exnum TYPE ekko-exnum,
lands TYPE ekko-lands,
stceg_l TYPE ekko-stceg_l,
END OF t_final.
DATA: i_final TYPE STANDARD TABLE OF t_final WITH HEADER LINE.
DATA: wa_final TYPE t_final.
IMPORT i_final from memory ID 'zfinal'.
write: i_final.
its giving Dump. -
Dynamic internal table column issue
Hi
i have ALV report with dynamic internal table.after i build the internal table and fieldcatalog i have problem i.e. when grid is displayed then one of the column value is coming in the next column.i populated col_pos in field catalog also and in the debug mode data is populated correctly for respective columns in fieldcatalog and dynamic internal table. But when it is displayed i have this problem.
any inputs on this?Hi Moorthy,
Did you perform an ALV consistency check?
Check the below given links as well.
The Consistency Check - ALV Grid Control (BC-SRV-ALV) - SAP Library
SAP ALV Consistency Check
Regards,
Philip. -
Hi,
I have 2 internal tables with different struc:
1 itab1 2. itab2
CID, CID
CEID, CEID
Month From
Year TO
for the second itab at run time i want to provide the values from(concatination of month and year) and TO.
1. i want to extract the data from the DB tables and add to the itab1
2. same data is copied to itab2 but at run time i wnat to concatenate the month and year in FROm and TO values will pass.
3. itab2 two is compare with another DB tables ...
Please help me with the code by taking any example..
can anyone will help me in this as iam unable to copy the data friol itab1 to itab2 because of diff strucure...
ur help is appreciable....
anjaliHi Neil,
table1 : CID , CEId, Month , Year.
Table2 : CID , CEID, FROM, TO.( in this data already present but we need to modify the data for TO)
these are the two database tables....
table 1 data is coming from thirdparty and these is passing to FM...
1. so ... i have created created itab1 and copied the data from table 1 to itab1( here i created itab1 similar structure to table1)
2. i created 2nd internal table with CID,CEID,FROM and TWO ( FRom aand TO i accepted the fields from Table2)
3. know i want to copy the data of first internal table to second internal table....
but condition is CID (copy as it is) CEID (copy as it is) FROm should be concatenation of Month and year of itab1.TO need to be passed from program.
4. know compare the data which is their in itab2 with table2.
how to gohead can atleast some one will help me... plz provide me the code
Anjali -
Hi,
I have got 3 tables:
it_extnout (old)
Fld1 Fld2 Fld3 Fld4 Fld5 Fld6 Fld7
ABC 123 70 JKL 5.00 A Q
it_extnin (new)
Fld1 Fld2 Fld3 Fld4 Fld5 Fld6 Fld7
ABC 123 99 LMN
it_extnin_x(update flag for new)
Fld1 Fld2 Fld3 Fld4 Fld5 Fld6 Fld7
ABC 123 X X X
So now...my requirement is as follows:
if an update flag is set for any field in it_extnin_x, then new value should get updated in it_extnout table.
Here, fld3, 4, and 6 is set for update, so finally my it_extnout should look like
Fld1 Fld2 Fld3 Fld4 Fld5 Fld6 Fld7
ABC 123 99 LMN 5.00 Q
Also, any field from fld3 to fld7 could be marked for an update, so it is dynamic.
I do not want to write read statements for each column like
read table itab with key fld3 = X (if sy-subrc is 0, then do some processing)
or read table itab with key where fld4 = X and so on....
What is the optimum way to achieve the same?
Any useful is deeply appreciated!
Thanks
Follow the rules of engagement, Don't use multiple user accounts for posting the question
If you repeat this your user will be locked and deleted
Edited by: Vijay Babu Dudla on Apr 20, 2011 10:19 AMTry this.I think you want output like this......
DATA: BEGIN OF LINE,
CARRID TYPE SBOOK-CARRID,
CONNID TYPE SBOOK-CONNID,
FLDATE TYPE SBOOK-FLDATE,
CUSTTYPE TYPE SBOOK-CUSTTYPE,
CLASS TYPE SBOOK-CLASS,
BOOKID TYPE SBOOK-BOOKID,
END OF LINE.
DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY TABLE LINE.
SELECT CARRID CONNID FLDATE CUSTTYPE CLASS BOOKID
FROM SBOOK INTO CORRESPONDING FIELDS OF TABLE ITAB.
LOOP AT ITAB INTO LINE.
AT FIRST.
WRITE / 'List of Bookings'.
ULINE.
ENDAT.
AT NEW CARRID.
WRITE: / 'Carrid:', LINE-CARRID.
ENDAT.
AT NEW CONNID.
WRITE: / 'Connid:', LINE-CONNID.
ENDAT.
AT NEW FLDATE.
WRITE: / 'Fldate:', LINE-FLDATE.
ENDAT.
AT NEW CUSTTYPE.
WRITE: / 'Custtype:', LINE-CUSTTYPE.
ENDAT.
WRITE: / LINE-BOOKID, LINE-CLASS.
AT END OF CLASS.
ULINE.
ENDAT.
ENDLOOP.
This is also helpful......
LOOP AT <itab>.
AT FIRST. ... ENDAT.
AT NEW <f1>. ...... ENDAT.
AT NEW <f2 >. ...... ENDAT.
<single line processing>
AT END OF <f2>. ... ENDAT.
AT END OF <f1>. ... ENDAT.
AT LAST. .... ENDAT.
ENDLOOP.
Regards
Abhishek -
First, here's what my DB looks like (MSDE 2000):
userX.TableA
userX.TableB
The DSN in CFAdmin is functional, it validates. I have
provided the username and password for userX specified earlier in
my DB setup for the DSN. It indicates "OK".
Here's my error when I run the page:
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object
name 'TableA'.
I have specified the username and password in the cfquery tag
as well. I'll be uploading this code on a production server. The
code as it is works on production - it's shared hosting so I don't
know how they're setup.
Not sure if someone can provide any clues to why this isn't
working at my end on my development environment.I was talking with a DBA friend and I think we figured it
out.
I was logged into the database using userX's credential. I
ran a simple SQL and it didn't find the table unless I prefixed it
using userX.
I looked at the security side of things for userX and the
user wasn't mapped to that database in question. I'm assuming that
this is the cause. In my case, I can't map the user due to the way
I imported the backup (I get an error while trying to map due to
the user already being in the database - or something like that).
My goal is to figure out how to import the DB properly
without creating the user in the database. Then, I could simply
create the login and map it to the database and in theory, I'd be
done - I think. -
Populating dynamic internal table
Hi All,
I've created a dynamic internal table the issue is that the data is to be entered in it from 2 different tables so ...
is their any way we can read the internal table field names ...
or any other way to populate data in it ...hi
check this link
http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
thanks
sitaram -
Accessing internal tables at runtime.
Hi all,
I am writing a code where in i have to transfer data from excel to database table.
Iam getting the excel data in an itab. Can anybody help me with how to access internal tables at runtime ?
i am using the following code with sy-tabix. here, when the sy-tabix is odd it picks up the value,
but i want that within the same loop when i increment sy-tabix by 1, then it should fetch the second column of same row. But its not working as it shows an error that it does not permit subfield access.
the code is as follows:
LOOP AT t_tab[] into wa_tab .
data: l_tabix type sy-tabix,
name_index type sy-tabix.
data: c type i.
l_tabix = sy-tabix.
name_index = l_tabix+1.
c = ( l_tabix mod 2 ).
******to check if sy-tabix is odd**********
if c ne 0.
READ TABLE t_tab into wa_tab index l_tabix.
wa_product1-product = wa_tab-VALUE.
************incrementing sy-tabix*************
READ TABLE t_tab into wa_tab index name_index. (here it shows error)
wa_product1-product_name = wa_tab-value.
endif.
endloop.
Thanks in advance.Hi Omer,
Copy and paste this code.
=====================================
REPORT ztest_create_data_dynamic .
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
is_fcat LIKE LINE OF it_fcat.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
DATA: new_table TYPE REF TO data.
DATA: new_line TYPE REF TO data.
FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
Build fieldcat
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SYST'
CHANGING
ct_fieldcat = it_fcat[].
LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial.
MOVE-CORRESPONDING is_fcat TO is_fieldcat.
is_fieldcat-fieldname = is_fcat-fieldname.
is_fieldcat-ref_field = is_fcat-fieldname.
is_fieldcat-ref_table = is_fcat-ref_tabname.
APPEND is_fieldcat TO it_fieldcat.
ENDLOOP.
Create a new Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
Create a new Line with the same structure of the table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
Test it...
DO 30 TIMES.
ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = sy-index.
INSERT <l_line> INTO TABLE <l_table>.
ENDDO.
LOOP AT <l_table> ASSIGNING <l_line>.
ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
WRITE <l_field>.
ENDLOOP. -
Regarding Internal table and access performance
hey guys.
In my report , Somehow i reduced the query performance time by selecting minimum key fields and moved the selected records to internal table.
Now from this internal table i am restricting the loop
as per my requirements using where statements.(believing that internal table retrieval is more faster than database acces(using query)).
But still my performance goes down.
Could you pls suggest me how to reduce the execution time
in abap programming.
I used below commands.
Read using binary search.
loop ...where statement.
perform statements.
collect staements.
delete itab.(delete duplicates staements too)
sort itab(sorting).
For each above statements do we have any faster way to retrieval records.
If i see my bottle neck at se30.it shows
ABAP programming to 70 percent
database access to 20 percent
R3 system as 10percent.
now how to reduce this abap process.
could you pls reply.
ambichan.
ambichan.Hello Ambichan,
It is difficult to suggest the improvements without looking at the actual code that you are running. However, I can give you some general information.
1. READ using the BINARY SEARCH addition.
This is indeed a good way of doing a READ. But have you made sure that the internal table is <i>sorted by the required fields</i> before you use this statement ?
2. LOOP...WHERE statement.
This is also a good way to avoid looping through unnecessary entries. But further improvement can certainly be achieved if you use FIELD-SYMBOLS.
LOOP AT ITAB INTO <FIELD_SYMBOL_OF_THE_SAME_LINE-TYPE_AS_ITAB>.
ENDLOOP.
3. PERFORM statements.
A perform statement can not be optimized. what matters is the code that you write inside the FORM (or a subroutine).
4. COLLECT statements.
I trust you have used the COLLECT statement to simplify the logic. Let that be as it is. The code is more readable and elegant.
The COLLECT statement is somewhat performance intensive. It takes more time with a normal internal table (STANDARD). See if you can use an internal table of type SORTED. Even better, you can use a HASHED internal table.
5. DELETE itab.(delete duplicates staements too)
If you are making sure that you are deleting several entries based on a condition, then this should be okay. You cannot avoid using the DELETE statement if your functionality requires you to do so.
Also, before deleting the DUPLICATES, ensure that the internal table is sorted.
6. SORT statement.
It depends on how many entries there are in the internal table. If you are using most of the above points on the same internal table, then it is better that you define your internal table to be of type SORTED. That way, inserting entries will take a little more time (to ensure that the table is always sorted), but alll the other operations are going to be much faster.
Get back to me if you need further assistance.
Regards,
<a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=zwcc%2fwm4ups%3d">anand Mandalika</a>. -
Issue with uploading XML file from application server into internal table
i Need to fetch the XML file from the application server and place into internal table and i am getting error message while using the functional module SMUM_XML_PARSE and the error message is "line 1 col 1-unexpected symbol; expected '<', '</', entity reference, character data, CDATA section, processing instruction or comment" and could you please let me know how to resolve this issue?
TYPES: BEGIN OF T_XML,
raw(2000) TYPE C,
END OF T_XML.
DATA:GW_XML_TAB TYPE T_XML.
DATA: GI_XML_TAB TYPE TABLE OF T_XML INITIAL SIZE 0.
DATA:GI_STR TYPE STRING.
data: GV_XML_STRING TYPE XSTRING.
DATA: GI_XML_DATA TYPE TABLE OF SMUM_XMLTB INITIAL SIZE 0.
data:GI_RETURN TYPE STANDARD TABLE OF BAPIRET2.
OPEN DATASET LV_FILE1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC NE 0.
MESSAGE 'File does not exist' TYPE 'E'.
ELSE.
DO.
* Transfer the contents from the file to the work area of the internal table
READ DATASET LV_FILE1 INTO GW_XML_TAB.
IF SY-SUBRC EQ 0.
CONDENSE GW_XML_TAB.
* Append the contents of the work area to the internal table
APPEND GW_XML_TAB TO GI_XML_TAB.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
* Close the file after reading the data
CLOSE DATASET LV_FILE1.
IF NOT GI_XML_TAB IS INITIAL.
CONCATENATE LINES OF GI_XML_TAB INTO GI_STR SEPARATED BY SPACE.
ENDIF.
* The function module is used to convert string to xstring
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = GI_STR
IMPORTING
BUFFER = GV_XML_STRING
EXCEPTIONS
FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE 'Error in the XML file' TYPE 'E'.
ENDIF.
ENDIF.
IF GV_SUBRC = 0.
* Convert XML to internal table
CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
XML_INPUT = GV_XML_STRING
TABLES
XML_TABLE = GI_XML_DATA
RETURN = GI_RETURN.
ENDIF.
READ TABLE GI_RETURN TRANSPORTING NO FIELDS WITH KEY TYPE = 'E'.
IF SY-SUBRC EQ 0.
MESSAGE 'Error converting the input XML file' TYPE 'E'.
ELSE.
DELETE GI_XML_DATA WHERE TYPE <> 'V'.
REFRESH GI_RETURN.
ENDIF.Could you please tel me why the first 8 lines were removed, till <Soap:Body and also added the line <?xml version="1.0" encoding="UTF-8"?> in the beggining .
Becuase there will be lot of XML files will be coming from the Vendor daily and that should be uploaded in the application server and should update in the SAP tables based on the data in the XML file.
what information i need to give to vendor that do not add the first 8 lines in the XML file and add the line in the beggining <?xml version="1.0" encoding="UTF-8"?> ??????
Is there any other way we can do with out removing the lines? -
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,
PrabhakarHI,
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. -
Issue in populating the dynamic internal table in SMARTFORMS
Hi Experts,
My requirement is I have a table in the below format.
Measuring Point
Description of Measuring Point
UOM
Date
Time
Reading
96
POWER GENERATED
kwh
20140501
101837
1.00E+04
96
POWER GENERATED
kwh
20140502
102220
1.00E+04
96
POWER GENERATED
kwh
20140503
104623
1.25E+01
96
POWER GENERATED
kwh
20140504
101111
2.00E+03
98
AUX POWER CONSUME
kwh
20140501
101837
1.00E+05
98
AUX POWER CONSUME
kwh
20140502
102220
1.00E+05
99
NET POWER EXPORTED
kwh
20140501
101837
1.00E+07
99
NET POWER EXPORTED
kwh
20140502
102220
1.00E+07
100
AVG POWER GENERATED
MW
20140501
101837
1.00E+02
100
AVG POWER GENERATED
MW
20140502
102220
1.00E+02
101
AUX POWER CONSUMED(%)
20140501
101837
1.00E+02
101
AUX POWER CONSUMED(%)
20140502
102220
1.01E+01
102
PLANT AVAILABLE HRS
hrs
20140501
101837
1.01E+01
102
PLANT AVAILABLE HRS
hrs
20140502
102220
1.01E+01
103
PLANT RUN HOURS
hrs
20140501
101837
1.01E+01
103
PLANT RUN HOURS
hrs
20140502
102220
1.01E+01
104
PLANT AVAILABLITY FACTOR
20140501
101837
1.00E+02
104
PLANT AVAILABLITY FACTOR
20140502
102220
1.00E+02
which i need to display like below based on the user Requirement for print out.
DATE
POWER GENERATED(96)
AUX POWER CONSUME(98)
NET POWER EXPORTED(99)
AVG POWER GENERATED(100)
AUX POWER CONSUMED(%)(101)
PLANT AVAILABLE HRS(102)
PLANT RUN HOURS(103)
PLANT AVAILABLITY FACTOR(104)
kwh
kwh
kwh
MW
hrs
hrs
01.05.2014
1.00E+04
1.00E+05
1.00E+07
1.00E+02
1.00E+02
1.01E+01
1.01E+01
1.00E+02
02.05.2014
1.00E+04
1.00E+05
1.00E+07
1.00E+02
1.01E+01
1.01E+01
1.01E+01
1.00E+02
03.05.2014
1.25E+01
04.05.2014
2.00E+03
Now the issue is how to assign the values of stops from the internal table to dynamically for a specific date in SMARTFORMS?
Please help me in resolving this issue.Hi,
See if this articale is good for you:
The case of "dynamic columns in smartform"
Regards.
Maybe you are looking for
-
HTTPS from JDK1.2.1 to JDK 1.4.1
We are trying to connect application running on JDK1.2.1 to application in JDK 1.4.1. Both applications are in Oracle 9ias application server but with different JDK and different physical machines. We are getting following error while trying to acces
-
(QM) How To Insert Control Characteristic To Multiple Inspenction Plans
Hello everyone, we created a new characteristic and want to add this characteristic to most of the inspenction plans. We have thousands of materials so we have to do it with a program. I searched the Bapi's FM's but i couldn't find such a bapi. We us
-
Hello all... I just recently upgrade my PowerBook G4 to Leopard. I am using DVD Studio Pro 3 and my projects that worked in 10.4 Tiger now are working 90% of the way but my frames/dropzones (buttons) and background videos either don't play/show or th
-
Adobe Indesign 1.5.2
I am using Windows XP SP2 on a Dell Optiplex 745 and I am having this problem. When I double-click on an InDesign file, the InDesign application starts, but the file doesn't open. I have to "manually" select Open and navigate to the file to open it.
-
I am looking to upgrade to FinalCut X from FinalCut Express. I need a new camcorder and want one that is Mac friendly. I am looking for a good name brand camcorder that I do not have to do a "workaround" to have files convert. Any suggestions?