-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial (v1.0.0) code commit (release)
- Loading branch information
Showing
6 changed files
with
1,421 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
*&---------------------------------------------------------------------* | ||
*& ABAP DATA PARSER | ||
*& project homepage: https://github.com/sbcgua/abap_data_parser | ||
*&---------------------------------------------------------------------* | ||
|
||
report zdata_parser. | ||
|
||
class lcl_test_data_parser definition deferred. | ||
|
||
include zdata_parser_class. | ||
include zdata_parser_tests. | ||
|
||
start-of-selection. | ||
|
||
* Help message | ||
|
||
write: / 'Abap data parser is an utility to parse TAB-delimited text into an internal table of an arbitrary'. | ||
write: / 'flat structure. It support "unstrict" mode which allows to skip fields in the source data (for the'. | ||
write: / 'case when only certain fields are being loaded). It supports "header" raw as the first line in the'. | ||
write: / 'text - in this case field order in the text may differ from the internal abap structure field order.'. | ||
write: / 'It also supports loading into a structure (the first data line of the text is parsed).'. | ||
write: /. | ||
write: / 'The tool is open source and distributed under MIT license.'. | ||
write: / 'The home page is https://github.com/sbcgua/abap_data_parser.'. | ||
write: /. | ||
write: / 'To utilize data_parser please include zdata_parser_class and zdata_parser_tests to your program.'. | ||
write: / 'Alternatively, you may also copy content of zdata_parser_class to your program and skip tests'. | ||
write: / '(please keep the license text, however). '. | ||
write: /. | ||
write: /(100) 'An example of usage:' color = 4. | ||
write: /. | ||
write: / ' data lt_container type my_table_type.'. | ||
write: /. | ||
write: / ' lcl_data_parser=>create( lt_container )->parse('. | ||
write: / ' exporting i_data = my_get_some_raw_text_data( )'. | ||
write: / ' importing e_container = lt_container ).'. | ||
write: /. | ||
write: /(100) '... or a more complex one ...' color = 4. | ||
write: /. | ||
write: / ' lcl_data_parser=>create('. | ||
write: / ' i_pattern = lt_container', at 52 '" table or structure' color = 2 inverse. | ||
write: / ' i_amount_format = '' .''', at 52 '" specify thousand and decimal delimiters' color = 2 inverse. | ||
write: / ' )->parse( '. | ||
write: / ' exporting'. | ||
write: / ' i_data = my_get_some_raw_text_data( )', at 52 '" string of CRLF separated rows of TAB separated fields' color = 2 inverse. | ||
write: / ' i_strict = abap_false', at 52 '" text may contain not all fields' color = 2 inverse. | ||
write: / ' i_has_head = abap_true', at 52 '" headers in the first line of the text' color = 2 inverse. | ||
write: / ' importing'. | ||
write: / ' e_container = lt_container ).', at 52 '" table or structure (first data line from text)' color = 2 inverse. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_PROG" serializer_version="v1.0.0"> | ||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"> | ||
<asx:values> | ||
<PROGDIR> | ||
<NAME>ZDATA_PARSER</NAME> | ||
<STATE>A</STATE> | ||
<SQLX/> | ||
<EDTX/> | ||
<VARCL>X</VARCL> | ||
<DBAPL/> | ||
<DBNA/> | ||
<CLAS/> | ||
<TYPE/> | ||
<OCCURS/> | ||
<SUBC>1</SUBC> | ||
<APPL/> | ||
<SECU/> | ||
<CNAM/> | ||
<CDAT>0000-00-00</CDAT> | ||
<UNAM/> | ||
<UDAT>0000-00-00</UDAT> | ||
<VERN/> | ||
<LEVL/> | ||
<RSTAT/> | ||
<RMAND/> | ||
<RLOAD>E</RLOAD> | ||
<FIXPT>X</FIXPT> | ||
<SSET/> | ||
<SDATE>0000-00-00</SDATE> | ||
<STIME/> | ||
<IDATE>0000-00-00</IDATE> | ||
<ITIME/> | ||
<LDBNAME/> | ||
<UCCHECK>X</UCCHECK> | ||
</PROGDIR> | ||
<DYNPROS/> | ||
<CUA> | ||
<ADM> | ||
<ACTCODE/> | ||
<MENCODE/> | ||
<PFKCODE/> | ||
<DEFAULTACT/> | ||
<DEFAULTPFK/> | ||
<MOD_LANGU/> | ||
</ADM> | ||
<STA/> | ||
<FUN/> | ||
<MEN/> | ||
<MTX/> | ||
<ACT/> | ||
<BUT/> | ||
<PFK/> | ||
<SET/> | ||
<DOC/> | ||
<TIT/> | ||
<BIV/> | ||
</CUA> | ||
<TPOOL> | ||
<item> | ||
<ID>R</ID> | ||
<KEY/> | ||
<ENTRY>Table parser</ENTRY> | ||
<LENGTH>12</LENGTH> | ||
<SPLIT/> | ||
</item> | ||
</TPOOL> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |
Oops, something went wrong.