cancel
Showing results for 
Search instead for 
Did you mean: 

BADI BBP_DOC_CHANGE_BADI

Former Member
0 Kudos

Hi Guys,

I need to implement the method BBP_SC_CHANGE in the BADI BBP_DOC_CHANGE_BADI. Here I need to to change the vendor partner function. But I am not sure how to implement the BADI. Because in the BADi documentation it says, if we implement the metod BBP_SC_CHANGE, this method will call twice and it says For method BBP_SC_CHANGE, ensure that you fill all export parameters even if you wish to change only one parameter. After calling up the BAdI, the system can only work with the data in the export interface Hence I am not sure how to implement this method. Could you please let me know how to implement this method or if you have sample implmentation please provide to me,

Thanks

Ganesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nama,

I think the best example is included in your own system. I paste here for you.

DATA: ls_header type BBPS_SC_HEADER_BADI,

lt_item type BBPT_SC_ITEM_BADI,

ls_item type BBPS_SC_ITEM_BADI,

ls_item_import type BBP_PDS_SC_ITEM_ICU,

lt_account type BBPT_ACC_BADI,

ls_account type BBPS_ACC_BADI,

ls_account_import type BBP_PDS_ACC,

lt_partner type BBPT_PDS_PARTNER,

ls_partner type BBP_PDS_PARTNER,

lt_orgdata type BBPT_PDS_ORG,

ls_orgdata type BBP_PDS_ORG.

  • ! shopping cart programm will go on with values of export interface.

  • if they are not changed / empty further processing with this.

  • Before endmethod export interface must be filled at least with

  • import interface.

  • ! import/export interface of header,item,account using different types

  • Export interface has included the structures of import interface

  • ==> they have same definition, same length

  • header data

move-corresponding is_header to ls_header.

  • 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_account into ls_account_import.

move-corresponding ls_account_import to ls_account.

append ls_account to lt_account.

endloop.

  • partner data

loop at it_partner into ls_partner.

append ls_partner to lt_partner.

endloop.

  • organisation data

loop at it_orgdata into ls_orgdata.

append ls_orgdata to lt_orgdata.

endloop.

  • fill export data

  • Programm will go one with values of the export structure/tables

  • all data from import structure are not used anymore

ES_HEADER = LS_HEADER.

ET_ITEM[] = LT_ITEM[].

ET_ACCOUNT[] = LT_ACCOUNT[].

ET_PARTNER[] = LT_PARTNER[].

ET_ORGDATA[] = LT_ORGDATA[].

Best regards