on 12-27-2013 2:26 PM
Hi SCN,
We have upgraded from ECC 4.6C to ECC 6.0,
We are facing a wired problem while creating sales order:
When creating SO system is showing pricing condition type with description and analysis button is also fine
but as we save or make some changes in the document the tab looks like this:
Condition name is appearing blank, and when clicking analysis button
When we try enter manual condition type it gives a wired message:
Message no. V1206
Where as there is no pricing procedure with name A in pricing procedure, don't know why system is taking all the condition types description out and giving this error.
Correct help will be appreciated.
Thank you,
Warm Regards,
#SRT
Hi,
1. Check if user exits under program MV61AFZA aand MV45AFZZ are used.
2. Check if any routine assigned to the pricing procedure condition types.
3. Check the pricing procedure getting determined in the sales order header level (before and after save/change)and also check ovkk pricing procedure determination configuration.
This mostly seems to be some issue in ABAP code.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
Many thanks for your reply,
Yes you are rite there is a condition formula for alternative condition type which may be the reason because when I am removing that system is working perfectly fine.
But we are not able to comprehend that same formula was working in 4.6C where as giving this wired error in ECC 6.
We are totally confused because there is no syntax error in the program (RV64A901) and we are clueless what to do.
Thanks,
Regards
#SRT
Dear SRT,
Same issue I faced in my previous project. I resolved my issue through Regenerating all the condition tables in V/03 T code.
1. So use T code V/03
2. Enter your condition table ( In fact all condition table one by one )
3. Then in Condition Tab - Select Change
4. Generate that condition table again (Shift + F4).
Please find the screen below :
Kindly check and revert back.
Regards:
Abhishek
Hi Abhishek,
Many thanks for your replay, seems a kind of relief that you have faced similar issues.
But we are not using any access sequence for our condition types but I have I have done for all other created tables and still no luck, the problem still persist .
**Is there any other clue....??
Thanks for all your support and help.
Thank you,
Warm regards
#SRT
Couple of OSS notes are there which are related to your issue but they are older versions and since you have indicated that your current version is ECC6, I dont think, this will give you a solution. Moreover, I also dont find any OSS note related to ECC6. Better you raise an OSS message with SAP.
G. Lakshmipathi
Hi Ram,
Thanks for all your continuous support....here is the code with which it is working in old system, where as same is working in new system also but don't know why taking out pricing procedure and condition names..
FORM FRM_KONDI_WERT_901.
*{ INSERT TB2K921640 1
*
DATA:
found TYPE xfeld,
perc TYPE int1,
d TYPE i,
wa_xkomv LIKE xkomv,
it_xkomv TYPE TABLE OF komv_index,
wa_xkomv2 LIKE xkomv.
DATA: lt_item TYPE wty_pvwty_dia_tab,
ls_item TYPE wty_pvwty_dia,
lt_version TYPE wty_pnwtyv_dia_tab,
ls_version TYPE wty_pnwtyv_dia,
lt_header TYPE wty_pnwtyh_dia_tab,
ls_header TYPE wty_pnwtyh_dia.
DATA: wa_pnwtyh TYPE pnwtyh.
DATA:
date(10) TYPE c,
datum TYPE pnwtyh-refdt,
wa_premium TYPE zpr_premium.
DATA:
wa_premium_def TYPE zpr_premium_def,
acttype TYPE zpr_premium_def-type_of_act,
SALESACT TYPE zpr_premium_def-sales_act. "CR31030
DATA: cs_pnwtyv_dia TYPE wty_pnwtyv_dia,
ls_items TYPE wty_pvwty_dia,
pname TYPE wty_pvwty_dia-pname,
versn TYPE wty_versn,
lines TYPE i.
DATA:
knumv TYPE vbrk-knumv,
sum1 TYPE konv-kbetr,
it_konv TYPE TABLE OF konv,
wa_konv TYPE konv,
posnr TYPE vbrp-posnr.
DATA:
wert TYPE komv_index-kwert,
bonus_pct TYPE zpr_premium-bonus_pct,
bonus_amt TYPE zpr_premium-bonus_amt,
handling_pct TYPE zpr_premium-handling_pct,
handling_amt TYPE zpr_premium-handling_amt.
SELECT SINGLE *
FROM pnwtyh
INTO wa_pnwtyh
WHERE clmno EQ komk-wty_clmno.
IF sy-subrc EQ 0.
REFRESH: lt_header, lt_version, lt_item.
CALL METHOD cl_ppeliwty_cntl=>claim_read_db
EXPORTING
iv_clmno = wa_pnwtyh-clmno
IMPORTING
et_pnwtyh = lt_header
et_pnwtyv = lt_version
et_pvwty = lt_item.
***** get last version
DESCRIBE TABLE lt_version LINES lines.
SORT lt_version BY versn.
READ TABLE lt_version INTO ls_version INDEX lines.
* describe table lt_item lines lines.
READ TABLE lt_header INTO ls_header INDEX 1.
READ TABLE lt_item INTO ls_item
WITH KEY pname(4) = ls_version-versn .
*komp
*komk
*xkwert
*xkomv
CLEAR: sum1.
SELECT SINGLE posnr FROM vbrp
INTO posnr
WHERE vbeln EQ wa_pnwtyh-refno
AND pstyv EQ 'ZT00'.
IF sy-subrc NE 0.
* GET PESSENGER CARS DATA
SELECT SINGLE knumv
FROM vbrk
INTO knumv
WHERE vbeln EQ wa_pnwtyh-refno.
SELECT * FROM konv
INTO wa_konv
WHERE knumv EQ knumv
AND ( kschl EQ 'ZN00' OR kschl EQ 'ZN01'
OR kschl EQ 'ZN02' OR kschl EQ 'ZN50'
OR kschl EQ 'ZN60' OR kschl EQ 'ZN80' )
AND kawrt NE 0.
sum1 = sum1 + wa_konv-kbetr.
ENDSELECT.
ELSE.
* GET TRUCKS DATA
SELECT SINGLE knumv
FROM vbrk
INTO knumv
WHERE vbeln EQ wa_pnwtyh-refno.
SELECT * FROM konv
INTO CORRESPONDING FIELDS OF wa_konv
WHERE knumv EQ knumv
AND kposn EQ posnr
AND ( kschl EQ 'ZT01' OR kschl EQ 'ZT02'
OR kschl EQ 'ZT04' OR kschl EQ 'ZT05' OR kschl EQ 'ZT06' )
AND kawrt NE 0.
sum1 = sum1 + wa_konv-kbetr.
ENDSELECT.
ENDIF.
IF sy-sysid EQ 'TB2' AND sum1 IS INITIAL.
sum1 = 10000.
ENDIF.
* Get the type of advertising for the sales activity
SELECT SINGLE SALES_ACT type_of_act
FROM zpr_premium_def
INTO (SALESACT, acttype)
WHERE matnr EQ ls_item-matnr.
* Begin of change IM59239 PIPA 14.01.2009
* following code was commented and new one created with
* all registration type present in the system
* IF acttype EQ 'D'.
** Get the demo vehicle registration date
* CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
* EXPORTING
* vin = wa_pnwtyh-relob_ext
* atnam = 'RD0005' "Zulass.dat. VFW
* IMPORTING
* date = date
* EXCEPTIONS
* characteristic_not_found = 1
* vin_not_found = 2
* no_value = 3
* dump = 4
* OTHERS = 5.
* ELSE.
** Get the registration dealer date
* CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
* EXPORTING
* vin = wa_pnwtyh-relob_ext
* atnam = 'RD0002' " Zul.dat. Endkunde
* IMPORTING
* date = date
* EXCEPTIONS
* characteristic_not_found = 1
* vin_not_found = 2
* no_value = 3
* dump = 4
* OTHERS = 5.
* ENDIF.
*
* UNPACK date TO datum.
DATA: date1(10) TYPE c,
date2(10) TYPE c,
datum1 TYPE pnwtyh-refdt,
datum2 TYPE pnwtyh-refdt.
*-----------------------------------------------------------------------------
DATA: gv_frame_contract TYPE zpr_premium-frame_contr,
gv_body TYPE zpr_premium-body_type_code,
gv_modelcode TYPE zpr_premium-model_code,
gv_opt TYPE zpr_premium-opt,
gv_model_year TYPE zpr_premium-model_year,
gv_sam TYPE zpr_premium-sam,
gv_ddate TYPE c,
gv_edate TYPE c,
lv_demdate(10),
lv_enddate(10),
enddate TYPE d,
demdate TYPE d,
gv_dproc TYPE zpr_premium_def-cl_proc,
gv_eproc TYPE zpr_premium_def-cl_proc..
DATA: t_l_class LIKe sclass OCCURS 0 WITH HEADER LINE.
DATA: t_l_objectdata LIKE clobjdat OCCURS 0 WITH HEADER LINE.
DATA: t_l_object LIKE clobjekte OCCURS 0 WITH HEADER LINE.
DATA: t_l_sel_char LIKE sel_char OCCURS 0 WITH HEADER LINE.
DATA: lv_atwrt LIKE ausp-atwrt.
DATA: lv_atinn LIKE cabn-atnam.
DATA: lv_class TYPE klasse_d.
DATA: lv_klart TYPE klah-klart.
DATA: lv_object_low TYPE kssk-objek,
lv_atflv TYPE ausp-atflv.
* Begin of insert by Santosh for CR31855
CONSTANTS: c_a type char1 value 'A',
c_u type char1 value 'U'.
* End of insert by Santosh for CR31855
*-----------------------------------------------------------------------------
IF acttype EQ 'D'.
* Get the demo vehicle registration date
CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
EXPORTING
vin = wa_pnwtyh-relob_ext
atnam = 'RD0005' "Zulass.dat. VFW
IMPORTING
DATE = DATE
EXCEPTIONS
characteristic_not_found = 1
vin_not_found = 2
no_value = 3
dump = 4
OTHERS = 5.
UNPACK date TO datum.
ELSEIF acttype EQ 'E'.
* Get the registration dealer date
CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
EXPORTING
vin = wa_pnwtyh-relob_ext
atnam = 'RD0002' " Zul.dat. Endkunde
IMPORTING
DATE = DATE
EXCEPTIONS
characteristic_not_found = 1
vin_not_found = 2
no_value = 3
dump = 4
OTHERS = 5.
UNPACK date TO datum.
ELSEIF acttype EQ 'F'.
* retrieve first registration
* Get the demo vehicle registration date
CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
EXPORTING
vin = wa_pnwtyh-relob_ext
atnam = 'RD0005' "Zulass.dat. VFW
IMPORTING
DATE = DATE1
EXCEPTIONS
characteristic_not_found = 1
vin_not_found = 2
no_value = 3
dump = 4
OTHERS = 5.
UNPACK date1 TO datum1.
* Get the registration dealer date
CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
EXPORTING
vin = wa_pnwtyh-relob_ext
atnam = 'RD0002' " Zul.dat. Endkunde
IMPORTING
DATE = DATE2
EXCEPTIONS
characteristic_not_found = 1
vin_not_found = 2
no_value = 3
dump = 4
OTHERS = 5.
UNPACK date2 TO datum2.
IF date1 IS NOT INITIAL AND date2 IS NOT INITIAL.
IF datum1 < datum2.
datum = datum1.
ELSE.
datum = datum2.
ENDIF.
ELSEIF date1 IS NOT INITIAL AND date2 IS INITIAL.
datum = datum1.
ELSEIF date1 IS INITIAL AND date2 IS NOT INITIAL.
datum = datum2.
ENDIF.
ELSEIF acttype EQ 'C'.
* retrieve end customer registration date, demo reg date must be empty
* Get the demo vehicle registration date
CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
EXPORTING
vin = wa_pnwtyh-relob_ext
atnam = 'RD0005' "Zulass.dat. VFW
IMPORTING
DATE = DATE1
EXCEPTIONS
characteristic_not_found = 1
vin_not_found = 2
no_value = 3
dump = 4
OTHERS = 5.
* Get the registration dealer date
CALL FUNCTION 'Z_W_F_PR_GET_CHARACTERISTICS'
EXPORTING
vin = wa_pnwtyh-relob_ext
atnam = 'RD0002' " Zul.dat. Endkunde
IMPORTING
DATE = DATE2
EXCEPTIONS
characteristic_not_found = 1
vin_not_found = 2
no_value = 3
dump = 4
OTHERS = 5.
UNPACK date2 TO datum2.
IF date1 IS INITIAL.
datum = datum2.
ENDIF.
* Begin of change by Santosh for CR31855
* ELSEIF acttype EQ 'A'.
ELSEIF acttype EQ c_a or acttype EQ c_u.
* END of change by Santosh for CR31855
CLEAR: gv_frame_contract,
gv_body,
gv_modelcode,
gv_opt,
gv_model_year,
gv_sam,
gv_ddate,
gv_edate,
lv_demdate,
lv_enddate,
enddate,
demdate,
lv_atwrt,
lv_atinn,
lv_class,
lv_klart,
lv_object_low,
lv_atflv.
REFRESH: t_l_class,
t_l_objectdata,
t_l_object,
t_l_sel_char .
CLEAR: lv_enddate,lv_demdate,enddate,demdate.
CLEAR: lv_atinn, lv_atwrt, lv_atflv.
lv_klart = '300'.
lv_object_low = wa_pnwtyh-relob_ext.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
class = lv_class
classtype = lv_klart
object = lv_object_low
objecttable = 'MARA'
TABLES
t_class = t_l_class
t_objectdata = t_l_objectdata
i_sel_characteristic = t_l_sel_char
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4.
IF sy-subrc = 0.
ENDIF.
* get all the required characteristics.
READ TABLE t_l_objectdata WITH KEY atnam = 'NC0014'.
IF sy-subrc = 0.
gv_modelcode = t_l_objectdata-ausp1.
ENDIF.
CLEAR t_l_objectdata-ausp1.
READ TABLE t_l_objectdata WITH KEY atnam = 'NC0026'.
IF sy-subrc = 0.
gv_sam = t_l_objectdata-ausp1.
ENDIF.
CLEAR t_l_objectdata-ausp1.
READ TABLE t_l_objectdata WITH KEY atnam = 'NC0016'.
IF sy-subrc = 0.
gv_opt = t_l_objectdata-ausp1.
ENDIF.
CLEAR t_l_objectdata-ausp1.
READ TABLE t_l_objectdata WITH KEY atnam = 'NC0010'.
IF sy-subrc = 0.
gv_body = t_l_objectdata-ausp1.
ENDIF.
CLEAR t_l_objectdata-ausp1.
READ TABLE t_l_objectdata WITH KEY atnam = 'NC0015'.
IF sy-subrc = 0.
gv_model_year = t_l_objectdata-ausp1.
ENDIF.
CLEAR t_l_objectdata-ausp1.
READ TABLE t_l_objectdata WITH KEY atnam = 'RD0003'.
IF sy-subrc = 0.
gv_frame_contract = t_l_objectdata-ausp1.
ENDIF.
CLEAR t_l_objectdata-ausp1.
READ TABLE t_l_objectdata WITH KEY atnam = 'RD0002'.
IF sy-subrc = 0.
lv_atflv = t_l_objectdata-atflv.
ENDIF.
CLEAR t_l_objectdata-ausp1.
IF sy-subrc = 0.
IF lv_atflv IS NOT INITIAL.
* Convert floating point to character
CALL FUNCTION 'MC_FLTP_CHAR'
EXPORTING
fc_a_fld = lv_atflv
IMPORTING
fc_r_fld = lv_enddate.
CONDENSE lv_enddate.
enddate = lv_enddate.
ENDIF.
ENDIF.
CLEAR: lv_atinn, lv_atwrt, lv_atflv.
READ TABLE t_l_objectdata WITH KEY atnam = 'RD0005'.
IF sy-subrc = 0.
lv_atflv = t_l_objectdata-atflv.
ENDIF.
IF sy-subrc = 0.
IF lv_atflv IS NOT INITIAL.
* Convert floating point to character
CALL FUNCTION 'MC_FLTP_CHAR'
EXPORTING
fc_a_fld = lv_atflv
IMPORTING
fc_r_fld = lv_demdate.
CONDENSE lv_demdate.
demdate = lv_demdate.
ENDIF.
ENDIF.
**write selects to get dates.
CLEAR: gv_edate, gv_ddate.
IF enddate IS INITIAL AND demdate IS NOT INITIAL.
datum = demdate.
ELSEIF enddate IS NOT INITIAL AND demdate IS INITIAL.
datum = enddate.
ELSEIF enddate IS NOT INITIAL AND demdate IS NOT INITIAL.
CLEAR: gv_edate, gv_ddate.
DATA: BEGIN OF wa_sales_act,
sales_act TYPE zpr_premium_def-sales_act,
matnr TYPE zpr_premium_def-matnr,
cl_proc TYPE zpr_premium_def-cl_proc,
type_of_act TYPE zpr_premium_def-type_of_act,
END OF wa_sales_act.
CLEAR: gv_edate, wa_sales_act,gv_dproc,gv_eproc.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
gv_edate = 'X'.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE enddate
AND zpr_premium~valid_to GE enddate.
IF sy-subrc = 0.
gv_edate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
ENDIF.
ENDIF.
*------------------------------------------------------Demo date
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_eproc = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ gv_frame_contract
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ gv_sam
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ gv_opt
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ gv_modelcode
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ gv_model_year
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ gv_body
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
SELECT SINGLE zpr_premium_def~sales_act
zpr_premium_def~matnr
zpr_premium_def~cl_proc
zpr_premium_def~type_of_act
INTO wa_sales_act
FROM zpr_premium_def
INNER JOIN zpr_premium
ON zpr_premium~vkorg EQ zpr_premium_def~vkorg
AND zpr_premium~sales_act EQ zpr_premium_def~sales_act
WHERE zpr_premium~vkorg EQ 'DE01'
AND zpr_premium_def~sales_act EQ SALESACT
AND zpr_premium~frame_contr EQ ''
AND zpr_premium~body_type_code EQ ''
AND zpr_premium~model_code EQ ''
AND zpr_premium~opt EQ ''
AND zpr_premium~model_year EQ ''
AND zpr_premium~sam EQ ''
AND zpr_premium~valid_from LE demdate
AND zpr_premium~valid_to GE demdate.
IF sy-subrc = 0.
gv_ddate = 'X'.
IF wa_sales_act-cl_proc IS NOT INITIAL.
gv_dproc = 'X'.
ENDIF.
ENDIF.
*--------------------------------------------------------------
* Begin of insert by Santosh for CR31855
if acttype EQ c_u.
* IF gv_ddate = 'X' AND gv_edate = 'X'.
if demdate LT enddate.
datum = enddate.
endif.
* endif.
CLEAR: lv_demdate, lv_enddate, demdate, enddate.
ELSEIF acttype EQ c_a.
* End of insert by Santosh for CR31855
IF gv_ddate = 'X' AND gv_edate = 'X'.
IF gv_dproc EQ 'X'.
datum = demdate.
ELSEIF gv_eproc EQ 'X'.
datum = enddate.
ENDIF.
ELSEIF gv_ddate = 'X' AND gv_dproc EQ 'X'.
datum = demdate.
ELSEIF gv_edate = 'X' AND gv_eproc EQ 'X'.
datum = enddate.
ENDIF.
CLEAR: lv_demdate, lv_enddate, demdate, enddate.
ENDIF.
endif. "Santosh for CR31855
ENDIF.
* End of change IM59239 PIPA 14.01.2009
IF NOT ls_item-zz_frame_contr IS INITIAL.
CALL FUNCTION 'Z_GET_PREMIUM_DATA'
EXPORTING
matnr = ls_item-matnr
vin = wa_pnwtyh-relob_ext
frame_contr = ls_item-zz_frame_contr
datum = datum "wa_pnwtyh-refdt
IMPORTING
premium = wa_premium
EXCEPTIONS
not_found = 1
dump = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
ELSE.
CALL FUNCTION 'Z_GET_PREMIUM_DATA'
EXPORTING
matnr = ls_item-matnr
vin = wa_pnwtyh-relob_ext
* frame_contr = ls_item-zz_frame_contr
datum = datum "wa_pnwtyh-refdt
IMPORTING
premium = wa_premium
EXCEPTIONS
not_found = 1
dump = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
ENDIF.
LOOP AT xkomv INTO wa_xkomv WHERE kschl = 'ZP01'.
IF komv-kschl EQ 'ZP01'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
IF wa_xkomv-kbetr EQ 0.
wa_xkomv-kawrt = sum1.
xkwert = sum1.
ELSEIF komv-kbetr NE 0 AND komv-kschl EQ 'ZP01'.
wa_xkomv-kawrt = komv-kbetr.
wa_xkomv-kwert = komv-kbetr.
* sum1 = komv-kbetr.
xkwert = komv-kbetr.
ENDIF.
MODIFY xkomv[] FROM wa_xkomv INDEX sy-tabix.
EXIT.
ENDLOOP.
IF wa_premium-bonus_amt = 0.
* Take amount from invoice and calculate with %.
LOOP AT xkomv INTO wa_xkomv WHERE kschl = 'ZP02'.
IF komv-kschl EQ 'ZP02'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
IF wa_xkomv-kbetr EQ 0.
wa_xkomv-kbetr = ( wa_premium-bonus_pct * 10 ).
ELSEIF komv-kbetr NE 0 AND komv-kschl EQ 'ZP02'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
MODIFY xkomv FROM wa_xkomv.
EXIT.
ENDLOOP.
ELSE.
* Take amount from invoice.
LOOP AT xkomv INTO wa_xkomv WHERE kschl = 'ZP03'.
IF komv-kschl EQ 'ZP03'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
IF wa_xkomv-kbetr EQ 0.
wa_xkomv-kbetr = wa_premium-bonus_amt.
ELSEIF komv-kbetr NE 0 AND komv-kschl EQ 'ZP03'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
MODIFY xkomv FROM wa_xkomv.
EXIT.
ENDLOOP.
ENDIF.
*######## fill for handling stuff
IF wa_premium-handling_amt = 0.
* Take amount from invoice and calculate with %.
LOOP AT xkomv INTO wa_xkomv WHERE kschl = 'ZP04'.
IF komv-kschl EQ 'ZP04'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
IF wa_xkomv-kbetr EQ 0.
wa_xkomv-kbetr = ( wa_premium-handling_pct * 10 ) * -1.
ELSEIF komv-kbetr NE 0 AND komv-kschl EQ 'ZP04'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
MODIFY xkomv FROM wa_xkomv.
EXIT.
ENDLOOP.
ELSE.
* Take amount from invoice.
LOOP AT xkomv INTO wa_xkomv WHERE kschl = 'ZP05'.
* wa_xkomv-kbetr = wa_premium-handling_amt.
IF komv-kschl EQ 'ZP05'.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
IF wa_xkomv-kbetr EQ 0.
wa_xkomv-kbetr = wa_premium-handling_amt * -1.
ELSEIF komv-kbetr NE 0 AND komv-kschl EQ 'ZP05'.
IF komv-kbetr > 0.
komv-kbetr = komv-kbetr * -1.
ENDIF.
wa_xkomv-kbetr = komv-kbetr.
ENDIF.
MODIFY xkomv FROM wa_xkomv.
EXIT.
ENDLOOP.
ENDIF.
ENDIF.
*} INSERT
ENDFORM.
Regards
#SRT
Hi friend,
You said condition type 'zp01' is Manuel. so did You enter that in header level. and checked. if you enter the condition level in header level it will automatically come to the item level.
And as you said there is no pricing procedure has been assigned. so how the condition types will appear. eventhough those are manuel conditions.
Try to create new procedure with the required condition types and check once again. are they working properly. if not u have to check the table names and fields names. and work with ABAP, BASIS team.
Thank You,
ADITHYA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Listing down some activities we performed after our ECC Upgrade.
RV12A001- Generate condition tables- Schedule in background
RV12D001- Generate Access sequence- Schedule in background
SDTXT1AID- Missing Text elements
Plz check if they helpful
BR
Srrimaan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SRT,
Check all the setting from SD side & take the help of BASIS or ABAP to sort out the unknown behavior of the system.
Regards,
S.Himavanth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.