SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Process Output types through program



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> List Generation, LDB, Spool Process, SAP Query, Report Painter
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Mon Dec 17, 2012 10:29 am    Post subject: Process Output types through program Reply with quote

Source: http://wiki.sdn.sap.com/wiki/display/ABAP/Process+Output+types+through+program

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.

Code:
         DATA: it_nast type standard table of nast,

                wa_nast type nast.

2 Now assign values to the work area.

Code:
            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

Code:
            call function 'RV_MESSAGE_UPDATE_SINGLE'
              exporting
                msg_nast = wa_nast.


4 Process the output type using the FM 'WFMC_MESSAGES_PROCESS'

Code:
                  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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> List Generation, LDB, Spool Process, SAP Query, Report Painter All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.