Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display data in screen field F4 module pool- pasing values frm internal tbl

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

former_member1245113
Active Contributor
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

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.

Former Member
0 Kudos

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

Venkat_Sesha
Advisor
Advisor
0 Kudos

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.

Former Member
0 Kudos

This question was answered as the last point mentioned was really very very helpfull

Former Member
0 Kudos

Need some more clarification for the question posted.