‎2008 Mar 04 5:11 AM
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
‎2008 Mar 04 5:16 AM
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
‎2008 Mar 04 5:17 AM
‎2008 Mar 04 5:18 AM
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.
‎2008 Mar 04 5:18 AM
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 .
‎2008 Mar 04 5:18 AM
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
‎2008 Mar 04 5:20 AM
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.