Hi,
For an inbound GR scenario, i am using the idoc WMMBID02. Since the
third party not giving any batch value in XI mapping, i am trying to
put the batch value into the idoc field through function exit:
EXIT_SAPLLMDE_002. The following code i have used:
LOOP AT T_IDOC_DATA.
IF T_IDOC_DATA-segnam = 'E1MBXYI'.
SELECT SINGLE * FROM mara WHERE matnr = T_IDOC_DATA-sdata+2(18) AND
XCHPF = 'X'.
IF sy-subrc = 0.
SELECT * FROM t001w WHERE werks = T_IDOC_DATA-sdata+20(4).
IF t001w-regio = '22'.
batch = 'TN'.
ELSEIF t001w-regio = '01'.
batch = 'AP'.
ELSEIF t001w-regio = '10'.
batch = 'KA'.
ENDIF.
ENDSELECT.
T_IDOC_DATA-sdata+28(2) = batch.
MODIFY T_IDOC_DATA.
ENDIF.
ENDIF.
ENDLOOP.
The modified values i can see in the internal table T_IDOC_DATA.
But in the end when i see the triggered idoc through T.Code: WE05, it has not
posted, still it is showing the status error as "Enter Batch".
pls share your experience to resolve this issue...
rgds,
balu