cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance the FM "BBP_PD_SC_TRANSFER"

former_member213851
Active Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member213851
Active Contributor
0 Kudos

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

former_member184741
Active Contributor
0 Kudos

Hi,

you create an implicit enhancement in driver FM B46B_DPO_TRANSFER at the end and do whatever you want

former_member213851
Active Contributor
0 Kudos

Hi Sankara,

For FM B46B_DPO_TRANSFER , I tried with implicit enhancements.

However, it shows same warning message and upon hitting enter, nothing happens.




Regards,

Sachin




Former Member
0 Kudos

Hi,

For this requirement to meet you can trigger the event which could be responsible to send an notification which you trying to send . This enhancement still you can create in BAPI_PO_CREATE1.

But you need to set an delay of like 10 Sec for the event to trigger.

Thanks

Ankit Jain

former_member213851
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

former_member213851
Active Contributor
0 Kudos

Hi Ankit,

Adding COMMIT WORK forcefully lead to some problems into SRM system.

Creating background jobs will create issues in Audit .

Regards,

Sachin

former_member228602
Contributor
0 Kudos

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

0 Kudos

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

former_member213851
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

former_member213851
Active Contributor
0 Kudos

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


0 Kudos

Hi Sachin,

Is it classic scenario or extended?

Why cant you just use MM output mechanism to send mail?

Best regards

Sachi

former_member213851
Active Contributor
0 Kudos

Hi Sachi,

I want any BADI or EXIT  in SRM after PO is created in ECC and EKKO ,EKPO, NAST etc tables are updated.

Regards,

Sachin

former_member228602
Contributor
0 Kudos

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

former_member213851
Active Contributor
0 Kudos

Hi Veera,

Thanks for the updates. I am using the last scenario : PO  creation using BBP_PD_PO_TRANSFER.

I checked the where used list and it's being used in 2-3 objects ... But those can not be enhanced....

Is there any other way....

Regards,

Sachin

0 Kudos

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

former_member213851
Active Contributor
0 Kudos

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