Reg: Field Names in GUI_DOWNLOAD

Hi Sapers,
I want to keep the Field Headings in XLS file.Here I am using the FM GUI_DOWNLOAD, and passing the Tables parameter(i.e, fieldnames) .But my heading is truncated to 10 char.
as the way the FM does.
How can I satisfy my client.Plz help me out.
regards,
sri...

yah, sure.
here is my code, from type-pools....
*---- TYPE-POOLS DECLARATION -*
TYPE-POOLS:truxs.
*---- SELECTION SCREEN BLOCK -*
SELECTION-SCREEN BEGIN OF BLOCK sri. " WITH FRAME TITLE INPUT'.
PARAMETERS   p_bukrs TYPE t001-bukrs OBLIGATORY VALUE CHECK.
PARAMETERS : pperiod(2) TYPE c,
             pyear(4)   TYPE c,
             p_file TYPE rlgrap-filename OBLIGATORY default 'C:\Documents and Settings\srikanth\Desktop\rep1.xls'.
PARAMETERS : csvfile  RADIOBUTTON GROUP rg1,     "factfile RADIOBUTTON GROUP rg1,
             excel    RADIOBUTTON GROUP rg1 default 'X',
             text     RADIOBUTTON GROUP rg1.
SELECTION-SCREEN END OF BLOCK sri.
*---- TYPES DECLARATION -*
TYPES : BEGIN OF ty_faglflext,
          tslvt TYPE faglflext-tslvt,
          tsl01 TYPE faglflext-tsl01,
          tsl02 TYPE faglflext-tsl02,
          tsl03 TYPE faglflext-tsl03,
          tsl04 TYPE faglflext-tsl04,
          tsl05 TYPE faglflext-tsl05,
          tsl06 TYPE faglflext-tsl06,
          tsl07 TYPE faglflext-tsl07,
          tsl08 TYPE faglflext-tsl08,
          tsl09 TYPE faglflext-tsl09,
          tsl10 TYPE faglflext-tsl10,
          tsl11 TYPE faglflext-tsl11,
          tsl12 TYPE faglflext-tsl12,
          zzetbrnum TYPE zetbrmap-zzetbrnum,
        END OF ty_faglflext.
TYPES :BEGIN OF ty_bukrs,
          bukrs TYPE bukrs,
       END OF ty_bukrs.
TYPES :BEGIN OF ty_etbrtot,
          zzetbrnum TYPE zetbrmap-zzetbrnum,
          totamt TYPE tslxx12,
       END OF ty_etbrtot.
TYPES :BEGIN OF ty_currtostr,
         dfld(1) type c,
          zzetbrnum LIKE zetbrmap-zzetbrnum,
          totamt(26) TYPE c,
       END OF ty_currtostr.
TYPES : BEGIN OF ty_csv,
          comma(80) TYPE c,
        END OF ty_csv.
TYPES : BEGIN OF ty_txt,
          hfld(1) TYPE c,
          dfld(1) TYPE c,
          zzetbrnum LIKE zetbrmap-zzetbrnum,
          totamt(26) TYPE c,
          tfld(1) TYPE c,
        END OF ty_txt.
TYPES : BEGIN OF header_record,
          hfld(1) TYPE c,
          filler1(13) TYPE c,
          loc(5) TYPE c,
          filler2(10) TYPE c,
          ppyy(4) TYPE c,
          filler3(47) TYPE c,
        END OF header_record.
TYPES : BEGIN OF detail_record,
          dfld(1) TYPE c,
          gl(4) TYPE c,
          subbacc(5) TYPE c,
          bal(18) TYPE n,
          sign(1) TYPE c,
          filler(4) TYPE c,
          code(2) TYPE c,
          filler1(45) TYPE c,
        END OF detail_record.
TYPES : BEGIN OF trailer_record,
          tfld(1) TYPE c,
          filler(79) TYPE c,
        END OF trailer_record.
*---- DATA DECLARATION -*
*---- Work Area Declaration -*
DATA : wa_infaglflext TYPE ty_faglflext,
       wa_inetbrtot TYPE ty_etbrtot,
       wa_currtostr TYPE ty_currtostr,
       wa_csv TYPE ty_csv,
       wa_txt TYPE ty_txt,
       wa_header_record TYPE header_record,
       wa_detail_record TYPE detail_record,
       wa_trailer_record TYPE trailer_record.
      wa_xls type ty_xls.
*---- Internal Tables Declaration -*
DATA : infaglflext TYPE STANDARD TABLE OF ty_faglflext,
       inetbrtot TYPE STANDARD TABLE OF ty_etbrtot,
       i_currtostr TYPE TABLE OF ty_currtostr,
       i_csv TYPE STANDARD TABLE OF ty_csv,
       i_txt TYPE STANDARD TABLE OF ty_txt.
      i_xls type table of ty_xls.
DATA: BEGIN OF dlpivot OCCURS 1.
          INCLUDE STRUCTURE excelpivot.
DATA: END OF dlpivot.
DATA : t_bukrs TYPE STANDARD TABLE OF ty_bukrs WITH HEADER LINE.
DATA : BEGIN OF infieldnames OCCURS 1,   " Internal Table to Hold Headings in file.
        text(50),
       END OF infieldnames.
*---- Variables -*
DATA : v_temp TYPE tslxx12,
       v_amt TYPE tslxx12.
DATA : v_mon(2) TYPE c,
       v_year(4) TYPE c,
       v_yr(4) TYPE c.
DATA : v_pfile TYPE string.
      p_filetyp type string.
DATA : v_len TYPE i,
       v_ext(4),
       v_exts(4),
       v_fpath TYPE string.
*---- INITIALIZING PARAMETERS -*
INITIALIZATION.
  v_mon   = sy-datum+4(2).
  v_year  = sy-datum+0(4).
  pperiod = v_mon.
  pyear   = v_year.
*---- VALIDATIONS -*
*---- COMPANY CODE VALIDATION -*
AT SELECTION-SCREEN ON p_bukrs.
  SELECT bukrs FROM t001 INTO TABLE t_bukrs WHERE bukrs = p_bukrs. " COMP CODE
  IF sy-subrc NE 0.
    MESSAGE 'enter valid company code' TYPE 'E'.
  ENDIF.
*---- MONTH VALIDATION -*
AT SELECTION-SCREEN ON pperiod.
  IF ( pperiod LT 1 OR pperiod GT 12 ).
    MESSAGE 'Enter valid month ' TYPE 'E'.
  ENDIF.
*---- YEAR VALIDATION -*
AT SELECTION-SCREEN ON pyear.
  v_yr = v_year - 2.
  IF ( pyear GT v_year OR pyear LT  v_yr ).
    MESSAGE 'Enter valid Year(Not less than current minus 2 or Greater than current) ' TYPE 'E'.
  ENDIF.
*---- File Extension Validation -*
AT SELECTION-SCREEN.
  PERFORM get_ext.
  IF ( ( NOT ( excel EQ 'X' AND v_ext EQ '.xls' ) ) and
  ( NOT ( csvfile EQ 'X' AND v_ext EQ '.csv' ) ) and
  ( NOT ( text EQ 'X' AND v_ext EQ '.txt' ) ) ).
    MESSAGE e001(zgmam_msg).   "'choose the correct file format' TYPE 'E'.
  ENDIF.
*---- F4 FUNCTIONALITY FOR FILE PATH -*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
      field_name    = 'P_FILE'
    IMPORTING
      file_name     = p_file.
*---- START-OF-SELECTION -*
START-OF-SELECTION.
  SELECT a~tslvt
         a~tsl01
         a~tsl02
         a~tsl03
         a~tsl04
         a~tsl05
         a~tsl06
         a~tsl07
         a~tsl08
         a~tsl09
         a~tsl10
         a~tsl11
         a~tsl12
         b~zzetbrnum
     INTO TABLE infaglflext
     FROM faglflext AS a
       INNER JOIN zetbrmap AS b
         ON arbukrs = bbukrs  AND
            aracct  = bhkont
     WHERE a~ryear   = pyear.
  IF sy-subrc EQ 0.
    LOOP AT infaglflext INTO wa_infaglflext.
     CLEAR v_amt.
      v_amt = v_amt + wa_infaglflext-tslvt.
      DO pperiod TIMES
        VARYING v_temp
        FROM   wa_infaglflext-tsl01
          NEXT wa_infaglflext-tsl02.
        v_amt = v_amt + v_temp.
      ENDDO.
      wa_inetbrtot-zzetbrnum = wa_infaglflext-zzetbrnum.
      wa_inetbrtot-totamt    = v_amt .
      APPEND wa_inetbrtot TO inetbrtot.
      CLEAR : wa_inetbrtot,
              wa_infaglflext,
              v_amt.
    ENDLOOP.
    PERFORM header.
    IF ( excel EQ 'X' AND v_ext EQ '.xls' ).
      PERFORM download_to_xls.
    ELSE.
      IF ( csvfile EQ 'X' AND v_ext EQ '.csv' ).
        PERFORM download_to_csv.
      ELSE.
        IF ( text EQ 'X' AND v_ext EQ '.txt' ).
          PERFORM download_to_text.
        ENDIF.
      ENDIF.
    ENDIF.
  ELSE.
    WRITE :/ 'NO RECORDS FOUND'.
  ENDIF.
-------------------SUBROUTINES----------------------------------**
*&      Form  download_to_xls
      text
FORM download_to_xls.
*wa_xls-head1 = 'GENERAL LEDGER'.
*wa_xls-head2 = 'AMOUNT'.
*APPEND WA_XLS TO I_CSV.
*CLEAR WA_XLS.
*loop at inetbrtot into wa_inetbrtot.
wa_xls-zzetbrnum = wa_inetbrtot-zzetbrnum.
wa_xls-totamt    = wa_inetbrtot-totamt.
append wa_xls to i_CSV.
clear wa_xls.
*endloop.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
  EXPORTING
    file_name                       = p_file
  CREATE_PIVOT                    = 0
   DATA_SHEET_NAME                 = 'EXCEL'
  PIVOT_SHEET_NAME                = ' '
  PASSWORD                        = ' '
  PASSWORD_OPTION                 = 0
TABLES
   PIVOT_FIELD_TAB                 = dlpivot
   DATA_TAB                        = inetbrtot
   FIELDNAMES                      = infieldnames
EXCEPTIONS
   FILE_NOT_EXIST                  = 1
   FILENAME_EXPECTED               = 2
   COMMUNICATION_ERROR             = 3
   OLE_OBJECT_METHOD_ERROR         = 4
   OLE_OBJECT_PROPERTY_ERROR       = 5
   INVALID_PIVOT_FIELDS            = 6
   DOWNLOAD_PROBLEM                = 7
   OTHERS                          = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
     filename                      = v_pfile
     filetype                      = 'DBF'
     WK1_N_SIZE                    = 15
     WK1_T_SIZE                    = 15
     append                       = 'X'
  CONFIRM_OVERWRITE               = 'X'
   TABLES
     data_tab                      = inetbrtot
     fieldnames                    = infieldnames.
ENDFORM.                    "download_to_xls
*&      Form  download_to_csv
      text
FORM download_to_csv.
  DATA : v_data TYPE string.
  CLEAR wa_inetbrtot.
  LOOP AT inetbrtot INTO wa_inetbrtot.
    v_data = wa_inetbrtot-totamt.
    CONDENSE  v_data NO-GAPS.
    CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
      EXPORTING
        betrg                         = v_data
    WAERS                         = ' '
    NEW_DECIMAL_SEPARATOR         =
    NEW_THOUSANDS_SEPARATOR       =
     IMPORTING
       string                        = wa_currtostr-totamt
    wa_currtostr-zzetbrnum = wa_inetbrtot.
    APPEND wa_currtostr TO i_currtostr.
    CLEAR wa_currtostr.
  ENDLOOP.
  LOOP AT i_currtostr INTO wa_currtostr.
    CONCATENATE wa_currtostr-zzetbrnum
                wa_currtostr-totamt
                INTO wa_csv-comma
                SEPARATED BY ','.
    APPEND wa_csv TO i_csv.
    CLEAR wa_csv.
  ENDLOOP.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                      = v_pfile
   filetype                         = 'ASC'
  WRITE_FIELD_SEPARATOR           = 'X'
    TABLES
      data_tab                      = i_csv
     fieldnames                   = infieldnames.
ENDFORM.                    "download_to_csv
*&      Form  DOWNLOAD_TO_TEXT
      text
-->  p1        text
<--  p2        text
FORM download_to_text. " using p_filetyp type string.
  DATA : BEGIN OF head OCCURS 1,                             " Internal Table to Hold Headings in file.
          text(1) VALUE 'H',
         END OF head.
  DATA : v_data TYPE string.
  CLEAR wa_inetbrtot.
  CLEAR wa_header_record.
  wa_header_record = space.
  wa_header_record-hfld = 'H'.
wa_txt-hfld = 'H'.
  wa_header_record-ppyy+0(2) = pperiod.
  wa_header_record-ppyy2(2) = pyear2(2).
  APPEND wa_header_record TO i_csv.
  APPEND wa_txt TO i_txt.
  CLEAR wa_txt.
  LOOP AT inetbrtot INTO wa_inetbrtot.
    CLEAR wa_detail_record.
    wa_detail_record = space.
    wa_detail_record-dfld = 'D'.
   wa_txt-dfld         = 'D'.
   wa_txt-zzetbrnum    = wa_inetbrtot-zzetbrnum.
    wa_detail_record-bal = '0000000000000000000000'.
   wa_detail_record-bal = wa_
    v_data              = wa_inetbrtot-totamt.
    wa_detail_record-gl = wa_inetbrtot-zzetbrnum.
    CONDENSE  v_data NO-GAPS.
    CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'           "CONVERT ITAB-DATA TO STRING, AS THE ITAB CONTAINS A CURRENCY FIELD.
      EXPORTING
        betrg                         = v_data
    WAERS                           = ' '
    NEW_DECIMAL_SEPARATOR           =
    NEW_THOUSANDS_SEPARATOR         =
     IMPORTING
       string                         = wa_txt-totamt
    wa_detail_record-bal = wa_txt-totamt.
    IF ( wa_inetbrtot-totamt LT 0 ).
      wa_detail_record-sign = '-'.
    ELSE.
      wa_detail_record-sign = ' '.
    ENDIF.
    APPEND wa_detail_record TO i_csv.
    APPEND wa_txt TO i_txt.
    CLEAR wa_txt.
  ENDLOOP.
  wa_trailer_record-tfld = 'T'.
  APPEND wa_trailer_record TO i_csv.
  CLEAR wa_txt.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
  BIN_FILESIZE                      =
     filename                         = v_pfile
     filetype                         = 'DAT'
    append                          = 'X'
     header                         = 'abcd'
     replacement                    = '#'
  WRITE_FIELD_SEPARATOR             = ','
  CONFIRM_OVERWRITE                 = 'X'
    TABLES
      data_tab                        = i_csv
    fieldnames                      = HEAD.
ENDFORM.                    " DOWNLOAD_TO_FILE
*&      Form  header
      text
-->  p1        text
<--  p2        text
FORM header .
  infieldnames-text = 'GeneralLedger Account'.
  APPEND infieldnames.
  CLEAR infieldnames.
  infieldnames-text = 'Amount'.
  APPEND infieldnames.
  CLEAR infieldnames.
ENDFORM.                    "header
*&      Form  get_ext
      text
FORM get_ext.
  v_pfile = p_file.
  v_len   = STRLEN( v_pfile ).
  v_len   = v_len - 4.
  v_ext   = v_pfile+v_len(4).
ENDFORM.                    "get_ext
Message was edited by:
        srikanth vadlamani

Similar Messages

  • Not able to download the field names in GUI_DOWNLOAD(very urgent)

    Hi All,
    I am downloading the file contents to the presentation server.i am able to get the file contents proeprly but not able to download the field names into text file.
    Can anybody please help me in this issue..? its very urgent. Valuable answers will be rewarded.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = w_filename
          filetype                = 'DAT'
         write_field_seperator   = c_x
          col_select              = c_x
          COL_SELECT_MASK         = t_mask
        TABLES
          data_tab                = t_tab
          fieldnames              = t_colnames
        EXCEPTIONS
    Thanks & Regards,
    Satish.

    Hi,
    I have tried in both ways its not working.
    while a ran the program it is going to the dump.
    I am working in mySAP ECC6.0
    Can pl you suggest other way..
    Thanks & Regards,
    Satish.

  • HOW TO KEEP FIELD NAMES IN GUI_DOWNLOAD

    Hai,
    can u answer this.

    HI ravi,
    pass all the column names in an internal table and pass the internal table in the field names parameter of the FIELDNAMES of tables parameters..
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
    FIELDNAMES                      = it_fieldnames
    PLS CHECK THE SIMPLE CODE BELOW...
    data: begin OF itab occurs 0,
          matnr like mara-matnr,
          end of itab.
          data : begin of it_fieldnames occurs 0,
                 name(100),
                 end of it_fieldnames.
      it_fieldnames-name = 'MATNR'.
      APPEND IT_FIELDNAMES.
    select matnr from mara into table itab UP TO 10 ROWS.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'C:\Documents and Settings\sampath\Desktop\flatfile.txt'
        FILETYPE                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
       FIELDNAMES                      = IT_FIELDNAMES
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    hope this helps u a bit,
    all the best,
    regards,
    sampath
    mark helpful answers
    Message was edited by:
            sampath pilla

  • Reg: field names in FI module

    Hi to all,
        I need to generate report.. but i have to maintain input fields like company code , fiscal year & period.
    which fields i have to take to required input.  Table name & field names please let me know,,,
    I am waiting for your response....
    Thanks in advance.........................
    Regards,
    Vinay
    Moderator Message: Do your own work. You have already been warned once today. Please read the Rules of this forum to avoid getting into trouble.
    Edited by: kishan P on Apr 5, 2011 11:35 AM

    Hi to all,
        I need to generate report.. but i have to maintain input fields like company code , fiscal year & period.
    which fields i have to take to required input.  Table name & field names please let me know,,,
    I am waiting for your response....
    Thanks in advance.........................
    Regards,
    Vinay
    Moderator Message: Do your own work. You have already been warned once today. Please read the Rules of this forum to avoid getting into trouble.
    Edited by: kishan P on Apr 5, 2011 11:35 AM

  • Reg: field names of an Internal table

    Hi all,
    I'd like to display all the field names of the internal table or a structure.
    I want it very urgent.
    Use ful answers will be awarded greatly.
    Thanks in advance.
    Jagan Mohan.

    Hi Jagan,
      Use the below code.
    TYPE-POOLS: SYDES.
    DATA: TD TYPE SYDES_DESC.
    DATA: BEGIN OF WA OCCURS 0,
           CONTINUE     TYPE C,
           NAME(15)     TYPE C,
          END OF WA.
    TYPES:BEGIN OF STR1,
            NUM(3) TYPE N,
            NAME(20) TYPE C,
          END OF STR1.
    *DATA: ITAB LIKE T247 OCCURS 0 WITH HEADER LINE.
    *DATA: ITAB TYPE STR1 OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF ITAB OCCURS 0,
           NUM(3) TYPE N,
           NAME(20) TYPE C,
          END OF ITAB.
    DESCRIBE FIELD ITAB INTO TD.
    WA[] = TD-NAMES[].
    LOOP AT WA.
      IF WA-NAME = SY-REPID.
        DELETE WA.
        CONTINUE.
      ENDIF.
      SEARCH WA-NAME FOR '-'.
      IF SY-SUBRC = 0.
        DELETE WA.
        CONTINUE.
      ENDIF.
      SEARCH WA-NAME FOR '='.
      IF SY-SUBRC = 0.
        DELETE WA.
        CONTINUE.
      ENDIF.
    ENDLOOP.
    LOOP AT WA.
      WRITE: / WA-NAME.
    ENDLOOP.

  • Reg : field name

    Hi ,
               I would like to know the field name for " scheduled for delivery quantity" .
    Please help me out as it is an urjent requirement.
    Thanks,
    Usha.
    Edited by: Usha Rani Achana on Mar 5, 2010 1:53 PM

    Hi,
    Thanks for your reply.
    Actually , I dont know the transaction too.
    We had a requirement to fetch material If current stock (  MARD-LABST )minus scheduled for delivery  < total open sales order quantity ( VBEP-WMENG)
    For developing logic for this, I need the field name for scheduled for delivery  .

  • Reg:field and table name

    Hi Guys,
    I am developing one report for knowing the recognised amount ,but i am not able to get the field and table name .In system it is showing that VBRAV51HD:RVAMT_REAL_G.But this is a structure,how to get a field name for recognised amount.Please help.
    Thanks & Regards,
    Sash.

    Hi sash,
    I think u need to some R n D upon it. First take the structure and open it in SE11. Then try to find out what all tables does the structure comprises of. Then try finding the relevant fieldname of the table( which is also existent in the structure) getting accessed when the field is triggered. That may solve your problem. try finding the objective of your structure being shown.
    Abhijit

  • Reg:FCC to ignore the last field name

    Hi...
       I am using FCC in the reciver file adapter.
    the output structure is like
    94,ESSAR,,,,,,,D,0000100226,10000,12/13/1 KURLA EAST,MUMBAI,,400025,006398765432,,2009-03-24 00:00:00.0,0000100226,20202789,,,,SUCCESS,,
    /home/corpuser/Disbursement/DD
    I am achieving the above structure. But in that i dont want the last field name "/home/corpuser/Disbursement/DD".
    Can you please tell how to ignore the last field name in the receiver file adapter using FCC.
    Thanks & Regards,
    Leela

    94,ESSAR,,,,,,,D,0000100226,10000,12/13/1 KURLA EAST,MUMBAI,,400025,006398765432,,2009-03-24 00:00:00.0,0000100226,20202789,,,,SUCCESS,,
    /home/corpuser/Disbursement/DD
    I am achieving the above structure. But in that i dont want the last field name "/home/corpuser/Disbursement/DD".
    Can you please tell how to ignore the last field name in the receiver file adapter using FCC.
    Completely with Jai on that.
    Dont do that mapping itself. Handle such conditions in your mapping.
    Is there any specific reason why you can do so?

  • Reg. Field names in ejb-jar.xml (EJB CMP)

    Hi,
    I am using WAS 5.1 and EJB CMP 2.0.
    I got a error while dealing with the database i.e ORACLE 8.The Scenario in detail,
    I had a table X with filed names 'help' and 'sequence'. When i am generating Jar file using 'ejbdeploy', the name of the field names in Table.ddl changing automatically to 'help1' and 'sequence1'. Due to this i am not able to access data from database.
    Why field names are changing? Are they keywords ? con't we have field names with the above names? If they are keywords tell me the document which contains these details?
    Thanks in Advance.

    According to the ejb-jar.xml dtd ejb-name, ejb-class, persistence-type, prim-key-class, reentrant are the required elements for an entity bean.
    <!ELEMENT entity (description?, display-name?, small-icon?,
              large-icon?, ejb-name, home?, remote?, local-home?,
              local?, ejb-class, persistence-type, prim-key-class,
              reentrant, cmp-version?, abstract-schema-name?,
              cmp-field*, primkey-field?, env-entry*, ejb-ref*,
              ejb-local-ref*, security-role-ref*, security-identity?,
              resource-ref*, resource-env-ref*, query*)>

  • Field names are not coming in file when dloaded frm apserv to prserv

    Here i'm dloading data to Appserver..frm there data is dloading to pre server..but fieldnames are downloading...i am working in 4.6c version.same code is working in ECC version...Plzz give me a suggestion...
    FORM dload_file_from_server  USING     p_srfname            "#EC *
                                           p_fname              "#EC *
                                           p_psfile             "#EC *
                                           p_flag.
      DATA: lv_fname TYPE string.
      CASE p_flag.
        WHEN 'MSEG'.
          ASSIGN it_fn TO <fn>.
          ASSIGN wa_fn TO <fn_wa>.
          ASSIGN it1_mseg TO <fs>.
          ASSIGN wa1_mseg TO <fs_wa>.
          ASSIGN p_srfname TO <fs_fname>.
          CONCATENATE p_psfile p_fname INTO lv_fname SEPARATED BY '\'.
        WHEN 'MKPF'.
          ASSIGN it_fn TO <fn>.
          ASSIGN wa_fn TO <fn_wa>.
          ASSIGN it1_mkpf TO <fs>.
          ASSIGN wa1_mkpf TO <fs_wa>.
          ASSIGN p_srfname TO <fs_fname>.
          CONCATENATE p_psfile p_fname INTO lv_fname SEPARATED BY '\'.
         WHEN OTHERS.
      ENDCASE.
      OPEN DATASET <fs_fname> FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      READ DATASET  <fs_fname> INTO <fn_wa>.
      APPEND <fn_wa> TO <fn>.
      DO.
        IF sy-tabix GE 1.
          READ DATASET <fs_fname> INTO <fs_wa>.
          IF sy-subrc = 0.
            APPEND <fs_wa> TO <fs>.
          ELSE.
            EXIT.
          ENDIF.
        ENDIF.
      ENDDO.
      CLOSE DATASET <fs_fname>.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                  = lv_fname
          filetype                  = 'ASC'
          trunc_trailing_blanks     = 'X'
          trunc_trailing_blanks_eol = 'X'
        TABLES
          data_tab                  = <fs>
          fieldnames                = <fn>.
      IF sy-subrc <> 0.                                         "#EC
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR: <fn>, <fn_wa>.
    ENDFORM.                    " dload_file_from_server
    Please use code tags - it makes your code easier to read
    Edited by: Rob Burbank on Dec 6, 2010 4:00 PM

    Hi,
        I think for 4.6 C <fn> must be declared as an internal table and the field names should be given as records and not as one single record.
       the fieldnames internal table should contain records as :
       Field1
       Field2 ....  and not as Field1 Field2 ....
    Regards,
    Srini.

  • Inserting Field Names as Header while downloading the file

    Hi,
    I am downloading one file using CALL METHOD cl_gui_frontend_services=>gui_download and wanted to add field names as header while downloading.I have the filed names in one internal table and have written the code as follows:
       LOOP AT gt_import INTO gw_import.
          gw_fldname-field_name = gw_import-field_name.
          APPEND gw_fldname TO gt_fldname.
        ENDLOOP.
    Here gt_fldname has the field names.
          l_descr_ref ?= cl_abap_typedescr=>describe_by_data( gt_fldname ).
          CLEAR : l_counter.
          LOOP AT l_descr_ref->components[] ASSIGNING <lfs_comp_wa>.
            l_counter = l_counter + 1.
            ASSIGN COMPONENT sy-index OF STRUCTURE gt_fldname TO <lfs_comp>.
            IF sy-subrc = 0.
              <lfs_comp> = <lfs_comp_wa>-name.
            ENDIF.
          ENDLOOP.
       CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = pdir1
            filetype                = text-038
            append                  = ''
            write_field_separator   = 'X'
          CHANGING
            data_tab                = <lfs_comp>
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
            unknown_error           = 6
            header_not_allowed      = 7
            separator_not_allowed   = 8
            filesize_not_allowed    = 9
            header_too_long         = 10
            dp_error_create         = 11
            dp_error_send           = 12
            dp_error_write          = 13
            unknown_dp_error        = 14
            access_denied           = 15
            dp_out_of_memory        = 16
            disk_full               = 17
            dp_timeout              = 18
            file_not_found          = 19
            dataprovider_exception  = 20
            control_flush_error     = 21
            not_supported_by_gui    = 22
            error_no_gui            = 23
            OTHERS                  = 24.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = pdir1
            filetype                = text-038
            append                  = 'X'
            write_field_separator   = 'X'
          CHANGING
            data_tab                = <gfs_table1>
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
            unknown_error           = 6
            header_not_allowed      = 7
            separator_not_allowed   = 8
            filesize_not_allowed    = 9
            header_too_long         = 10
            dp_error_create         = 11
            dp_error_send           = 12
            dp_error_write          = 13
            unknown_dp_error        = 14
            access_denied           = 15
            dp_out_of_memory        = 16
            disk_full               = 17
            dp_timeout              = 18
            file_not_found          = 19
            dataprovider_exception  = 20
            control_flush_error     = 21
            not_supported_by_gui    = 22
            error_no_gui            = 23
            OTHERS                  = 24.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
    But it goes to dump at       l_descr_ref ?= cl_abap_typedescr=>describe_by_data( gt_fldname ) where I am trying to make the filed names horizontal.
    Can anyone help on this?

    The issue has been resolved after writting:
          l_ref_table ?= cl_abap_tabledescr=>describe_by_data( gt_fldname ).
          l_descr_ref ?= l_ref_table->get_table_line_type( ).
    Thanks.

  • What are the field names for below mentioned

    Hello Friends
    What are the fields names for below tables
    in EKKO
    Purchase Document Date
    Net Value of the purchase document.
    In EKPO
    Item Description
    From which place We bought it. (It means in Sales Items there we can know from which plant we sold the goods, like in EKPO, there is any field like this)
    Please let we are defining the report to find out the stock availability for perticular storage location using select Options plant, company code, material no.
    How many tables involve her to build this report. and also field names, they come under which table.
    Please send me this information ASAP. PLz Plz Plz..........
    Regards
    Praveen

    You can check the fields of these tables via SE11
    Purchase Document Date  -  EKKO-BEDAT
    Item Description  -  EKPO-TXZ01
    Net price per item - EKPO-NETPR.
    Regards,
    Rich Heilman

  • Capture field name in table control on double click

    Hi,
    How can I capture the field name of internal table passed to table control on double click?
    I have set function code as 'PICK' and applied 'Respond to double click' and used GET CURSOR statement. Here I can get the values like row number (line number), field value also. But I would like to capture on which field the cursor is (or on which column the cursor is)?
    Thanks in advance.
    Regards
    Ramesh.

    Got it.
    We can capture it by using the statement GET CURSOR only.
    GET CURSOR field <field xx> .
    Here the <field xx> is the field name where we have said double click.

  • Field names Missing in the (Excel) Mail attachment

    Hi ,
    I am trying to send my ALV Grid Output as Excel Email attachment using the below code
    The problem is that the field names are missing in the receivers Mail.
    i.e
    *Name*   *Emp Code*   * Branch*         "this is missing
    abc         123                 ukp
    I searched many threads but unable to find the solution for this.
    Kindly suggest me regarding this issue.
    loop at p_eadd.
        if p_eadd-low <> space.
          clear reclist.
          reclist-rec_type = 'U'.  "Internet-adress
          reclist-receiver = p_eadd-low.
          reclist-express = 'X'.
          append reclist.
        endif.
      endloop.
    * endif.
    * Send the document
      call function 'SO_NEW_DOCUMENT_SEND_API1'
         exporting
              document_type              = 'RAW'
              document_data              = doc_chng
    *         PUT_IN_OUTBOX              = 'X'
         tables
              object_content             = objcont
              receivers                  = reclist
         exceptions
              too_many_receivers         = 1
              document_not_sent          = 2
              operation_no_authorization = 4
              others                     = 99.
      ld_aplstat = '4'.
      case sy-subrc.
        when 0.
          loop at reclist.
            if reclist-receiver = space.
              name = reclist-rec_id.
            else.
              name = reclist-receiver.
            endif.
            if reclist-retrn_code = 0.
              write: / name, ': succesfully sent'.
            else.
              write: / name, ': error occured'.
            endif.
          endloop.
          ld_aplstat = '0'.
        when 1.
          write: / 'Too many receivers specified !'.
        when 2.
          write: / 'No receiver got the document !'.
        when 4.
          write: / 'Missing send authority !'.
        when others.
          write: / 'Unexpected error occured !'.
      endcase.
    *.Tell workflow to go on
      clear ls_scma_event.
      ls_scma_event-wf_event = cs_wf_events-finished.
      ls_scma_event-wf_witem = wf_witem.
      ls_scma_event-wf_okey  = wf_okey.
      call function 'KPEP_MONI_CLOSE_RECORD'
        exporting
          ls_key        = gs_key
          ls_scma_event = ls_scma_event
        changing
          ld_aplstat    = ld_aplstat
        exceptions
          no_id_given   = 1
          others        = 2.
    call function 'SAP_CONVERT_TO_XLS_FORMAT'
          exporting
           i_field_seperator          = ' '
           i_line_header              = 'X'
            i_filename                 = p_file
    *   I_APPL_KEEP                = ' '
          tables
            i_tab_sap_data             = it_final
    * CHANGING
    *   I_TAB_CONVERTED_DATA       =
         exceptions
           conversion_failed          = 1
    *   OTHERS                     = 2
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    Thanks in Advance,
    Mr. Ben

    Hi Ben,
    Follow the code below....
    Your internal table it_final will have the attachment data. After you got the attachment data do the following
    gc_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    lt_attachment        TYPE TABLE OF  solisti1 ,
    gt_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0 WITH HEADER LINE,
      CLEAR:gs_attach.                      <this will have your attachment, declare a structure which contains fields of your  excel sheet>
    <before this you have to copy all the fields from your final internal table which should be attached to email to gs_attach>
    For attaching field names
        CONCATENATE gc_ret gs_attach INTO gs_attach.
        gs_attach = gs_attach+1.
        APPEND gs_attach TO gt_attach.
    CLEAR:lt_attachment.
          lt_attachment[] = gt_attach[].
    SORT  lt_attachment .
          DELETE ADJACENT DUPLICATES FROM lt_attachment COMPARING ALL FIELDS.
          CLEAR gs_attach.
          CONCATENATE <field names >
          INTO gs_attach SEPARATED BY gc_tab.
          INSERT gs_attach INTO lt_attachment INDEX 1.
    <field addition ends>
    call function 'SO_NEW_DOCUMENT_SEND_API1'
         exporting
              document_type              = 'RAW'
              document_data              = doc_chng
            PUT_IN_OUTBOX              = 'X'
         tables
              object_content             = objcont
              receivers                  = reclist
            contents_bin               = lt_attachment
         exceptions
              too_many_receivers         = 1
              document_not_sent          = 2
              operation_no_authorization = 4
        if sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    Regards,
    Aravind.

  • Unable to get Field Names from Archived File

    Hi All,
    We have a ECC 6 Ehp4 system. When i retrieve Idocs archived using SARA, the data only contains application data. There is no field names available - eg: posting date, tax code etc. Please find below the background on this issue.
    I configured archiving of process idocs (status 52,12,03) from EDIDC tables. I set up the settings for Archive Object IDOC and archived the data for 15 days.
    Both archiving and deletion of data from the table was successful.
    I tried reading the Idoc data from Archive File using the Information System option -> Info structure (available as default for Idoc).
    But the data retrieved only shows the Application data for all the segments of the IDoc. The fields for the segments like Tax Code, Posting Date etc are not available in the data. Functional teams will not be able to make sense with just the application data.
    Am I missing some setting? Is there any way to retrieve the related field values also ?
    Please help.
    Thanks and Regards,
    Raghavan

    Hi All,
    There is tcode WE10. You could choose if the data source is archive and also the archive session. You will get the list of segments provided. click on the segment number and you will get the data.
    Thanks and Regards,
    Raghavan

Maybe you are looking for

  • Synchronous Inbound Proxy: Request Responce Type

    Hi, I am new to ABAP and i have to work on a inbound proxy which is synchronous ie a request-responce scenario has to be implemented. Can some one guide me how to initiate. Regards, vickey Any replys will be highly appreciated and rewarded.

  • IBook Video Chip not working

    I have read about this issue before, and I know it is a major problem with this model iBook. When I turn on my iBook nothing shows on the display, just sound, and when it does work, there is just a fuzzy picture. Pressing on the area where the video

  • Ipod freezing computer when I connect it

    hello. My Ipod worked fine ever since I got it one week ago however two days ago each time I connect it to the computer to charge it freezes my computer. Is there any way to correct this?

  • I accidentally deleted my 'address bar' not sure the proper term

    But the thing where you type the name of the website you want to view., How do I get it back? Thanks!

  • Anti virus's and home button problem

    Hi 1)i want to We Need antiviruse in My iPhone 5s ? 2)how to understand my iPhone when produce??? Due to home button problem . Thanks