02-23-2010 6:05 AM
Dear all,
Can anyone please suggest me the appropriate user exit for the above mentioned requirement (in case of Inbound change IDoc processing)?
ZXM06O01 Include ZXM06O01
ZXM06TOP Include ZXM06TOP
ZXM06U02 Include ZXM06U02
ZXM06U15 Include ZXM06U15
ZXM06U22 Include ZXM06U22
ZXM06U36 Include ZXM06U36
ZXM06U40 Include ZXM06U40
ZXM06U41 Include ZXM06U41
ZXM06U51 Include ZXM06U51
ZXM06ZZZ Include ZXM06ZZZ
Regards
VJ
I think I am nto able to convey properly. Anyways here is the doubt I am putting in different way.
Actually I am doing change Inbound IDoc processing to delete the item level text note (for e.g. 'F02'). I manage to found one exit 'EXIT_SAPL2012_002' in the BAPI 'BAPI_PO_CHANGE' having include 'ZXMEWU09'. I am using table parameter 'POTEXTITEM' to fetch the values from the incoming IDoc and after that deleting the records in this table which corresponds to text Id 'F02'. Now problem is that even after deleting mentioned text note values, changes are reflecting in the purchase order at item level. Here is the code :
IF NOT potextitem[] IS INITIAL.
******Start of Change M003**********
CONSTANTS: c_f08 TYPE tdid VALUE 'F02'.
DELETE potextitem WHERE text_id = c_f08.
******End of Change M003**********
ENDIF.
Please suggest some solution.
Regards
VJ
Edited by: Vishal Jindal on Feb 24, 2010 7:46 AM
Edited by: Vishal Jindal on Feb 24, 2010 7:58 AM
02-24-2010 7:23 AM
Hi,
Try using the LOOP on the POTEXTITEM, then delete the text_id = c_f08. And also check whether the poexpimpitemx is passed as X for the field .Might be useful
Regards,
Aditya
Edited by: aditya on Feb 24, 2010 12:53 PM
02-24-2010 7:42 AM
Hi Aditya,
"And also check whether the poexpimpitemx is passed as X for the field". Can you please elaborate what exactly you are talking about?? Is it 'POTEXTITEMX' or 'POEXPIMPITEMX'. Do you want me to code in the below mentioned way :
IF NOT potextitem[] IS INITIAL.
******Start of Change M003**********
CONSTANTS: c_f08 TYPE tdid VALUE 'F02'.
DATA: it_ch_potextitem LIKE STANDARD TABLE OF bapimepotext,
DATA: wa_potextitem TYPE bapimepotext.
it_ch_potextitem[] = potextitem[].
DELETE it_ch_potextitem WHERE text_id = c_f08.
CLEAR potextitem[].
POTEXTITEMX[] = it_ch_potextitem[].
******End of Change M003**********
ENDIF.
regards
VJ
02-25-2010 12:57 PM
Aditya,
I am trying with the below mentioned code but it is not deleting the text note :
IF NOT potextitem[] IS INITIAL.
DATA : wg_ponum(10) TYPE c,
wg_itmnum(5) TYPE c,
wg_name LIKE thead-tdname.
DATA : wa_potextitem LIKE bapimepotext.
CONSTANTS:wg_id(4) TYPE c VALUE 'K04'.
READ TABLE potextitem INTO wa_potextitem WITH KEY text_id = 'K04'.
IF sy-subrc = 0.
clear : wg_ponum,
wg_itmnum.
wg_ponum = wa_potextitem-po_number.
wg_itmnum = wa_potextitem-po_item.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wg_itmnum
IMPORTING
output = wg_itmnum.
CONCATENATE wg_ponum wg_itmnum INTO wg_name.
DELETE potextitem WHERE text_id = wg_id.
CALL FUNCTION 'DELETE_TEXT'
EXPORTING
client = sy-mandt
id = wg_id
language = sy-langu
name = wg_name
object = 'EKPO'
savemode_direct = 'X'
* TEXTMEMORY_ONLY = ' '
* LOCAL_CAT = ' '
EXCEPTIONS
not_found = 1
OTHERS = 2 .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear : wa_potextitem,
wg_name.
ENDIF.
ENDIF.
Please suggest where the changes can be done.
Cheers
VJ