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

Align Data in AL11

Former Member
0 Likes
1,060

Hi Guru,

I have a requirement to place a header text in my file in AL11 path. How can I align the data into its corresponding text?

Example: Header Text: Materials , Description. Under Header text 'Materials' is its corresponding materials (ex. 12345) and under header text 'Description' is its corresponding description. Anyone has an idea on how can I do this in my code to align those details to its corresponding header text? Your help is much highly appreciated. Thanks!

Hi Guru,

I have a requirement to place a header text in my file in AL11 path. How can I align the data into its corresponding text?

Example: Header Text: Materials , Description. Under Header text 'Materials' is its corresponding materials (ex. 12345) and under header text 'Description' is its corresponding description. Anyone has an idea on how can I do this in my code to align those details to its corresponding header text? Your help is much highly appreciated. Thanks!

3 REPLIES 3
Read only

Former Member
0 Likes
781

Hi,

First Take an Internal table like this.

begin of itab,

data(300),

end of itab.

For Header- if you to display in the center then

itab-data+150(10) = 'Header Text'.

append itab.

Then For line items, just decide the positions

itab-data+150(18) = 'Material'.

append itab.

Do this way.And all the data should be appended to the internal table.

Loop at itab.

Transfer itab to dataset.

endloop.

Then it will be stored, the way you want.

Thanks & Regards,

Vamsi.

Read only

0 Likes
781

Hi Krishna...Thanks for your example...What if I have materials and description in one line only for the line item position, how can I do this? I'm encountering an error that the 'sum of the offset and length exceeds the length of the start of the structure". By the way, I'm using text symbols for the Header Text like 'MATERIALS', 'DESCRIPTION'. These header text should be aligned to its corresponding line items. Thanks.

Read only

manthanraja
Active Participant
0 Likes
781

hi ysera

Did you have a look at [THIS|;

Very similar issues have been highlighted here ...

Do check to see whether it helps ..

BR

Manthan.