on 11-02-2007 1:50 AM
Hi All,
I have created a Condition Value 900 for Order in Transaction VOFM.
Following is the code.
FORM FRM_KONDI_WERT_900.
*{ INSERT GEDK905076 2
*Cuando los motivos de pedido (KOMK-augru) sean GQ1 y GQ2,
*y el item category (KOMP-/dbm/itcat) sea P003.
*el impuesto (xkwert) debe ser 0.
CONSTANTS: c_gq1(3) TYPE c VALUE 'GQ1',
c_gq2(3) TYPE c VALUE 'GQ2',
c_p003(4) TYPE c VALUE 'P003'.
CHECK komk-augru EQ c_gq1 OR
komk-augru EQ c_gq2.
CHECK komp-/dbm/itcat EQ c_p003.
xkwert = 0.
*} INSERT
ENDFORM.
But this code is not updating the Condition screen for items condition value.
The condition was activated and the program RV80HGEN ejecuted
Regards
Mariano
Hi Mariano,
sometimes the new routine is not includet in the main program. Pl check this in you routine.
Utilities -> More Utilities -> Main Program. In the pop up you should see the main program name. If this is empty make the same in an other routine and afterwards generated the main program in se38 again.
Regards
William
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariano,
Following is the sample code we used for alternate calculation routine assigned against condition type in our pricing procedure which does the calculation for a condition type rounding off calculation.
Hope this example may help you. Your routine activation and GEN program running is perfect.
Try to put a break point in the program and view whether it is firing or not.
CALL FUNCTION 'ZSD_PRICING_RND_OFF'
EXPORTING
is_komp = komp
is_komk = komk
IMPORTING
es_xkwert = xkwert.
*} INSERT
ENDFORM.
*****************************************************************
CALL FUNCTION 'ZSD_PRICING_RND_OFF' -
> This function module code is as following:
IF ( is_komp-zzpkgid IS INITIAL AND NOT is_komp-zzaufrt IS INITIAL ) "Item is not a package / not called from pkg txn
OR NOT is_komk-fkart IS INITIAL "Called from BIllING_CREATE
OR ( is_komp-zzraufrt EQ 'ZPED' AND is_komp-zzraufrt EQ 'ZSED' ). "When called from estimate
CHECK NOT is_komp-zzkdgrp EQ 'FM'. "Prevent rounding off for MOD customer group
TRY.
val_before_rnd = is_komp-netwr / 10.
CATCH cx_sy_arithmetic_error INTO lv_obj_excep.
lv_excep_txt = lv_obj_excep->get_text( ).
MESSAGE s001(zdm_pricing_services) WITH lv_excep_txt.
ENDTRY.
CALL FUNCTION 'ROUND'
EXPORTING
decimals = 1
input = val_before_rnd
sign = c_abap_true
IMPORTING
output = val_after_rnd.
TRY.
val_after_rnd = val_after_rnd * 10.
CATCH cx_sy_arithmetic_error INTO lv_obj_excep.
lv_excep_txt = lv_obj_excep->get_text( ).
MESSAGE s001(zdm_pricing_services) WITH lv_excep_txt.
ENDTRY.
es_xkwert = val_after_rnd - is_komp-netwr.
ENDIF.
ENDFUNCTION.
************************************************************************
Hope this may help you.
Regards,
Shabeer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariano,
I dont see you updating the condition value anywhere. I think the field for the same is XKOMV-KWERT. However you have not used it anywhere and you are using only using order reason to verify something.
However I have very limited technical knowledge. Also post this in technical forum. You may get a better answer.
Reward if this helps you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
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.