05-20-2011 7:57 AM
Hi,
I have an internal table with some values.
I have to display data in a screen field of Module pool.
In this regards, I am passing the values from the internal table to the function module "vrm_set_values" in order to display the data.
but when i am doing so, the data is not populated in the screen field when pressed F4 for the field.
While debugging, I could find the cursor is not going to the function module only....
Kindly help me in this regards !
thanks
shankar
05-20-2011 8:07 AM
HI,
Have you added the logic in the PAI for the event
PROCESS ON VALUE-REQUEST.
Field : field_name module source_code. " Specify the field name and source_code is the module in which you will write the F4 logic.
This event is triggered while pressing F4 on the field .
Regards,
MAdhukar Shetty
05-20-2011 8:50 AM
HI,
iN Top Include
TYPE-POOLS VRM.
TABLES : SFLIGHT.
DATA : CID TYPE VRM_ID, " For List Box
CAR TYPE VRM_VALUES,
WCAR LIKE LINE OF CAR,
CARRID TYPE SPFLI-CARRID,
OK TYPE SY-UCOMM.
DATA : ITAB TYPE TABLE OF SFLIGHT WITH HEADER LINE, " For Second List Box
CONID TYPE VRM_ID,
CON TYPE VRM_VALUES,
WCON LIKE LINE OF CON.
On The screen create 2 list box with names
1) SFLIGHT-CARRID " For this assign any dummy Code and it will trigger PBO once you leave select
2) SFLIGHT-CONNID
in PBO
module status_100.
in Program
module status_100 output.
REFRESH CAR.
WCAR-KEY = 'AA'. " You have to say the Key and Text value to same as per my observation
WCAR-TEXT = 'AA'.
APPEND WCAR TO CAR.
WCAR-KEY = 'LH'.
WCAR-TEXT = 'LH'.
APPEND WCAR TO CAR.
CID = 'SFLIGHT-CARRID'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = CID
VALUES = CAR
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
For more info go throught the following thread
Cheerz
Ramchander Rao.K
05-20-2011 9:25 AM
Hello Shankar,
I have to display data in a screen field of Module pool. In this regards, I am passing the values from the internal table to the function module "vrm_set_values" in order to display the data.
First of all VRM_SET_VALUES is not released, i will avoid it unless absolutely reqd.
You can mark the module pool field's "Dropdown" attribute as either "Listbox" or "Listbox with key". In the PAI call the "F4IF_INT_TABLE_VALUE_REQUEST" & pass the internal table values to it.
Sample code can be found in the forum.
BR,
Suhas
PS: As mentiond you've to call VRM_SET_VALUES in the PBO module & not in PAI.
05-23-2011 7:11 AM
Hi,
All.
As suggested by all, i have used the VRM_SET_VALUES in PBO and getting the values in the required field.
I have one more issue over here, when i am selecting the value in the field the value has to get stored at some location through which i display the concerned values in the next field,
But i am unable to capture the value of the field, due to which the value in the next field is not being displayed.
Can any one help me - as in how i can store the value which has been selected intially.
Thanks in advance.
shankar
05-20-2011 1:48 PM
Hi,
Either you do as ramchander said or you can do the search assigned to the field in Screen painter attributes by creating a custom search help. and write the code the Search help exit (your ITAB data) ..
Thanks,
Bhargav.
05-21-2011 8:00 PM
This question was answered as the last point mentioned was really very very helpfull
05-23-2011 7:12 AM