2006 Sep 18 11:09 AM
All,
We have to update PO-items details in the shipping tab. in order to do this, we have implemented note 765494.
However, so far no update of the PO-items took place (we have used the commit of course).
Does anybody has any idea how to fill the interface in order to update these fields
Thanks in advance,
Bert
PS
The sap note tells us that if you have trouble with this note, SAP will help but you will be charged for this (!!!!).
2006 Sep 18 11:30 AM
hi,
have u checked the conversion routines for the field's which u r using.
try to fill the field values in function module(the fields which u r using to upload).
Njoy SAP
2006 Sep 18 11:36 AM
Hi
Check if this code is useful...
Regards,
Raj
Exclude deletion marked items from updating.
LOOP AT it_ekpo WHERE loekz NE 'L' .
l_tabix = sy-tabix.
Fill requisitioner if it is blank
IF it_ekpo-afnam IS INITIAL.
it_poitem-preq_name = 'MATRIX'.
it_poitemx-preq_name = 'X'.
ELSE.
l_itm_txt = it_ekpo-txz01.
CONDENSE l_itm_txt.
l_length = strlen( l_itm_txt ).
IF l_length = 40.
CONCATENATE it_ekpo-txz01+0(39) '.'
INTO it_poitem-short_text.
ELSE.
CONCATENATE it_ekpo-txz01 '.'
INTO it_poitem-short_text.
ENDIF.
it_poitemx-short_text = 'X'.
ENDIF.
it_poitem-po_item = it_ekpo-ebelp.
it_poitemx-po_item = it_ekpo-ebelp.
it_poitemx-po_itemx = 'X'.
APPEND it_poitemx.
APPEND it_poitem.
m_save = 'X'.
ENDLOOP.
*Execute BAPI when any of the line got changed.
IF m_save = 'X'.
l_po_no = it_file-ebeln.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_po_no
POHEADER =
POHEADERX =
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
no_messaging = 'X'
no_message_req = 'X'
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPHEADER =
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POTEXTHEADER =
POTEXTITEM =
POPARTNER =
.
LOOP AT it_return WHERE type = 'E'.
CLEAR m_save.
it_errors-docnum = it_file-ebeln.
it_errors-type = 'E'.
it_errors-msg = it_return-message+0(120).
APPEND it_errors.
ENDLOOP.
ELSE.
it_errors-docnum = it_file-ebeln.
it_errors-type = 'I'.
it_errors-msg = 'Check this PO, no data changed'.
APPEND it_errors.
ENDIF.
IF m_save = 'X'. "Saved Properly
m_tabix = l_tabix.
it_errors-docnum = it_file-ebeln.
it_errors-type = 'S'.
CONCATENATE 'PO Changed Properly.. ' m_count
'/' m_tabix 'line items changed'
INTO it_errors-msg SEPARATED BY ' '.
APPEND it_errors.
ENDIF.
CLEAR:it_poitem,it_poitemx,it_return,it_ekpo.
REFRESH:it_poitem,it_poitemx, it_return, it_ekpo.
ENDLOOP.
COMMIT WORK.
2006 Sep 18 11:36 AM
Hi ravi,
Thanks for your reply.
There is no conversion routine for the fields I want to update. The fields that I want to update are Route and Delivery Priority.
Bert