on 05-25-2015 3:36 PM
Hi All,
we are in SRM 7 EHP 2 trying to Update one custom field in PO in BBP_PROCESS_PO Method PROCESS_SMARTFORM but I am unable to achieve this , in SDN i found related threads which seems to be Ok with my code, but No success in PO update ,Guide me on this.
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
EXPORTING
i_guid = lv_po_guid
i_with_itemdata = 'X'
IMPORTING
e_header = v_in_header
TABLES
e_item = it_item
e_account = it_account
e_partner = it_partner
e_longtext = it_longtext
e_limit = it_limit
e_orgdata = it_orgdata
e_tax = it_tax
e_pridoc = it_pridoc
e_hcf = it_hcf
e_icf = it_icf
e_tol = it_tot
e_messages = it_messages.
MOVE-CORRESPONDING v_in_header TO s_header.
s_header-approval_ind = 'R'.
LOOP AT it_item_up INTO ls_item_up.
IF ls_item_up-znopooutput IS INITIAL.
ls_item_up-znopooutput = 'X'.
MODIFY it_item_up FROM ls_item_up.
CLEAR ls_item_up.
ENDIF.
endloop.
CALL FUNCTION 'BBP_PD_PO_UPDATE'
EXPORTING
i_header = s_header
it_attach = it_attachment
IMPORTING
e_changed = v_chnaged
es_header = v_out_header
TABLES
i_item = it_item_up
i_account = it_account
i_partner = it_partner
i_longtext = it_longtext
i_limit = it_limit
i_orgdata = it_orgdata
i_tax = it_tax
i_pridoc = it_pridoc
e_messages = it_messages
i_hcf = it_hcf
i_icf = it_icf
i_tol = it_tot.
CALL FUNCTION 'BBP_PD_PO_SAVE'
EXPORTING
IV_HEADER_GUID = lv_po_guid.
CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'
EXPORTING
I_NO_STATUS = 'X'.
* set commit work for po deletion
COMMIT WORK AND WAIT.
here v_chnaged is getting 'X' , even I checked in Debugging value is passing fine to all update statements.
Thank you,
Venkat
HI Venkata
I am not exactly able to understand but maybe it means that your last commit statement is not updating the database as per the values you wanted the program to update
It is always better to maintain conditon like SY-SUBRC = 0 to be able to understand where exactly it is failing .
Also check it_messages if it has an entry in Error it wont let you update
Kindly check again and attach screenshots of debug mode incase it does not really work still
Regards
Vinita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
please check the Content of IT_MESSAGES after the call of Function BBP_PD_PO_UPDATE.
Regards
Oliver
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.