‎2006 Oct 10 1:22 PM
I have developed a custom Function Module which in turn calls the BAPI Function Module 'BAPI_BCONTACT_CREATEFROMDATA'.
The import parameters of the function module are passed to the BAPI function module.
If the BAPI is called successfully then the Customer Contact is created. But if the BAPI is not called successfully then i need to pass back the reason code to the Custom Function Module's export parameter.
I am not able to crack this issue.
Can anyone please help me with this?
Regards,
Rakesh.
‎2006 Oct 10 1:25 PM
'BAPI_BCONTACT_CREATEFROMDATA' will have the return parameter ( RETURN LIKE BAPIRETURN1 STRUCTURE BAPIRETURN1 ). Check what it is returing when the contract is not created. Pass that to the custom function module parameter.
For this in ur custom FM assign a export parameter return like BAPIRETURN1. Pass the value which is coming from BAPI to this return.
‎2006 Oct 12 9:02 AM
> 'BAPI_BCONTACT_CREATEFROMDATA' will have the return
> parameter ( RETURN LIKE BAPIRETURN1 STRUCTURE
> BAPIRETURN1 ). Check what it is returing when the
> e contract is not created. Pass that to the custom
> function module parameter.
>
> For this in ur custom FM assign a export parameter
> return like BAPIRETURN1. Pass the value which is
> coming from BAPI to this return.
>
Ya that is fine i have one export parameter in my custom function module that gets its value from the RETURN export parameter of the BAPI. But what i want really is i need to get the reason codes like 'o1','o2','o3','o4','o5','o6'. So how can i get that.coz i need to get the specific error and not a generalised one.
‎2006 Oct 10 2:29 PM
Hi
'BAPI_BCONTACT_CREATEFROMDATA' returns two export parameter 'RETURN' and 'CONTACT'.
If ur Contact will not be created then posiible error msgs will be stroed in RETURN parameter,This u need to pass to ur custom FM.U can check CONTACT field whetehre its initial after firing BAPI.If BAPI succesfully executed then this field will have value otherwise not.
To pass the RETURN value declare one export parameter
RETURN like BAPIRETURN1.
Then collect the msgs.
If helpful
Then reward me points
Regs
Manas Ranjan Panda