cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCRIPT

Former Member
0 Kudos

Can u give any example for adding one field in SAP- Script form??? please give some specific example don't give link

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI

You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.

PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.

Sample code for the same is given below...

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.

All the very best.....

Regards,

Sreenivasa sarma K.