Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

key figure no values

hi Colleagues,

My keyfigure EW05DLZEI is not displaying values in the infocube., Can you help me what this code does and what result it gives

FORM COMPUTE_/BIC/EW05DLZEI

USING RECORD_NO LIKE SY-TABIX

TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE

G_S_MINFO TYPE RSSM_S_MINFO

CHANGING RESULT TYPE /BIC/OIEW05DLZEI

G_T_ERRORLOG TYPE rssm_t_errorlog_int

RETURNCODE LIKE SY-SUBRC

ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage

$$ begin of routine - insert your code only below this line -

  • DATA: l_s_errorlog TYPE rssm_s_errorlog_int.

IF TRAN_STRUCTURE-zzwedat_likp IS INITIAL OR

"letzte Einlagerung erfolgt

TRAN_STRUCTURE-podat IS INITIAL OR

TRAN_STRUCTURE-potim IS INITIAL OR

TRAN_STRUCTURE-zzwedat IS INITIAL OR

TRAN_STRUCTURE-zzwetim IS INITIAL OR

( TRAN_STRUCTURE-podat EQ TRAN_STRUCTURE-zzwedat AND

TRAN_STRUCTURE-potim EQ TRAN_STRUCTURE-zzwetim ) OR

TRAN_STRUCTURE-podat > TRAN_STRUCTURE-zzwedat OR

( TRAN_STRUCTURE-podat EQ TRAN_STRUCTURE-zzwedat AND

TRAN_STRUCTURE-potim > TRAN_STRUCTURE-zzwetim ).

dlz = 0.

ELSE.

CALL FUNCTION 'ZEW05_DURATION_FABKL'

EXPORTING

i_date_from = TRAN_STRUCTURE-podat

i_time_from = TRAN_STRUCTURE-potim

i_date_to = TRAN_STRUCTURE-zzwedat

i_time_to = TRAN_STRUCTURE-zzwetim

i_werk = TRAN_STRUCTURE-werks

IMPORTING

e_duration_int = dlz.

  • E_DURATION_EXT =

  • E_UNIT_DAY =

RESULT = dlz * 24.

ENDIF.

  • returncode <> 0 means skip this record

RETURNCODE = 0.

  • abort <> 0 means skip whole data package !!!

ABORT = 0.

$$ end of routine - insert your code only before this line -

ENDFORM.

Former Member
Former Member replied

Hello there,

It appears that your code also calls a function developed with the name ZEW05_DURATION_FABKL

Here's what your code do:

If any of the fields:

zzwedat_likp,

podat,

potim

zzwedat

zzwetim

don't have values the field EW05DLZEI is zero;

If any of these conditions apply:

podat = zzwedat and potim = zzwetim

or

podat > zzwedat

or

podat = zzwedat and potim > zzwetim

the field EW05DLZEI will also be zero;

If none of the above applys, then the function ZEW05_DURATION_FABKL is called (you can check this function under the transaction se37) with the fields:

podat corresponding to date_from

potim corresponding to time_from

zzwedat corresponding to date_to

zzwetim corresponding to time_to

werks corresponding to werk

and this function returns a value

In that case the field EW05DLZEI will be the value returned by the function ZEW05_DURATION_FABKL * 24

Hope this helps,

Regards,

Diogo.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question