Skip to Content
0
Former Member
Aug 01, 2005 at 11:01 AM

The value of GET RUNTIME FIELD is '*'!?

79 Views

Hello,

I am try measuring the performance of two select querys. But the value of the second runtime field becomes '*' and produces an runtime exception. Can any body help me?. Thank.

Regards, Lars.

P.S.: The Code

&----


*& Report ZTEST *

*& *

&----


*& HAHA *

*& *

&----


REPORT ZTEST.

TYPES: ty_data TYPE zsd_count_log_KZ.

TABLES: vbap, vbak, vapma, vbkd.

DATA: t_data TYPE STANDARD TABLE OF ty_data.

DATA: wa_data TYPE ty_data.

FIELD-SYMBOLS: <data> TYPE ty_data.

DATA: str1 TYPE STRING, str2 TYPE STRING.

DATA: t1, t2, t3, t4, t5 TYPE i.

DATA: t_outtab TYPE STANDARD TABLE OF ty_data.

DATA: t_outtab1 TYPE STANDARD TABLE OF ty_data.

DATA: t_outtab2 TYPE STANDARD TABLE OF ty_data.

DATA: wa_outtab TYPE ty_data.

***********************************************************************

*Selektionsbildschirm

***********************************************************************

SELECTION-SCREEN BEGIN OF BLOCK 1-1 WITH FRAME TITLE text-s01.

SELECT-OPTIONS: s_vkorg FOR vbak-vkorg OBLIGATORY memory id vko,

s_vtweg FOR vbak-vtweg,

s_spart FOR vbak-spart,

s_auart FOR vbak-auart,

s_vbeln FOR vbak-vbeln,

s_kunnr for vbak-kunnr,

s_wempf for vbak-kunnr,

s_vsbed for vbak-vsbed,

s_augru for vbak-augru.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF BLOCK 1-2 WITH FRAME TITLE text-s03.

SELECT-OPTIONS: s_vdatu FOR vbak-vdatu NO-EXTENSION

memory ID log_kz_vdatu_010805.

SELECT-OPTIONS: s_fkdat FOR vbkd-fkdat NO-EXTENSION

memory ID log_kz_fkdat_010805.

SELECT-OPTIONS: s_prsdt FOR vbkd-prsdt NO-EXTENSION

memory ID log_kz_prsdt_010805.

SELECTION-SCREEN END OF BLOCK 1-2.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF BLOCK 1-3 WITH FRAME TITLE text-s02.

SELECT-OPTIONS: s_werks FOR vbap-werks,

s_matnr FOR vbap-matnr,

s_vstel FOR vbap-vstel,

s_ABGRU for vbap-ABGRU.

SELECTION-SCREEN END OF BLOCK 1-3.

SELECTION-SCREEN END OF BLOCK 1-1.

SELECTION-SCREEN: BEGIN OF BLOCK 2-1

WITH FRAME TITLE text-s03.

PARAMETERS: p_vari LIKE disvariant-variant.

SELECTION-SCREEN: END OF BLOCK 2-1.

***********************************************************************

*Selektionsbildschirm

***********************************************************************

SET RUN TIME CLOCK RESOLUTION HIGH.

GET RUN TIME FIELD t1.

PERFORM firstselect.

GET RUN TIME FIELD t2.

PERFORM secondselect.

GET RUN TIME FIELD t3.

WRITE: / 'ERSTESELECT', 'ZWEITESELECT'.

t4 = t2 - t1.

t5 = t3 - t2.

WRITE: / t4, t5.

FORM firstselect.

SELECT kvkorg kvtweg kspart kauart k~kunnr

kvsbed kaugru kvbeln kmandt

FROM VBAK AS k

INTO CORRESPONDING FIELDS OF TABLE t_outtab1

WHERE k~vkorg IN s_vkorg AND

k~vtweg IN s_vtweg AND

k~spart IN s_spart AND

k~auart IN s_auart AND

k~kunnr IN s_kunnr AND

k~vsbed IN s_vsbed AND

k~augru IN s_augru AND

k~vbeln IN s_vbeln.

ENDFORM.

FORM secondselect.

SELECT pposnr pvstel p~werks

pabgru pmatnr p~kwmeng

pzzurmeng pvrkme pmandt pvbeln

FROM VBAP AS p

INTO CORRESPONDING FIELDS OF TABLE t_outtab2

FOR ALL ENTRIES IN t_outtab1

WHERE

p~vstel IN s_vstel AND

p~werks IN s_werks AND

p~matnr IN s_matnr AND

p~abgru IN s_abgru AND

  • t_outtab1-mandt = p~mandt AND

p~vbeln = t_outtab1-vbeln.

ENDFORM.