update conditions in BAPI_SALESORDER_CHANGE

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
mikko

update conditions in BAPI_SALESORDER_CHANGE

Post by mikko » Thu May 15, 2003 2:01 am

HI,
does anyone know how to update the conditions within the function BAPI_SALESORDER_CHANGE it seems that SAP is not supporting that functionnality, the system is creating duplicate entries .

batch input is not possible because this screen cannot be used with BI ,
does any one have an idea how to update those conditions within a batch program ?

thanks a lot.
mike

SLKorolev
Posts: 607
Joined: Wed Dec 18, 2002 1:05 am
Location: Russia
Contact:

Post by SLKorolev » Thu May 15, 2003 2:30 am

Hi Mike,
I've traced down the source code a little bit and found that you should set UPDATEFLAG field of the cooresponding line of CONDITIONS_INX table parameter to 'U'. Hope this helps.
Best regards, Sergey Korolev

MIKKO

that's right but in that case you end with duplicate entries

Post by MIKKO » Thu May 15, 2003 3:24 am

Hi SLKorolev,

that's right but in that case you end up with duplicate entries, it doesn't allow you to specify which condition you want to update, and it just adds a other condition . instead of going in the condition and modifying the entry,
the bapi creates another entry for the same condition.

regards,
mike

P. Poirier
Posts: 137
Joined: Fri May 09, 2003 12:49 pm

Post by P. Poirier » Thu May 15, 2003 5:05 pm

Hi,

We've had the same problem here. I fill the table this way:
  • CONDITIONS_IN
    ITM_NUMBER = Item number
    COND_TYPE = Condition type
    COND_VALUE = Value
    CURR_ISO = Currency

    CONDITIONS_INX
    ITM_NUMBER = Item number
    COND_TYPE = Condition type
    COND_VALUE = 'X'
    CURR_ISO = 'X'
Even if you specify 'U' in updateflag, you end up having two lines for this condition type. I don't think there is a way to modify the existing one with this BAPI, but I'm pretty sure that only the last line of this condition type is taken into account. You'd have to verify that, but if it does take only the last line, maybe the users can live with the fact that the correct amount for this condition type is only the last one entered. That's what they do here.

But if there is a way around this, I would sure be interested to know about it.

Hope this helps

JAC0205.

Post by JAC0205. » Mon Dec 13, 2004 10:20 am

LOGIC_SWITCH-COND_HANDLE = 'X'.

JAC0205.

Post by JAC0205. » Mon Dec 13, 2004 10:20 am

LOGIC_SWITCH-COND_HANDLE = 'X'.

hsenden
Posts: 167
Joined: Mon Oct 21, 2002 2:22 am
Location: Wijlre, Netherlands
Contact:

Post by hsenden » Thu Nov 24, 2005 4:07 am

LOGIC_SWITCH-COND_HANDL = 'X'.

Thanx Jac0205 for the answer. It solved also my problem.

regards,
Hans

bermany
Posts: 2
Joined: Tue Mar 21, 2006 2:11 am

Post by bermany » Tue Apr 11, 2006 6:13 am

This logic switch doesn't exist in version 4.6c and down!

Raju Chitae
Posts: 140
Joined: Thu Dec 09, 2004 8:44 am
Location: India

Post by Raju Chitae » Wed Apr 12, 2006 1:34 am

I had faced this problem in 4.6C & after lot of debugging I sorted that out by using logic_switch-pricing = 'G'.

I hope this helps,

Regards
Raju Chitale

Skorpio21
Posts: 30
Joined: Thu May 25, 2006 5:18 am
Location: Spain

Post by Skorpio21 » Thu May 25, 2006 5:44 am

Is not working... I've used all your suggestions and the bapi runs well but then when i see the sales order in VA02 the price and the others conditions hadn't been changed :(

Skorpio21
Posts: 30
Joined: Thu May 25, 2006 5:18 am
Location: Spain

Post by Skorpio21 » Fri Jun 09, 2006 5:49 am

Still have duplicate entries for conditions... also MWST condition is deleted.

any ideas?

MOVE: 'X' TO p_logic_switch-cond_handl,
'C' TO p_logic_switch-pricing.
Why a four-year-old child could understand this report. Run out and find me a four-year-old child. I can't make head nor tail out of it. (G.Marx)

Sark E.Get
Posts: 867
Joined: Sun Apr 02, 2006 11:01 am

Post by Sark E.Get » Mon Jun 12, 2006 8:17 am

P. Poirier wrote:I don't think there is a way to modify the existing one with this BAPI, but I'm pretty sure that only the last line of this condition type is taken into account.
I've seen the situation where the same condition appears twice, but I think it's more likely to be controlled by KINAK than the sequence.

Post Reply