‎2007 Jun 19 8:40 PM
hi All
is there a way to set a indicartor in the SAP side to tell the ASN IDOC has been resend and not orginal?
The customer wants that if the ASN idoc is sent again the customer would want to know that its not an origianl ASN instead its a copy of the ASN sent earlier.
any idea how to achieve this?
~Suresh
‎2007 Jun 28 4:00 PM
Hi,
This is normally achieved by selecting from NAST to see if an entry for the same key has a processed status (nast-vstat = '1'). You can then set a field in the IDOC according to the existence of this record or not.
An example selection from nast being:
select single * into *nast
from nast where kappl = nast-kappl
and objky = nast-objky
and kschl = nast-kschl
and spras = nast-spras
and parnr = nast-parnr
and parvw = nast-parvw
and nacha between '1' and '4'
and vstat = '1'.
if sy-subrc eq 0.
This is a repeat output
else.
This is not a repeat output
endif.
Hope this helps,
Darren