cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_DOC_CHANGE_BADI

Former Member
0 Kudos

Hi SRM Gurus,

I have the below issue with the BADI BBP_DOC_CHANGE_BADI.

Current scenario :

We have implemented the above badi for SC, PO & CONF.

There are three implementation active currently with filter value as below:

1) flt_val = BUS2121 (SC)

2) flt_val = BUS2201 (PO)

3) flt_val = BUS2203 (CONF)

These are three different implementations with 3 different filter values.

Issue:

When i activate the PO BADI with or without code inside method IF_EX_BBP_DOC_CHANGE_BADI~BBP_PO_CHANGE the PO is not getting automatically created when the SC is approved.

PO is created automatically when SC is approved if i deactivate the PO BADI implementation.

The implementation for the PO badi is for creating a backend workflow event using FM SWE_EVENT_CREATE. I tested by commenting the entire code in this PO badi method but keeping the implementation active, still the PO is not created from SC.

Please let me know what can be the possible causes of this issue.

Cheers,

Chirag.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Chirag,

The problem is with your PO BADI implementation. Please make sure that you map all the importing parametsr to the exporting parameters appropiately.

i.e. First make sure PO is getting created with an active implementaion for the filter PO. Once this is completed, you can build additional logic in the BADI.

This should solve your problem.

Regards

Kathirvel

Former Member
0 Kudos

Hello,

I have mapped all the exporting parameters with importing parameters as below but still the issue is not resolved. Please can you help further?

DATA : ls_partner TYPE bbp_pds_partner ,

ls_item TYPE bbp_po_item_badi ,

ls_item_import TYPE bbp_pds_po_item_icu,

ls_account_import TYPE bbp_pds_acc ,

ls_account TYPE bbps_acc_badi ,

ls_header TYPE bbp_po_header_badi ,

lt_item TYPE bbpt_po_item_badi ,

lt_acc TYPE bbpt_acc_badi ,

lt_partner TYPE bbpt_pds_partner .

MOVE-CORRESPONDING is_header TO ls_header.

  • partner data

LOOP AT it_partner INTO ls_partner.

APPEND ls_partner TO lt_partner.

ENDLOOP.

  • item data

LOOP AT it_item INTO ls_item_import.

MOVE-CORRESPONDING ls_item_import TO ls_item.

APPEND ls_item TO lt_item.

ENDLOOP.

  • accounting data

LOOP AT it_acc INTO ls_account_import.

MOVE-CORRESPONDING ls_account_import TO ls_account.

APPEND ls_account TO lt_acc.

ENDLOOP.

es_header = ls_header .

et_partner[] = lt_partner[].

et_item[] = lt_item[] .

et_acc[] = lt_acc[] .

et_hcf[] = it_hcf[] .

et_icf[] = it_icf[] .

et_sdln[] = it_sdln[] .

Cheers,

Chirag.

Former Member
0 Kudos

Hi,

Please try the following SAP note:

Note 1152871 - Service lines not created.

Thanks,

Pradeep

Former Member
0 Kudos

Hi All,

Still the issue is not resolved. I seek all your help.

Regards,

Chirag.

Former Member
0 Kudos

Try to create a PO manually and add the shopping cart line item (that failed to generate a PO). Then debug your BADI. This should help you track the problem.

Regards

Kathirvel

Former Member
0 Kudos

What I don't understand is why you use the BBP_DOC_CHANGE badi for triggering the backend workflow. Isn't it better to use the BBP_DOC_SAVE badi for that? This badi is specifically called for additional customer specific actions. The doc_change is for changing the document itself.

I agree with the others that the implementation in the po doc_change_badi has an error.

Regards,

Robin