on 01-06-2015 12:20 PM
Hi All,
I am trying to enhance the FM " BBP_PD_SC_TRANSFER" but for each object inside this FM I am getting message 'function group BBP_PD_SC'
can not be enhanced. Is there any object where I can put my custom code in SRM after PO is getting created in ECC and PO# is passed to SRM.
Regards,
Sachin
Hi All,
Is there BADI or EXIT in SRM after PO is created in ECC using BAPI_PO_CREATE1 and EKKO ,EKPO, NAST etc tables are updated.
Regards,
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit ,
I did the same thing. But there is no commit work provided by BAPI_PO_CREATE1 .
So nothing is updated in the database tables NAST, EKKO and EKPO etc unless SRM triggers the BAPI_TRANSACTION_COMMIT from SRM.
So we cant write code in ECC as all the tables will not have PO specific data in tables at the time when BAPI_PO_CREATE1 exists.
Regards,
Sachin
No need to commit raise an event and then catch an event after 10sec.
In commit I understand it will not allow you to update the date.
Or why not you create a report which is scheduled for every 10 mins or as per your requirement to find put which all POs has been created from SRM and send an notification accordingly.
Thanks
Ankit Jain
Hi Sachin,
I would suggest you do the following. There is a report called BBP_GET_STATUS_2 which would have scheduled by you periodicallty. This job actually is used to used to update SC with the PO number in classic scenario. I suggest you can check for SC and after updating the SC you can trigger the mail. So you would have to enhance the report but should solve your issue. Maybe you need to check for specific conditions to ensure you trigger mail only on successful PO, but it should be figurable.
Thanks and Regards,
Veera
Hello Sachin,
Step1--> Make copy of report SAPFM06P (Only subroutines for PDF is required which starts with ADOBE_ and FILL_CONTROL_STRUCTURE, XSTRING_TO_SOLIX)
ADOBE_PRINT_OUTPUT is designed to support email and if needed you can enhance the same to build required email body
Step2--> You can use MEDRUCK_PO or your custom adobe form
Step3--> make customizing setting as I mentioned my previous reply with new report and adobe form
Make sure that you selected the right output medium (5) for email and output execution type (Dispatch time as Send while saving data).
Step4--> configure SOST for mail communication
Step5--> Create SC and let SRM create classic PO.
Once the PO is created in ERP, System identifies the right output type and email is sent with PO PDF as attachment once the PO is saved in ERP.
Hope this helps
Best Regards
Sachi
Hi All,
This issue has been resolved. I found one implicit enhancement point in Method CREATE_DOCUMENT where we are calling one Custom RFC to trigger an email with PO as PDF attachment once all the Database tables are updated.
RFC FM ZMM_RFC_PO_EMAIL_ATTCH_SEND will be invoked from SRM system after all the database values are updated to in the backend ECC system.
Implicit enhancement ZMM_SRM_PO_PDF_EMAIL will be created in if_bbp_sc_be_crt~do in SRM .Check if Success message regarding PO creation exists in status message table ET_MESSAGE.
If yes, FM ‘FUNCTION_EXISTS’ is used to check if RFC implementation exists in target system. If exists, then only RFC FM ZMM_RFC_PO_EMAIL_ATTCH_SEND will be triggered.
Regards,
Sachin
Hi. SRM generates the PO number and passes it into ECC as an external reference, but I guess that is not that important to your issue.
What exactly are you trying to achieve? If you can not use the PO_CREATE_BACKEND_NEW BADI then you could probably enhance somewhere a bit after it. Set a breakpoint in this BADI, then setp up once or twice and go onto the next bit of code. SRM will call something (depends on a few things exactly what it calls) and create the PO in ECC. Then you can try and enhance wherever you are at that point.
You could also use the ME_PROCESS_PO_CUST BADI in ECC which will be called once the PO posts into ECC. You could RFC back into SRM to do things, it really depends on exactly what you want to do.
Regards,
Dave.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
I want to send an email from ECC system along with PO as an attachment.
This PO will be created from SRM portal using shopping cart.
I debugged it further and found that BAPI_PO_CREATE1 is used in ECC to create PO.
I enhanced it and put the code to send an email.
However,it lead to on problem. I used COMMIT WORK forcefully in my enhancement to update NAST ,EKKO, EKPO and all other table. But this lead to strange behavior and PO creation from portal fails when it's being created for first time and second time onwards it works.
When I debugged further I found that BAPI_TRANSACTION_COMMIT is called as RFC to COMMIT all table data changes from SRM to ECC.
So I want any point after BAPI_TRANSACTION_COMMIT In SRM, where I can add my custom code to fetch data from updated standard tables and send email.
But entire code comes under function group BBP_PD_SC and hence it can bot be enhanced.
Please help me to crack this dead end.
Regards,
Sachin
Hello Sachin,
It depends on how you are triggering the PO creation.
1. Let us assume you are trying to create a Classic PO from Sourcing Cockpit then any of the view of 4th step of sourcing cockpit can have an post-exit written to trigger the execution of email generation.
2. If you are trying to order the Purchase order from PO screen and transferring the ECS PO then you can use the view of PO screen and enhancement to trigger your calls.
3. If only you are using the scenario of automatic PO creation based on product category then it could be a sort of issue. Even there i would suggest a where-used list of BBP_PD_SC_TRANSFER there should be a call from shopping cart application where you can insert the mail generation code.
I hope this helpful.
Thanks and Regards,
Veera
Why do you want to write custom code?
try setting up below in ERP
You need to set up below customizing to have output type determined automatically while creating PO in ERP.
Condition Table
Access Sequences
Message Type
Message Determination Schemas
Partner Roles per Message Type
Condition Record
Condition Table
SPRO > Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
Select: Purch. Doc. Type, Purch. Organization and Vendor
Access Sequences
SPRO -> Material Management-> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
Message Type
SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order
Message Determination Schemas
Message Determination Schemas
SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
Assign Schema to Purchase Order
SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
Partner Roles per Message Type
SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
Condition Record
Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data->Messages-> Purchase Order-> MN04-> Create
Now you create PO (ME21N) and save it. Go to ME22N and print the PO by giving output type.
By this ERP will determine output type you need to use.
Best Regards
Sachi
Hi Sachi,
I am an ABAPer. I am not well aware of benefits of automatic determination of output types.
Can you let me know if it is possible to achieve below goals with automatic Output type determination and corresponding configuration settings ...
1. Send an email to desired recipients.
2. Populate email body with desired message.
3. Add dynamic subject to the email
4. Send PO as PDF attachment in email
Regards,
Sachin
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.