How to call a subroutine form
SAPscripts
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck
.
DATA : BEGIN OF it_input_table
OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
* déclaration de la table
output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table
OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
*
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
*-----------------------------------------------------*
* FORM CDE_CENT
*
*-----------------------------------------------------*
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table
INDEX 1.
MOVE it_input_table-value
TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM
ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX
1.
output[] = it_output_table[].
ENDFORM.
Frédéric BRUNEAU
See Also:
Help
on Conversion From Numbers to Text Amount
More Function Module
Functions /
SAP Script / ALV
Tables
Database Table
ABAP Books List
ABAP/4 Certification,
Programming, Smartforms, Sapscripts and Object Oriented Programming Books
Smart Forms
SAP Smartforms
ABAP Menu:
ABAP Example Hints
and Tips
Return to Index:-
SAP ABAP/4 Programming,
Basis Administration, Configuration Hints and Tips
(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
All product names are trademarks of their respective
companies. The site www.gotothings.com is in no way affiliated with
SAP AG.
Any unauthorised copying or mirroring is prohibited.
|