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

Selection screen

Former Member
0 Likes
626

Hi,

My requrement is given below.

Create an ABAP program which has Material and Material Description on the selection screen.The Material Description Field should be input disabled.If the user enters the material and executes the program the material description should get auto-populated.

Thanks,

Chinmaye

6 REPLIES 6
Read only

vinod_vemuru2
Active Contributor
0 Likes
597

Hi,

Check this logic.

PARAMETERS: po_matnr TYPE mara-matnr OBLIGATORY,

po_maktx TYPE makt-maktx.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CHECK screen-name EQ 'PO_MAKTX'.

screen-input = 0.

modify screen.

ENDLOOP.

CLEAR po_maktx.

SELECT SINGLE maktx FROM makt into po_maktx WHERE matnr EQ po_matnr AND

spras EQ sy-langu.

U can do the validations also.

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on Mar 4, 2008 10:47 AM

Read only

Former Member
0 Likes
597

Hi Chinmaye,

What is your query?

Regards,

Sandeep

Read only

Former Member
0 Likes
597

Hi,

try like below......

PARAMETERS : p_matnr TYPE matnr,
             p_maktx TYPE maktx.

AT SELECTION-SCREEN OUTPUT.

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

  LOOP AT SCREEN.
    IF screen-name = 'P_MAKTX'.
      screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Cheers,

jose.

Read only

Former Member
0 Likes
597

Hi

Do like this,,

tables : mara , makt.

parameter p_matnr type mara-matnr .

parameter p_maktx type makt-maktx .

AT Selection-screen .

IF not p_matnr is initial.

select single maktx from makt into p_maktx where matnr = p_matnr .

ENDIF .

Hope it helps .

Read only

Former Member
0 Likes
597

at selection screen take two parametres

material and mat.desc.

give them modif id by

parameters:materail type matnr modif id G1,

description type maktx modif id G2.

Now in

AT SEELECTION-SCREEN OUTPUT.

loop at screen .

if screen-group1 = 'G2'.

screen-input = 0.

endif.

endloop.

Now whenever you will press enter sy-ucomm will be ONLI

So write in same event further write

case sy-ucomm.

when 'ONLI'.

Select single maktx into description from makt

where matnr = material.

endcase.

plz reward if useful

vivek

Read only

Former Member
0 Likes
597

To Disable a material description in the selection screen you have code the following logic in the 'AT SELECTION-SCREEN OUTPUT' event.

Suppose, p_maktx is used to disply the material description and p_matnr for the material in selection screen.


SELECT SINGLE MAKTX FROM MAKT 
                                      INTO P_MAKTX
                                      WHERE MATNR = P_MATNR.

LOOP AT SCREEN.
  IF SCREEN-NAME = 'P_MAKTX'.
      SCREEN-INPUT = '  '.
      SCREEN-OUTPUT = ' X'.
      MODIFY SCREEN.
  ENDIF.
ENDLOOP.