2012 Apr 24 1:35 PM
Hi guys,
This function just makes me kill my self over and over
It worked , now it doesn't anymore, and can't find the problem.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = gs_ekko-ebeln
poheader = gt_header
poheaderx = gt_headerx
TABLES
return = return
poitem = gt_item
poitemx = gt_itemx
Changing the header still works ,but when i try to change the item it doesn't change it anymore.
gt_item and gt_itemx are tables with header line
LOOP AT itab INTO wa.
CLEAR gt_item.
gt_item-po_item = wa-ebelp.
gt_item-quantity = wa-menge.
APPEND gt_item.
CLEAR gt_itemx.
gt_itemx-po_item = wa-ebelp.
gt_itemx-quantity = gv_check. " 'X'
APPEND gt_itemx.
ENDLOOP.
I've did some debugging and i see that i pass gt_item with the new values, but after the function it comes back with the old values. Why does it modify my values i passed? And as information , but i don't think it's very important , i'm working with screen and i call a perform to do this in my module ( input , user_command 'save' ) .
Any help would be wonderful. Thank you.
2012 Apr 24 1:47 PM
Hi,
In the item strcutre you might be having update flag , please check and pass it as 'U', also for itemx pass it as 'X'. I believe you are able to change the quantity manually, Please check the Po in mE22N and try to change the value manually and see.. what is the return strucre giving??
Regards,
Nagaraj.
2012 Apr 24 1:47 PM
Hi,
In the item strcutre you might be having update flag , please check and pass it as 'U', also for itemx pass it as 'X'. I believe you are able to change the quantity manually, Please check the Po in mE22N and try to change the value manually and see.. what is the return strucre giving??
Regards,
Nagaraj.
2012 Apr 24 2:03 PM
Yep another stupid question from my side . i've done all but not double checked the me22n, because i done that this morning. someone played with the the po_documents i was using and they were un-editable anymore