ABOUT NAST RSNAST00

Hi,
  How ABOUT NAST RSNAST00 this are linked with ABAP Code?
Example if any?
Thanks
Avi

Hi
  Check this one The simplest way to create IDocs, is to write an ABAP. The individual ABAP can either be a triggering ABAP which runs at certain events, e.g. every night, or it can be an ABAP which does the complete IDoc creation from scratch.
Triggering ABAP
A triggering ABAP would simply try to determine which IDocs need sending and call the appropriate IDoc creation routines.
ABAP creates the whole IDoc
You may also imagine the ABAP to do all the job. As this is mostly reinventing the wheel, it is not really recommended and should be reserved to situation, where the other solution do not provide an appropriate mean.
1.1     NAST Messages Based Outbound IDocs
You can use the R/3 message concept to trigger IDocs the same way as you trigger SAPscript printing.
One of the key tables in R/3 is the table NAST. This table records reminders written by applications. Those reminders are called messages.
Applications write messages to NAST, which will be processed by a message handler
Every time when an applications sees the necessity to pass information to a third party. a message is written to NAST. A message handler will eventually check the entries in the table and cause an appropriate action.
EDI uses the same mechanism as printing
The concept of NAST messages has originally been designed for triggering SAPscript printing. The very same mechanism is used for IDocs, where the IDoc processor replaces the print task, as an IDoc is only the paperless form of a printed document.
Condition technique can mostly be used
The messages are usually be created using the condition technique, a mechanism available to all major R/3 applications.
Printing, EDI and ALE use the same trigger
The conditions are set up the same way for any output media. So you may define a condition for printing a document and then just change the output media from printer to IDoc/EDI or ALE.
Figure 1:     Communicating with message via table NAST
NAST messages are created by application by calling function module MESSAGING
Creating NAST messages is a standard functionality in most of the SAP core applications. Those applications - e.g. VA01, ME21 - perform calls to the central function module MESSAGING of group V61B. The  function module uses customizing entries, mainly those of the tables T681* to T685*.
NAST contains object key, sender and receiver
A NAST output message is stored as a single record in the table NAST. The record stores all information that is necessary to create an IDoc. This includes mainly an object key to identify the processed object and application to the message handler and the sender and receiver information.
Programs RSNAST00 and RSNASTED provide versatile subroutines for NAST processing
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.
FORM einzelnachricht IN PROGRAM RSNAST00
TABLES: NAST.
SELECT * FROM NAST ...
PERFORM einzelnachricht IN PROGRAM RSNAST00
Programs are customized in table TNAPR
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.
1.2     The RSNAST00 ABAP
The ABAP RSNAST00 is the standard ABAP, which is used to collect unprocessed NAST message and to execute the assigned action.
RSNAST00 is the standard batch collector for messages
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.
RSNAST00 processes only messages of a certain status
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.
For batch execution a selection variant is required
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.
1.3     Sending IDocs Via RSNASTED
Standard R/3 provides you with powerful routines, to trigger, prepare and send out IDocs in a controlled way. There are only a few rare cases, where you do not want to send IDocs the standard way.
The ABAP RSNAST00 is the standard routine to send IDocs from entries in the message control. This program can be called directly, from a batch routine with variant or you can call the FORM einzelnachricht_screen(RSNAST00) from any other program, while having the structure NAST correctly filled with all necessary information.
RSNAST00 determines if it is IDoc or SAPscript etc.
If there is an  entry in table NAST, RSNAST00 looks up the associated processing routine in table TNAPR. If it is to send an IDoc with standard means, this will usually be the routine RSNASTED(EDI_PROCESSING) or RSNASTED(ALE_PROCESSING) in the case of ALE distribution.
RSNASTED processes IDocs
RSNASTED itself determines the associated IDoc outbound function module, executes it to fill the EDIDx tables and passes the prepared IDoc to the port.
You can call the standard processing routines from any ABAP, by executing the following call to the routine. You only have to make sure that the structure NAST is declared with the tables statement in the calling routine and that you fill at least the key part and the routine (TNAPR) information before.
TABLES NAST.
NAST-MANDT = SY-MANDT.
NAST-KSCHL = 'ZEDIK'.
NAST-KAPPL = 'V1'.
NAST-OBJKY = '0012345678'.
NAST-PARNR = 'D012345678'.
PERFORM einzelnachricht_screen(RSNAST00).
Calling einzelnachricht_screen determines how the message is processed. If you want to force the IDoc-processing you can call it directly:
TNAPR-PROGN = ''.
TNAPR-ROUTN = 'ENTRY'.
PERFORM edi_processing(RSNASTED).
1.4     Sending IDocs Via RSNAST00
Here is the principle flow how RSNAST00 processes messages for IDocs.
Figure 2:     Process logic of RSNAST00 ABAP
1.5     Workflow Based Outbound IDocs
Unfortunately, there are application that do not create messages. This is especially true for master data applications. However, most applications fire a workflow event during update, which can easily be used to trigger the IDoc distribution.
SWE_EVENT_CREATE
Many SAP R/3 applications issue a call to the function SWE_EVENT_CREATE during update. This function module ignites a simple workflow event.
Workflow is a call to a function module
Technically a workflow event is a timed call to a function module, which takes the issuing event as the key to process a subsequent action.
Applications with change documents always trigger workflow events
If an application writes regular change documents (ger.: Änderungsbelege) to the database, it will issue automatically a workflow event. This event is triggered from within the function CHANGEDOCUMENT_CLOSE. The change document workflow event is always triggered, independent of the case whether a change document is actually written.
Workflow coupling can be done by utility functions
In order to make use of the workflow for IDoc processing, you do not have to go through the cumbersome workflow design procedure as it is described in the workflow documentation. For the mentioned purpose, you can register the workflow handler from the menu, which says Event Coupling from the BALD transaction.
Workflow cannot easily be restarted
Triggering the IDoc from a workflow event has a disadvantage: if the IDoc has to be repeated for some reason, the event cannot be repeated easily. This is due to the nature of a workflow event, which is triggered usually from a precedent action. Therefore you have to find an own way how to make sure that the IDoc is actually generated, even in the case of an error. Practically this is not a very big problem for IDocs. In most cases the creation of the IDoc will always take place. If there is a problem, then the IDoc would be stored in the IDoc base with a respective status. It will shown in transaction WE05 and can be resend from there.</b>
Thanks
Manju

Similar Messages

  • RSNAST00  & RSNASTED

    I am new to IDOC and I am trying to learn OUTBOUND IDOC by Message Control.
    Can somebody explain where RSNAST00 AND RSNASTED are used in the process of creating outbound idoc.
    Thanks in advance.

    Hi,
    Check this one The simplest way to create IDocs, is to write an ABAP. The individual ABAP can either be a triggering ABAP which runs at certain events, e.g. every night, or it can be an ABAP which does the complete IDoc creation from scratch.
    Triggering ABAP
    A triggering ABAP would simply try to determine which IDocs need sending and call the appropriate IDoc creation routines.
    ABAP creates the whole IDoc
    You may also imagine the ABAP to do all the job. As this is mostly reinventing the wheel, it is not really recommended and should be reserved to situation, where the other solution do not provide an appropriate mean.
    1.1 NAST Messages Based Outbound IDocs
    You can use the R/3 message concept to trigger IDocs the same way as you trigger SAPscript printing.
    One of the key tables in R/3 is the table NAST. This table records reminders written by applications. Those reminders are called messages.
    Applications write messages to NAST, which will be processed by a message handler
    Every time when an applications sees the necessity to pass information to a third party. a message is written to NAST. A message handler will eventually check the entries in the table and cause an appropriate action.
    EDI uses the same mechanism as printing
    The concept of NAST messages has originally been designed for triggering SAPscript printing. The very same mechanism is used for IDocs, where the IDoc processor replaces the print task, as an IDoc is only the paperless form of a printed document.
    Condition technique can mostly be used
    The messages are usually be created using the condition technique, a mechanism available to all major R/3 applications.
    Printing, EDI and ALE use the same trigger
    The conditions are set up the same way for any output media. So you may define a condition for printing a document and then just change the output media from printer to IDoc/EDI or ALE.
    Figure 1: Communicating with message via table NAST
    NAST messages are created by application by calling function module MESSAGING
    Creating NAST messages is a standard functionality in most of the SAP core applications. Those applications - e.g. VA01, ME21 - perform calls to the central function module MESSAGING of group V61B. The function module uses customizing entries, mainly those of the tables T681* to T685*.
    NAST contains object key, sender and receiver
    A NAST output message is stored as a single record in the table NAST. The record stores all information that is necessary to create an IDoc. This includes mainly an object key to identify the processed object and application to the message handler and the sender and receiver information.
    Programs RSNAST00 and RSNASTED provide versatile subroutines for NAST processing
    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.
    FORM einzelnachricht IN PROGRAM RSNAST00
    TABLES: NAST.
    SELECT * FROM NAST ...
    PERFORM einzelnachricht IN PROGRAM RSNAST00
    Programs are customized in table TNAPR
    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.
    1.2 The RSNAST00 ABAP
    The ABAP RSNAST00 is the standard ABAP, which is used to collect unprocessed NAST message and to execute the assigned action.
    RSNAST00 is the standard batch collector for messages
    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.
    RSNAST00 processes only messages of a certain status
    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.
    For batch execution a selection variant is required
    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.
    1.3 Sending IDocs Via RSNASTED
    Standard R/3 provides you with powerful routines, to trigger, prepare and send out IDocs in a controlled way. There are only a few rare cases, where you do not want to send IDocs the standard way.
    The ABAP RSNAST00 is the standard routine to send IDocs from entries in the message control. This program can be called directly, from a batch routine with variant or you can call the FORM einzelnachricht_screen(RSNAST00) from any other program, while having the structure NAST correctly filled with all necessary information.
    RSNAST00 determines if it is IDoc or SAPscript etc.
    If there is an entry in table NAST, RSNAST00 looks up the associated processing routine in table TNAPR. If it is to send an IDoc with standard means, this will usually be the routine RSNASTED(EDI_PROCESSING) or RSNASTED(ALE_PROCESSING) in the case of ALE distribution.
    RSNASTED processes IDocs
    RSNASTED itself determines the associated IDoc outbound function module, executes it to fill the EDIDx tables and passes the prepared IDoc to the port.
    You can call the standard processing routines from any ABAP, by executing the following call to the routine. You only have to make sure that the structure NAST is declared with the tables statement in the calling routine and that you fill at least the key part and the routine (TNAPR) information before.
    TABLES NAST.
    NAST-MANDT = SY-MANDT.
    NAST-KSCHL = 'ZEDIK'.
    NAST-KAPPL = 'V1'.
    NAST-OBJKY = '0012345678'.
    NAST-PARNR = 'D012345678'.
    PERFORM einzelnachricht_screen(RSNAST00).
    Calling einzelnachricht_screen determines how the message is processed. If you want to force the IDoc-processing you can call it directly:
    TNAPR-PROGN = ''.
    TNAPR-ROUTN = 'ENTRY'.
    PERFORM edi_processing(RSNASTED).
    1.4 Sending IDocs Via RSNAST00
    Here is the principle flow how RSNAST00 processes messages for IDocs.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7dbd43d711d1893e0000e8323c4f/content.htm
    Regards,
    Priyanka.

  • RSNAST00 - NAST table - NACE relation ...

    Kindly let me know what actually RSNAST00 program does ?
    1). Because we create quotations in va21 and
    the same are processed by running RSNAST00 program as a first step.
    2). and then we run our z-program, so that our z-program runs the above RSNAST00 program generated spools, and send then to printer, where printer is located in some other country.
    In /nnace, our output type, script program and script form are configured in such a way when the output type is created and given to RSNAT00 program...then our z-program runs ...then automatically in Print program( for script form) gets printed to user in other country.
    The problem is when in /nva22 the quotation is changed again
    it is ready for printing ...And when we run RSNAST00 program, again the quotations already printed are again getting printed with their changes.
    So, Can I control this in   PRINT Program of script ?
    like by selecting the same quotations from NAST table and if entry is there don't print  ?
    Kindly suggest me ...

    Hi Sam,
    Please check this link
    http://help.sap.com/saphelp_nw04/helpdata/EN/c8/19893143b111d1896f0000e8322d00/content.htm
    http://help.sap.com/saphelp_dimp50/helpdata/EN/6a/c10412adb111d1b6120000e8a738dc/content.htm
    Best regards,
    raam

  • RSNAST00 program and NAST table.

    Can anybody tell what is the relation between
    RSNAST00 program and
    NAST Table ?
    1). Actually, it seems RSNAST00 program first check the Object key entries in NAST table ...if it does not find the exact entry in NAST table, then RSNAST00 program creates one entry in NAST tables and generated spool...
    Please validate me ...

    Hi Sam,
    The ABAP Program 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.
    Regards,
    Chandra Sekhar

  • About RSNAST00

    I meet a problem that is when I try to run RSNAST00 with input an existed object number (a billing document)and output type (such as ZORG), I continuously get "0 output were processed in total." So I couldn't see the proper results. (But I can see this invoice output with the object number and output type by using VF31).
    Could you please tell me what the problem is when I run RSNAST00? Thanks a lot.

    Your output type should be configured to repeat output and you should select 'Send Again' checkbox in the selection sreen of program RSNAST00.

  • RSNAST00

    Hi friends,
    What is RSNAST00 and in what reference we use this. In one of our old programs they were using this RSNAST00 to print out the report output. Now I am asked to add email functionality to it. Is there any option in RSNAST00 to do email attachment. So I have to attach the output as pdf file to send external email. Please help me in doing this.
    SUBMIT RSNAST00 VIA SELECTION-SCREEN WITH S_KAPPL IN R_KAPPL
                                               WITH S_OBJKY IN R_OBJKY
                                               WITH S_KSCHL IN R_KSCHL
                                               WITH S_NACHA IN R_NACHA
                                               WITH P_AGAIN EQ ' '
                                               WITH P_PRINT EQ '4_A1'
                                                   AND RETURN.
    Thanks
    Veni.

    Hi Suresh,
    Thank you for the information. After I select the output type as 'ZCOM' and Tranmission Medium '1' for print out and executed. I go to sp01 transaction to see the output. I know how to use function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    But Can you please let me know how to create the spool request, as I donot have idea about it. I am attaching the code I have. Please help me.
    Thanks
    Veni.
    REPORT ZSDRSHIP LINE-SIZE 248 LINE-COUNT 65 MESSAGE-ID ZV
                          NO STANDARD PAGE HEADING.
    Data Declaration
    *Tables
    TABLES: VBRK,                          "Billing: Header Data
            ITCPO,                         "Sapscript Output Interface
            T001,                          "Company Codes
            SADR,                          "Address Management: Company Data
            VBPA,                          "Sales Document: Partner
            KNA1,                          "General Data in Customer Master
            LFA1,                          "Vendor master (general section)
            VBRP,                          "Billing: Item Data
            DNAST,                         "Output status, display fields
            T005T,                         "Country Names
            EIKP,                          "Export/Import header data
            T618T,                         "Modes of Transport: Descriptions
            ZMAT,                        "Classification of Material Numbers
            T001W,                         "Plants/Branches
            T005U,                         "Taxes: Region Key: Texts
            NAST.                          "Message status
    selection screen for the program RSNAST00 run.
    RANGES: R_KAPPL FOR DNAST-KAPPL,
            R_OBJKY FOR NAST-OBJKY,
            R_KSCHL FOR NAST-KSCHL,
            R_NACHA FOR NAST-NACHA,
            R_LDEST FOR NAST-LDEST.
    Internal tables.
    DATA: BEGIN OF ITAB_VBRK OCCURS 100,
          VBELN LIKE VBRK-VBELN,
          NETWR LIKE VBRK-NETWR,
          BUKRS LIKE VBRK-BUKRS,
          EXNUM LIKE VBRK-EXNUM,
          END OF ITAB_VBRK.
    DATA: BEGIN OF ITAB_VBRP OCCURS 50,
          MATNR LIKE VBRP-MATNR,
          FKIMG LIKE VBRP-FKIMG,
          NETWR LIKE VBRP-NETWR,
          WERKS LIKE VBRP-WERKS,
          END OF ITAB_VBRP.
    DATA: BEGIN OF ITAB_ZMAT OCCURS 10,
          ZMATNR LIKE ZMAT-ZMATNR,
          FKIMG LIKE VBRP-FKIMG,
          NETWR LIKE VBRP-NETWR,
          END OF ITAB_ZMAT.
    DATA: BEGIN OF FTAB OCCURS 100,
          IND TYPE C,
          VBELN(10) TYPE N,
          NETWR LIKE VBRK-NETWR,
          BUKRS LIKE VBRK-BUKRS,
          EXNUM LIKE VBRK-EXNUM,
          END OF FTAB.
    DATA: IND TYPE C,
          CNT1 TYPE I,
          IPAGE TYPE I,
          I_WERKS LIKE VBRP-WERKS VALUE ' '.
    Program Selections
    SELECT-OPTIONS: SDATE FOR VBRK-FKDAT.
    Initialization
    INITIALIZATION.
    Initialization for the program RSNAST00 run.
      R_KAPPL-SIGN = 'I'.
      R_KAPPL-OPTION = 'EQ'.
      R_KAPPL-LOW = 'V3'.
      R_KAPPL-HIGH = ' '.
      APPEND R_KAPPL.
      CLEAR R_KAPPL.
      R_KSCHL-SIGN = 'I'.
      R_KSCHL-OPTION = 'EQ'.
      R_KSCHL-LOW = 'ZCOM'.
      R_KSCHL-HIGH = ' '.
      APPEND R_KSCHL.
      CLEAR R_KSCHL.
      R_NACHA-SIGN = 'I'.
      R_NACHA-OPTION = 'EQ'.
      R_NACHA-LOW = '1'.
      R_NACHA-HIGH = ' '.
      APPEND R_NACHA.
      CLEAR R_NACHA.
    Start-of-selection
    START-OF-SELECTION.
      SELECT VBELN NETWR BUKRS EXNUM FROM VBRK INTO TABLE ITAB_VBRK
                                 WHERE FKART EQ 'F8'
                                   AND FKDAT IN SDATE.
      COMMIT WORK.
      PERFORM OUTPUT.
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'PRIN'.
          PERFORM READ_DATA.
          PERFORM PRINT_DATA.
        WHEN 'SELE'.
          PERFORM SELECT_DATA.
        WHEN 'DETA'.
          PERFORM READ_DATA.
          PERFORM DISPLAY_DATA.
      ENDCASE.
    TOP-OF-PAGE
    TOP-OF-PAGE.
      PERFORM HEADINGS.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE SY-UCOMM.
        WHEN 'SELE'.
          PERFORM HEADINGS.
        WHEN 'DETA'.
          PERFORM HEADINGS1.
      ENDCASE.
    *&      Form  OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM OUTPUT.
      SET PF-STATUS 'NORM'.
      LOOP AT ITAB_VBRK.
        WRITE: /01 SY-VLINE,
                02 IND AS CHECKBOX,
                03 SY-VLINE,
                04 ITAB_VBRK-VBELN,
                15 SY-VLINE,
                16 ITAB_VBRK-NETWR,
                51 SY-VLINE.
      ENDLOOP.
      ULINE /(51).
    ENDFORM.                               " OUTPUT
    *&      Form  READ_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM READ_DATA.
      CNT1 = 6.
      IPAGE = 1.
      REFRESH FTAB.
      LOOP AT ITAB_VBRK.
        READ LINE CNT1 OF PAGE IPAGE FIELD VALUE IND INTO FTAB-IND.
        READ LINE CNT1 OF PAGE IPAGE FIELD VALUE
                                   ITAB_VBRK-VBELN INTO FTAB-VBELN.
        FTAB-BUKRS = ITAB_VBRK-BUKRS.
        FTAB-NETWR = ITAB_VBRK-NETWR.
        FTAB-EXNUM = ITAB_VBRK-EXNUM.
        APPEND FTAB.
        CLEAR FTAB.
        CNT1 = CNT1 + 1.
        IF CNT1 > 65.
          IPAGE = IPAGE + 1.
          CNT1 = 6.                        "Vish - 10/03/00
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " READ_DATA
    *&      Form  PRINT_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM PRINT_DATA.
      LOOP AT FTAB.
        IF FTAB-IND = 'X'.
          REFRESH R_OBJKY.
          R_OBJKY-SIGN = 'I'.
          R_OBJKY-OPTION = 'EQ'.
          R_OBJKY-LOW = FTAB-VBELN.
          R_OBJKY-HIGH = ' '.
          APPEND R_OBJKY.
          CLEAR R_OBJKY.
          SUBMIT RSNAST00 VIA SELECTION-SCREEN WITH S_KAPPL IN R_KAPPL
                                               WITH S_OBJKY IN R_OBJKY
                                               WITH S_KSCHL IN R_KSCHL
                                               WITH S_NACHA IN R_NACHA
                                               WITH P_AGAIN EQ ' '
                                               WITH P_PRINT EQ '4_A1'
                                                   AND RETURN.
          IF FTAB-NETWR GE 2500.
            PERFORM GET_DATA.
            PERFORM PRINT_FORM.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " PRINT_DATA
    *&      Form  PRINT_FORM
          text
    -->  p1        text
    <--  p2        text
    FORM PRINT_FORM.
      ITCPO-TDIMMED = 'X'.
      ITCPO-TDDELETE = 'X'.
      ITCPO-TDPROGRAM = SY-REPID.
      ITCPO-TDDEST = '5_A1'.
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                FORM     = 'Z_SHIPPERS'
                LANGUAGE = SY-LANGU
                OPTIONS  = ITCPO
           EXCEPTIONS
                CANCELED = 1
                DEVICE   = 2
                FORM     = 3
                OPTIONS  = 4
                UNCLOSED = 5
                OTHERS   = 6.
      LOOP AT ITAB_ZMAT.
        CALL FUNCTION 'WRITE_FORM'
            EXPORTING
                 ELEMENT       = 'ITEM_DATA'
                 FUNCTION      = 'SET'
                 TYPE          = 'BODY'
                 WINDOW        = 'MAIN'
       IMPORTING
            PENDING_LINES =
             EXCEPTIONS
                  ELEMENT       = 1
                  FUNCTION      = 2
                  TYPE          = 3
                  UNOPENED      = 4
                  UNSTARTED     = 5
                  WINDOW        = 6
                  OTHERS        = 7.
      ENDLOOP.
      CALL FUNCTION 'CLOSE_FORM'
           EXCEPTIONS
                UNOPENED = 1
                OTHERS   = 2.
      IF SY-SUBRC EQ 0.
        MESSAGE I355 WITH FTAB-VBELN.
      ENDIF.
    ENDFORM.                               " PRINT_FORM
    *&      Form  SELECT_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM SELECT_DATA.
      SY-LSIND = 0.
      IF IND = 'X'.
        IND = ' '.
      ELSEIF IND = ' '.
        IND = 'X'.
      ENDIF.
      PERFORM OUTPUT.
    ENDFORM.                               " SELECT_DATA
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA.
      CLEAR: T001, SADR, VBPA, LFA1, KNA1, T005T, EIKP, T618T, I_WERKS.
      REFRESH: ITAB_VBRP, ITAB_ZMAT.
      SELECT SINGLE ADRNR BUTXT FROM T001 INTO (T001-ADRNR, T001-BUTXT)
                          WHERE BUKRS EQ FTAB-BUKRS.
      SELECT SINGLE * FROM SADR WHERE ADRNR EQ T001-ADRNR
                                  AND NATIO EQ SPACE.
      SELECT SINGLE LIFNR FROM VBPA INTO VBPA-LIFNR
                              WHERE VBELN EQ FTAB-VBELN
                                  AND POSNR = '000000'
                                  AND PARVW = 'SP'.
      SELECT SINGLE * FROM LFA1 WHERE LIFNR = VBPA-LIFNR.
      SELECT SINGLE KUNNR FROM VBPA INTO VBPA-KUNNR
                              WHERE VBELN EQ FTAB-VBELN
                                  AND POSNR = '000000'
                                  AND PARVW = 'WE'.
      SELECT SINGLE * FROM KNA1 WHERE KUNNR = VBPA-KUNNR.
      SELECT SINGLE * FROM T005T WHERE SPRAS = 'E'
                                   AND LAND1 = KNA1-LAND1.
      SELECT SINGLE * FROM EIKP WHERE EXNUM = FTAB-EXNUM.
      SELECT SINGLE * FROM T618T WHERE SPRAS = 'E'
                                   AND LAND1 = EIKP-ALAND
                                   AND EXPVZ = EIKP-EXPVZ.
      SELECT MATNR FKIMG NETWR WERKS FROM VBRP INTO TABLE ITAB_VBRP
                                   WHERE VBELN = FTAB-VBELN.
      LOOP AT ITAB_VBRP.
        IF I_WERKS EQ ' '.
          I_WERKS = ITAB_VBRP-WERKS.
          SELECT SINGLE * FROM T001W WHERE WERKS = I_WERKS.
          SELECT SINGLE * FROM T005U WHERE SPRAS = 'E'
                                       AND LAND1 = T001W-LAND1
                                       AND BLAND = T001W-REGIO.
        ENDIF.
        SELECT SINGLE ZMATNR FROM ZMAT INTO ZMAT-ZMATNR
                                       WHERE MATNR = ITAB_VBRP-MATNR.
        IF SY-SUBRC EQ 0.
          MOVE ZMAT-ZMATNR TO ITAB_ZMAT-ZMATNR.
          MOVE ITAB_VBRP-FKIMG TO ITAB_ZMAT-FKIMG.
          MOVE ITAB_VBRP-NETWR TO ITAB_ZMAT-NETWR.
          COLLECT ITAB_ZMAT.
          CLEAR ITAB_ZMAT.
        ELSE.
          MESSAGE I356 WITH ITAB_VBRP-MATNR.
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " GET_DATA
    *&      Form  HEADINGS
          text
    -->  p1        text
    <--  p2        text
    FORM HEADINGS.
      FORMAT COLOR COL_HEADING.
      WRITE: 'AMERICA, INC.',
             / 'List of Commercial Invoices'.
      ULINE /(51).
      FORMAT COLOR 2.
      WRITE: /01 SY-VLINE,
              03 SY-VLINE,
              04 TEXT-001,
              15 SY-VLINE,
              16 TEXT-002,
              51 SY-VLINE,
             52 '                                               ' COLOR OFF.
      ULINE /(51).
    ENDFORM.                               " HEADINGS
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_DATA.
      SET PF-STATUS 'NORM1'.
      LOOP AT FTAB.
        IF FTAB-IND = 'X'.
          REFRESH ITAB_VBRP.
          SELECT MATNR FKIMG NETWR WERKS FROM VBRP INTO TABLE ITAB_VBRP
                                       WHERE VBELN = FTAB-VBELN.
        WRITE:/ 'Details of Commercial Invoice:'COLOR 4, FTAB-VBELN COLOR 4.
          ULINE /(56).
          LOOP AT ITAB_VBRP.
            WRITE: /01 SY-VLINE,
                    02 ITAB_VBRP-MATNR,
                    20 SY-VLINE,
                    21 ITAB_VBRP-NETWR,
                    56 SY-VLINE,
             57 '                                               ' COLOR OFF.
          ENDLOOP.
          ULINE /(56).
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " DISPLAY_DATA
    *&      Form  HEADINGS1
          text
    -->  p1        text
    <--  p2        text
    FORM HEADINGS1.
      FORMAT COLOR COL_HEADING.
      WRITE: 'AMERICA, INC.',
             / 'Commercial Invoice Details.'.
      ULINE /(56).
      FORMAT COLOR 2.
      WRITE: /01 SY-VLINE,
              02 TEXT-003,
              20 SY-VLINE,
              21 TEXT-004,
              56 SY-VLINE,
             57 '                                               ' COLOR OFF.
      ULINE /(56).
    ENDFORM.                               " HEADINGS1

  • Initiate print using NAST entries in background

    Hi there,
    We create an entry on NAST table, generated from an GR/GI individiual slip. Dispatch time is given "1 Send with periodically scheduled job".
    Question is, how can we initiate the print function using an own program. The goods received confirmation event occurs, this will initate the print from NAST. After this, the program should start and print NAST entries. So scheduling the job will not work in this scenario. RSNAST00 could not be initated in background such a wise. Also some dialog screens appear for the selected NAST entries.
    At the end the output type on the material document should appear with the updated status.
    Thanks for your input.

    HI
    GOOD
    GO THROUGH THE FOLLOWING DETAILS TO KNOW MORE ABOUT THE NAST
    NAST Message Status
    http://idocs.de/www5/mySap/PDF/Book_06.pdf
    NAST=>
    Another common application of a message queue is to collect requests for delayed
    processing, e.g. as a batch job during off-peak times. Typically this is done with
    print documents like invoices which are due to be sent and thus printed only once
    75 per week. The SAP R/3 NAST table is such a message queue and the ABAP
    RSNAST00 is the matching handler for it.
    The message control is also known as the NAST messaging due to the name of
    the database table NAST (germ: NAchrichtenSTeuerung). The mechanism is, that
    a requesting application deposits a request message in table NAST and an
    interested consumer application eventually picks them up and decides upon an
    85 appropriate action. The consuming action is fully independent from the requester.
    If the requester expects a response, it has to poll the expected result tables.
    • The requesting application stores a message in table NAST
    • A program (usually RSNAST00) polls the table NAST for unprocessed
    messages and activates the program that has been dedicated to process that
    90 message
    • The processing function finally finalizes the message by marking the message
    as processed and storing status information and eventual log data to it
    http://idocs.de/www5/mySap/PDF/Book_06.pdf
    THANKS
    MRUTYUN

  • RSNAST00 Concern?

    Hi..
    I want to know how RSNAST00  calls the respective function module in the ABAB Coding.?
    For Example in case of say any Delivery Document Number, when we run RSNAST00 for it giving the proper message type(say in our case LD00 with ALE as a medium)then at what point of time is the function module (say IDOC_OUTPUT_DELIVRY)called in that program. I didnt see a direct call of the function module as such in the program.
    I hope I have made myself clear in framing a question.
    Thanks.

    Hi Subhash,
    As most of reply said, RSNAST00 will call the subroutine ALE_PROCESSING or EDI_PROCESSING in the program RSNASTED. But this is link is defined in your message determination .. If you know place where you maintain the Program name script name for Printing the documents with output type.. it is the same place you maintian the subroutine and program (i.e. ALE_PROCESSING or EDI_PROCESSING in the program RSNASTED based on the output medium; A- Ale, 6-EDI).
    So when you run RSNAST00, it basically selects all the output records ready for procesing from NAST table based on the seletion parameters you have give. From there it identifies the program and subroutine to be called, calls that particular subroutine (for printing it will be your ENTRY subroutine in Driver program) with the Nast record. RSNAST00 Job is done once it calls the subroutine..
    Now the Subroutine being called takes the job of printing/faxing/ creating & sending the iDoc.
    In case of ALE/EDI, your ALE_PRocessing & EDI_procssing routine determines the FM to be called in the following way.
    It picks up the Message partner from the NAST record and check whether there is partner profile defined for that in WE20. If not defined error.. if defined, it will determine the FM to be called based on information given in the Output control tab and processed code give there (Process code is linked to your FM that fill the iDoc). Then it passes the iDoc internal table to ALE layer for further processing which stores that on DB and sends it our bsed on the WE20 configuration..
    Hope this gives you the clear picture about how the iDoc is generated from output control.
    Regards,
    Nagaraju Chidurupalli.

  • Duplicando registro tabela NAST após chamada J_1BNFE_CALL_RSNAST00

    Boa tarde pessoal,
    estava conversando com o Fernando nesta [Thread|; e resolvi abrir uma nova thread.
    Estava implementando a badi de impressão do danfe e notei um comportamento estranho.
    Após gerar uma NFe, é gerado um registro na NAST.
    Na sequencia, executo o FM J_1B_NFE_XML_IN para simular o aceite desta NFe, o que acarreta na chamada da badi de impressão e na minha badi tenho a chamada p/ o FM J_1BNFE_CALL_RSNAST00.
    Dentro deste FM, ele move alguns parâmetros de entrada para a NAST e chama o form einzelnachricht, que chama tnaprlesen_, optischearchivierung_, programmaufrufen_, protocolstore_ e finalmente o nastupdate_.
    Neste ponto do programa, a chave que tenho no header da tabela NAST é diferente da que já consta na tabela do bd.
    No BD tenho este registro na NAST:
    MANDT     321
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     E
    PARNR                                                                               
    PARVW                                                                               
    ERDAT     06/24/2009
    ERUHR     14:38:41
    e no programa, no form nastupdate_, tenho o header da NAST assim:
    MANDT
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     
    PARNR     
    PARVW     
    ERDAT     00000000
    ERUHR     000000
    Sendo assim, quando ele dá o update nast. ele dá sy-subrc = 4, e na sequencia, o código trata if sy-subrc ne 0, insert nast. Com isso tenho 2 registros na NAST pra mesma NF, um com o status VSTAT = 1, mas com o SPRAS/ERDAT/ERUHR não preenchidos e o outro, o "original", com tudo preenchido porém com o status VSTAT = 0.
    Olhando o Spool na SP01 eu vejo a NFe "impressa" apenas uma vez, o que está correto. Mas o que me incomoda é que ele acaba gerando registros duplicados.
    Segue meu código da BADI:
      IF  i_active-code EQ '100'         "NF-e autorizada
      AND i_active-printd IS INITIAL     "só imprimir automaticamente se ainda não foi impressa
      AND i_active-cancel IS INITIAL     "não faz sentido imprimir autom. se ela foi cancelada
      AND i_active-conting_s IS INITIAL. "não faz sentido imprimir autom. se ela foi alternada
                                         "p/conting. pois deverá ser cancelada
        CALL FUNCTION 'J_1BNFE_CALL_RSNAST00'
        EXPORTING
          I_ACTIVE = i_active
          I_DIMME  = 'X'
          I_PRINTER = vl_printer
        EXCEPTIONS
          no_printer = 1
          others = 2.
        COMMIT WORK.
        IF sy-subrc = 0.
          CALL FUNCTION 'J_1B_NFE_ERROR_PROTOKOLL'
          EXPORTING
            i_docnum = i_active-docnum.
        ENDIF.
      ENDIF.
    Para "resolver" esse pequeno problema (ao meu ver, não sei se está correto ou não este comportamento), criei um FM Z com o seguinte código:
    FUNCTION ZBR_J_1BNFE_CALL_RSNAST00.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_ACTIVE) TYPE  J_1BNFE_ACTIVE
    *"     VALUE(I_KAPPL) TYPE  NAST-KAPPL DEFAULT 'NF'
    *"     VALUE(I_NACHA) TYPE  NAST-NACHA DEFAULT '1'
    *"     VALUE(I_DIMME) TYPE  NAST-DIMME DEFAULT 'X'
    *"     VALUE(I_PRINTER) TYPE  RSPONAME OPTIONAL
    *"  EXCEPTIONS
    *"      PRINT_ERROR
    TABLES: nast.
    SELECT SINGLE *
        FROM nast
       WHERE kappl = i_kappl AND
             objky = i_active-docnum AND
             kschl = i_active-form AND
             nacha = i_nacha AND
             vstat = '0'.
    start printing
      nast-kappl = i_kappl.
      nast-objky = i_active-docnum.
      nast-kschl = i_active-form.
      nast-nacha = i_nacha.          "1 = print output
      "nast-ldest = i_printer.
      "nast-dimme = i_dimme.          "X = print immidiately
      PERFORM einzelnachricht IN PROGRAM rsnast00 USING sy-subrc.
      IF NOT sy-subrc IS INITIAL.
        MESSAGE i230(8b) with i_active-docnum RAISING print_error. "#EC *
      ENDIF.
    ENDFUNCTION.
    e na BADI, o chamei desta forma:
    CALL FUNCTION 'ZBR_J_1BNFE_CALL_RSNAST00'
        IN BACKGROUND TASK
        EXPORTING
          i_active = i_active
        EXCEPTIONS
          no_printer = 1
          others = 2.
    Desta maneira, não ocorreu a duplicação dos registros da NAST e a nota também foi impressa OK.
    A minha dúvida é se realmente o comportamento esperado utilizando o primeiro procedimento é duplicar o registro na NAST ou se pode ser que tenha algo errado no meu sistema(SAP_APPL 602 SP01) na hora da chamada da RSNAST00.

    parte 1
    Boa tarde pessoal,
    estava conversando com o Fernando nesta [Thread|; e resolvi abrir uma nova thread.
    Estava implementando a badi de impressão do danfe e notei um comportamento estranho.
    Após gerar uma NFe, é gerado um registro na NAST.
    Na sequencia, executo o FM J_1B_NFE_XML_IN para simular o aceite desta NFe, o que acarreta na chamada da badi de impressão e na minha badi tenho a chamada p/ o FM J_1BNFE_CALL_RSNAST00.
    Dentro deste FM, ele move alguns parâmetros de entrada para a NAST e chama o form einzelnachricht, que chama tnapr_lesen, optische_archivierung, programm_aufrufen, protocol_store e finalmente o nast_update.
    Neste ponto do programa, a chave que tenho no header da tabela NAST é diferente da que já consta na tabela do bd.
    No BD tenho este registro na NAST:
    MANDT     321
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     E
    PARNR                                                                               
    PARVW                                                                               
    ERDAT     06/24/2009
    ERUHR     14:38:41
    e no programa, no form nastupdate_, tenho o header da NAST assim:
    MANDT
    KAPPL     NF
    OBJKY     0003347752
    KSCHL     ZNFE
    SPRAS     
    PARNR     
    PARVW     
    ERDAT     00000000
    ERUHR     000000
    Sendo assim, quando ele dá o update nast. ele dá sy-subrc = 4, e na sequencia, o código trata if sy-subrc ne 0, insert nast. Com isso tenho 2 registros na NAST pra mesma NF, um com o status VSTAT = 1, mas com o SPRAS/ERDAT/ERUHR não preenchidos e o outro, o "original", com tudo preenchido porém com o status VSTAT = 0.
    Olhando o Spool na SP01 eu vejo a NFe "impressa" apenas uma vez, o que está correto. Mas o que me incomoda é que ele acaba gerando registros duplicados.
    continua
    Edited by: Jose Nunes on Jun 24, 2009 5:00 PM
    Edited by: Jose Nunes on Jun 24, 2009 5:01 PM

  • How do I set up my Condé Nast At Home scheduled content application?

    The steps are pretty simple:
    Open the Condé Nast At Home application. The application should open as soon as installation is complete. You can also open the program by clicking your desktop icon, or by clicking Start, then All Programs, then the name of the particular application.
    To set up the application to print your Condé Nast At Home items, follow these steps:
    (1)    Select each of the days when you want prints.
    (2)    Select the time of day when you want your prints (these are in hourly slots).
    (3)    Select your printer from the list (PDF and XPS writers are not supported). .
    (4)    Don’t forget to click Save when you’re through!
    You can also click the wrench icon () to open the Settings dialog, where you can:
    (1)    Turn Scheduled Printing On or Off (you might want to turn scheduled printing Off when you go on vacation, for instance).
    (2)    Set the desired action for when a scheduled print is missed. If you want the item to print immediately when you log in, select Automatically. If you want to be asked before an item is printed, select When Prompted. If you just want to skip missed items, select Never.
    (3)    Click Save in the Settings dialog to save your changes.
    Don’t forget that on the days and times you’ve selected, your printer must be turned on, have paper, and be connected to your computer, and your computer must be on and connected to the Internet. Happy printing!
    Did this answer your question? If it did, why not click the Kudos! button to the left?
    If it didn’t answer your question about a printing problem, click Reply to ask the community, or search the forum for other posts that might help.
    Or, click here to go back to the Guide to Printing Condé Nast At Home Scheduled Content.
    Condé Nast At Home (c) 2011 Condé Nast. All Rights Reserved.
    I work on HP's behalf.

    scooter has provided links to Apple's pages for the AirPort Express and AirPort Extreme base station (AEBS).
    Both of these devices are IEEE 802.11g wireless routers (also called base stations). If you have an Ethernet connection to the Internet (for example DSL or cable modem), you can connect either of these devices directly to that connection and create a wireless network. Since Ethernet and IEEE 802.11g are worldwide standards you can connect any compatible device (including PCs running Windows).
    Every computer needs a unique IP address. You can think of an IP address as a street address for your house. A unique address guarantees that items addressed to you get to you.
    Typically ISPs provide users with a single (one) public IP address. A public IP address is visible to anyone on the Internet. A router uses the single IP address provided by the ISP and creates multiple local (non-public) IP addresses for you computers. This allows you to use multiple computers.
    If you need to connect both wireless and Ethernet computers you will need the AEBS. The AEBS provides a separate LAN port for Ethernet computers.
    BTW, you can accomplish the same thing with any inexpensive wireless router.
    The advantage of the AEBS over other routers is (a) built-in 56k modem for connecting to a dial-up ISP and (b) USB port for a single compatible printer.
    The advantage of the AirPort Express over other routers is (a) sound output port for streaming music to a stereo and (b) USB port for a single compatible printer.

  • Access NAST table immediately after creation of sales order (va01)

    Hi All,
    I want to access the nast data for the newly created sales order from va01. I tried to use program exits:
    userexit_save_document and userexit_save_documnr_prepare
    and plu the BADI BADI_SD_V46H0001 method EXIT_SAPLV46H_003.
    the breakpoint is not stoping there even if I have given.
    Please suggest any enhancements are there for such functionality.
    The flow is like this.:
    when user clicks on the save button after entering the data for sales order creation, the email/fax will be send to the contact persons for the output type and I want to update the nast table DATVR entry so that it will be marked as processed entry.
    rgds
    Madhuri

    I am not sure what you want, but I think it is not  the right way to realize the flow.
    When a sales order is saved, the process of issuing output will be handled by another program RSNAST00 (T_CODE: WE15)immediately or via a scheduled job due to output configuration , and the nast table will be updated at the same time. i think there is no need to update the nast table by yourself.

  • Spool requests are being sent the the B9 printer queue(RSNAST00).

    Hi gurus,
    has anyone found a fix for this issue? i'm currently experiencing the same issue and would like to know how i can fix this..
    Spool requests are being sent the the B9 printer queue. Most spool requests are for one page, when there are spool requests for multiple pages these spool requests take longer to create, in the meantime, other spool requests that are single pages are going to the printer queue. This creates and "out-of-vendor-order" issue during printing.
    The out of vendor order sequencing creates a significant level of work effort for the business users to resort the printed copies in order to prepare the documents for mailing. A change is required to eliminate this manual effort.
    Development has indicated an enhancement could be made to the RSNAST00 program where only those print jobs for application "MR" with transmission "1" (for print) would be gathered in groups of "X" number of documents to create one spool, prior to creating the spool, a check would be made to see if the next document was for the same vendor, if so the next document/s would be included in the same spool, when a new vendor was found, a new spool would be created.
    To temporarily fix the issue the jobs have been placed on "no execute" and the support team is identifing the chargebacks and RTV created during the week, manually running the RSNAST00 program in groups of 500 - 800 documents, ensuring all doucments for a vendor a sent in the same spool request.

    Post Author: Stephen@Azzu
    CA Forum: General
    Nobody know the answer to this one? Stephen@Azzu:Here's a good one...I'm using Crysal Reports XI (fully service packed) and the reports I have created are being used in a VB.Net application. I have no problems whatsoever in printing the reports, everything is fine. However, when the report is sent to the printer, the printer queue displays 'document' as the, err, document name. I'd like it to say something more relevant, such as the document number the user selected.So I've tried setting the ReportDocument.Name but wait, it's read only!? How about the summary info? No change. Filename? No change either. I've browsed the internet, searched the knowledge base and found nothing. So my question is this...How do I get the printer queue to display an appropriate name for my document?Stephen

  • Adding a new record in NAST table via Z program

    Hi Experts,
        I have a requirement in which i have to trigger a SAP Script to send as FAX based on some condition when a shipment is saved by VT02N transaction.
    The output type which i am using is configured to send fax immediately  on save of shipment. And so now I can only send fax by entering output type and other details in MESSAGES FOR CURRENT SHIPMENT section.
    But the requirement is  when user saves the shipment and if the required conditions are met then output type should be automatically populated in MESSAGES FOR CURRENT SHIPMENT section.
    I think by adding an entry in MESSAGES FOR CURRENT SHIPMENT section we are adding an entry in NAST table. I would like to know how we can populate an entry in this table automatically.
    Regards,
    Leona

    Hi,
    As much I have understood ur requirement, you need not do and thing using Z(custom).
    I think, SAP has inbuilt functionality.
    As you are discussing about Shipment(VT02N), you need to assign shipment type to sales organization in VV21(create), VV22(chnage).
    In this tcodes you need to add Customer number, Partner Function, Medium(FAX, Printout, Idoc, etc ...).
    So when you change shipment and save it, automatically messages will be configured and will contain a entry, which will trigger FAX
    You are discussing about some condition, based on which FAX should be triggered. Can you be little more clear on this.
    Hope it helps u...
    Thanks & Regards,
    Mihir.
    Edited by: mihir6666 on Jul 12, 2011 7:54 AM

  • Questions about IDoc

    Hi ABAPers,
    I´m new on IDoc, so I need somebody to help me.
    I wish know how can I find where an IDoc is "generated". That is, where the MASTER_IDOC_DISTRIBUTE function is called.
    My issue is an IDoc generated during the purchase order process (I guess that in the MIRO), I´ve already tried debug and stop in the above function without sucess.
    Any help is welcomed.
    Thanks,
    Charles

    >
    Charles Oliveira wrote:
    > Hi Krishnendu,
    >
    > The debug didn't stop in these functions too.
    >
    > I don't understand so well about IDoc, but what I've, corrects me if something is wrong, is an IDoc (outbound) that is generated in a BADI or an USEREXIT, during the MIRO.
    >
    > I need know what's this EXIT or BADI, to make some modifications in the information that is passed to IDoc.
    >
    > Thank you and if you know anything more to help me, I would appreciate.
    >
    >
    > Regards,
    > Charles
    There is a Concept called Message Control , Here Output type is attached to the IDoc message type and IDoc type. You will maintain this In WE20 partner profile part , in the outbound section.
    and at the same time you will maitain the Output type in NACE ,
    In NACE you will Configure the output type with medium as ALE/IDOC or EDI
    and Program RSNASTED , i am not sure what is used in your case ? , it may be same or it may be Different and custom one.
    you go to program RSNAST00 ,
    in this you can go to line # 1327 ,
    perform (tnapr-ronam) in program (tnapr-pgnam) using returncode
                                                             us_screen
                                                             if found.
    here you keep a break point. and Go to MIRO tigger the output type. if it stops well and good.
    if not start Debugging  using /H in the messages screen , and Trigger the output by saving it.and then activate the Update Debugging from Menu Debugging->Update Debugging
    then F8. it will stop exactly the above perform , and there you check.
    and also if you know the output type you can check the Medium and Program used for processing the output.

  • Processing a cancelled invoice through RSNAST00

    Hi Gurus,
    I am working on enhancement for emailing the invoices. We created a output type ZRD3 for email invoices. The dispatch time is set as "Send with periodically scheduled job". We execute RSNAST00 via job to process those invoices.
    The problem is, if the invoice got cancelled , RSNAST00 still process it because it just look into the NAST table entry.
    Is there any way to control it through processing routine. I suggested to use a custom program which deletes the entries in NAST for cancelled invoices and then submit RSNAST00 program. This new custom program should be executed in the job instead of standard RSNAST00.
    Please let me know any alternative suggestions. Thanks in advance for your kind help.
    Poornima

    Hi,
    I created a requirement program for the output type, but as Jelena told the invoice is not cancelled at the time of execution of requirement program. So the validations in the requirement program is not getting triggered.
    As of now, we are planning to execute a custom program which picks out the cancelled invoices and set the status in NAST table as processed.. Or i am trying to find a userexit at the time of cancellation of invoice(after save) where i could include my logic for updating the NAST table entries. If i get through the second method, i would be able to avoid the custom program...
    Please let me know your opinions...
    Poornima
    Edited by: Poornima Pandiyaraj on Jan 5, 2009 4:00 PM

Maybe you are looking for

  • No Disk space on my BRAND NEW MacBookPro???

    While using my Imovie to import clips from my Canon ZR600 First 38 edited clips suddenly moved into the Trash on their own.. and cannot be dragged out without them flying back like on a rubber band.. Now I get this error message that says,"You are ru

  • Database, custom step types, ann XML report issues...All in one

    TS3.0 Have a number of issues to do the above. I'll try and explain them in order. I'm sure there all linked, but can't figure out how... The "Custom" Steps.....They are copies of the NI Numeric/Multiple Numeric tests, with a added post step to trans

  • Replace everything except in html tags

    I have this little piece of code hilighting words in search results, however, it obviously replaces text in html tags as well and I want it to omit all html. I've also noticed that replacenocase replaces the case of my words...while it does search fo

  • Iframe in BSP

    Hi, Hope someone faced this issue. We are using CRM4.0. MY requirement is: I need to have a tableview freezing 2 columns and rest to view data by using scroll bars. So to implement a tableview with freezing columns with scroll bars i planned to make

  • PR printout directly sent to email

    Hi, Our ABAP has developed a program wherein we will be able to send our PR thru email. They have done it thru TCode SPAD. Our question is, would it be possible to change the filename and the body of the message? Thank you.