Need a Function Module

Hi All,
I am using 'GUI_DOWNLOAD' to download excel file.
In this case if any field having leading zeros it is removed.I want any option in this FM which will retain the leading zeros or any other FM which will do the same.
Regards,
Jeetu

Hi Jeetu,
  I just worked on this & found that if you append '' in front of the field with leading zeros,you will get them in the downloaded excel.
data: begin of itab occurs 0,
       test(10),
      end of itab.
    itab-test = '''000120'.
    append itab.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'C:/FILE.XLS'
       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                      =
     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.

Similar Messages

  • Need a function module to create production order with reference

    Hi
    I need a function module to create a production order with reference to an existing order. There is no BAPI available for SAP 4.7 release. I found that the function module CO_ZF_PRODUCTIONORDER_CREATE does not create with reference to an existing order.
    Any help will be rewarded.
    Pavan

    Dear Pavan,
    Unfortunately there is no FM for this..
    Cheers
    Nitesh

  • Need a function module to convert xstring to string in web dynpro applicati

    hi,
       need a function module to convert xstring to string in web dynpro application other than HR_KR_XSTRING_TO_STRING.
    Moderator message: please (re)search yourself first.
    Edited by: Thomas Zloch on Nov 17, 2010 5:31 PM

    Hi,
    Check the following link:
    FM to convert XString to String
    Regards,
    Bhaskar

  • Need BAPI function module to change routing (CA12 Tcode)

    Hi Freinds,
       i have bapi function module to create bapi_routing_create,
       but i need bapi function module  to ROUTE CHANGE.
    tcode is ca12
       pls help me out .....it's urgent to me
    mail to me :[email protected]
    regards
    madhu

    Thanks Jitendra,
    I have tried to use it but I am not able to obtain a good result. I have set values for PLKO_DI_TAB and MAPL_DI_TAB, but it does not work…
    What is missing?

  • Need a Function Module for fetching the prior date-Urgent!!

    Hi All,
         I need a function module which will give the prior date with respect to the no: of days days that are entered as input.
    Can anyone please help me to fing one function module which acts as the above.
    Required very urgently!!!
    Thanks and Regards,
        Neethu

    Hi Neethu,
    Please run the report 'ZRECTIFY_FM_DOCUMENTS' in your system.
    Before running the report, create the following selection texts for the parameters/select-options as given below:
    P_BUKRS:  Company code
    S_GJAHR:  Fiscal year
    S_BELNR:  FI document no.
    P_TEST:   Test run
    For More information please refer <b>SAP Note: 309619</b>
    Best Regards,
    Johnny.

  • I need a function module for processing idoc

    i need a function module that can be used for processing of idocs. The name of the fm should be Z_AS4_IDOC_INPUT_SHPMNT you should create functiongroup ZAS4 as copy of group ZS40. The functionmodule should be build on the basis of Z_S_IDOC_INPUT_ZSDELV.
    Messagetype: ZASHPMNT
    Idoctype: SHPMNT05
    Partner: ASSIST
    The purpose is  to check the delivery number in Segment E1EDL20, to find the invoice in the documentflow and to select an message record of this invoice in tha table nast.
    plz help..
    <THREAD LOCKED. This is a forum for solving problems, not for getting other people to do your work. Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting any further questions.>
    Edited by: Mike Pokraka on Oct 15, 2008 4:13 PM

    great work done in copy /paste all your functional requirement here.
    Now search and get a primer on ALE / IDOCs processing and start from there

  • Need a function module for fetching description of fields in a table

    Hi experts,
    I have a requirement where i need to fetch the descriptions of all the fields of a given database table.
    I am looking for a function module that gives the descriptions of a field. Please suggest a way.
    Points will be rewarded.
    Thanks in advance.

    Use FM DDIF_FIELDINFO_GET to get information about a field. Pass table name and Fieldname.
    Use FM DDIF_FIELDLABEL_GET if you need only the field label.
    Use FM DDIF_TABL_GET for getting information of all fields of a particular table.
    Regards,
    Lakshmi.
    Edited by: Santhanalakshmi V on Jun 11, 2008 5:26 PM

  • I need a Functional module to get the header material from the component .

    Dear Guru's
    Please help me .
    I need a name of the Functional module to get the header material from the component .
    As in if I put the Component in the Input I should get ALL the Main header materials using this Component.
    Regards,
    Roshan Lilaram Wadhwani.

    This was not answered

  • Need a function module to read some std. fields in service process in CIC

    Hi All,
        Process is -
    > user creating service process doc. in/from CIC (win client). SAP CRM 3.1 Version.
    Under service document's interaction record there are few fields (category, priority, reason, status, result). Using FM: crm_order_read, am able to read/find category, priority & status. But am not able to read/find reason & result. Can you please help me for this which function module i need to use. Or is there any other method is there to find out.
    Sunil

    Hi Sunil,
    You would find the reason data in ET_SERVICE_OS output parameter of CRM_ORDER_READ.
    Go to ET_SERVICE_OS ->OSSET ->SUBJECT-> CODEGRUPPE, CODE, KURZTEXT, CODETEXT.
    Hope this helps!
    Regards,
    Saumya

  • Need a function module to create a Vendor

    Hi Experts,
    I am wondering if there is a RFC enabled function module to create vendor in background?
    My current situation is that I need to create a function module or Identify one standard SAP function module. I have gone through some of the threads on BAPI_VENDOR_CREATE and VENDOR_INSERT or VENDOR_UPDATE, as well as the batch program ( RFBIKR00 ).
    BAPI_VENDOR_CREATE - <b>RFC enabled but it is an online creation that requires user interaction</b>
    VENDOR_INSERT & VENDOR_UPDATE - <b>Not RFC enabled FM</b>
    RFBIKR00 - <b>is a batch program and could not be called using RFC</b>
    I need to be able to trigger a function  module from the HR system. Has anyone done something similar?
    Please help. Points will be awarded.
    Thanks and best regards,
    Yap Thung Yuen
    Message was edited by:
            Thung Yuen Yap

    Hi,
    If there is no option then you can copy the FM VENDOR_INSERT & VENDOR_UPDATE into Z FM's  and make the RFC enable.
    Hope this helps.
    Regards,
    Shahu

  • I need the function module name

    i got the requirement to post data to FBS1 FB01 FBV1 transaction before posting the data to transaction i need to check the data in the iternal table for validity . this can be hadled by function modules or bapi
    if any now the name please reply

    hi  santaliestra.
    XBLNR(16) TYPE C,                  " Reference
    BLDAT(10) TYPE C,                  " Document date
    BUDAT(10) TYPE C,                  " Posting date
    BKTXT(25) TYPE C,                  " Short text
    BLART(2)  TYPE C,                  " Document type
    WAERS(5)  TYPE C,                  " Currency
    BUKRH(4)  TYPE C,                  " Company code in Header
        STODT(10) TYPE C,                  " Reversal date
        STGRD(2)  TYPE C,                  " Reason
        BUKRS(4)  TYPE C,                  " Company code
        GSBER(4)  TYPE C,                  " Business area
        HKONT(10) TYPE C,                  " Account number
        KOSTL(10) TYPE C,                  " Cost center
        AUFNR(12) TYPE C,                  " Order number
        PROJK(8)  TYPE C,                  " Wbs
        NPLNR(12) TYPE C,                  " Network
        VORNR(4)  TYPE C,                  " Network activity
        PRCTR(10) TYPE C,                  " Profit center
        ZUONR(18) TYPE C,                  " Assignment number
        PERNR(8)  TYPE C,                  " Personnel number
        VBUND(6)  TYPE C,                  " Trading parnter
        WRBTR(13) TYPE C,                  " Amount
        DMBTR(13) TYPE C,                  " Amount
        MWSKZ(2)  TYPE C,                  " Tax code
        SGTXT(50) TYPE C,                  " Item text
        MATNR(18) TYPE C,                  " Material
        LZBKZ(3)  TYPE C,                  " Bank indicator
        LANDL(3)  TYPE C,                  " Supplying country
        WWCNT(3)  TYPE C,                  " Ship to country
        WWPRL(2)  TYPE C,                  " Product line
        WWPG1(5)  TYPE C,                  " Product group
        WERKS(4)  TYPE C,                  " Plant
        BZIRK(6)  TYPE C,                  " Sales district
        BATR2(3)  TYPE C,                  " Bus. Attr 2
        WWPL4(11) TYPE C,                  " Product level 4
        WWPL5(14) TYPE C,                  " Product level 5
        PRODT(18) TYPE C,                  " Product
        KNDNR(10) TYPE C,                  " Customer
        VKORG(4)  TYPE C,                  " Sales org.
        VTWEG(2)  TYPE C,                  " Distribution channel
        SPART(2)  TYPE C,                  " Division
        VKBUR(4)  TYPE C,                  " Sales office
        INDUS(4)  TYPE C,                  " Industry
        CSGRP(2)  TYPE C,                  " Customer group
        MTNR1(18) TYPE C,                  " Material
        VKGRP(3)  TYPE C,                  " Sales group
        BATR1(18) TYPE C,                  " Bus. Attr 1
        WWPL3(8)  TYPE C,                  " Product level 3
        FKART(4)  TYPE C,                  " Billing type
        MGENT(8)  TYPE C,                  " Management entity
        WWPL6(18) TYPE C,                  " Product level 6
    for these fields i need to check for validity .

  • Urgent ...Need for  function module name.

    I have a requirement to print label using smartforms,in transaction VL02N.In which i need to get the name1(ship to information) information at run time as the
    user can change the Address in Stock transport order (most likely) or at the Delivery at the run time. We need to find a function module that reads the run time structure data (VTTPVB\name1) and gives us the data.
    Any pointers on this regards would be helpful
    With Thanks and Regards
    Arun T
    [email protected]

    Hi Sap Surfer,  
    VTTK and VTTP are the delivery tables here all the details with respect to delivery is stored and retrieved.
    To get the name1 and address fields the partner function plays a vital role and thus you can achieve this from VBPA.
    By selecting the correct partner function the right information can be retrieved.
    The structure contains data only during the transaction or the transaction programs run thus it is not advisible to get data from that so data is usually fetched from Tables.
    Hope this solves your query.
    Reward Points if useful.
    Thanks,
    Tej..

  • Need a functional module to compute the invoice balance

    Hi,
    I need to know if there is a functional module which we can use to compute the invoice balance by deducting the credit notes and the payments.

    This was not answered

  • Example needed for function module

    kindly provide me an example for function module & let me how to use this function in a report program..Thnaks in advance..

    Hi,
    GO to Tcode SE80.Create fucntion group.Name should start with z or y.
    GO to Tcode SE37.Create function module.Assign it to function group created above.Name should start with z or y.
    In change mode,you can top include.This is the place you should put the declarations.
    In F01,you need to write the form and U01 you should write the main program.Best way is to take any function module(z*) and follow it.
    There are 3 types of fm.
    1.Normal fm
    2.RFC enabled
    3.Update task.
    Check this link for RFC.
    http://help.sap.com/saphelp_47x200/helpdata/en/22/0425f2488911d189490000e829fbbd/frameset.htm

  • Need a Function Module for Week Calculation

    Dear Experts,
      I want a function module which calculate the week number.
      Suppose for date 04.05.2010
      week is 19...........
       i want to fetch through function module.
    i have already tried function module like GET_WEEK_INFO_BASED_ON_DATE & DATE_GET_WEEK
      throgh both function module output is come out is 18.
      but i need 19.
      when i pass 02.01.2010
    then it giving 53 week of 2009.
    plz. help me as soon as possible.
    Thanks,

    Jan 2 2010 was indeed 53rd week of 2009, so SAP FMs are returning right value. I would strongly recommend to consult your functional consultant before assuming Jan1 2010 as week 1 of 2010.
    [quote from wikipedia|http://en.wikipedia.org/wiki/ISO_8601#Week_dates]
    'If 1 January is on a Monday, Tuesday, Wednesday or Thursday, it is in week 01. If 1 January is on a Friday, Saturday or Sunday, it is in week 52 or 53 of the previous year (there is no week 00). 28 December is always in the last week of its year.'
    Regards,
    Pawan.
    Edited by: Pawan Kesari on May 4, 2010 4:56 PM

  • Need SMD function module for business partner in SRM

    Hi Gurus,
    I am looking for standard Master Idoc create SMD function module for business partner in SRM.
    I need to send an Idoc from SRM to ECC based on change pointers i.e. whenever a business partner is changed in SRM. So there are standard function modules *smd* available for other data but i am not able to find any FM for busienss partner.
    Please suggest if anyone has came accross such scenario.
    Thanks,
    Ravindra

    Got it

Maybe you are looking for

  • Is there a way to use EXIF information from images in Muse?

    I use Lightroom to manage my images. In Lightroom, I enter Caption metadata. (In the Lightroom Library, I enter data in the Caption field of the Metadata section.) Now I'd like use that Caption data to create an ALT tag in Muse. Is there any way to d

  • Adobe InDesign Quitting on Start Up

    I recently purchased a 17" MacBook Pro, and while the other applications of my version of Adobe CS3 (Illustrator, Photoshop, etc.) work fine, InDesign simply crashes on start up. It works fine on my two-year old iMac. I appreciate it's third party so

  • Missing fonts in FrameMaker 9 even after installing Adobe Type Manager

    Hi, We are using Formata family fonts in our templates. We import the templates and don't see the font family. We then installed the Adobe Type Manager and tried reimporting the template. No results. We then edited the makers.ini file and added the F

  • Sender service to an ALE logical system

    Hi, I have a question. I am getting an error "Unable to convert sender service to an ALE logical system". Please help! Thank you. regards, Karun.M

  • About IDOC s processing

    Hi, Can any send me sample code , How Idoc s are processed in SE38. If you have any sample code please let me know that. Regards, Prasad