Application Development and Automation 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: 
Read only

Problem with select options

Former Member
0 Likes
1,083

Hi all,

I have this simple requirement. In my program I have 2 select options and 1 parameter.

My requirement on F4 functionality of 1 select options i have to fill other select options and parameters. So, I have coded as following, but the problem is. The values are inside the other select options and parameters but not visible on screen.

DATA : v_laufd LIKE f110v-laufd,

v_laufil LIKE f110v-laufi,

v_laufih LIKE f110v-laufi.

select-options : s_laufd for regyh-laufd,

s_laufi for reguh-laufi.

parameters : s_rzawe type reguh-rzawe.

at selection-screen on value request for s_laufd-low.

CALL FUNCTION 'F4_ZAHLLAUF'

IMPORTING

laufd = v_laufd

laufi = v_laufil.

s_laufd-low = v_laufd.

SELECT SINGLE rzawe FROM reguh INTO s_rzawe WHERE laufd = v_laufd

AND laufi = v_laufil.

s_laufi-low = v_laufil.

The values are populated in s_laufd-low, s_laufi-low & s_rzawe, but when the screen is displayed only values in s_laufd-low is displayed and other 2 its showing blank.

I have tried other events like AT SELECTION-SCREEN & AT SELECTION SCREEN OUTPUT as well, but no use.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

former_member194797
Active Contributor
0 Likes
992

I have seen the same in a Z-REPORT which works fine. After the


CALL FUNCTION 'F4_ZAHLLAUF'
. . .

there is a

  
LEAVE TO SCREEN SY-DYNNR.

Please try it. I hope it helps.

10 REPLIES 10
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
992

Hello,

CALL FUNCTION 'F4_ZAHLLAUF'

IMPORTING

laufd = v_laufd

laufi = v_laufil.

s_laufd-low = v_laufd.

SELECT SINGLE rzawe FROM reguh INTO s_rzawe WHERE laufd = v_laufd

AND laufi = v_laufil.

s_laufi-low = v_laufil.

I think you have to use:


s_laufi-sign = 'I'.
s_laufi-option = 'EQ'.
s_laufi-low =  v_laufil.
APPEND s_laufi.

Try & let me know.

BR,

Suhas

Read only

Former Member
0 Likes
992

Hi Suhas,

Sorry i forgot to mention, I have also tried append s_laufi.

If not s_laufi, should show s_rzawe as this is only a parameter.

Thanks

Read only

BH2408
Active Contributor
0 Likes
992

Hi ,

we need to use this Function Module in the AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>.

and this it iwll return only one value which <field>

Regards,

Bharani

Read only

Former Member
0 Likes
992

Hi Bharani,

Then there is no other way to fill the values in the other fields based on the value which i have got in this event.?

Thanks!!!

Edited by: Mr A on Jan 21, 2009 4:31 PM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
992

Hello,

Try this bit of coding:


TABLES: reguh.

DATA :
v_laufd LIKE f110v-laufd,
v_laufil LIKE f110v-laufi,
v_laufih LIKE f110v-laufi.

SELECT-OPTIONS : s_laufd FOR reguh-laufd,
s_laufi FOR reguh-laufi.

PARAMETERS : s_rzawe TYPE reguh-rzawe.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_laufd-low.
  CALL FUNCTION 'F4_ZAHLLAUF'
    EXPORTING
      f1typ = 'D'
    IMPORTING
      laufd = v_laufd.
*      laufi = v_laufil.

  s_laufd-low = v_laufd.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_laufi-low.
  CALL FUNCTION 'F4_ZAHLLAUF'
    EXPORTING
      f1typ = 'I'
    IMPORTING
*      laufd = v_laufd
      laufi = v_laufil.

  s_laufi-low = v_laufil.

BR,

Suhas

Read only

Former Member
0 Likes
992

hi suhas,

Thanks for the reply. The probelm with this code is s_laufi-low will trigger only when i do F4 on s_laufi. But my requirement is to fill s_laufi when value request on s_laufd is called.

bye

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
992

Hello,

This is how exactly my code will work. Can you share with me the code which worked for you?

BR,

Suhas

Read only

Former Member
0 Likes
992

Hi Suhas.

This is the code which worked for me.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_laufd-low.

CLEAR v_laufd.

CALL FUNCTION 'F4_ZAHLLAUF'

IMPORTING

laufd = v_laufd

laufi = v_laufil.

s_laufd-low = v_laufd.

APPEND s_laufd.

SELECT SINGLE rzawe FROM reguh INTO s_rzawe WHERE laufd = v_laufd

AND laufi = v_laufil.

s_laufi-low = v_laufil.

APPEND s_laufi.

LEAVE TO SCREEN sy-dynnr.

Read only

former_member194797
Active Contributor
0 Likes
993

I have seen the same in a Z-REPORT which works fine. After the


CALL FUNCTION 'F4_ZAHLLAUF'
. . .

there is a

  
LEAVE TO SCREEN SY-DYNNR.

Please try it. I hope it helps.

Read only

0 Likes
992

Hi Henri,

Thanks !!! problem solved. Points awarded for your reply.

cheers!!!!