Sunteți pe pagina 1din 2

Process Output types through program

Skip to end of metadata


Created by Guest, last modified on Nov 04, 2008
Go to start of metadata

Introduction
What is an Output type (Message type) ? (source SAP Help)

An output type (or also a "condition type") summarizes messages of the same meaning. It contains parameters that are valid
for all its assigned messages, for example appropriate partner functions.

USE:

For each transmission medium, one form routine in a program is assigned to the output type. This form routine is called for
processing the message (message status record).

Output type processing

Output types or message types are processed from business transactions like vt02n, me22n etc.

When an message type is processed it runs the associated form routine of the output type, but in certain cases we may
require to process the message type through our program so we will see how to do that.

Processing of output types through program.


The Message Status Record (table NAST) contains information about when to start processing programs and which
parameters are used. When the processing program has been called, a processing status is written.

So to process a message type through our program we have to create these parameters in the NAST table.

STEP BY STEP PROCEDURE:

1 Create an internal table and work area of type nast.

DATA: it_nast type standard table of nast,

wa_nast type nast.

2 Now assign values to the work area.

wa_nast-mandt = sy-mandt.
wa_nast-kappl = <appropriate value>."Application area
wa_nast-objky = <appropriate value>."object key. Po, shipment etc
wa_nast-kschl = <output type>."output type to be processed
wa_nast-spras = <appropriate value>."language
wa_nast-parnr = <appropriate value>."message partner
wa_nast-parvw = <appropriate value>."partner function
wa_nast-erdat = sy-datum."current date
wa_nast-eruhr = sy-uzeit."current time
wa_nast-nacha = <appropriate value>."message transmission medium
wa_nast-anzal = '01'."number of messages
wa_nast-vsztp = <appropriate value>."Dispatch time
wa_nast-vstat = '0'."processing status
3 Now Update the NAST table with the fm 'RV_MESSAGE_UPDATE_SINGLE'

call function 'RV_MESSAGE_UPDATE_SINGLE'


exporting
msg_nast = wa_nast.

4 Process the output type using the fm 'WFMC_MESSAGES_PROCESS'

data: lt_msg_nast type table of msg0,

ls_msg0 like msg0,

t_disp type table of naliv2.

move-corresponding wa_nast to ls_msg0.


append ls_msg0 to lt_msg_nast.

call function 'WFMC_MESSAGES_PROCESS'


exporting
pi_display_id = 'NALIV2'
pi_no_dialog = 'X'
tables
tx_messages = lt_msg_nast
tx_display = t_disp.

S-ar putea să vă placă și