2009 Nov 23 8:42 AM
Hi gurus,
I have a customer created and I need to create a new partner function automatically.
Someone knows a BAPI or User Exit to create a new partner function in a customer when it exists.
Thanks in advance,
Xavier Gràcia.
2009 Nov 23 8:54 AM
Hi gurus,
I have a customer created and I need to create a new partner function automatically.
Someone knows a BAPI or User Exit to create a new partner function in a customer when it exists.
Thanks in advance,
Xavier Gràcia.
2009 Nov 23 8:50 AM
Hi Xavier Gràcia,
Can please explain ur scenario
Regards,
Rajesh S
2009 Nov 23 8:52 AM
Hi
Check with user exit EXIT_SAPMF02D_001,
BAPI BAPI_CUSTOMER_CHANGEFROMDATA.
Regards
Srilaxmi
2009 Nov 23 8:54 AM
2009 Nov 23 9:30 AM
Dear ksd,
I'm trying to execute the bapi SD_CUSTOMER_MAINTAIN_ALL but it is returning the error following:
...
Excepción KNA1_INCOMPLETE
ID mensaje: F2 Nº mensaje: 804
...
I'm completing the import parameter I_KNA1 with the values:
MANDT='010'
KUNNr = '4' (Number of the customer)
Also, all the information in the tables KNVP requiered to create the new function partner.
Thanks for your help.
Best Regards,
Xavier Gràcia.
2009 Nov 23 9:46 AM
2009 Nov 23 10:59 AM
No, In the table KNA1 I passed only the fields that identified the customer.
Thanks.
2009 Nov 23 11:59 AM
Dear ksd,
I pass the code implemented. In this case I only pass the table T_XKNVP:
DATA: BEGIN OF XKNVP OCCURS 0.
INCLUDE STRUCTURE FKNVP.
DATA: END OF XKNVP.
XKNVP-KUNNR = '0000000004'.
XKNVP-VKORG = 'FDB'.
XKNVP-VTWEG = '01'.
XKNVP-SPART = '01'.
XKNVP-PARZA = '005'.
XKNVP-PARVW = 'WE'.
XKNVP-KUNN2 = '0000000006'.
XKNVP-KZ = 'I'.
APPEND XKNVP.
CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
TABLES
T_XKNVP = XKNVP
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.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
When I execute this code the system does not return any error (sy-subrc = 0), but it is not create the new function partner.
Thanks for your help.
Xavier Gràcia.
Edited by: Oscar Barrabes on Nov 23, 2009 1:01 PM
2009 Nov 23 12:27 PM
Just do a select single * from kna1 and pass it all.
Try doing the same for KNB1 and KNVV also.
Edited by: ksd on Nov 23, 2009 5:57 PM
2009 Nov 23 3:40 PM
I try with all KNA1, KNB1 and KNVV also, but the system doesn't work.
Thanks for your help!
Xavier Gràcia.
2009 Nov 23 6:05 PM
2009 Nov 24 10:02 AM
Dear Sampath,
Thanks for your help. I had not remembered to execute the commit work after the FM call.
Best Regards,
Xavier Gràcia
2011 Sep 28 10:20 AM
HI,
now am facing the same problem, i am using sd_customer_maintain_all and passing knai,knvp,and knvv.
but wheni check in the table knvp, it is showing kunnr and kunn2 same values,
here is my code:
LT_XKNVP-KUNNR = WA_FINAL-SHIPCUST.
LT_XKNVP-VKORG = L_SORG(4).
LT_XKNVP-VTWEG = L_DCHAN.
LT_XKNVP-SPART = L_DVIS(2).
LT_XKNVP-PARVW = 'SH'.
LT_XKNVP-KUNN2 = WA_FINAL-SOLDCUST.
LT_XKNVP-KZ = 'I'.
CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
EXPORTING
I_KNA1 = WA_KNA1
I_KNVV = WA_KNVV
I_BAPIADDR1 = WA_BAPIADDR1
PI_POSTFLAG = 'X'
IMPORTING
E_KUNNR = L_KUNNR
O_KNA1 = WA_KNA1
TABLES
T_XKNAS = LT_XKNAS
T_XKNVI = LT_XKNVI
T_XKNVP = LT_XKNVP
T_YKNAS = LT_YKNAS
T_YKNVI = LT_YKNVI
T_YKNVP = LT_YKNVP.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK AND WAIT.
ENDLOOP.
ENDIF.
plz help me.
thanks in advance.
2009 Nov 23 9:04 AM
Hi ,
Try with USEREXIT_XVBAPF_KEY (in Include RV60AFZA)
Regards
Abhii
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |