2010 Jul 20 9:39 AM
Hi,
I have small issue , i need to block the customer while creating im using BADI(ADDRESS_UPDATE) to block the customer created.In the BADI im trying to update few fields of KNA1 table using UPDATE statement.
Like this...
WA_KNA1-SPERR = 'X'.
WA_KNA1-CASSD = 'X'.
WA_KNA1-AUFSD = '01'.
WA_KNA1-FAKSD = '01'.
WA_KNA1-LIFSD = '01'.
UPDATE KNA1 SET SPERR = WA_KNA1-SPERR
AUFSD = WA_KNA1-AUFSD
LIFSD = WA_KNA1-LIFSD
FAKSD = WA_KNA1-FAKSD
CASSD = WA_KNA1-CASSD
WHERE KUNNR = W_KUNNR.
when this statement excutes it is updating
1) SPERR
2) AUFSD this two field remaining 3 fields it is not updating
Can anyone pls let me know the reason .
thanks in Adv.
2010 Jul 20 9:58 AM
Hello ajju_bobby ,
If you are in a BADI,
write a wrapper Function module to update the fields in and Call it in update task
Have a commit at end of function module ,
Don't forget to lock the customer using FM ENQUEUE DEQUE WHILE updating as it is a change BADI
Hi,
I have small issue , i need to block the customer while creating im using BADI(ADDRESS_UPDATE) to block the customer created.In the BADI im trying to update few fields of KNA1 table using UPDATE statement.
Like this...
WA_KNA1-SPERR = 'X'.
WA_KNA1-CASSD = 'X'.
WA_KNA1-AUFSD = '01'.
WA_KNA1-FAKSD = '01'.
WA_KNA1-LIFSD = '01'.
UPDATE KNA1 SET SPERR = WA_KNA1-SPERR
AUFSD = WA_KNA1-AUFSD
LIFSD = WA_KNA1-LIFSD
FAKSD = WA_KNA1-FAKSD
CASSD = WA_KNA1-CASSD
WHERE KUNNR = W_KUNNR.
when this statement excutes it is updating
1) SPERR
2) AUFSD this two field remaining 3 fields it is not updating
Can anyone pls let me know the reason .
thanks in Adv.
2010 Jul 20 9:45 AM
see note 1469543
it is not possible to update kna1 directly, you must create a bim
oops sorry see that you're question is it inside a badi and not bapi
kind regards
arthur
Edited by: A. de Smidt on Jul 20, 2010 10:45 AM
2010 Jul 20 9:49 AM
2010 Jul 20 9:58 AM
Hello ajju_bobby ,
If you are in a BADI,
write a wrapper Function module to update the fields in and Call it in update task
Have a commit at end of function module ,
Don't forget to lock the customer using FM ENQUEUE DEQUE WHILE updating as it is a change BADI
2010 Jul 20 10:04 AM
thanks for ur quick reply .
but which Function Module should for updation .
pls let me know Deque and Enqu for locking Customer.
pls let me know ..
Thanks in adv.
2010 Nov 04 5:22 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |