Useful ABAP Functions

Function Description
POPUP_TO_SELECT_MONTHSelect month and year.
GUI_RUNRun command on client side.

Split string to lines for displaying

[code]DATA: lv_content TYPE string, lv_pos TYPE i, lv_len TYPE i. lv_content = ‘dummy string’. lv_pos = 1. WHILE lv_pos LE strlen( lv_content ). lv_len = 80. IF lv_pos + lv_len GT strlen( lv_content ). lv_len = strlen( lv_content ) – lv_pos. ENDIF. WRITE lv_content+lv_pos(lv_len). lv_pos = lv_pos + 80. ENDWHILE.[/code]

Installing SAP Netware ABAP 7.51 SP02 on CentOS 7 Minimal

You can find great documentation for installing SAP Netware ABAP 7.51 SP02 at Julie blog post. I didn’t use shared OS because of huge disk/ram usage.

Prerequest

Install your favorite text editor

Install nano, vim, etc with yum.

[code]yum install nano[/code]

Enable ssh for root

You can open multiple terminal and make copy paste with ssh to your server.

[code]nano /etc/ssh/sshd_config[/code]

Remove # for uncomment line “PermitRootLogin yes” or add it if missing.
[code]service sshd restart[/code]

Disable firewall

You need to open a lot of port for SAP Netware in firewall. You can disable firewall instead of configuring it.

[code]service firewalld stop
systemctl disable firewalld[/code]

Install uuidd package

SAP Netware using uuidd library for generating GUID, install it.

[code]yum install uuidd[/code]

Install vmware tools and shared folder

Install open-vm-tools.

[code]yum install open-vm-tools[/code]

You can find vmware tools in VMWare Virtual Machine menu as Install VMware Tools. Then you can check /mnt folder for CD which including tools. Copy it to your temp.

[code]cp VMwareTools-10.x.tar.gz /tmp
tar -zxvf VMwareTools-10.x.tar.gz[/code]

Install python for tools installer.

[code]yum install python[/code]

Change directory to extracted folder then run tools installer.

[code]phyton install vmware-install.pl[/code]

Installation

Start installation script with below arguments.

[code]./install.sh -g -s[/code]

SOAP Üzerinden RFC Fonksiyon Çağırmak

Aşağıdaki URL’i kullanarak SAP üzerinden ilgili fonksiyonun WSDL’i alınabilir:

http://sapserverurl/sap/bc/soap/wsdl?sap-client=clientnumber&services=functioname

Elde edilen WSDL kullanılarak gerekli client geliştirilebilir.

SOAMANAGER’ı yetkisiz çalıştırmak

SE93 t-code’undan WDYID t-code’unu girerek çalıştırın:

Application parametresine APPL_SOAP_MANAGEMENT
Start Mode parametresine ise BROWSER girerek raporu yürütün.

Exit bulmak

CL_EXITHANDLER class’ının GET_INSTANCE methoduna break point koyarsanız, programlar exit çağırmaya çalıştığında yakalayabilirsiniz.

İki tarih arasındaki gün sayısı

[code]call function ‘DAYS_BETWEEN_TWO_DATES’
exporting
i_datum_bis             = s_date-high
i_datum_von             = s_date-low
i_stgmeth               = 2
importing
e_tage                  = lv_i
exceptions
days_method_not_defined = 1
others                  = 2.

” i_stgmeth parametresi ay/yıl içindeki gün sayısını belirtmektedir:
” 1 360 gün üzerinden
” 2 gerçek gün sayısı[/code]