Monday, October 11, 2010 at 12:59 AM | 0 comments

Tahapan untuk memanggil SmartForms :
- Sebelumnya buat form seperti di samping, untuk codenya bisa dilihat di bawah.







REPORT YTEST.

data : gv_func_module_name type rs38l_fnam,
   gs_control_parameters type ssfctrlop,
   gs_output_options type ssfcompop.

constants: cn_form(30) value 'YTEST'.


parameters: pa_prm1 type c length 30.
parameters: pa_prm2 type c length 30.


call function 'SSF_FUNCTION_MODULE_NAME'
   exporting
      formname = cn_form
   importing
      fm_name = gv_func_module_name
   exceptions
      no_form = 1
      no_function_module = 2
      others = 3.
if sy-subrc <> 0. exit. endif.

gs_control_parameters-preview = 'X'.
gs_output_options-tdnewid = 'X'.
gs_output_options-tddelete = 'X'.
gs_output_options-tdimmed = 'X'.

call function gv_func_module_name
   exporting
      control_parameters = gs_control_parameters
      output_options = gs_output_options
      user_settings = ' '
      pa_param1 = pa_prm1
      pa_param2 = pa_prm2
*   tables
*      gi_ytest = gi_ytest
   exceptions
      formatting_error = 1
      internal_error = 2
      send_error = 3
      user_canceled = 4
      others = 5.

- Tetapi sebelum di execute, kita harus buat smartforms dahulu.
dimana parameter pa_prm1 dan parame2 akan kita lempar ke smartforms.



- Klik 2x di Form Interface kemudian tambahkan pa_param1 dan pa_param2 di tab import.



- Klik 2x di %TEXT1 tambahkan PA_PRM1 : &pa_param1&


- Klik 2x di %TEXT2 tambahkan PA_PRM2 : &pa_param2& ( sama seperti di atas )
- kemudan jalankan dan akan terlihat seperti dibawah.

Posted by Shanto Labels:
Bagaimana merubah page orientation (Portrait/Landscape) di SmartForm.

1. Pertama buka smartform ( tcode smartforms ).
2. Klik 2x TEST, Klik "Output Options" tab, Disana akan terlihat print attributes kemudian pilih Page Format.

Capture Screen :

Posted by Shanto Labels:
Wednesday, October 6, 2010 at 5:58 AM | 0 comments
Fungsi DateDiff adalah mengembalikan jumlah interval antara dua tanggal itu di VB, sedangkan di ABAP kita bisa mengunakan fungsi DAYS_BETWEEN_TWO_DATES.

Contoh :

CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
   i_datum_bis = '20080401'
   i_datum_von = '20080327'
   i_stgmeth = 2
IMPORTING
   e_tage = output_interval.
Posted by Shanto Labels: