Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

NAST not updated

Hi Experts,

                 I have created layout for MM contract through smartform.I have created one driver program also and attached it in specific output type in EV application in NACE.Driver program is called when I am going to take print preview from ME9k.In driver program I have written this code...

*&---------------------------------------------------------------------*

*&      Form  entry_neu

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*      -->ENT_RETCO  text

*      -->ENT_SCREEN text

*----------------------------------------------------------------------*

FORM ENTRY_NEU USING ENT_RETCO ENT_SCREEN.

   DATA : NAST LIKE NAST,

          L_NAST  LIKE NAST,

          L_FROM_MEMORY,

          L_DOC  TYPE MEEIN_PURCHASE_DOC_PRINT,

          L_DRUVO LIKE T166K-DRUVO.

   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

     EXPORTING

       FORMNAME                 = 'ZMM_F_CONTRACT'

*   VARIANT                  = ' '

*   DIRECT_CALL              = ' '

    IMPORTING

      FM_NAME                  = G_V_FM

    EXCEPTIONS

      NO_FORM                  = 1

      NO_FUNCTION_MODULE       = 2

      OTHERS                   = 3

             .

   IF SY-SUBRC <> 0.

     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

   ENDIF.

   CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'

     EXPORTING

       IX_NAST        = NAST

       IX_SCREEN      = ENT_SCREEN

     IMPORTING

       EX_RETCO       = ENT_RETCO

       EX_NAST        = L_NAST

       DOC            = L_DOC

     CHANGING

       CX_DRUVO       = L_DRUVO

       CX_FROM_MEMORY = L_FROM_MEMORY.

   G_V_EBELN = L_NAST-OBJKY.

   CALL FUNCTION G_V_FM

* EXPORTING

*   ARCHIVE_INDEX              =

*   ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

*   CONTROL_PARAMETERS         =

*   MAIL_APPL_OBJ              =

*   MAIL_RECIPIENT             =

*   MAIL_SENDER                =

*   OUTPUT_OPTIONS             =

*   USER_SETTINGS              = 'X'

* IMPORTING

*   DOCUMENT_OUTPUT_INFO       =

*   JOB_OUTPUT_INFO            =

*   JOB_OUTPUT_OPTIONS         =

    EXCEPTIONS

      FORMATTING_ERROR           = 1

      INTERNAL_ERROR             = 2

      SEND_ERROR                 = 3

      USER_CANCELED              = 4

      OTHERS                     = 5

             .

   IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

   ENDIF.

ENDFORM.                    "entry_neu


In this subroutine NAST structure is not updated.For this reason I am not getting Contract no..

Please advice..

Not what you were looking for? View more on this topic or Ask a question