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

Problem in displaying Table Control..

Former Member
0 Likes
1,997

Hi friends,

I am displaying data from the table J_2IACCBAL(Opening/Closing a/c balance table).

i fetched d data into one internal table ITAB.

and I am populating unsing table control.

inthe field ITAB-EXAMT some negetive values are also there.

but while displaying through table control on screen whenever the negetive value is caame then my program giving shotdump,

if in the selection if got all positive values then it is displaying properly..

I have checked in the debugging also, when ever negetive value is going to display then only it is going to shotdump..

pls check and give me d solution...

FYI: pls see in se11 also (J_2IACCBAL-EXAMT)

Regards,

Ramesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,067

hai,

In module pool for any i/p or o/p field to handle negative value: place -


V in the field.

The field must be of a numeric type, QUAN, DEC etc. Also, in the "Text or I/O Field" under the "Text I/O Templates" tab under the Element List of the screen, you must enter something like this.

___________V

This will allow room for your negative sign.

Otherwise it will give a dump.

Cheers,

Umasankar

6 REPLIES 6
Read only

Former Member
0 Likes
1,067

Is that not possible for you to use a character variable instead of a numeric for this field ? Probably at the time of processes you can move back those values to a numberic field and while displaying move it to character.

rgds,

TM.

Read only

0 Likes
1,067

no,

I have taken

DATA: ITAB TYPE TABLE OF j_2iaccbal WITH HEADER LINE,

WA TYPE j_2iaccbal.

CONTROLS: tc1 TYPE TABLEVIEW USING SCREEN 103.

*This is , simply select data and populate through table control on sceen...

Pls. any one check and give me d solution..

Regards,

Ramesh.

Read only

Former Member
0 Likes
1,068

hai,

In module pool for any i/p or o/p field to handle negative value: place -


V in the field.

The field must be of a numeric type, QUAN, DEC etc. Also, in the "Text or I/O Field" under the "Text I/O Templates" tab under the Element List of the screen, you must enter something like this.

___________V

This will allow room for your negative sign.

Otherwise it will give a dump.

Cheers,

Umasankar

Read only

0 Likes
1,067

Hi Umasankar,

Thanx for solving my problem, i am struggling to solve this from last 2 days,

Regards,

Ramesh.

Read only

0 Likes
1,067

the domain behind this field does not cater for signs which is why you get a dump.

as Umasankar has said you should change your field definition in your table control to cater for the sign. add the V as he suggests.

Read only

Former Member
0 Likes
1,067

Hai Ramesh Babu

Check the following Document

1) Screen tables

A table can be created in transaction. These tables, when designed on the screen are called as SCREEN TABLES.

These are of two types.

Table Controls and Step loops

These tables are treated as Loops.

2)Features of Table Controls

Data is displayed in the form of table.

Table control gives user the feeling of an actual table.

You can scroll through the table vertically as well as horizontally.

You can select rows and columns.

You can resize the with of columns.

You can have separator lines between rows and columns.

Automatic resizing of the table when the user resizes the window.

You can update information in the table control and it can be updated in the database table by writing code for it.

3)Steps for creating table control

Declaration of table control in module pool program.

Designing of table controls on the screen.

Passing data to table control in flow logic.

4)Declaration of TC in MPP

syntax:

controls <name of table control> type tableview using screen <‘screen no.’>.

5)Designing Table control on screen

Click on Table in Control bar and place it on the screen. You can adjust the length and width of the Table Control.

Name the table control.(same name as given in data declaration).

From dictionary object OR from program fields select the fields and place them in the table control

6)Passing data to table control

Usually transfer of data from program to screen is automatic.

In case of TC, you need to explicitly transfer the data to table control.

ABAP/4 provides Loop statement, which is associated with flow logic to transfer the data.

7)Passing of data contd.

PBO.

Loop at <name of internal table> with control <name of table control> cursor <scroll variable>.

module…….

Endloop.

PAI.

Loop at < name of internal table>.Endloop.

8)Scroll variables

Top_line : the row of table where the screen display starts.

Current_line : the row currently being processed inside a loop.

9)Transfer of data from prg to TC.

With ‘Loop at …’ statement, the first row is placed in the header of internal table.

If any module is specified between Loop and End loop, it will be executed. In this module, generally we will be assigning this internal table fields to table control screen fields.

The row in internal table is transferred to the TC as stated in the ‘Loop at…..’ statement.

The system encounters the ‘Endloop’ statement and control is passed back to the next line of internal table.

In the same way all the records of the internal table are passed to the TC.

Thanks & regards

Sreenivasulu P