分类: 项目管理
2012-03-14 10:15:36
I figured out another way to do this.
on debugging I could figure out the program containing the data in the memory.
Before the save I accessed this program and updated the parameter as required.
Also For transaction BP this program is not available but there is another program so there is an if else based on the sy-tcode.
I need to check for other BP transactions as well but as of now this seems good.
IF_EX_PARTNER_UPDATE~CHANGE_BEFORE_UPDATE:
SPAN {
font-family: "Arial monospaced for SAP";
font-size: 10pt;
color: #000000;
background: #CCE8CF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
METHOD if_ex_partner_update~change_before_update.
DATA lt_but0is_o TYPE TABLE OF but0is .
DATA lt_but0is_n TYPE TABLE OF but0is .
DATA ls_but0is TYPE but0is .
DATA lt_but000_o TYPE TABLE OF but000 .
DATA lt_but000_n TYPE TABLE OF but000 .
DATA ls_but000 TYPE but000 .
DATA lt_but020_o TYPE TABLE OF but020 .
DATA lt_but020_n TYPE TABLE OF but020 .
DATA ls_but020 TYPE but020 .
DATA ls_address TYPE bapibus1006_address .
**************************************************************************************************************
IF sy-tcode = 'BP'.
CALL FUNCTION 'BUPA_ISNUMBER_CALLBACK'
TABLES
et_but0is_old = lt_but0is_o
et_but0is_new = lt_but0is_n.
CALL FUNCTION 'BUPA_GENERAL_CALLBACK'
TABLES
et_but000_old = lt_but000_o
et_but000_new = lt_but000_n.
CALL FUNCTION 'BUPA_ADDR_CALLBACK'
TABLES
et_but020_old = lt_but020_o
et_but020_new = lt_but020_n.
IF lt_but0is_n IS NOT INITIAL.
LOOP AT lt_but0is_n INTO ls_but0is.
ENDLOOP.
ENDIF.
IF lt_but000_n IS NOT INITIAL.
LOOP AT lt_but000_n INTO ls_but000.
ENDLOOP.
ENDIF.
IF lt_but020_n IS NOT INITIAL.
LOOP AT lt_but020_n INTO ls_but020.
ENDLOOP.
ENDIF.
CALL FUNCTION 'BUPA_ADDRESS_GET_DETAIL'
EXPORTING
iv_partner = ls_but000-partner
iv_valdt = sy-datlo
IMPORTING
es_address = ls_address.
ENDIF.
ENDMETHOD.