Skip to Content
Former Member
Jan 17, 2008 at 03:28 PM

BBP_DOC_CHANGE_BADI: unable to valoriza custom field


Hi all,

I'm using BBP_DOC_CHANGE_BADI badi, in particular BBP_PO_CHANGE method.

I have to fill a custom field in the header from a OrgData.

this is the code

METHOD if_ex_bbp_doc_change_badi~bbp_po_change.

DATA: ls_partner TYPE bbp_pds_partner,

ls_item TYPE bbp_po_item_badi,

ls_acc TYPE bbps_acc_badi,

ls_hcf TYPE bbp_pds_hcf_po,

ls_icf TYPE bbp_pds_icf_po,

ls_sdln TYPE bbp_pds_sdln,

ls_item_i TYPE bbp_pds_po_item_icu,

fm_header type BBP_PDS_PO_HEADER_D,

ls_orgdata type BBP_PDS_ORG.

DEFINE fill_str.

loop at &1 into &2.

append &2 to &3.

clear &2.



MOVE-CORRESPONDING is_header TO es_header.

fill_str it_acc ls_acc et_acc.

fill_str it_hcf ls_hcf et_hcf.

fill_str it_icf ls_icf et_icf.

fill_str it_sdln ls_sdln et_sdln.

fill_str it_orgdata ls_orgdata et_orgdata.

fill_Str it_partner ls_partner et_partner.

LOOP AT it_item INTO ls_item_i.

MOVE-CORRESPONDING ls_item_i TO ls_item.

APPEND ls_item TO et_item.

CLEAR: ls_item, ls_item_i.


read table it_orgdata into ls_orgdata index 1.

es_header-zz_tipotr = ls_orgdata-PROC_GROUP_ID.


In the badi all works fine but in the browser the value doesn't appear.

I debug some code, and the customer fields was losen out the the function module BBP_PD_PO_UPDATE.

Any Idea? is there any note to implement or it's my mistake?