on 11-04-2008 9:46 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.