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

break line in sending mail program

Former Member
0 Likes
514

Hi All,

I am creating sending mail program, its working fine but for that i have problem in break line.

my code is below:

doc_chng-obj_descr = 'SAP test mail'.

      • Mail Contents

loop at itab..

CONCATENATE 'sap test mail UPDATED:' ''

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

CONCATENATE 'test1:' SPACE itab-KOKRS

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

CONCATENATE 'test2:' SPACE itab-KSTAR

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

if int = 16.

CONCATENATE 'test3:' space itab-objnr

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

endif.

endloop.

output is:

sap test mail

test1:5000

test2:0000600100

test3:371040

sap test mail

test1:5000

test2:0000600100

test3:362040

but i want blank line after 1 entry like below

sap test mail

test1:5000

test2:0000600100

test3:371040

sap test mail

test1:5000

test2:0000600100

test3:362040

so please guide me.... i used skip and new-line statement but its not working...

Thanks in advance

zeni

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
473

Add a blank line at the end of the loop.

loop at itab..
CONCATENATE 'sap test mail UPDATED:' ''
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.

CONCATENATE 'test1:' SPACE itab-KOKRS
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.

CONCATENATE 'test2:' SPACE itab-KSTAR
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.

if int = 16.
CONCATENATE 'test3:' space itab-objnr
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.
endif.

* Add a blank line
clear lt_objtxt.
append it_objtxt.


endloop.

Regards,

Rich Heilman

Hi All,

I am creating sending mail program, its working fine but for that i have problem in break line.

my code is below:

doc_chng-obj_descr = 'SAP test mail'.

      • Mail Contents

loop at itab..

CONCATENATE 'sap test mail UPDATED:' ''

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

CONCATENATE 'test1:' SPACE itab-KOKRS

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

CONCATENATE 'test2:' SPACE itab-KSTAR

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

if int = 16.

CONCATENATE 'test3:' space itab-objnr

INTO it_objtxt SEPARATED BY space.

APPEND it_objtxt.

endif.

endloop.

output is:

sap test mail

test1:5000

test2:0000600100

test3:371040

sap test mail

test1:5000

test2:0000600100

test3:362040

but i want blank line after 1 entry like below

sap test mail

test1:5000

test2:0000600100

test3:371040

sap test mail

test1:5000

test2:0000600100

test3:362040

so please guide me.... i used skip and new-line statement but its not working...

Thanks in advance

zeni

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
474

Add a blank line at the end of the loop.

loop at itab..
CONCATENATE 'sap test mail UPDATED:' ''
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.

CONCATENATE 'test1:' SPACE itab-KOKRS
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.

CONCATENATE 'test2:' SPACE itab-KSTAR
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.

if int = 16.
CONCATENATE 'test3:' space itab-objnr
INTO it_objtxt SEPARATED BY space.
APPEND it_objtxt.
endif.

* Add a blank line
clear lt_objtxt.
append it_objtxt.


endloop.

Regards,

Rich Heilman

Read only

0 Likes
473

Hi Rich,

Thanks for quick reply. problem is also solved......

its very simple..... Thank you very much.

I have assign point also.

Thanks

Zeni