cancel
Showing results for 
Search instead for 
Did you mean: 

BADI for POs created automatically in background

Former Member
0 Kudos

Hi All,

We have a scenario in which, Purchase Order gets created automatically in background whenever a Shopping Cart is approved.

I have to write an enhancement to select the Transaction Type for this Purchase Order, which is created automatically and in background.

I tried BADI BBP_DOC_CHANGE_BADI but the same is not getting called for POs created automatically in background. It works for POs created in dialog mode by the user.

Is there any other BADI that I can use to change the POs which are created automatically in background.

Thanks,

Sameer Tapre

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sameer,

To have proper Transaction type (Doc type) of PO selected once SC approved and creating PO in backend is achieved by BBP_CREATE_BE_PO_NEW with Interface FILL_PO_INTERFACE1.

Thank you

Ritesh

Former Member
0 Kudos

Hi

Can you please let know which scenario are you using Classic or Ex Classic??

Regards

Trinath

Former Member
0 Kudos

Hi,

I assume you're using Extended Classic Scenario, otherwise BBP_DOC_CHANGE_BADI wouldn't make any sense.

This BAdi should also be called if the PO is created automatically in background, please check this again by for example implementing an endless while loop in the BAdi and then checking back in transaction SM50. From here you're then able to debug the program.

Another possibility, apart from this BAdi, would be BBP_DOC_SAVE_BADI for BUS2201.

Regards

Markus

Answers (3)

Answers (3)

summer_wang
Contributor
0 Kudos

Dear  Sameer,

I don't know your scenario , but please see the list below :

Standard scenario (only SRM Local PO)

BBP_DOC_CHANGE_BADI

BBP_DOC_CHECK_BADI

BBP_UI_CONTROL_BADI

BBP_LONGTEXT_BADI

Classic Scenario (Only ECC PO )

BBP_CREATE_BE_PO_NEW

Extened classic scenairo : (SRM and ECC PO)

SRM PO creations:

BBP_DOC_CHANGE_BADI

BBP_DOC_CHECK_BADI

BBP_UI_CONTROL_BADI

BBP_LONGTEXT_BADI

PO Transfer to ECC:

BBP_ECS_PO_OUT_BADI

ECC PO creation before and after BAPI :

BBP_MAP_BEFORE_BAPI

BBP_MAP_AFTER_BAPI

Former Member
0 Kudos

Hi All,

Thanks for the feedback.

We checked again and found that the BADI BBP_DOC_CHANGE_BADI is getting triggerd even for POs created in background automatically.

Thanks,

Sameer Tapre

Former Member
0 Kudos

Hi,

Did you try the BBP_DOC_CHECK_BADI? This can be used to control the header as well as the item level details of the Purchasing Document.

/Manoj

Former Member
0 Kudos

We can use BBP_DOC_CHECK_BADI for performing validation for documents created by user in Dialog mode.

But in my case I have to change the data and in background mode. So BBP_DOC_CHECK_BADI wont work in my case

Former Member
0 Kudos

Hi,

Can you please mention what exactly are you trying to change in the PO?

Now if I am correct, there are only 2 BAdi's to control PO creation in SRM. Namely,

BBP_DOC_CHECK_BADI

BBP_DOC_CHANGE_BADI

In you case, you seem to have tried both the cases. Have you tried developing your own custom BAdi's to meet your business requirement?

/Manoj