‎2007 Feb 08 11:03 AM
Hello All,
We are using BI Integrated planning for our planning.
I have some basic questions on Customer exits.
I have two variables ZIPVAR1 and ZIPVAR2 attached to a dropdown box.
Both the variable should access a table where the values
For eg:
-
-
Table Variable
-
-
ZIPVAR1 ZIPVAR2
1 11
1 12
1 13
2 21
2 22
2 23´
When the user chooses the value 1 for ZIPVAR1 then the exit must read the table
and bring the corresponding values ZIPVAR2 (11, 12, 13) in to dropdown box where ZIPVAR2 is assigned.
Now the function module part:
I am bringing the values of ZIPVAR1 after the input with 'importing' and I am appending the output to a 'exporting' type .
I have the results in the 'exporting' type.
My question how does i bring the output of the program in to my variable ZIPVAR2.
How can i do this!? Can you guys gimme a direction. Thanks a lot in advance
Regards,
Karthik Krishna.
‎2007 Feb 08 1:16 PM
Hi
ZIPVAR2 variable will be a listbox so it have rows appended so it would be a like table .
Just look at the below code.
DATA : S_LISTBOX TYPE VRM_VALUE .
DATA : T_LISTBOX TYPE STANDARD TABLE OF VRM_VALUE INITIAL SIZE 0 .
S_LISTBOX-KEY = '1' .
S_LISTBOX-TEXT = 'Class/Interface' .
APPEND S_LISTBOX TO T_LISTBOX .
S_LISTBOX-KEY = '2' .
S_LISTBOX-TEXT = 'Description' .
APPEND S_LISTBOX TO T_LISTBOX .
S_LISTBOX-KEY = '3' .
S_LISTBOX-TEXT = 'Method' .
APPEND S_LISTBOX TO T_LISTBOX .
G_VRM_ID = 'ZCW_LIST-T1' .
*loop at t_listbox into s_listbox .
SET PARAMETER ID 'AUN' FIELD SPACE.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = G_VRM_ID
VALUES = T_LISTBOX
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Now i have listbox in the screen with name zcw_list-t1 .
Where ZCW_LIST is table type and include a structure ZCW_LIST1 with field T1 .
Your export type should a type of table type and you will tranfer the value as above code as mention .
Please reward if useful.
‎2007 Feb 08 1:16 PM
Hi
ZIPVAR2 variable will be a listbox so it have rows appended so it would be a like table .
Just look at the below code.
DATA : S_LISTBOX TYPE VRM_VALUE .
DATA : T_LISTBOX TYPE STANDARD TABLE OF VRM_VALUE INITIAL SIZE 0 .
S_LISTBOX-KEY = '1' .
S_LISTBOX-TEXT = 'Class/Interface' .
APPEND S_LISTBOX TO T_LISTBOX .
S_LISTBOX-KEY = '2' .
S_LISTBOX-TEXT = 'Description' .
APPEND S_LISTBOX TO T_LISTBOX .
S_LISTBOX-KEY = '3' .
S_LISTBOX-TEXT = 'Method' .
APPEND S_LISTBOX TO T_LISTBOX .
G_VRM_ID = 'ZCW_LIST-T1' .
*loop at t_listbox into s_listbox .
SET PARAMETER ID 'AUN' FIELD SPACE.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = G_VRM_ID
VALUES = T_LISTBOX
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Now i have listbox in the screen with name zcw_list-t1 .
Where ZCW_LIST is table type and include a structure ZCW_LIST1 with field T1 .
Your export type should a type of table type and you will tranfer the value as above code as mention .
Please reward if useful.