Application Development and Automation 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: 
Read only

Routine for VOFM

Former Member
0 Likes
806

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

5 REPLIES 5
Read only

Former Member
0 Likes
740

ZTERM is available in KOMP.

try this way - ZTERM TYPE KOMP-ZTERM,

*reward if solved*

Read only

0 Likes
740

Hi sreejith ,

while debugging i check but there is no entry in KOMP-ZTERM.

Read only

0 Likes
740

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

Read only

0 Likes
740

hii rishi!

i am not clear abt it.

Read only

0 Likes
740

hii frnds !

how to debug with using field symbol?