cancel
Showing results for 
Search instead for 
Did you mean: 

adding field

Former Member
0 Kudos

hi all

how can we add a field to standard form

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

U can Subroutine program for this purpose..

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.

Syntax in a form window:

/: PERFORM <form> IN PROGRAM <prog>

/: USING &INVAR1&

/: USING &INVAR2&

......

/: CHANGING &OUTVAR1&

/: CHANGING &OUTVAR2&

......

/: ENDPERFORM

INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.

OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.

The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:

FORM <form> TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...

ENDFORM.

Check this link for sample code..

Former Member
0 Kudos

u can add new field using subroutines

U can use subroutine also n 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.

Reward points if useful.