10-15-2008 11:27 AM
Hello All,
I have two fields on my screen ,material number and material desc.
The material desc field is suppose to be greyed out and the value for it should be filled on entering the material number .The materail number has the f4 help,so selecting the material number the material desc should be filled.
This i am suppose to have in module programming.
Please help me with the sample code of handling this situation in screen programming.
Thanks in advance,
swati
10-15-2008 11:29 AM
hi,
using F4_IF_INT_TABLE_VALUE_REQUEST.
u can achieve it. if u want any examples search on this function module in SCN.
Rgds.,
subash
10-15-2008 11:33 AM
Hi,
It can be done like this.
Say if your material number field name is w_matnr and mat desc field name is w_desc.
Process on value request.
" You will be using the above given FM
" You get your material number.
" Once you get the Material Number
Select single maktx from makt into w_desc where matnr = w_matnr.
" This will populate the description field
Regards,
Pramod
10-15-2008 11:48 AM
Hi pramod,
It will great if you can explain me with the sample code please.
10-15-2008 11:55 AM
Hi,
You said you are doing this in a module pool program.
Also you mentioned that your material number has F4 help.
Please tell me whether you have handled this F4 help in your code.
If so immediately after handling the F4 (value request code ).
write the following code below.
Select single maktx from makt into w_maktx where matnr = w_matnr and spras = sy-langu.
What this will do is to populate your description field.
Regards,
Pramod
10-15-2008 12:12 PM
Hi Swathi,
One more input.
In PBO u hav use the loop at screen to grey out the Desc field.
Rhea.
10-15-2008 11:35 AM
Hi GADDAMEEDI SUBASH,
I think it is not F4_IF_INT_TABLE_VALUE_REQUEST but it is F4IF_INT_TABLE_VALUE_REQUEST. Please check it
Krish.........
10-15-2008 11:37 AM
Hi Krish,
Thanks for correcting me man...i am aware of it...its a print mistake.
Rgds.,
subash
10-15-2008 11:39 AM
Hi,
let p_matnr and p_maktx (only for output) are the selection-screen fields.
AT SELECTION_SCREEN on P_MATNR.
if p_matnr is not initial.
select single maktx from makt into gv_maktx
where matnr = p_matnr
and spras = 'EN'.
if sy-subrc = 0.
p_maktx = gv_maktx.
endif.
endif.
In Module pool program write this logic in PAI.
Regards,
Dwarakanath.S
Edited by: Dwarakanath Sankarayogi on Oct 15, 2008 12:52 PM
10-15-2008 11:53 AM
Hi Swati,
Look into the below code.
TABLES : MAKT.
PARAMETERS : P_MATNR LIKE MAKT-MATNR default 'R-1230' ,
P_MAKTX LIKE MAKT-MAKTX modif id RR1.
initialization.
loop at screen.
IF SCREEN-GROUP1 = 'RR1'.
SCREEN-INTENSIFIED = '1'.
SCREEN-ACTIVE = 1.
SCREEN-DISPLAY_3D = '1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
endif.
endloop.
at selection-screen output.
loop at screen.
IF SCREEN-GROUP1 = 'RR1'.
SCREEN-INTENSIFIED = '1'.
SCREEN-ACTIVE = 1.
SCREEN-DISPLAY_3D = '1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
endif.
endloop.
select single maktx into p_maktx from makt
where matnr = p_matnr.
comment on it
regards
Kumar M