" ty_output and tt_output are just dummy types
DATA: l_output_line TYPE ty_output,
l_output_lines TYPE tt_output,
l_csv_output TYPE truxs_t_text_data,
l_txt_output TYPE TABLE OF string,
PARAMETERS: p_alv RADIOBUTTON GROUP rb1 DEFAULT 'X' USER-COMMAND radio,
p_csv RADIOBUTTON GROUP rb1,
p_flcsv TYPE rlgrap-filename DEFAULT 'c:\temp\file.csv',
p_txt RADIOBUTTON GROUP rb1,
p_fltxt TYPE rlgrap-filename DEFAULT 'c:\temp\file.txt'.
" fill table l_output_lines with your data you want to export as txt or csv
IF p_csv = abap_true.
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
TABLES
i_tab_sap_data = l_output_lines
CHANGING
i_tab_converted_data = l_csv_output.
TRY.
cl_gui_frontend_services=>gui_download( EXPORTING filename = CONV #( p_flcsv )
filetype = 'ASC'
CHANGING data_tab = l_csv_output ).
CATCH cx_root INTO DATA(e_text).
MESSAGE e_text->get_text( ) TYPE 'I'.
ENDTRY.
ELSEIF p_txt = abap_true.
LOOP AT l_output_lines INTO l_output_line.
CALL FUNCTION 'SO_STRUCT_TO_CHAR'
EXPORTING
ip_struct = l_output_line
IMPORTING
ep_string = l_string.
APPEND l_string TO l_txt_output.
ENDLOOP.
TRY.
cl_gui_frontend_services=>gui_download( EXPORTING filename = CONV #( p_fltxt )
filetype = 'ASC'
CHANGING data_tab = l_txt_output ).
CATCH cx_root INTO e_text.
MESSAGE e_text->get_text( ) TYPE 'I'.
ENDTRY.
ENDIF.
Tag: SAP
[SAP] Install SAP Gui for Java 7.50 on Linux Mint 20
Download
First have a look at the Requirements and FAQ.
Find the download link in the SAP Support Portal here. You will need a valid S-User and download permissions.
If you are not able to download the installer via Support Portal, there is a little workaround. Both, the installer for SAP Gui for Windows and SAP Gui for Java are also delivered with the AS ABAP 752 SP04, developer edition:
“The actual download (in the form of several .rar files), along with more information is available from the SAP Community Trials and Downloads page. Search for “7.52 SP04″ for convenience.”
You will have to download all 11 .rar files (about 14,6GB). When unziping, you’ll find a folder called client (about 1,2GB) containing both installers.
Installation
Since SAP Gui 7.50 Rev 5, Oracles JDKs is not necessary to run SAP Gui for Java, instead you are able to use OpenJDK. Read more about it here. And since version 7.50 Rev 8 the installer includes SapMachine and OpenJFX. Read more about it here. In this case, you don’t even have to install OpenJKD and OpenJFX by yourself and don’t have specify the module path, because it comes containerized within the SAP Gui.
So better first check the version of your downloaded gui. I’ve got SAP Gui 750 rev 5 within the AS ABAP 752 SP04. So let’s install openJDK & openJFX.
sudo apt-get install openjdk-11-jre openjfx
java --version
Finally lets install the SAP Gui:
cd JavaGUI/
java -jar PlatinGUI750_5-80002496.JAR install
The important step during the installation of SAP Gui for Java Rev 5 is to define the option for the module path. The module path hast to point to the OpenJFX lib-path:
/usr/share/openjfx/lib
Now you should be able to run the SAP Gui on Linux Mint 20
Eclipse ADT
When using Eclipse with ADT in combination with SAP Gui for Java and receiving the following error:
"The system reqirements are not met.Could not find: javafx.propertiesin: /usr/lib/jvm/java-11-openjdk-amd64/libYour Java Virtual Machine seems not to support JavaFX, required to run the SAPGUI for Java 7.50 rev 5.Please make sure you provide a valid path to the Java FX modules during guiinstallation."
You also have to add the OpenJFX path to the eclipse.ini file. Read more about it here.
--module-path=/usr/share/openjfx/lib
--add-modules=ALL-MODULE-PATH
[ABAP] Fill table rows into range table
DATA(pernrs) = VALUE pernr_tab( ( |00000001| )
( |00000002| )
( |00000003| ) ).
DATA(lr_pernr) = VALUE cchry_pernr_range( FOR pernr IN pernrs ( sign = 'I'
option = 'EQ'
low = pernr
high = '' ) ).
"Append row to range
APPEND VALUE #( option = 'EQ'
sign = 'I'
low = pernr ) TO lr_pernr.
[ABAP] Read IT0008 lgart values
Oldschool abap…
DATA: BEGIN OF i0008,
lgart LIKE p0008-lga01,
betrg LIKE p0008-bet01,
anzhl LIKE p0008-anz01,
eitxt LIKE p0008-ein01,
opken LIKE p0008-opk01,
indbw LIKE p0008-ind01,
END OF i0008.
rp-provide-from-last p0008 space pn-begda pn-endda.
DO 40 TIMES
VARYING i0008-lgart FROM p0008-lga01 NEXT p0008-lga02
VARYING i0008-betrg FROM p0008-bet01 NEXT p0008-bet02
VARYING i0008-anzhl FROM p0008-anz01 NEXT p0008-anz02
VARYING i0008-eitxt FROM p0008-ein01 NEXT p0008-ein02
VARYING i0008-opken FROM p0008-opk01 NEXT p0008-opk02
VARYING i0008-indbw FROM p0008-ind01 NEXT p0008-ind02.
IF i0008-lgart = '2001'.
EXIT.
ENDIF.
ENDDO.
[FI] Transactions
FPE3 | Beleg anzeigen |
FPL9 | Konto Anzeigen |
FBL3N | offene Posten für Sachkonten |
FS00 | Kontenplan anlegen |
[SAP] SAP Gui login with single click in KeePass
Just paste the following string into the URL field when creating a new entry in KeePass. You only have to replace three parameters manually:
- system
- sysname
- language
The two parameters system
and sysname
have to match exactly the system settings in your SAP Gui.
cmd://sapshcut -maxgui -system=E01 -sysname="SAP Dev System" -client=100 -user={USERNAME} -pw={PASSWORD} -language=DE
With a single click on the URL string or by using the shortcut CTRL + U, the SAP Gui will open and log you in.
You can find out more about the parameters for the sapshcut program, by opening the Windows Power Shell and entering
start sapshcut /?
Of course, you could also log in via command line or via batch script (.bat), but this would require to write/store your password in clear text.
start sapshcut -maxgui -system=E01 -sysname="SAP Dev System" -client=011 -user=testuser -pw=testpassword -language=DE
[Fiori] Leave Request Approval Steps with Custom Workflow
If you want to copy the standard workflow of the leave request approval process (WS12300111) and are adding another approval step (or you just want to add an escalation where you set the approve workitem to obsolete and create a new approval step for the next approver) you have to implement the following BAdI. In detail you only have to add the new step ID in the filter, else the approver will not see any approval or reject buttons in his inbox. See details here.
BAdI: /IWWRK/BADI_WF_BEFORE_UPD_IB
As second step you have to add the Workflow in the customizing. You’ll find further information here.
[Fiori] MyInbox BAdI’s
Paket: SWL = Business Workflow: Worklist Client
Paket: SWW = Business Workflow: Workitems
Also usefull:
[Fiori] HCM Fiori Apps: OData Classes, Functionsmodules and BAdI’s
Transactions:
PTARQ | Testumgebung Abwesenheitsmitteilung |
PTCOR | Testumgebung Zeitbuchungskorrektur |
HCM Fiori OData Services:
Request database :
BAdI’s:
Leave Request Functionsmodules: