on 04-06-2011 11:47 PM
I want to modify SmartForm Y640_SDORC_A so I always print the net value and discount percentage.
I have an access sequence and my discount can be created by a discount percentage condition (ZD00) or by Special Price (PR01) condition.
My problem is that if I use the Special Price Condition the Internal Table where the smartform loops to get the price only gets the Net Value amount, and it wont print the discount percentage, but if I dont use the Special Price condition the internal value has 2 rows the first one is for Discount Condition and the second for Net Value and it prints correctly.
This is how my access secuence is arranged, the X are the print id column:
PR00 Price
ZD00 Discount (X)
PR01 Special Price
--- Net Value (X)
How can I fix the internal table creation so when there is a Special Price Condition (PR01) the internal table also gets the Discount percentage value.
Here is my Forms Code:
*&--------------------------------------------------------------------*
*& Form GET_ITM_PRICE_TABLE
*&--------------------------------------------------------------------*
*---------------------------------------------------------------------*
FORM get_itm_price_table
USING
is_vbdpa TYPE vbdpa
is_vbdka TYPE vbdka
iv_price_print_mode TYPE c
iv_spras TYPE spras
CHANGING
ct_komv TYPE t_komv_tab
ct_komvd TYPE t_komvd_tab
cs_komk TYPE komk.
DATA ls_komp TYPE komp.
DATA ls_komk TYPE komk.
* DATA lt_tkomv TYPE STANDARD TABLE OF komv.
IF ls_komk-knumv NE is_vbdka-knumv OR
ls_komk-knumv IS INITIAL.
CLEAR ls_komk.
ls_komk-mandt = sy-mandt.
ls_komk-kalsm = is_vbdka-kalsm.
ls_komk-kappl = 'V'.
ls_komk-waerk = is_vbdka-waerk.
ls_komk-knumv = is_vbdka-knumv.
ls_komk-knuma = is_vbdka-knuma.
ls_komk-vbtyp = is_vbdka-vbtyp.
ls_komk-land1 = is_vbdka-land1.
ls_komk-vkorg = is_vbdka-vkorg.
ls_komk-vtweg = is_vbdka-vtweg.
ls_komk-spart = is_vbdka-spart.
ls_komk-bukrs = is_vbdka-bukrs_vf.
ls_komk-hwaer = is_vbdka-waers.
ls_komk-prsdt = is_vbdka-erdat.
ls_komk-kurst = is_vbdka-kurst.
ls_komk-kurrf = is_vbdka-kurrf.
ls_komk-kurrf_dat = is_vbdka-kurrf_dat.
ENDIF.
ls_komp-kposn = is_vbdpa-posnr.
ls_komp-kursk = is_vbdpa-kursk.
ls_komp-kursk_dat = is_vbdpa-kursk_dat.
IF is_vbdka-vbtyp CA 'HKNOT6'.
IF is_vbdpa-shkzg CA ' A'.
ls_komp-shkzg = 'X'.
ENDIF.
ELSE.
IF is_vbdpa-shkzg CA 'BX'.
ls_komp-shkzg = 'X'.
ENDIF.
ENDIF.
IF iv_price_print_mode EQ 'A'.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
comm_head_i = ls_komk
comm_item_i = ls_komp
language = iv_spras
IMPORTING
comm_head_e = ls_komk
comm_item_e = ls_komp
TABLES
tkomv = ct_komv
tkomvd = ct_komvd.
ELSE.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM_BUFFER'
EXPORTING
comm_head_i = ls_komk
comm_item_i = ls_komp
language = iv_spras
IMPORTING
comm_head_e = ls_komk
comm_item_e = ls_komp
TABLES
tkomv = ct_komv
tkomvd = ct_komvd.
ENDIF.
cs_komk = ls_komk.
ENDFORM. "get_itm_price_table
Regards,
Carlos
Turns out this can be done modifiying access sequence.
Carlos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.