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

page header length problem

Former Member
0 Likes
468

I have created page header like this:

but not displaying material as header in my out put

please correct if anything wrong.

IF NOT s_matnr IS INITIAL.

CLEAR: l_line,S_dup.

l_line-typ = 'S'.

l_line-key = 'Material'.

s_dup+4(22) = s_matnr-low.

IF NOT s_matnr-high IS INITIAL.

s_dup+21(23) = 'To'.

ENDIF.

s_dup+24(70) = s_matnr-high.

WRITE : s_dup TO l_line-info.

APPEND l_line-info TO lt_top_of_page.

ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
447

The first line should be :

IF NOT s_matnr[] IS INITIAL.

Read only

Former Member
0 Likes
447

try with this

IF NOT s_matnr IS INITIAL.

CLEAR: l_line,S_dup.

l_line-typ = 'S'.

l_line-key = 'Material'.

s_dup+4(22) = s_matnr-low.

IF NOT s_matnr-high IS INITIAL.

s_dup+27(23) = 'To'.

ENDIF.

s_dup+51(70) = s_matnr-high.

WRITE : s_dup TO l_line-info.

APPEND l_line-info TO lt_top_of_page.

ENDIF.

Read only

Former Member
0 Likes
447

Hi Sapien ,

IF NOT s_matnr-low IS INITIAL.

CLEAR: l_line,S_dup.

l_line-typ = 'S'.

l_line-key = 'Material'.

s_dup+4(22) = s_matnr-low.

Endif.

IF NOT s_matnr-high IS INITIAL.

s_dup+27(2) = 'To'.

s_dup+51(70) = s_matnr-high.

Endif.

Append s_dup.

l_line[ ] = s_dup [ ].

lt_top_of_page[ ] = l_line[ ].

see if l_line and s_dup and lt_top_of_page are having the same structure .

Then this will do.

just in debugging check how the data is moving from s_dup to tp-of -page .

Important.

remember that the structures should be the same when u r moving the contents

Regards,

VIjay.

Read only

Former Member
0 Likes
447

Hi

As highlighted by Rajesh, try using IF NOT <b>S_MATNR[]</b> IS INITIAL.

Kind Regards

Eswar

Read only

Former Member
0 Likes
447

hi

good

did you debug this code , check some postion as i pointing out here.

value of

s_dup+24(70) = s_matnr-high.

append statement

APPEND l_line-info TO lt_top_of_page.

if you r getting the s_dup value than you ll get the header at your out put.

thanks

mrutyun^