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

Text for Selection Parameter

Former Member
0 Likes
1,216

I want to display text right after the selection parameter.

E.g.

P_MATNR TYPE VBAP-MATNR.

Once the user enters the materil number in the parameter and presses enter, the material description

should be display on to the right of the material number.

MV1234 (Material Description) .

Appreciate Help.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
1,184
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: p_matnr TYPE matnr MODIF ID b.
PARAMETER:p_desc TYPE maktx MODIF ID a.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1 = 'A'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

  SELECT SINGLE maktx
     INTO p_desc
     FROM makt
    WHERE matnr = p_matnr.

Rob got it right....

Edited by: J@Y on Jan 26, 2009 6:00 PM

7 REPLIES 7
Read only

Former Member
0 Likes
1,184

Hi,

Try this..


 selection-screen begin of line.
  parameters P_MATNR TYPE VBAP-MATNR.
  selection-screen comment +40(<size of your text>) text-001(This should contain the description)
 selection-screen end of line.

Read only

nkr1shna
Contributor
0 Likes
1,184

Hi Rao,

You can achieve the requirement by declaring two selection screen variables, one for material number and one for material description.

Make sure you make material description as non-editable field. Get help on parameters or select-options which gives all display options.

ON SELECTION SCREEN <material>.

write program lines which populates your selection screen field <material description>.

Best Regards,

Krishna

Read only

Former Member
0 Likes
1,184

This works:

REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.

TABLES: mara, makt.

PARAMETER: p_mat LIKE mara-matnr OBLIGATORY.

SELECTION-SCREEN COMMENT 54(40) comm01.

AT SELECTION-SCREEN.
  SELECT SINGLE maktx FROM makt
    INTO comm01
    WHERE matnr = p_mat
      AND spras = sy-langu.

  IF sy-subrc <> 0.
    comm01 = 'Invalid material'.
  ENDIF.

Rob

Read only

0 Likes
1,184

I am getting the below message when i try to activate.

Error when generating the selection screen "1000" of report "ZTST

Read only

0 Likes
1,184

Your screen must be smaller. You can play with the position of the elements.

Rob

Read only

0 Likes
1,184

Hi Joy / Rob.

It works fine now . Thanks for your help.

Read only

former_member156446
Active Contributor
0 Likes
1,185
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: p_matnr TYPE matnr MODIF ID b.
PARAMETER:p_desc TYPE maktx MODIF ID a.
SELECTION-SCREEN END OF LINE.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1 = 'A'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

  SELECT SINGLE maktx
     INTO p_desc
     FROM makt
    WHERE matnr = p_matnr.

Rob got it right....

Edited by: J@Y on Jan 26, 2009 6:00 PM