‎2011 Jun 17 5:46 PM
Hi Friends,
I copied the BAPI_REPMANCONF1_CREATE_MTS into Z FM and when I test the Z FM, I wantedly entered the wrong production version say ABCD instead of 1234. The message field of my return bapi BAPIRET2 is populated with an error message saying that "Production version not found". Till here it is working fine.
I need to modify my code in such a way that if I enter the wrong production version, my bapi should error me in such a way that "ABCD Production version not found" in the message field of BAPIRET2.
Please sugesst me ideas for solving this.
Thanks.
‎2011 Jun 17 6:36 PM
This text is contained in message class RM and message number 149.
If your return contains the above combination modify your message to include 'PRODUCTION VERSION'. However this is the best way to achieve it...
Thanks,
‎2011 Jun 17 7:56 PM
Hi gvsastry,
Thanks for the response.
Can you brief me how to do achieve this? This is a SAP automated message and I don't have acess to modify it. Is there any way that I can assign my Z message class to this return bapi instead of RM 149?
‎2011 Jun 17 8:19 PM
Nani,
Please follow approach suggested by Suman.
All you have to do is validate production version ( of that material/product?) against DB Tables before calling you ZFM or Std BAPI.
If you would like to go by my approach.. you will have to do something like this..
option1:
IF RETURN-TYPE = 'E' AND RETURN-ID EQ 'RM' AND RETURN-MESSAGE = '149'.
CONCATENAT 'XXXX' RETURN-MESSAGE INTO RETURN-MESSAGE.
ENDIF.Option2: Create a Z class.
IF RETURN-TYPE = 'E' AND RETURN-ID EQ 'RM' AND RETURN-MESSAGE = '149'.
RETURN-ID = 'ZID'.
RETURN-NUMBER = 'XXX' -> Number in Z class.
RETURN-MESSAGE = 'your message'.
ENDIF.
‎2011 Jun 17 9:07 PM
‎2011 Jun 17 7:30 PM
You can check for the Production version before passing it to BAPI, Instead of creating a Z for this.
‎2011 Jun 17 7:58 PM
Suman:
Thanks for the reply.
Can you please brief me how to achieve this functionality?