‎2006 May 10 9:27 AM
hi,
i am working on a table control which contains 2 fields likly material no and material description.
when i select one material no in first field, i want to display the related material desc in 2nd field. is it possible in table control.
help and suggestions will be much appriciated.
regards,
senthilkumar.r
‎2006 May 10 10:09 AM
Hi
You can easly manage in the PBO process, infact it's useless to store the description, so if the output fields is MARA-MATNR and MAKT-MAKTX:
PROCESS PBO.
LOOP AT T_ITAB WITH CONTROL <TABLE CONTROL> CURSOR ....
MODULE DISPLAY_ITAB.
ENDLOOP.
MODULE DISPLAY_ITAB.
IF NOT ITAB-MATNR IS INITIAL.
SELECT SINGLE * FROM MAKT WHERE SPRAS = SY-LANGU
AND MATNR = ITAB-MATNR.
IF SY-SUBRC <> 0. CLEAR MAKT. ENDIF.
ELSE.
CLEAR MAKT.
ENDIF.
MARA-MATNR = ITAB-MATNR.
ENDMODULE.
if you use the same fields of itab as output fields:
MODULE DISPLAY_ITAB.
SELECT SINGLE MAKTX FROM MAKT INTO ITAB-MAKTX
WHERE SPRAS = SY-LANGU
AND MATNR = ITAB-MATNR.
IF SY-SUBRC <> 0. CLEAR ITAB-MAKTX . ENDIF.
ENDMODULE.
max
‎2006 May 10 9:36 AM
Senthil,
You will fetch the material description upon a event and populate the table control internal table.
You cannot do this unless there is a event getting raised.
Regards,
Ravi
Note : Please mark the helpful ansewrs
‎2006 May 10 9:54 AM
‎2006 May 10 9:59 AM
hi,
first enter your material, and then press enter button.
enable the ENTER the button for your screen. and then when you press the enter button handle that in PAI of your screen.
Regards
vijay
‎2006 May 10 9:36 AM
Yes, when you enter the material and then press enter in PAI you can handle that enter and populate the respective material text.
Regards
vijay
‎2006 May 10 9:36 AM
‎2006 May 10 9:41 AM
Hai,
YA it is possible in table control.Select the row of the field you want to get description.Create any icons for displaying material description in the application tool bar.
In the user command for that particular fucntion code get the material description for the corresponding material and modify the final internal table.
This will give the description for the corresponding material you have selected.
Cheers
Umasankar
‎2006 May 10 9:41 AM
ye it is possible
if ur table control fieldnames are itab-matnr and itab-maktx.
in PAI of that screen
when 'OTHERS'.
loop at itab.
select maktx from makt into itab-maktx where matnr = itab-matnr.
modify itab transporting maktx.
endloop.
‎2006 May 10 10:09 AM
Hi
You can easly manage in the PBO process, infact it's useless to store the description, so if the output fields is MARA-MATNR and MAKT-MAKTX:
PROCESS PBO.
LOOP AT T_ITAB WITH CONTROL <TABLE CONTROL> CURSOR ....
MODULE DISPLAY_ITAB.
ENDLOOP.
MODULE DISPLAY_ITAB.
IF NOT ITAB-MATNR IS INITIAL.
SELECT SINGLE * FROM MAKT WHERE SPRAS = SY-LANGU
AND MATNR = ITAB-MATNR.
IF SY-SUBRC <> 0. CLEAR MAKT. ENDIF.
ELSE.
CLEAR MAKT.
ENDIF.
MARA-MATNR = ITAB-MATNR.
ENDMODULE.
if you use the same fields of itab as output fields:
MODULE DISPLAY_ITAB.
SELECT SINGLE MAKTX FROM MAKT INTO ITAB-MAKTX
WHERE SPRAS = SY-LANGU
AND MATNR = ITAB-MATNR.
IF SY-SUBRC <> 0. CLEAR ITAB-MAKTX . ENDIF.
ENDMODULE.
max