Skip to Content

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

routine problem for VOFM

hi gurus ,

in VOFM , I am creating a routine for VA01 , conditions formula, for customer discount, Z007 is condition type , but problem is that after running the program nothing is coming.

FORM FRM_KONDI_WERT_860.

*{ INSERT DFDK914010 1

if XKOMV-kschl = 'Z007'.

data : basic like xkomv-KWERT,

vat like xkomv-KWERT,

X LIKE xkomv-KWERT,

Y LIKE xkomv-KWERT,

Z LIKE xkomv-KWERT,

ZTERM LIKE KOMP-ZTERM,

DAYS LIKE T052-ZTAG2.

  • +SK21112007

data: z_zterm like vbkd-zterm.

data: ref_zterm(21) value '(SAPMV45A)XVBKD-ZTERM'.

field-symbols: <FS_ZTERM> type any.

assign (ref_zterm) to <FS_ZTERM>.

z_zterm = <FS_ZTERM>.

*+SK21112007

READ TABLE XKOMV WITH KEY KSCHL = 'ZFBP'.

if sy-subrc = 0.

BASIC = XKOMV-KWERT.

endif.

READ TABLE XKOMV WITH KEY KSCHL = 'JIN7'.

if sy-subrc = 0.

VAT = XKOMV-KWERT.

endif.

*+SK21112007

SELECT SINGLE ZTAG1 INTO DAYS FROM T052

WHERE ZTERM = Z_ZTERM.

*+SK21112007

X = BASIC + VAT.

Y = ( X * 10 / 100 ) / 365.

Z = Y * DAYS.

*komv-KWERT = Z .

*xkomv-kwert = z.

xkwert = z.

endif.

*} INSERT

ENDFORM.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question