‎2007 Mar 07 9:28 AM
Dear all,
i want to know how to call a variant from one program and the variant is to be used in other new program via variant name only nothing to selected only the vaue contained in that variant is to be used in new program.
is there any functional module for that .
regards,
balaji
‎2007 Mar 07 9:32 AM
Hi,
Go thru the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/c0/98038fe58611d194cc00a0c94260a5/frameset.htm
‎2007 Mar 07 9:32 AM
Hi,
Select variant from vari table.
Here variants will save in vari table and variant is field which will be variant name.
regards,
sreevani
‎2007 Mar 07 9:32 AM
‎2007 Mar 07 10:23 AM
Dear ravi,
i have to pass the values of variant to new program for that the function module is useful i think so.
i want to know how to get the value for a field by using that.
regards,
balaji.
‎2007 Mar 07 9:33 AM
Hello,
Do like this:
SUBMIT
... USING SELECTION-SETS OF PROGRAM prog
Effect
Uses variants of the program prog when executing the program rep.
Note
Important
The programs prog and rep must have the same SELECT-OPTIONS and PARAMETERs. Otherwise, variants of the program prog may be destroyed.
Note
When using this addition, the specified variant vari of the program prog is taken in USING SELECTION-SET vari. On the other hand, all variant-related actions on the selection screen of rep (Get, Save as variant, Display, Delete) refer to the variants of prog.
Example
SUBMIT REPORT01
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'REPORT00'
AND RETURN.
Effect
Executes the program REPORT01 with the variant VARIANT1 of the program REPORT00.
Note
Runtime errors:
LOAD_PROGRAM_NOT_FOUND: The specified program was not found.
SUBMIT_WRONG_TYPE: The specified program is not a report.
SUBMIT_IMPORT_ONLY_PARAMETER: Only one value passed to a report parameter.
SUBMIT_WRONG_SIGN: Invalid value passed to a selection with the addition SIGN.
SUBMIT_IN_ITAB_ILL_STRUCTURE: Table passed to a selection with WITH sel IN itab had an unexpected structure.
For reading the VARAINT make use of the FM <b>RS_VARIANT_DISPLAY</b>
Vasanth