Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Output upload to UNIX depends on the layout variant

Hi All,

I have a requirement. once report output is displayed i need to upload that output to UNIX server and downloadble to PC desktop depend on the layout variant.

If i selected the variant report is displaying only the fields depends on the variant but in UNIX it is downaloading all the fields, my client want to download only the fields depends on the layout variant. Could you please suggest me what i have to follow?

Former Member replied


You will need to get the field catalog, this depends on the ALV version that you are using it will either be a method call or function module REUSE_ALV_FIELDCATALOG_MERGE.

Once you have the field catalog build a dynamic internal table based upon it, something like..

* Create a new Table
  CALL METHOD cl_alv_table_create=>create_dynamic_table
      it_fieldcatalog = IT_LVC_CAT
      ep_table        = new_table.

* Create a new Line with the same structure of the table.
  ASSIGN new_table->* TO <l_table>.
  CREATE DATA new_line LIKE LINE OF <l_table>.
  ASSIGN new_line->* TO <l_line>.

Now populate the new table by moving the corresponding fields from your source table and then output the new table to the file system.


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question