‎2007 Nov 16 11:40 AM
hi gurus !
i m creating new routine for vofm.
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.
READ TABLE XKOMV WITH KEY KSCHL = 'ZFBP'.
BASIC = XKOMV-KWERT.
READ TABLE XKOMV WITH KEY KSCHL = 'JIN7'.
VAT = XKOMV-KWERT.
SELECT SINGLE ZTAG2 INTO DAYS FROM T052 WHERE ZTERM = KOMP-ZTERM.
X = BASIC + VAT.
Y = ( X * 10 / 100 ) / 360.
Z = Y * DAYS.
komv-KWERT = Z * 100.
problem is that zterm fields is blank in structure KOMP.
wanna know in which structure i will get this field.
regards,
Rahul
Message was edited by:
rahul deshmukh
‎2007 Nov 16 12:12 PM
ZTERM is available in KOMP.
try this way - ZTERM TYPE KOMP-ZTERM,
*reward if solved*
‎2007 Nov 16 12:19 PM
Hi sreejith ,
while debugging i check but there is no entry in KOMP-ZTERM.
‎2007 Nov 16 12:36 PM
Hello,
Please try with XKOMP or *KOMP. If you dont find values in any of these structures then you can use field-symbols.
To use field symbol first in debugging mode set watch point and find the point where value of ZTERM getting populated in any of these structure ( KOMP,*KOMP,XKOMP) before entering into your routine.( you can use CALL push button indebugging to view inwhich prog. ZTERM lastly visible) Note down program and subroutine name and then call it into your pricing routine using field symbols as follows....
data: refkomv(18) value '(SAPMV45A)XKOMP[]'.
field-symbols: <fs_komp> type any.
assign (refkomv) to <fs_komp>.
if sy-subrc = 0.
it_komv[] = <fs_komp>.
Thus SAPMV45A is the code where vaule of XKOMP is found. Assign this to a variable which inturn assign to a F.S. then F.S. will give you vaule of XKOMP in
SAPMV45A.
I hope this will solve your problem. Reward points if helpful.
Rushikesh
‎2007 Nov 19 6:16 AM
‎2007 Nov 19 9:34 AM