2007 Jul 13 1:13 PM
hi,
Iam sending the code for getting the idoc number from sales document.
but iam not getting the result.
please see the code and correct the code so that i will get the idoc number from the sales document.
tables edid4.
data l_docnum like edid4-docnum.
parameters:p_vbeln like vbak-vbeln.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
IMPORTING
OUTPUT = p_vbeln
.
select single docnum from edid4 into l_docnum where sdata like '&p_vbeln&'.
if sy-subrc = 0.
write edid4-docnum.
else.
write ' the record is not found'.
endif.
it is very urgent..............
thanks in advance......
2007 Jul 13 1:19 PM
concatenate '%' p_vbeln '%' into v_vbeln.
select single docnum from edid4 into l_docnum where sdata like v_vbeln.
if sy-subrc = 0.
write edid4-docnum.
else.
write ' the record is not found'.
endif.
2007 Jul 13 1:19 PM
concatenate '%' p_vbeln '%' into v_vbeln.
select single docnum from edid4 into l_docnum where sdata like v_vbeln.
if sy-subrc = 0.
write edid4-docnum.
else.
write ' the record is not found'.
endif.
2007 Jul 13 1:46 PM
please send the code once again with some more clarity,because iam not getiting the answer.
it is very u rgent........
thanks in advance.......
2007 Jul 13 2:05 PM
See the below code :
report zxyz.
tables edid4.
data l_docnum like edid4-docnum.
parameters:p_vbeln like vbak-vbeln.
<b>data sdata like edid4-sdata.</b>
start-of-selection.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
IMPORTING
OUTPUT = p_vbeln
.
<b>concatenate '%' p_vbeln '%' into sdata.</b>
select single docnum from edid4 into l_docnum
where sdata like <b>sdata.</b>
if sy-subrc = 0.
write edid4-docnum.
else.
write ' the record is not found'.
endif.
Thanks
Seshu
2007 Jul 13 2:16 PM
Hi Sudarson,
Do not use table EDID4 for what you are trying to do as it will be very slow and EDID4 does not hold the details you want.
Look at tables EDIDC - IDOC control records
EDIDS - IDOC status records - the fields STAPAx hold the parameters, like sales order number, that you need.