cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare global internal table in smartform

Former Member
0 Kudos

Hi

i need internal table in smart form with type of tline .. tline is structure and when i declare it in global definition as lines like tline it creates a structre ... kindly help me out

Regards

Ammad

Accepted Solutions (1)

Accepted Solutions (1)

nabheetscn
Active Contributor
0 Kudos

Hello,

Please find below the sample code.

Lets say you want an internal table for BSEG.

Go to TYPES tab.

types:lt_bseg type STANDARD TABLE OF bseg.

In global variable write

gt_bseg type lt_bseg...

It will create an internal table.

Regards,

Nabheet Madan

Former Member
0 Kudos

hey i got the following error message

Lines1 is a table with out header line and therefore has no component called tdline

nabheetscn
Active Contributor
0 Kudos

This error is coming becasue u have not created an work area which is of same type as tdline.

Just double click on the error and copy paste the code here.Error now is nin ur code.

Secondly lets my internal table is GT_TLINE.

I will declare a work are GWA_TLINE type TLINE.

then i can have

loop at gt_line into gwa_tline or

read table gt_tline into gwa_tline with key etc.

Regards,

Nabheet Madan

nabheetscn
Active Contributor
0 Kudos

Is the issue solved...?

Former Member
0 Kudos

Hey thanks it works one more question .. can i print in header section with loop ? coz i have more than one record but it is printing the last one ... i got the data in table ... use the loop option move the data into work area and print the varibale of work area .. help me out in this as well

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

nabheetscn
Active Contributor
0 Kudos

Hello,

Yes you can print the header section in loop...Exactly how have so made the loop is it in a template or main window..?

Regards,

Nabheet

nabheetscn
Active Contributor
0 Kudos

If the issue is solved please close the thread.

Answers (1)

Answers (1)

nabheetscn
Active Contributor
0 Kudos

Create a line type in the types tab of the same which you can use it in ur global devlaration to creeate the internal table.

Regards,

Nabheet Madan

Former Member
0 Kudos

hey i define this

TYPES: Line LIKE TABLE OF tline . in Types tab and

LINES1 like line in global data type but when i put break point in program line where i m using that table . it is still a strucutre

Regards

Ammad

nabheetscn
Active Contributor
0 Kudos

Heloo,

Define like this

TYPES: Line type standard TABLE OF tline . in Types tab and

LINES1 type line in global data type

Put a break point and check now.

Regards

Nabheet