cancel
Showing results for 
Search instead for 
Did you mean: 

Formatting?

Former Member
0 Kudos

Hi Experts,

I hv a Table Node in the Smartform, and this Table looks like,

(Now, the Existing format of Table is,):

<b>MATNR (Space).....................Serial#

7.............................................1

..............................................2

..............................................3</b>

The reqirement(expecting) format is.

<i><b>MATNR (Space).....................Serial#

7.............................................1,2,3</b></i>

So, How to achieve it?

ThanQ.

Message was edited by:

Srinivas

Message was edited by:

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

former_member181962
Active Contributor
0 Kudos

Hi srinivas,

While sending the data to the smartform, you can concatenate the serial numbers into a single field in the internal table for each material number in the PRINT PROGRAM itself.

Regards,

Ravi

Former Member
0 Kudos

ThanQ Ravi.

Let me try.

Former Member
0 Kudos

Hi Ravi,

Pls. can you give me example code?

ThanQ.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
data: str type string.

 loop at sn_tab.
  if sy-tabix = 1.
    str = sn_tab-serial.
  else.
     concatenate str sn_tab-serial into str separated by ','.
  endif.
 endloop.

Regards,

RIch Heilman

former_member181962
Active Contributor
0 Kudos

If your table has multiple matnrs, then do like this:

loop at sn_tab.

at new matnr.

itab_str-str = sn_tab-matnr.

itab_str-str = sn_tab-serial.

endat.

concatenate itab_str-str sn_tab-serial into itab_str-str separated by ','.

at end of matnr.

append itab_str.

clear itab_str.

endat.

endloop.

Regards,

Ravi

Former Member
0 Kudos

ThanQ to all.

Answers (0)