‎2007 Aug 03 6:50 AM
Hi,
i have copied a standard SAPscript form to zform.. Now in the main window, i need to show fields from mara table.. in perform statement what should i use in ' using & changing " variables so that i can diaplay mara table fields in main window.
with thanks
karthi.
‎2007 Aug 03 7:10 AM
hi,
You need to use the Material number in the USING parameters, and in the Changin gparamters you can use as amy parameters as you want whcih needs to be shown in the Layout,
so in the FORM based on the Material Number you can write the select ang fetch the fields and pass to the Changing parameters and Display them in the Layout
Regards
Sudheer
‎2007 Aug 03 7:06 AM
‎2007 Aug 03 7:10 AM
hi,
You need to use the Material number in the USING parameters, and in the Changin gparamters you can use as amy parameters as you want whcih needs to be shown in the Layout,
so in the FORM based on the Material Number you can write the select ang fetch the fields and pass to the Changing parameters and Display them in the Layout
Regards
Sudheer
‎2007 Aug 03 7:23 AM
Hi sudheer,
I need to display all the fields from mara table in my main window... in print program i'm passing the fields from mara table through an internal table... so u just give me the syntax for both ' perform statement ' need to be mentioned in script editor and syntax for ' form statement ' need to be mentioned in print program......
thanks for your reply...
karthi.
‎2007 Aug 03 8:02 AM
Hi sudheer,
I need to display all the fields from mara table in my main window... in print program i'm passing the fields from mara table through an internal table... so u just give me the syntax for both ' perform statement ' need to be mentioned in script editor and syntax for ' form statement ' need to be mentioned in print program......
thanks for your reply...
karthi.
‎2007 Aug 03 8:20 AM
HAI,
Here is the syntax.
this to be used in sapscript.
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/ : CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM.
You have to use ur internal table fields in using parameters.
like itab-matnr.
This is to be used in ur ABAP prg.
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
...
ENDFORM.
reward points if useful.
bye.
‎2007 Aug 03 8:23 AM
Go through this example
Ex.
/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>
/:USING &<field name>& "already data existing
/:CHANGING &<field name1& "sending empty field for populating
/:ENDPERFORM
Then create subroutine pool program and you have to write the code.
FORM ><subroutine name> tables int_cond structure itcsy
outt_cond structure itcsy.
data : value(20), value1(20). "do your own declarations
Read int_cond table index 1.
value = int_cond-value.
value1 = value1 + value.
Read outt_cond table index 1.
outt_cond-value = value1.
Modify outt_cond index 1.
ENDFORM.
Just rough idea given above.
Regards,
Sairam
‎2007 Aug 03 10:39 AM
hi,
thanks for your information. just let me know what is the exact syntax need to be used in perform and form statements... don't give the syntax " perform subroutine name in program program name using &invar1& &invar2& changing &outvar1& &outvar2&... instead tell me what should be used in place of invar1, invar2, outvar1 and outvar2. condition is want to display mara table fields in main window... tell me what is the field names i should give in invar1, invar2, outvar1 and outvar2.