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

Former Member
0 Likes
397

Hi SDN,

how do we handle a BUTTON in a table control? This is purely a Z application

Initially the table control is empty. The table control is to allow the user enter RFQ items and update in Ztable. And the Button is to enter a long text for each item created.

1. How do make the BUTTON invisible if table control is empty?

2. How to show the BUTTON for a particular row only if the key column of that table control is not initial? This means that if the user enters a value in the table control then only the BUTTON should be visible.

Whats happening till now is, i am able to create Longtext for the items, but say, when i enter 2 rows in the table control i get the same Logntext, since the USER COMMAND in either cases is the same and i dont want the Longtext for each row, i want teh LT different for each row.

Please provide help

Thanks in advance

Pratyusha

3 REPLIES 3
Read only

Former Member
0 Likes
353

Hi,

For 1 and 2

PBO..

LOOP AT T_DATA INTO S_DATA WITH CONTROL..

MODULE DISABLE_BUTTON.

ENDLOOP.

MODULE DISABLE_BUTTON.

IF S_DATA-KEY_FIELD IS INITIAL.

LOOP AT SCREEN.

IF SCREEN-FIELD = 'DDD'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

ENDMODULE.

3. For long text for each row you have to declare your internal table like this..

TYPES: BEGIN OF LONG_TEXT,

TEXT(72),

END OF LONG_TEXT.

TYPES: T_LONG_TEXT TYPE STANDARD TABLE OF LONG_TEXT.

DATA: BEGIN OF T_TABLE_CONTROL OCCURS 0,

KEYFIELD1,

....

....

LONG_TEXT TYPE T_LONG_TEXT,

END OF T_TABLE_CONTROL.

For storing the values..

DATA: WA LIKE T_TABLE_CONTROL.

DATA: WA_LONG_TEXT TYPE LONG_TEXT.

DATA: T_LTEXT_TEMP TYPE STANDARD TABLE OF LONG_TEXT.

  • POPULATING THE LONG TEXT

WA_LONG_TEXT-TEXT = 'THIS IS IN LONG TEXT'.

APPEND WA_LONG_TEXT TO T_LTEXT_TEMP.

  • POPULATE THE TABLE CONTROL INTERNAL TABLE.

WA-KEYFIELD1 = 'AA'.

WA-LONG_TEXT = T_LTEXT_TEMP[].

APPEND WA TO T_TABLE_CONTROL.

Hope this helps..

Thanks,

Naren

Read only

Former Member
0 Likes
353

Hi can u please help me in the table control problem where i have created a table control this is purely customised screen where i need to enter the data inside the table control and after all data entered on pressing save button i need to have data in ztable created what should i do how it can be done,

please help

Regards,

Ujwala.

Read only

0 Likes
353

hi Ujwala,

try to open a new thread rather than going in the same, that would be better for you to get the quick answers

Regards,

GNk