*&---------------------------------------------------------------------*
*& 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.
*& 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
Post a Comment