10-01-2008 5:33 PM
Hi,
I have a requirement to filled in BSEG-ZUONR field with BEDNR field in PO line item through MIGO and MIRO. I'm not able to find any user exit to change the value in BSEG-ZUONR. Currently ZUONR is filled with PO # and line item.
Is there any suggestion on how to change the value ZUONR with BEDNR?
Thanks.
10-01-2008 10:34 PM
Hi,
I tried the samething in my system while doing MIGO. It is updating the BSEG-ZUONR correctly..
Not sure what you are missing...
Thanks
Naren
10-01-2008 5:40 PM
Hi,
You can use the BTE 1120 to change BSEG-ZUONR...
Check this link for how to implement BTE.
Thanks
Naren
10-01-2008 8:36 PM
I've implemented BTE. I set a break point in the z function module, it's triggering it. However, the zuonr field still has value of PO and line item. I don't know where the original value of zuonr came from, but it's not changing the value.
10-01-2008 8:44 PM
Hi,
You have to code in the BTE to change the value BSEG-ZUONR.
Try this code...
FIELD-SYMBOLS: <lwa_bsegsub> TYPE bseg_subst.
DATA: BEGIN OF lwa_po,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
END OF lwa_po.
DATA: l_bednr TYPE ekpo-bednr.
LOOP AT t_bsegsub ASSIGNING <lwa_bsegsub>.
* Get PO and line item from ZUONR
lwa_po = <lwa_bsegsub>-ZUONR.
* Get the bednr from EKPO.
SELECT SINGLE bednr INTO l_bednr
FROM EKPO
WHERE EBELN = lwa_po-ebeln
and ebelp = lwa_po-ebelp.
* Check the return code.
if sy-subrc = 0.
<lwa_bsegsub>-ZUONR = l_bednr.
endif.
ENDLOOP.
Thanks
Naren
10-01-2008 9:13 PM
Thanks again for the quick response.
Field ZUONR in t_bsegsub is empty when the function module is triggered at first place. Basically I put the following codes:
data: lv_bednr type bednr.
loop at t_bseg.
loop at t_bsegsub.
select single bednr into lv_bednr from ekpo where ebeln =
t_bseg-ebeln and ebelp = t_bseg-ebelp.
t_bsegsub-zuonr = lv_bednr.
modify t_bsegsub index sy-tabix.
clear lv_bednr.
endloop.
endloop.
I can see value t_bsegsub-zuonr has changed.
However, when I go to table BSEG, the value is overwrite by PO# and line item #.
Do you have any idea where that comes from?
I'm wondering if it's the configuration issue.
I
.
10-01-2008 9:47 PM
10-01-2008 10:02 PM
1130 is not triggering the posting of MIGO and MIRO.
The field is not populated with the value.
10-01-2008 10:09 PM
Hi,
Please debug after the BTE 1120 is triggered and the BSEG-ZUONR internal table is update with BEDNR..
You can also create watch points on BSEG-ZUONR...to track where exactly the data is changing..
I will also check if this field value can be set in configuration..
Thanks
Naren
10-02-2008 2:56 PM
Hi,
I've tried again removing the code "clear lv_bednr", and it's working!
Thanks again for your help!!
10-01-2008 10:34 PM
Hi,
I tried the samething in my system while doing MIGO. It is updating the BSEG-ZUONR correctly..
Not sure what you are missing...
Thanks
Naren