diff --git a/README.md b/README.md index 854aa9d..df867aa 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # sap-lib Template programs, utility procedures and code samples for ABAP and other SAP development tools. Contributions are welcome. -Templates, programs and classes (abap/lib-package folder) are activated in an ABAP 7.50 SP 4 system and exported via [abapGit](https://github.com/larshp/abapGit). Latest release can be imported into an ABAP 7.31 SP 2 system. +Templates, programs and classes (abap/lib-package folder) are activated in an ABAP 7.50 SP 4 system and exported via [abapGit](https://github.com/larshp/abapGit). Latest [release](https://github.com/kkayacan/sap-lib/releases) can be imported into an ABAP 7.31 SP 2 system. #### Disclaimer Code in snippets folder are samples and are not guaranteed to work by just copying and pasting. Adjust it according to your requirement. @@ -9,17 +9,18 @@ Code in snippets folder are samples and are not guaranteed to work by just copyi #### Folder structure - [abap](abap/) - [lib-package](abap/lib-package/) Templates and programs exported via abapGit - - [prog](abap/lib-package/prog/) Programs - - [tmplt](abap/lib-package/tmplt/) Templates + - [program](abap/lib-package/program/) Programs + - [template](abap/lib-package/template/) Templates - [snippets](abap/snippets/) #### Index ##### Programs -- [Extract ABAP development objects to html/text files](abap/lib-package/prog/massdownload/) +- [Extract ABAP development objects to html/text files](abap/lib-package/program/ydtp_mass_download.prog.abap) ##### Templates -- [SLIS ALV report with user interaction functionality](abap/lib-package/tmplt/slisalv/) +- [SLIS ALV report with user interaction functionality](abap/lib-package/template/yp_alv_template.prog.abap) +- [SALV mini template](abap/lib-package/template/yp_salv_mini.prog.abap) ##### Snippets - ALV diff --git a/abap/lib-package/prog/massdownload/ydtp_mass_download.prog.abap b/abap/lib-package/program/ydtp_mass_download.prog.abap similarity index 100% rename from abap/lib-package/prog/massdownload/ydtp_mass_download.prog.abap rename to abap/lib-package/program/ydtp_mass_download.prog.abap diff --git a/abap/lib-package/prog/massdownload/ydtp_mass_download.prog.xml b/abap/lib-package/program/ydtp_mass_download.prog.xml similarity index 100% rename from abap/lib-package/prog/massdownload/ydtp_mass_download.prog.xml rename to abap/lib-package/program/ydtp_mass_download.prog.xml diff --git a/abap/lib-package/tmplt/slisalv/yi_globalalv.prog.abap b/abap/lib-package/template/yi_globalalv.prog.abap similarity index 100% rename from abap/lib-package/tmplt/slisalv/yi_globalalv.prog.abap rename to abap/lib-package/template/yi_globalalv.prog.abap diff --git a/abap/lib-package/tmplt/slisalv/yi_globalalv.prog.xml b/abap/lib-package/template/yi_globalalv.prog.xml similarity index 100% rename from abap/lib-package/tmplt/slisalv/yi_globalalv.prog.xml rename to abap/lib-package/template/yi_globalalv.prog.xml diff --git a/abap/lib-package/tmplt/slisalv/yp_alv_template.prog.abap b/abap/lib-package/template/yp_alv_template.prog.abap similarity index 100% rename from abap/lib-package/tmplt/slisalv/yp_alv_template.prog.abap rename to abap/lib-package/template/yp_alv_template.prog.abap diff --git a/abap/lib-package/tmplt/slisalv/yp_alv_template.prog.xml b/abap/lib-package/template/yp_alv_template.prog.xml similarity index 100% rename from abap/lib-package/tmplt/slisalv/yp_alv_template.prog.xml rename to abap/lib-package/template/yp_alv_template.prog.xml diff --git a/abap/lib-package/template/yp_salv_mini.prog.abap b/abap/lib-package/template/yp_salv_mini.prog.abap new file mode 100644 index 0000000..1aaa549 --- /dev/null +++ b/abap/lib-package/template/yp_salv_mini.prog.abap @@ -0,0 +1,29 @@ +REPORT yp_salv_mini. + +TABLES: bkpf. + +DATA o_salv TYPE REF TO cl_salv_table. +DATA t_bkpf TYPE TABLE OF bkpf. + +SELECT-OPTIONS: s_budat FOR bkpf-budat. + +START-OF-SELECTION. + + SELECT * FROM bkpf INTO TABLE t_bkpf + WHERE budat IN s_budat. + +END-OF-SELECTION. + + CALL METHOD cl_salv_table=>factory + IMPORTING + r_salv_table = o_salv + CHANGING + t_table = t_bkpf. + + o_salv->get_functions( )->set_all( abap_true ). + o_salv->get_columns( )->set_optimize( abap_true ). + o_salv->get_columns( )->set_key_fixation( value = abap_true ). + o_salv->get_columns( )->set_column_position( columnname = 'BUDAT' + position = 1 ). + + o_salv->display( ). diff --git a/abap/lib-package/template/yp_salv_mini.prog.xml b/abap/lib-package/template/yp_salv_mini.prog.xml new file mode 100644 index 0000000..f4c1e4f --- /dev/null +++ b/abap/lib-package/template/yp_salv_mini.prog.xml @@ -0,0 +1,24 @@ + + + + + + YP_SALV_MINI + A + X + 1 + T + X + X + + + + + R + SALV mini template + 18 + + + + +