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

TABLE CONTROL PROBLEM

srajendran
Explorer
0 Likes
873

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
841

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

8 REPLIES 8
Read only

Former Member
0 Likes
841

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

Read only

0 Likes
841

RAVI KUMAR,

PLS EXPLAIN IN DETAIL . I COULD'T UNDERSTAND.

Read only

0 Likes
841

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

Read only

Former Member
0 Likes
841

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

Read only

rahulkavuri
Active Contributor
0 Likes
841

deleted

Message was edited by: Rahul Kavuri

Read only

Former Member
0 Likes
841

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

Read only

Former Member
0 Likes
841
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.
Read only

Former Member
0 Likes
842

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