2022 Jul 26 8:49 AM
Hellp SAP Community,
I have a program in which I have to "Calculate the amount to be paid"
This is the formula : VBRK-NETWR + VBRK-MWSBK + KONV-KWERT
The code I wrote is incomplete or missing something , can you help me out ?
NB : I have added all fields type in the internal table lt_vbak
DATA : lt_vbak TYPE STANDARD TABLE OF ty_vbak,
wa_vbak TYPE ty_vbak,
SUM TYPE P DECIMALS 2.
SELECT (I have selected all the fields used in the formula + others I need in my program)
+ some joins I need to call the field KWERT
INTO CORRESPONDING FIELDS OF TABLE @lt_vbak
LOOP AT lt_vbak ASSIGNING FIELD-SYMBOL(<FS_WA>).
IF <FS_WA> IS ASSIGNED.
SUM=<FS_WA>-NETWR + <FS_WA>-MWSBK + <FS_WA>-KWERT>
ENDIF.
ENDLOOP.
Hellp SAP Community,
I have a program in which I have to "Calculate the amount to be paid"
This is the formula : VBRK-NETWR + VBRK-MWSBK + KONV-KWERT
The code I wrote is incomplete or missing something , can you help me out ?
NB : I have added all fields type in the internal table lt_vbak
DATA : lt_vbak TYPE STANDARD TABLE OF ty_vbak,
wa_vbak TYPE ty_vbak,
SUM TYPE P DECIMALS 2.
SELECT (I have selected all the fields used in the formula + others I need in my program)
+ some joins I need to call the field KWERT
INTO CORRESPONDING FIELDS OF TABLE @lt_vbak
LOOP AT lt_vbak ASSIGNING FIELD-SYMBOL(<FS_WA>).
IF <FS_WA> IS ASSIGNED.
SUM=<FS_WA>-NETWR + <FS_WA>-MWSBK + <FS_WA>-KWERT>
ENDIF.
ENDLOOP.
2022 Jul 26 9:20 AM
Hello,
Everything seem fine. Can you explain in more details. When you run this code what is the problem.