Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using function module SD_CUSTOMER_MAINTAIN_ALL

Former Member
0 Likes
4,535

Hello @ll,

I'm trying to use the function module SD_CUSTOMER_MAINTAIN_ALL for changing the value of KNA1-TELBX. But it doesn't work at all because the value of this field won't be updated on database. And I don't get any return code from the function module. What I'm doing wrong?

Here is the used coding:

DATA:

wa_kna1 TYPE kna1.

PARAMETERS:

p_kunnr TYPE kunnr DEFAULT '91'.

START-OF-SELECTION.

SELECT SINGLE * FROM kna1 INTO wa_kna1 WHERE kunnr EQ p_kunnr.

wa_kna1-telbx = '999'.

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'

EXPORTING

i_kna1 = wa_kna1

COMMIT WORK.

Thanks for any helpful answers!

Chris

7 REPLIES 7
Read only

Former Member
0 Likes
2,043

Hi david,

please check it once of your code,

i din't get you man.

madan

Read only

0 Likes
2,043

Hi Madan,

sorry I only just forgot the point after calling the function module. But it still doesn't work.

Chris

Read only

Former Member
0 Likes
2,043

try with pi_postfalg = 'X'

Read only

0 Likes
2,043

Hello Sanjay,

I also tried with this flag, but it still doesn't work

Bye

Chris

Read only

Former Member
0 Likes
2,043

Hey David,

Try like this..

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'

EXPORTING

I_KNA1 = wa_kna1

I_FROM_CUSTOMERMASTER = 'X'

IMPORTING

E_KUNNR = l_kunnr

E_SD_CUST_1321_DONE = l_val

EXCEPTIONS

CLIENT_ERROR = 1

KNA1_INCOMPLETE = 2

KNB1_INCOMPLETE = 3

KNB5_INCOMPLETE = 4

KNVV_INCOMPLETE = 5

KUNNR_NOT_UNIQUE = 6

SALES_AREA_NOT_UNIQUE = 7

SALES_AREA_NOT_VALID = 8

INSERT_UPDATE_CONFLICT = 9

NUMBER_ASSIGNMENT_ERROR = 10

NUMBER_NOT_IN_RANGE = 11

NUMBER_RANGE_NOT_EXTERN = 12

NUMBER_RANGE_NOT_INTERN = 13

ACCOUNT_GROUP_NOT_VALID = 14

PARNR_INVALID = 15

BANK_ADDRESS_INVALID = 16

TAX_DATA_NOT_VALID = 17

NO_AUTHORITY = 18

COMPANY_CODE_NOT_UNIQUE = 19

DUNNING_DATA_NOT_VALID = 20

KNB1_REFERENCE_INVALID = 21

CAM_ERROR = 22

OTHERS = 23.

Regards,

Jayram..

Read only

0 Likes
2,043

Hi Jayaram,

thanks a lot!!!! the export paramter i_maintain_address_by_kna1 must be filled with X and thant i works!!!

THANKS THANKS THANKS!!!!

Chris

Read only

Former Member
0 Likes
2,043

David,

Other wise try with this option.

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'

EXPORTING

I_KNA1 = wa_kna1

I_MAINTAIN_ADDRESS_BY_KNA1 = 'X'

Regards,

Jayram..