Skip to main content

sample driver program for smartforms

*&---------------------------------------------------------------------*
*& Report  ZSF_INVOIOCE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

report  zsf_invoioce.

tables: vbak,vbap.

types: begin of invoice,
       vbeln  type  vbeln_va,
       erdat  type  erdat,
       auart  type  auart,
       vkorg  type  vkorg,
       vtweg  type  vtweg,
       spart  type  spart,
       vkgrp  type  vkgrp,
       vkbur  type  vkbur,
       posnr  type  posnr_va,
       matnr  type  matnr,
       zmeng  type  dzmeng,
       kwmeng    type  kwmeng,
       end of invoice.

data: wa_invoice type invoice,
      it_invoice type standard table of invoice,
      f_name type rs38l_fnam.

selection-screen begin of block b1 with frame title text-001.
select-options : s_vbeln for vbak-vbeln.
selection-screen end of block b1.

start-of-selection.


  select   a~vbeln
           a~erdat
           a~auart
           a~vkorg
           a~vtweg
           a~spart
           a~vkgrp
           a~vkbur
           b~posnr
           b~matnr
           b~zmeng
           b~kwmeng
           into  corresponding fields of table it_invoice
     from  vbak as a inner join vbap as b on a~vbeln = b~vbeln
      where a~vbeln in s_vbeln.



end-of-selection.

  call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
      formname                 = 'Z_TEST_INVOICE'
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
   importing
     fm_name                  = f_name
   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 f_name
*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         =
tables
  it_invoice = it_invoice
   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.

Comments

Popular posts from this blog

Replacement of obsolete F.M. POPUP_TO_CONFIRM_STEP

The obsolete Function Module :     CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'        EXPORTING *          DEFAULTOPTION  = 'Y'             textline1      = text-003 *          TEXTLINE2      = ' '                titel          = 'Mengenbereitstellung' *          START_COLUMN   = 25 *          START_ROW      = 6             cancel_display = ' '        IMPORTING          ...

SPDD and SPAU in Upgrade projects

In upgradiation project SPDD and SPAU Aare the main transactions. Upgradiation project are like 1.Technical Upgrade 2.Functional Upgrade In technical project process steps like 1.System preparation and stack level patch upgrade – Basis Team 2.SPDD Phase – ABAP and Functionals 3.Up gradation of the system – Basis Team 4.SPAU Phase – ABAP and Functionals 5.DBACOCKPIT for indexing – ABAP TEAM 6.Issue resolution and error tracking – ABAP and Functionals 7.Zprograms corrections – obsolete function modules and objects In SPDD Phase This transaction code SPDD is the core step in an upgrade project. The system compares all the dictionary objects – data elements, database tables and structures of the latest system (say ECC) with the previous or the old system (Say 4.6c). These all elements are present under two nodes – with modification assistant and without modification assistant. Objects present under with modification assistant have the mo...