on 05-16-2007 10:10 AM
Hi,
I am looking for a way to change line items of PO (local Scenario) in SRM 5.0
For example, I have to set the final entry in line items.
I have tried to use the following FM:
1. BBP_PD_PO_GETDETAIL to get the data
afterwards
2. BBP_PD_PO_UPDATE to change the final entry sign
-> any idea, which import parameters have to been set?
I_PARK =
i_header =
i_save = '
IV_REJECT =
iv_with_change_approval =
-> in my case I get the export param changed = 'X'
Afterwards I call the FM
3. BBP_PD_PO_SAVE
-> sy-subrc 0
Then I checked the PO in the system and nothing is changed?!
Any idea how I can change PO items with several FM in an own Z-report?
Thanks in advance
Regards
Andreas
Hi Disha,
I want to change a PO not within a BAdi but within an own Z-report.
If i use the FM metnioned above, I am not able to change the PO.
Do I have to use another FM or do I have to submit a commit?
It seems like the system does not save any changes...
I am not sure how to use the mentioned FM...(i.e import params etc.)
Regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andreas,
I am facing same problem. But, i need to update header data.
I used,
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
EXPORTING
i_guid = wa_crmd_orderadm-guid
i_object_id = wa_crmd_orderadm-object_id
IMPORTING
e_header = wl_header.
then...
CALL FUNCTION 'BBP_PD_PO_UPDATE'
EXPORTING
i_header = wl_header_u
i_save = 'X'
IMPORTING
e_changed = l_changed
es_header = wl_header_d.
then...
CALL FUNCTION 'BBP_PD_PO_SAVE'
EXPORTING
iv_usertype = c_emp_e
IV_HEADER_GUID = wl_header_d-guid.
But, it is throwing a dump saying 'BUFFER TABLE NOT UP TO DATE'.
Please help me.
Thanks,
Vishnu
Hi Andreas,
I have done the same series of steps that u have specified.
If am changing only the final_entry indicator, the changes parameter of BBP_PD_PO_SAVE is returning blank. Also the PO is not getting updated with the final_entry flag.
Am I missing something here.
PFB the code.
...
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
EXPORTING
i_guid = l_guid
i_with_itemdata = 'X'
i_read_be_data = 'X'
IMPORTING
e_header = x_header
TABLES
e_item = t_item
DATA: l_changed TYPE c.
data: i_header type BBP_PDS_PO_HEADER_U.
move-corresponding x_header to i_header.
READ TABLE t_item INTO x_item INDEX 1.
x_item-final_entry = 'X'.
x_item-quantity = 3.
MODIFY t_item FROM x_item INDEX 1.
CALL FUNCTION 'BBP_PD_PO_LOCK'
EXPORTING
I_HEADER_GUID = i_header-guid
IV_OBJECT_ID = l_po
CALL FUNCTION 'BBP_PD_PO_UPDATE'
EXPORTING
i_header = i_header
I_SAVE = 'X'
IMPORTING
e_changed = l_changed
TABLES
i_item = t_item
CALL FUNCTION 'BBP_PD_PO_SAVE'
iv_header_guid = i_header-guid
CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'
COMMIT WORK AND WAIT.
CALL FUNCTION 'BBP_PD_PO_UNLOCK'
EXPORTING
I_HEADER_GUID = i_header-guid
IV_OBJECT_ID = l_po
Any pointers will be highly helpful.
Thanks in advance,
Sreeakanth
Edited by: Sreekanth Krishnan on Jun 10, 2009 10:57 AM
Edited by: Sreekanth Krishnan on Jun 10, 2009 10:57 AM
Edited by: Sreekanth Krishnan on Jun 10, 2009 11:03 AM
Edited by: Sreekanth Krishnan on Jun 10, 2009 11:04 AM
HI,
You can use the BADI "BBP_DOC_CHANGE_BADI"/BBP_DOC)_CEHCK_BADi.Try using the FM "BBP_PROCDOC_UPDATE".
BR,
Disha.
Pls reward points for useful answers.
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.