Application Development 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: 

HTML_TOP_OF_PAGE

sivakrishna_boddapati
Participant
0 Kudos

Hi Experts ,

my requirement is In my reuse_alv_grid_display , for the top of page i use HTML_TOP_OF_PAGE.

In that i use method

call method top->add_text

Exporting

text = l_text.

my string length is more than 255 so i put this in do loop . but it prints first 255 char then leave a space , how can i remove that space.

Ex : customer : 122 & M aterial : m1 . like in material it gives a gap.

7 REPLIES 7

SuhaSaha
Advisor
Advisor
0 Kudos

Can you post your code ?

0 Kudos

l_text = ' my name is Krishna and i am one of the member of SDN'.

do 3 times .

call method top_add_text

exporting

text = l_text.

end do.

In first time L_text contains : My name is Krishna an

and in second time l_text : d i am one of the memb

third time l_text contains : er of SDN.

Final out put like This : My name is Krishna an d i a, one of the memb er of sdn.

How to reduce that spaces .

0 Kudos

In first time L_text contains : My name is Krishna an

and in second time l_text : d i am one of the memb

third time l_text contains : er of SDN.

How do you split L_TEXT into 3 lines ?

Suhas

0 Kudos

I USE OFF SET TO DIVIDED WHOLE STRING INTO 3 LINES , HERE MY PROBLEM IS AFTER PRINTING FIRST LINE THROUGH ADD_TEXT METHOD . IN THE SECOND TIME IT GIVES A BLANK SPACE WHEN PASSING TO ADD_TEXT METHOD I DON'T WANT THAT BLANK SPACE.

Former Member
0 Kudos

Hi,

Please use this code

data: lv_text(255) type c,

lv_date(255) TYPE c,

lv_date_h(255) TYPE c,

lv_date_l(255) TYPE c,

lv_asm(255) TYPE c.

*Header title of the report

*If current status is checked

call method top->add_text

EXPORTING

text = 'Plant Wise Sale'

sap_style = 'HEADING'.

if s_werks-low is not INITIAL and s_werks-high is NOT INITIAL.

call method top->new_line.

call method top->add_text

EXPORTING

text = 'Plant Code'

fix_lines = 'X'.

call method top->add_text

EXPORTING

text = ':'

fix_lines = 'X'.

CONCATENATE s_werks-low 'To' s_werks-high INTO lv_asm SEPARATED BY space.

call method top->add_text

EXPORTING

text = lv_asm

fix_lines = 'X'.

ELSEIF s_werks-low is not INITIAL and s_werks-high is INITIAL.

call method top->new_line.

call method top->add_text

EXPORTING

text = 'Plant Code'

fix_lines = 'X'.

call method top->add_text

EXPORTING

text = ':'

fix_lines = 'X'.

lv_asm = s_werks-low .

call method top->add_text

EXPORTING

text = lv_asm

fix_lines = 'X'.

endif.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = Sy-repid

I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'

  • IT_EVENTS = I_EVENTS

IS_LAYOUT = w_layout

IT_FIELDCAT = i_field

  • IT_SORT = i_sort

I_DEFAULT = 'X'

TABLES

T_OUTTAB = it_final

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

Regards,

Manesh.R

sivakrishna_boddapati
Participant
0 Kudos

thanks

Former Member
0 Kudos

Hello all gurus!!!

Greetings!!!

The thing is that I am also using HTML_TOP_OF_PAGE...and I got the result in three diffrent line which is expected but now I want to put this line centrally aligned not left aligned...can anybody please tell me which method or anything related to this I can use....

Thanks in advance....

Regards,

Mahesh