cancel
Showing results for 
Search instead for 
Did you mean: 

Table column should hold values from more than one field

former_member188251
Active Participant
0 Kudos

Hi All,

I have to display a table(multiple rows) as shown below. I know the logic to fetch all the fields shown . But my problem is with regards to   displaying the 'Description' field.

All the values that make up 'Description' should be displayed in a separate line for a single table row.. That is , MARA-MFRPN on the first line , MAKT-MAKTX on second, hardcoded text 'Serial Number:' on third and  OBJK-SERNR on the fourth line. I have all the fields e in an internal table. How do I display the 'Description' field  in this fashion ?

NrProductDescriptionQuantityUOM
MSEG-ZEILEMSEG-MATNRMARA-MFRPN
MAKT-MAKTX
Serial number:
OBJK-SERNR
MSEG-MENGEMSEG-MEINS

The table should look similar to this

NrProductDescriptionQuantityUOM
11234AAAA
BBBBB
Serial Number:
1E4RT67U
10EA
26789CCCC
DDDD
Serial Number:
4R5T6Y7U
20EA

I know to display a table with that has a single field in every column. It is the 'Description'  field that is troubling me.

Thanks for your time and effort .

Best Regards,

Shankar.

Accepted Solutions (1)

Accepted Solutions (1)

former_member188251
Active Participant
0 Kudos

I wrapped every table column in a subform,  Unchecked the checkbox page break within content on the  body subform and on every subfom used to wrap the columns . Now  the table height is increasing dynamically.   Text modules didn't work.

BR,

Shankar.

Answers (4)

Answers (4)

former_member188251
Active Participant
0 Kudos

Hi All,

The OBJK-SERNR can contain multiple values for a single table data row . I want the table row to expand dynamically , depending on the number of OBJK-SERNR values present. How can I achieve this?

I found this link to set some layoout properties, can you pls provide the screenshots. Would be very helpful.

http://scn.sap.com/thread/3393741

BR,

Shankar.

Former Member
0 Kudos

Hello Shankar,

Create a text module for the Description column and bind it. Put your description column fields in the text module as below:

😕 &MARA-MFRPN&

😕 &MAKT-MAKTX&

😕 &W_SERNR& ---->Concatenate all the SERNR's into a variable

NrProductDescriptionQuantityUOM
MSEG-ZEILEMSEG-MATNRMARA-MFRPN
MAKT-MAKTX
Serial number:
OBJK-SERNR
MSEG-MENGEMSEG-MEINS

Rgds,

Ravinder

former_member188251
Active Participant
0 Kudos

Thanks Ravinder ! I'll try it and update here.

former_member188251
Active Participant
0 Kudos

Hi All,

I am suddenly facing one basic issue when trying to make the  body page content as flowed . The body page isn't expanding when I try to drag the corners. It expands when it is positioned, but when it is floored, it just gets created in the upper corner of the layout and isn't expanding when I drag the corners. I need it as flowed to create my table , if it is positioned the paginations tab is disabled in my subform. This might be too basic, but I am not able to find the answer on SCN/Google. Kindly help.

BR,

Shankar.

former_member188251
Active Participant
0 Kudos

This issue about the flowed subform is solved, I dragged down the content area on the master page , created a positioned subform on the body page, dragged and dropped the table there and then changed the subform to flowed. Table is now neatly flowing to second page. Back to the original issue now !

navip
Active Participant
0 Kudos

Hi,

  Please go through the below doc. and try to Implement as per your requirement.

http://scn.sap.com/docs/DOC-45798

Hope it helps...

---

Naveen

rakesh_m2
Contributor
0 Kudos

Hi Shankar,

Design table using 'Subform'. 

Have fields like this in subform.

MSEG-ZEILEMSEG-MATNRMARA-MFRPN
MAKT-MAKTX
Serial number:
OBJK-SERNR
MSEG-MENGEMSEG-MEINS

Wrap all these fields in a subform and bind the subform to the table which you want to print and repeat subform for the number of entries in it. 

Thanks,

Rakesh

Former Member
0 Kudos

in your Interface or in Program, concatenate all descriptions to a single field separated with

CL_ABAP_CHAR_UTILITIES=>NEWLINE.

and in your layout fix the width and make the height to expand to fit.

select allow multiple lines on binding tab.

Thanks.

Uma