on 03-23-2011 12:02 AM
I have activated Smartform Y640_SDORC_A but when it prints it puts item price as in internal price condition VPRS (which also happens to be the last row) instead of the correct price condition.
On the smarform code I get program GET_ITEM_COND :
DATA cv_itm_unit_price TYPE kbetr.
DATA cv_itm_amount TYPE kwert.
DATA cv_itm_freight_tot TYPE kwert.
DATA cv_itm_tax_tot TYPE kwert.
DATA ct_itm_vat_konv TYPE TABLE OF komvd.
CLEAR gt_itm_disp_konv.
CLEAR gv_itm_amount.
CLEAR gv_itm_all_tot.
DATA lt_komvd TYPE t_komvd_tab.
PERFORM get_itm_price_table
USING <fs>
is_vbdka
gv_price_print_mode
is_nast-spras
CHANGING
gt_komv
lt_komvd
gs_last_komk.
PERFORM get_itm_price_info_new
USING is_vbdka-knumv
<fs>-posnr
control_parameters-langu
lt_komvd
CHANGING gs_itm_price
* GV_ITM_UNIT_PRICE
gv_itm_amount
* GV_ITM_NET_VAL
cv_itm_freight_tot
cv_itm_tax_tot
gv_itm_all_tot
gt_itm_disp_konv
ct_itm_vat_konv.
*************************************
*ADD GV_ITM_NET_VAL TO GV_NET_SUM.
*ADD GV_ITM_ALL_TOT TO GV_ALL_SUM.
ADD cv_itm_tax_tot TO gv_tax_sum.
ADD cv_itm_freight_tot TO gv_freight_sum.
*GT_ITM_DISP_KONV[] = CT_ITM_DISP_KONV[]
DATA ls_itm_tax_konv TYPE komvd.
DATA ls_tax_konv TYPE komvd.
LOOP AT ct_itm_vat_konv INTO ls_itm_tax_konv.
ADD ls_itm_tax_konv-kawrt TO gv_tax_base_sum.
READ TABLE gt_tax_konv INTO ls_tax_konv
WITH KEY mwskz = ls_itm_tax_konv-mwskz.
IF sy-subrc = 0.
ADD: ls_itm_tax_konv-kawrt TO ls_tax_konv-kawrt,
ls_itm_tax_konv-kwert TO ls_tax_konv-kwert.
MODIFY gt_tax_konv FROM ls_tax_konv
TRANSPORTING kawrt kwert WHERE
mwskz = ls_tax_konv-mwskz .
ELSE.
APPEND ls_itm_tax_konv TO gt_tax_konv.
ENDIF.
ENDLOOP.
Where can I see the function "get_itm_price_info_new" ?
Thank you,
Regards
Carlos
Hello,
1 .Run transaction SMARTFORMS and open your form.
2 . Double click Global Definitions Below Global Settings.
3. Choose Tab Form Routines and find FORM get_itm_price_info_new.
Regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you David I found the Form.
Now I can see that an internal table gets created ( it_komvd ) and the price value its taken from there.
But the internal table its wrong as it only creates one row but not with condition PR00 as it should but with internal cost condition VPRS.
If somebody please can help me to find where is the code that creates this table?
This is part of the code of the Form:
FORM get_itm_price_info_new
USING
iv_doc_con_num TYPE knumv
iv_itm_num TYPE posnr
iv_contr_langu TYPE spras
it_komvd TYPE t_komvd_tab
CHANGING
cs_itm_price TYPE komvd
cv_itm_amount TYPE kwert
cv_itm_fright_tot TYPE kwert
cv_itm_tax_tot TYPE kwert
cv_itm_all_tot TYPE kwert
ct_itm_disp_konv TYPE t_komvd_tab
ct_itm_vat_konv TYPE t_komvd_tab.
DATA ls_konv TYPE komvd.
CLEAR cv_itm_fright_tot.
CLEAR ct_itm_vat_konv.
LOOP AT it_komvd INTO ls_konv.
DATA lv_vtext TYPE vtxtk.
Regards,
Carlos
Edited by: Carlos Salazar on Mar 24, 2011 8:20 PM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.