2006 Dec 11 9:50 AM
Hi,
We are trying to update the data for user defined fields by using FM 'BAPI_COSTCENTER_CHANGEMULTIPLE'. To populate the data for user defined fields we have implemented BADI defination 'K_CCA_CUSTOMER_FIELD'.
When we try to update the data for those fields, if we want to pass SPACE (empty) to a field(if it is already have non initial value) , it is not updating with SPACE but it still holds the old value. Can anybody knows how to update user defined fields with SPACE(initial value).
Thanks in Advance
Rajavardhana Reddy
Hi,
We are trying to update the data for user defined fields by using FM 'BAPI_COSTCENTER_CHANGEMULTIPLE'. To populate the data for user defined fields we have implemented BADI defination 'K_CCA_CUSTOMER_FIELD'.
When we try to update the data for those fields, if we want to pass SPACE (empty) to a field(if it is already have non initial value) , it is not updating with SPACE but it still holds the old value. Can anybody knows how to update user defined fields with SPACE(initial value).
Thanks in Advance
Rajavardhana Reddy
2006 Dec 11 9:57 AM
Hi,
User defined fields must be in separate structure and that structure should be appende to table parameters EXTENSIONIN and EXTENSIONINX, check your code for populating data to update.
Reward if usefull..
2006 Dec 11 10:28 AM
Hi,
I am doing everything whatever you have mentioned. The problem is assume that an userdefined field has some value like US_FIELD = 'TEST'. I want to change this to US_FIELD = ' '. Even though in the structure i am assigning value for this field has SPACE(' '), it is keeping its value as 'TEST' only.
2006 Dec 11 10:00 AM
Check this..
bapi_te_mvkex-sales_org = mvke-vkorg.
bapi_te_mvkex-distr_chan = mvke-vtweg.
bapi_te_mvkex-matnr_nach = 'X'.
bapi_te_mvkex-user_requested = 'X'.
bapi_te_mvkex-date_requested = 'X'.
g_t_bapiparex-structure = 'BAPI_TE_MVKE'.
g_t_bapiparex-valuepart1 = bapi_te_mvke.
APPEND g_t_bapiparex.
g_t_bapiparexx-structure = 'BAPI_TE_MVKEX'.
g_t_bapiparexx-valuepart1 = bapi_te_mvkex.
APPEND g_t_bapiparexx.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = bapimathead
salesdata = bapi_mvke
salesdatax = bapi_mvkex
IMPORTING
return = g_s_return
TABLES
extensionin = g_t_bapiparex
extensioninx = g_t_bapiparexx.
Your userdefined fields should be populated like this..
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |