05-11-2009 5:35 PM
hi all,
I'm having this trouble...
we are creating a Sales Order from PI calling directly the BAPI_SALESORDER_CREATEFROMDAT2...
but, theres a field than I have to change... the PSTYV must be TANN when the VBAP-NETWR is 0.
I've used the MV45AFZZ program for the exit... but no in the move_field_to_vbap ('cause it doesn't work form me), I used this one:
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
data: l_tabix type i VALUE 0.
if xvbak-AUART = 'ZCO'.
loop at xvbap.
add 1 to l_tabix.
if xvbap-netwr EQ 0.
xvbap-PSTYV = 'TANN'.
modify xvbap index l_tabix TRANSPORTING pstyv .
endif.
endloop.
endif.
ENDFORM.
and with this, when the sales order is created, my PSTYV field if NETWR = 0, now is TANN.... but this is NOT the solution 'cause I can't make an Invoice... I have an incompletion LOG....
but, if I change the field manually appears a message: New pricing carried out ( Message no. V1209 ).
and with this... I fix the problem.... but, you can see than I need it automatically....
so I think, than with my exit, I'm only changing the PSTYV value, but no all the changes than this need...
thanks in advance...
Regards..
05-11-2009 5:51 PM
Hi
U should run the exit USEREXIT_NEW_PRICING_VBAP (include MV45AFZB) in order to force a new pricing
Max
05-11-2009 5:51 PM
Hi
U should run the exit USEREXIT_NEW_PRICING_VBAP (include MV45AFZB) in order to force a new pricing
Max
05-11-2009 5:54 PM
05-11-2009 6:23 PM
Apart from that and also
ORDER_ITEMS_IN-ITEM_CATEG = " Value here
ORDER_ITEMS_INX-ITEM_CATEG = " Value here
a®
05-11-2009 6:40 PM
just try: apart from above, also check about setting of UPDATION flags, like UPDKZ = 'U'.
thanq
05-11-2009 8:11 PM
thanks All...
the solution was implements the User Exit : USEREXIT_NEW_PRICING_VBAP ...
again, Thanks a LOT!!!