Powered By

Free XML Skins for Blogger

Powered by Blogger

Saturday, October 18, 2008

SAP IDOCS OUTBOUND TRIGGER II

The messages are typically processed by

FORM ENTRY in PROGRAM RSNAST00.

If we are dealing with printing or faxing and

FORM EDI_PROCESSING in PROGRAM RSNASTED.

If we are dealing with IDocs

FORM ALE_PROCESSING in PROGRAM RSNASTED.

If we are dealing with ALE.

The following piece of code does principally the same thing as RSNAST00 does and
makes full use of all customizing settings for message handling.

TABLES: NAST.
SELECT * FROM NAST ...
PERFORM einzelnachricht IN PROGRAM RSNAST00

The processing routine for the respective media and message is customized in the
table TNAPR. This table records the name of a FORM routine, which processes the
message for the chosen media and the name of an ABAP where this FORM is found.

The ABAP RSNAST00 is the standard ABAP, which is used to collect unprocessed NAST
message and to execute the assigned action.

RSNAST00 can be executed as a collector batch run, that eventually looks for
unprocessed IDocs. The usual way of doing that is to define a batch-run job with
transaction SM37. This job has to be set for periodic processing and start a program
that triggers the IDoc re-sending.

Cave! RSNAST00 will only look for IDocs which are set to NAST-VSZTP = '1' or '2'
(Time of processing). VSZPT = '3' or '4' is ignored by RSNAST00.

Start RSNAST00 in the foreground first and find the parameters that match your
required selection criteria. Save them as a VARIANT and then define the periodic
batch job using the variant.

If RSNAST00 does not meet 100% your needs you can create an own program
similar to RSNAST00. The only requirement for this program are two steps:


* Read the NAST entry to process into structure NAST
tables nast.
data: subrc like sy-subrc.....
select from NAST where .......
* then call FORM einzelnachricht(rsnast00) to process the record
PERFORM einzelnachricht(rsnast00) USING subrc.

No comments:

Archives