1

I want to create a custom table with dynamic column headers. For example, column 1 would be the date today then the second column would be tomorrow's date and so on.

Can anybody help light me up on this one? Thanks a lot in advance!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Czarinaaaaa29
  • 311
  • 2
  • 8
  • 23
  • What do you mean by "custom table"? Do you mean a transparent table in SE11 or an internal table in your program (function module)? Or do you mean an ALV list, where you want the heading of the columns to be created dynamically? – József Szikszai Dec 12 '17 at 08:27
  • @JozsefSzikszai I mean a custom table not ALV. If this is not possible, I am thinking to name the field names as fld1 , fld2 , fld3, so on.. something like that--then dynamically change the field label (of its data elements) once table is displayed so I could achieve the desired dates as column header. But I have no idea yet how to do it. – Czarinaaaaa29 Dec 12 '17 at 08:41
  • You still did not answer the question, whether it is an internal table in your program or a transparent table in SE11. The term "custom table", makes me think the latter. You cannot create the text dynamically for table fields in SE11, just add whatever text. However, in your program you can do, whatever you need and add headings as you like. – József Szikszai Dec 12 '17 at 09:22
  • @JozsefSzikszai, I would create a transparent table in SE11. For example: This custom table ZTBL_ATTENDANCE. Fields for this will be dates today (Field1) and yesterday (Field2). This table will be updated daily so Field1 value today (sy-datum) will be Field2 value by tomorrow when I update this table again. – Czarinaaaaa29 Dec 12 '17 at 09:32
  • 1
    Not possible. DDIC and dynamics are opposites. – Suncatcher Dec 12 '17 at 10:33
  • 1
    Technically you can do this by creating a batch program that will update the Data Element's Field Labels daily to reflect the current date (most likely with FM `DDIF_DTEL_PUT`), but that is such an incredible kludge and it's a clear sign that you're doing something wrong. In your scenario you need to move to a custom report where you have more freedom to control how data is displayed. – Lilienthal Dec 18 '17 at 09:20

1 Answers1

2

Unfortunately you can't create field texts (for table fields) dynamically in SE11. However when you display the values of the table in your program, there you can use any text you need.

József Szikszai
  • 4,791
  • 3
  • 14
  • 24