Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

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.

<b>DATA: t1, t2, t3, t4, t5 TYPE i.</b>

GET RUN TIME FIELD <b>t1</b>.

here the variable t1 should be of type i.

change "DATA: t1, t2, t3, t4, t5 TYPE i." to

data: t1 type i ,

t2 type i ,

t3 type i ,

t4 type i ,

t5 type i .

Regards

Raja

4 REPLIES 4

Vinod_Chandran
Active Contributor
0 Kudos

This could be due to field overflow. Please check.

In the second select if you are using FOR ALL ENTRIES, always check whether the internal table (here t_outtab1) contains atleast one record. Otherwise the select will be global.

E.g.

IF NOT t_outtab1[] IS INITIAL.

SELECT...

ENDIF.

Message was edited by: Vinod C

0 Kudos

Hello Vinod C,

thanks for your quick reply. I don't think that it is a problem with overflow, because the query only takes a view seconds and the same exception arises when I use p as datatype for the counter. When I comment the two select statements out, there is no exception, so I believe that it has something do to with the two form-modules. Thanks.

Regards, Lars.

0 Kudos

Hello Vino C and Durairaj Athavan Raja,

the suggestion of Durairaj Athavan Raja solved the problem. Thanks to you both.

Regards, Lars.

athavanraja
Active Contributor
0 Kudos

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.

<b>DATA: t1, t2, t3, t4, t5 TYPE i.</b>

GET RUN TIME FIELD <b>t1</b>.

here the variable t1 should be of type i.

change "DATA: t1, t2, t3, t4, t5 TYPE i." to

data: t1 type i ,

t2 type i ,

t3 type i ,

t4 type i ,

t5 type i .

Regards

Raja