‎2008 Apr 24 10:56 AM
I am using BAPI_ALM_NOTIF_CREATE for notification; I filled the NOTIFPARTNER with following values
notifpartnr-partn_role = 'AG'.
Notifpartnr-partner = 60805723.
Based on the configuration the system first calculates its own value for partner for type AG based on functional location. I want to be overwritten by the partner number passed from BAPI, but the following message appears
E IX 011 Partner function SP can only be used once
While doing the same from standard transaction it overwrites .
Also I could not find any BADI or exit to play with partner functions, please let me know if there are any
cheers
chetanya
‎2008 Apr 24 11:04 AM
Hey there!
I had faced the same problem and then I used the BAPI
BAPI_SERVNOT_CREATE.
Here pass the same data that you have with you. Also, before passing the BP, use Alpha Conversion_Exit to get the BP in proper format.
Do let me know if this helped.
Pranjal.
‎2008 Apr 24 11:26 AM
hi
no it did not worked, i used the following code
notifpartnr-partn_role = 'BP'.
notifpartnr-partner = partner.
CALL UNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = notifpartnr-partner
IMPORTING
output = notifpartnr-partner.
APPEND notifpartnr.
also i am not sure what you are asking to pass BP as a value for partner role, i want it to be sold to party so the value will be AG i think
cheers
‎2008 Apr 24 12:01 PM
Here chk my code :
data : t_bapi2080_notpartnri TYPE STANDARD TABLE OF bapi2080_notpartnri WITH HEADER LINE.
t_bapi2080_notpartnri-partn_role = 'AG'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_final1-partner
IMPORTING
output = t_bapi2080_notpartnri-partner.
APPEND t_bapi2080_notpartnri TO t_bapi2080_notpartnri.
wa_bapi2080_nothdri-code_group = 'NEW/CONN'.
wa_bapi2080_nothdri-coding = wa_iflot-zz_vendor. "WA_IFLOT-ZZVAPLZ.
wa_bapi2080_nothdri-funct_loc = wa_final1-zz_haus.
wa_bapi2080_nothdri-desenddate = l_date.
wa_bapi2080_nothdri-short_text = 'New Connection'.
CALL FUNCTION 'BAPI_SERVNOT_CREATE'
EXPORTING
notif_type = 'S1'
notifheader = wa_bapi2080_nothdri
IMPORTING
notifheader_export = wa_bapi2080_nothdre
TABLES
notiftask = t_notiftask
notifpartnr = t_bapi2080_notpartnri
return = t_bapiret2.
‎2008 Apr 24 12:30 PM
Hi
Many thanks for code, I am exactly doing the same, but I think there are two differences worth mentioning
Difference one: I am passing the partner number as well in notifpartnr-partner = partner externally but that is not much difference as partner is required
Difference two: There is already existing configuration in our system based on functional location value it proposes the sold to party, I think this is the concern, so what is happening via bapi is that - first the existing configuration gets triggered and it proposes a SOLD to Party for it based on functional location, then it checks the BAPI structure and sees there is a value of type Sold to party coming again so it gives a message that two SOLD to party cannot be maintained, ideally it should modify the partner number coming from the BAPI to the one calculated from config, which it does not via BAPI but it does via IW51
If for functional location for which there is no configuration to get sold to party, BAPI works fine, as in such cases it only finds one partner of type AG
This concept works fine from standard transaction, suppose u put functional location press enter, because of config the value gets filled in SOLD to PARTY field, but when u change this value to a another the program modifies it rather than saying two sold to party
If there are any exits or BADI for BAPI_ALM_NOTIF_CREATE or BAPI_SERVNOT_CREATE that could help me where I can delete manually the sold to party proposed by configuration, then there will be only one partner AG coming from BAPI
Fill values- Notification Header
notifheader-funct_loc = func_loc.
notifheader-code_group = cod_grp.
notifheader-coding = coding.
notifheader-short_text = shrt_txt.
notifheader-priority = priority.
Fill values- Partner
notifpartnr-partn_role = 'AG'.
notifpartnr-partner = partner.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = notifpartnr-partner
IMPORTING
output = notifpartnr-partner.
APPEND notifpartnr.
CALL FUNCTION 'BAPI_SERVNOT_CREATE'
EXPORTING
notif_type = notif_type
notifheader = notifheader
IMPORTING
notifheader_export = notifheader_export
TABLES
notifpartnr = notifpartnr
return = gt_return.
cheers