Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 974

Re: ALV to Excel Exporting Issue

$
0
0

Hi,

 

I'm not getting the body of the list as  :


As per my understanding, while debugging the point from 'download to file', this part of program(download) will create its own Fcat, if we specify the  'ls_fieldcat-tabname     = fp_tabname." as standard table. So, as your part of code says fieldnames and table name as standard so fcat is prepared as such.


ZbuildCatalog using 'KUNNR' 'VBPA' '10' '8' 'Sold-to Party',

*         ZbuildCatalog using 'NAME1' 'KNA1' '35' '9' 'Sold-to Name',

*         ZbuildCatalog using 'KUNNR' 'VBPA' '10' '10' 'Ship-to Party',

*         ZbuildCatalog using 'NAME1' 'KNA1' '35' '11' 'Ship-to Name',

*         ZbuildCatalog using 'KUNNR' 'VBPA' '10' '12' 'Bill-to Party',

*         ZbuildCatalog using 'NAME1' 'KNA1' '35' '13' 'Bill-to Name',

*         ZbuildCatalog using 'KUNNR' 'VBPA' '10' '14' 'Payer',

As stated by Patrick,these fields are having the same name ,so field name is also same and not picking up the seltext here.(as table name as standard table VBPA and KNA1)

*ls_fieldcat-seltext_m   = fp_seltext_m.-->This is not used

 

Change you fcat as below,it works well,

 

Perform: ZbuildCatalog using 'VBELN' 'IT_FINAL' 'Contract No',

          ZbuildCatalog using 'AUART' 'IT_FINAL' 'DocTy',

          ZbuildCatalog using 'XBLNR' 'IT_FINAL'  'Biller ID',

          ZbuildCatalog using 'ERDAT' 'IT_FINAL'  'Created On',

          ZbuildCatalog using 'BSTNK' 'IT_FINAL'  'Purchase Order No',

          ZbuildCatalog using 'ERNAM' 'IT_FINAL'  'Created By',

          ZbuildCatalog using 'POSNR' 'IT_FINAL'  'Item',

          ZbuildCatalog using 'KUNNR' 'IT_FINAL'  'Sold-to Party',

          ZbuildCatalog using 'NAME1' 'IT_FINAL'  'Sold-to Name',

          ZbuildCatalog using 'KUNSH' 'IT_FINAL'  'Ship-to Party',

          ZbuildCatalog using 'NAME2' 'IT_FINAL'  'Ship-to Name',

          ZbuildCatalog using 'KUNBP' 'IT_FINAL' 'Bill-to Party',

          ZbuildCatalog using 'NAME3' 'IT_FINAL'  'Bill-to Name',

          ZbuildCatalog using 'KUNPY' 'IT_FINAL'  'Payer',

          ZbuildCatalog using 'NAME4' 'IT_FINAL'  'Payer Name',

          ZbuildCatalog using 'UEPOS' 'IT_FINAL'  'HgLvItm',

          ZbuildCatalog using 'MATNR' 'IT_FINAL'  'Material No',

          ZbuildCatalog using 'ARKTX' 'IT_FINAL'  'Material Description',

          ZbuildCatalog using 'VKAUS' 'IT_FINAL'  'Usage',

          ZbuildCatalog using 'ZMENG' 'IT_FINAL'  'Quantity',

          ZbuildCatalog using 'NETWR' 'IT_FINAL'  'Net Value',

          ZbuildCatalog using 'WAERK' 'IT_FINAL'  'Currency',

          ZbuildCatalog using 'ZIEME' 'IT_FINAL'  'Target Quan',

          ZbuildCatalog using 'IHREZ_E' 'IT_FINAL'  'Legacy Biller ID',

          ZbuildCatalog using 'PRSDT' 'IT_FINAL'  'Pricing Dt'.


well as the final column(Pricing Date) has been placed on next line. :


*         ZbuildCatalog using 'ERDAT' 'VBAK' '8' '4' 'Created On',   --> this says output length as 8.but number of characters in 'created on' are '10',may be this difference could be the issue while adjusting the fields, 'price date 'must have place on next line. I tried not passing these , outputlen and colpos ,it works fine.


*ls_fieldcat-outputlen   = fp_outputlen.

*ls_fieldcat-col_pos     = fp_colpos.

 

 

Regards

Pallavi


Viewing all articles
Browse latest Browse all 974

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>