Hi gurus!
After reading a lot of posts about similar questions to this one I haveN'T finally got it. The resume is that everytime I try to set a value zero condition type from this BAPI, the condition type is determinated again! so i can't give it a zero value.
My problem is as follows:
*1) I have a condition type on a Procedure ZABC and these are its specifications:*
_Access seq._
none
_Control DATA 1_
Cond. Class: A
Calculate Type: B
Cond. Category: ' '
Orunding Rule: ' '
StrucCond: ' '
{quote} _Group condition_ {quote}
none here
_Changes which can be made_
Manual entries: 'C'
All checks checked but "Header condition"
_Master Data_
none
_Scales_
none
_Control data 2_
just checked Currency Conv.: 'X'
_Text determination_
none
*2) Procedure specifications for this condition type:*
Manual: ' '
Required: 'X'
Stadistic: 'X'
Sutot: '6'
Requirement: yes, it uses a formula
CalType: yes, it uses a formula
BasType: yes, it uses a formula
*3) I use BAPI_SALESORDER_CREATEFROMDAT2 to create a sales order and in some cases I need to set this condition type value as zero. *
My item_condition_in table seems like this:
clear wa_order_CONDITIONS_in.
wa_order_CONDITIONS_in-itm_number = va_posicion.
MOVE it_bapisdcond_O-COND_VALUE TO
wa_order_CONDITIONS_in-COND_VALUE.
MOVE it_bapisdcond_O-CONDVALUE TO
wa_order_CONDITIONS_in-CONDVALUE.
MOVE it_bapisdcond_O-COND_ST_NO
TO wa_order_CONDITIONS_in-COND_ST_NO.
MOVE it_bapisdcond_O-COND_COUNT
TO wa_order_CONDITIONS_in-COND_COUNT.
MOVE it_bapisdcond_O-APPLICATIO
TO wa_order_CONDITIONS_in-APPLICATIO.
MOVE it_bapisdcond_O-COND_TYPE
TO wa_order_CONDITIONS_in-COND_TYPE.
MOVE it_bapisdcond_O-CONPRICDAT
TO wa_order_CONDITIONS_in-CONPRICDAT.
MOVE it_bapisdcond_O-CALCTYPCON
TO wa_order_CONDITIONS_in-CALCTYPCON.
CLEAR wa_order_CONDITIONS_in-CONBASEVAL.
MOVE it_bapisdcond_O-CURREN_ISO
TO wa_order_CONDITIONS_in-CURRENISO.
MOVE it_bapisdcond_O-CURRENCY
TO wa_order_CONDITIONS_in-CURRENCY.
MOVE it_bapisdcond_O-COND_P_UNT
TO wa_order_CONDITIONS_in-COND_P_UNT.
MOVE it_bapisdcond_O-COND_D_UNT
TO wa_order_CONDITIONS_in-cond_unit.
append wa_order_CONDITIONS_in to order_CONDITIONS_in.
clear wa_order_CONDITIONS_inx.
wa_order_CONDITIONS_inx-itm_number = va_posicion.
wa_order_CONDITIONS_inx-COND_TYPE = it_bapisdcond_O-cond_type.
wa_order_CONDITIONS_inx-COND_VALUE = 'X'.
wa_order_CONDITIONS_inx-CURRENCY = 'X'.
wa_order_CONDITIONS_inx-COND_UNIT = 'X'.
wa_order_CONDITIONS_inx-COND_P_UNT = 'X'.
wa_order_CONDITIONS_inx-updateflag = 'U'.
append wa_order_CONDITIONS_inx to order_CONDITIONS_inx.
Of course the cond_value, condvalue and conbaseval are set to zero.. other than this I have tested filling different vars on the order_conditions_in structure and in the inx one. Like updateflag as 'I' instead of 'U'. Filling fields like currency, cond_p_unt, conbaseval or not filling them... But the condition type is always REDETERMINED!
IS it able to set a zero value condition type from this BAPI when the condition type is formula calculated (base and value)?
Any advise will be appreciated!
Thanks in advance.
Edited by: John Smith on Apr 12, 2010 12:22 PM
Edited by: John Smith on Apr 12, 2010 12:23 PM
Edited by: John Smith on Apr 12, 2010 12:24 PM