Function Modules for uploading the file

Hi experts ,
                  I have a requirement to download a file (csv) from my local sytem (say desktop) into an internal table first and then update the contents of the same internal table into the database table.
Can anybody provide me with a sample program for doing the same or at least the name of function modules for the same.
Prompt replies will be rewarded.
TIA
Abhishek

Hi Abhishek,
How to use INSERT Statement..
Check this Sample Program..
TABLES:MARA.
DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
ITAB-MATNR = '123ABCDA'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
ITAB-MATNR = '123ABCDB'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
LOOP AT ITAB.
INSERT MARA FROM ITAB.
MODIFY MARA .
ENDLOOP.

Similar Messages

  • Function Module For Upload the Powerpoint Template in Webdynpro ABAP

    Hi,
      Can anyone tell me, is there any standard function module to upload the Powerpoint Template to Webdynpro ABAP.
    Regards,
    Saran

    Hello Saran,
    for uploading the powerpoint as file you could use the FileUpload ui element.
    Best regards,
    Thomas

  • Function module to choose the file for download and upload

    what is the function module to choose the file for download and upload  for presentation server.
    give me with example

    Please search in SCN.
    This has been discussed so many times.

  • Function module for transfering a file contents into another?

    Hi all,
       Is there a Function module for transfering a file contents into another?That is the whole content from a file to other??
    Regards,
    Shashank.

    Hi,
    I think there is no such FM. You need to read the data in internal table and then write it in another file.
    Regards,
    Atish

  • Function module for displaying the location

    Hi,
          Could anyone tell  the Function module for displaying the location in our system  without a  file name while downloading, when the user press f4.
    thanks

    * read the default pathname on application server
      call function 'FILE_GET_NAME'
           exporting
    *           CLIENT                  = SY-MANDT
                logical_filename        = lc_logical_filename_ftappl
                operating_system        = sy-opsys
    *           parameter_1             = ' '
    *           PARAMETER_2             = ' '
    *           USE_PRESENTATION_SERVER = ' '
    *           WITH_FILE_EXTENSION     = ' '
    *           USE_BUFFER              = ' '
           importing
                emergency_flag          = l_emergency_flag
                file_format             = l_file_format
                file_name               = l_file_name_ftappl
           exceptions
                file_not_found          = 1
                others                  = 2.

  • Creation of function module for updating the ztable

    Hi,
    I am sending the requirement for ceation of function module for updating the ztable.
    Requirement----
    Table Updation rule (New record)
    While creating a new record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO------->     Sales Delivery no in case of sales orderShipment no in case of transfer order
    UNAME----
    >     User ID
    ZORDTYPE----
    >     SALEOR in case of sales orderTRANSF in case of transfer order
    ZREFDOCNO----
    >Sales Order no in case of sales orderPurchase Order no in case of transfer order
    ZREFDOCNO1----
    >Delivery no in case of transfer order
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZREQNO----
    >Running serial number (incremented by 1 for each new record)
    ZREQDAT     -
    >System date
    ZREQTIME----
    >     System time
    ZSTATUS----
    >OPEN (for all new records)
    Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
    Table Updation rule (Status Update)
    While updating a record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO----
    >Sales order no in case of sales orderShipment no in case of transfer order
    ZSTATUS----
    >CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZSTATDAT----
    >System date
    ZSTATTIME----
    >     System time

    Do you have to create/update new record in Ztable through Function Module ?
    or you need to write FM only for validation?
    Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
    Let me know clearly what exactly u need ?
    Regards,
    Kiran

  • Function module for converting the foreign currency to words

    hi,
    can anybody tell me about the function module for converting the foreign currency to words format.
    Like 25.50 USD
    should be "Twenty Five Dollar & Fifty Sents."
    foreign currency can be anyone like USD, JPY, EUR etc.
    Regards
    Nitin Varshney

    Hi,
    Try using the FM SPELL_AMOUNT
    Check this wiki
    [SPELL_AMOUNT|https://wiki.sdn.sap.com/wiki/display/Snippets/SpelltheAmountenteredin+words]
    Regards
    Sarves

  • Standard function module for checking the sales organization and plant

    Hi all,
        Does have standard function module for checking the relationship between sales organization and plant?
    Thanks a lot!
    Nina

    hi
    good
    check these BAPIS
    BAPI_SALESGROUP_GET_DETAIL     Sales Group: Display Name                                                
    BAPI_SALESOFFICE_GET_DETAIL    Sales Office: Display Name                                               
    BAPI_SALESOFFICE_GRP_EXIST     Sales Office / Sales Group: Existence Check                              
    BAPI_SALESORG_EXIST            Sales Organization: Existence Check                                      
    BAPI_SALESORG_GET_DETAIL       Sales Organization: Display Data                                         
    BAPI_SALESORG_OFFICE_EXIST     Sales Organization / Sales Office: Existence Check                       
    PLANT=>
    BAPI_PROMO_GETSITEPLANNING     Detailed Data for the Plants Involved in a Promotion   
    thanks
    mrutyun^

  • Function Module for Posting the Delivery Doument

    Dear Experts,
            Could you please send me the Function Module for Posting the Delivery Doument.
    Thanks & Regards,
    Ashok.

    Hi,
    What do you mean by POSTING the delivery document?
    Are you mentioning the creation of Goods Issue?

  • Function module for uploading file in background

    hi friends
    i am working on Inbound IDOC interface where in which i am creating a function module for that,
    in which based on the idoc received , the interface has to choose the file from the shared folder and it has to move its contents to an internal table
    can anybody suggest me what function module can i use.
    we cant use GUI_upload,or cl_gui_frontend_services=>gui_upload
    because this requires an user to interact in mines it is not the case
    thanks in advance
    with regards
    s.janagar

    hi,
    check this thread,you will get idea how to transfer data from file to internal table.
    [https://forums.sdn.sap.com/click.jspa?searchID=17706879&messageID=6281020]

  • Function Module for putting Flat File into Application Server

    Hi Pals,
         what is the   Function module for putting my flatfile into application server..
    because i dont have  authorizations to  put my flatfile  into application server directly..
    I know one function mudule is there for that ...so,  can you suggest me.. what is the function module... for that..
    thanks.. and points will be assigned..
    chitti

    Hi,
    well normally you use the method GUI_UPLOAD of class CL_GUI_FRONTEND_SERVICES to upload a file from your client pc. Then you use the abap statements open dataset, transfer and close dataset to put the file to the app-server.
    kind regards
    Siggi

  • Function Module for getting the Sales Price for a condition type

    Hi,
    I am looking for a standard function module to which I can pass my condition type(new customizing) and it will return the sales price. The customer is going to create some new condition type to manitain the sales price. I'll have the necessary information like material/sales org/distribution channel, customer and need the standard function module to read the condition records for that condition type(as configured) and give me the price. PLease help if you know of a standard function module performing this.
    Thanks in advance.
    Regards
    Malthi

    Hi malthi ,
    welcome to sdn
    for material sales area u can look for the validations is table MVKE.
    the classification of the conditions is in tables like A901, a902 etc which in my opinion holds the condition types per classification .
    put a A* in se11 and this will give the list of tables per classification .
    u need to get the conditions as per kschl and dmbtr and
    etc..
    like this ..
    Get Condition Values for Material/Plant combination
      IF NOT i_a916[] IS INITIAL.
        SELECT knumh kappl kschl krech
               kbetr konwa kpein kmein
               INTO TABLE i_konp
               FROM konp
               FOR ALL ENTRIES IN i_a916
               WHERE knumh EQ i_a916-knumh AND
                     kappl EQ i_a916-kappl AND
                     kschl EQ i_a916-kschl AND
                     loevm_ko NE 'X'.
      ENDIF.
    Get Condition Values for Material/Plant/Ordertype/
    Customer combination
      IF NOT i_a925[] IS INITIAL.
        SELECT knumh kappl kschl  krech
               kbetr konwa kpein kmein
               APPENDING TABLE i_konp
               FROM konp
               FOR ALL ENTRIES IN i_a925
               WHERE knumh EQ i_a925-knumh AND
                     kappl EQ i_a925-kappl AND
                     kschl EQ i_a925-kschl AND
                     loevm_ko NE 'X'.
      ENDIF.
    just check this Fm if u can apply ur condition over here ..
    ME_GET_PRICE_CONDITION
    regards,
    VIjay.

  • Function module for getting the all PO waiting for release

    Hi,
    Is there any standard Function module for gettting all the PO's which all waiting for release.
    Regards
    Bala.

    hi Bala,
    ECC 6.0 Exits for VA01
    go through the above link i think that will help u...
    Regards,
    sindhu.

  • Java Module for changing the file's name

    Hi all
    I m developing a java module for altering a file's name. I m trying to append system date and time to the file name and send it back. I was successful in retrieving the file's name, appending date n time in it but now I want to send it back. How can I achieve this ? any pointers will be very helpful
    awaiting your reply
    Regards
    Kapil

    String SIGNATURE = "process(ModuleContext moduleContext, ModuleData inputModuleData)";
              TRACE.entering(SIGNATURE, new Object[] { moduleContext, inputModuleData });
    //          Access the XI message. I.e. this module must be placed in the module chain
               // behind a module that sets an XI message as principal data.
               Object obj = null;
               Message msg = null;
               try {
                         obj = inputModuleData.getPrincipalData();
                         msg = (Message) obj;
                        Message msgg = (Message)inputModuleData.getPrincipalData();     
                        AuditMessageKey amk = new AuditMessageKey(msgg.getMessageId(), AuditDirection.INBOUND);               
                        Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "RenameFile: Module Called");
    //               Read the channel ID, channel and the module configuration
                         String cid  = null;
                         String mode = null;
                         String fileName = null;
                         try {
                              // CS_GETMODDAT START
                              mode = (String) moduleContext.getContextData("mode");
                              // CS_GETMODDAT END
                              // CS_GETCHADAT START
                              cid  = moduleContext.getChannelID();
                              Channel channel = new Channel(cid);
    //                          channel = (Channel) LookupManager.getInstance().getCPAObject(CPAObjectType.CHANNEL, cid);
                              // Example to access a channel configuration parameter in a module: String someParameter = channel.getValueAsString("YourAttributeName");
                              // CS_GETCHADAT END
    //                         Hashtable mp = (Hashtable) inputModuleData.getSupplementalData("module.parameters");
    //                           if(null != mp)
    //                                 fileName = (String)mp.get("FileName");
    //                                 fileName = fileName + todaysDate;
    //                                 mp.put("FileName",fileName);     
                             fileName = channel.getValueAsString("file.targetFileName");
                             Date todaysDate = new Date(System.currentTimeMillis());
                             fileName = fileName + todaysDate;
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "RenameFile: fileed" + fileName);
                              if (mode == null) {
                                   TRACE.debugT(SIGNATURE, "Mode parameter is not set. Switch to 'none' as default.");
                                   mode = "none";
                              TRACE.debugT(SIGNATURE, "Mode is set to {0}", new Object[] {mode});
                         } catch (Exception e) {
                              TRACE.catching(SIGNATURE, e);
                              TRACE.errorT(SIGNATURE, "Cannot read the module context and configuration data");
                              ModuleException me = new ModuleException(e);
                              TRACE.throwing(SIGNATURE, me);
                             Audit.addAuditLogEntry(amk, AuditLogStatus.ERROR, "Rerrrd" + me);
                              throw me;
    //               try{
    //                  Hashtable mp = (Hashtable) inputModuleData.getSupplementalData("module.parameters");
    //                  String fileName = null;
    //                  Date todaysDate = new Date(System.currentTimeMillis());
    //                  if(null != mp)
    //                       fileName = (String)mp.get("FileName");
    //                       fileName = fileName + todaysDate;
    //                       mp.put("FileName",fileName);     
    //                  inputModuleData.setSupplementalData("module.parameters", mp);
    //               }catch(Exception e){
               } catch (Exception e) {
                    TRACE.catching(SIGNATURE, e);
                    if (obj != null)
                         TRACE.errorT(SIGNATURE, "Input ModuleData does not contain an object that implements the XI message interface. The object class is: {0}", new Object[] {obj.getClass().getName()});
                    else
                         TRACE.errorT(SIGNATURE, "Input ModuleData contains only null as XI message");
                    ModuleException me = new ModuleException(e);
                    TRACE.throwing(SIGNATURE, me);
                    throw me;
              return inputModuleData;
    Please refer the above code, it might help you to understand what i m trying to do. I have also included some code that is in comments which I tried by referring the links given by other users but its nt working. Please tell me how to improve my code to set the filename into the <b>reciever file adapter</b>.
    Regards
    Kapil

  • Functional module for determining the sales tax code

    Dear all,
    Kindly help me is there any Functional module to determine the sales tax code?
    My Requirement is Based on the Country, Sales Org and Tax code Pricing should pick up automatically.
    I tried adding the same fields in the table and inserted in the access sequence and created the condition record for the same.
    Created the order but system is not able to get  the Tax code while determining the price?
    Please help ...
    Regards,
    SK

    My Requirement is Based on the Country, Sales Org and
         Tax code Pricing should pick up automatically
    but system is not able to get the Tax code while determining the price?
    Your both the above comments are contradict to each other. In the first statement, you say pricing should pick up automatically whereas, in the next statement, you say tax code is not determining.   Please indicate the requirement clearly.
    thanks
    G. Lakshmipathi

Maybe you are looking for

  • Photoshop CC keeps crashing

    Everytime I try and use the save as funtion. Please help. I am running it on a 27-inch iMac with a 2.7GHz Intel Core i5 proccessor with 16 GB of ram. Here is the crash report. Process:         Adobe Photoshop CC [1521] Path:            /Applications/

  • Data Sets - Is there a way to put two fields in the same row?

    I am working on my first Spry Data Set (in Dreamweaver CS4) which, if I can get it figured out, will eventually be used as a calendar on a client's web site. You can see the beginning of the project here: http://www.rieradesignco.com/calendarlist_spr

  • I want to wipe iBook of it's content, but it will not boot up from DVD

    Can someone tell me how I clear off the content of iBook and install the basic set of the applications? I have the original OS 9 disks but they will not boot up with these. I have gradually upgraded the OS so I don't have disks to match 10.4.11. I wa

  • Can't open Camera Raw in Bridge

    One thing I noticed is that with CS5, when I choose Browse in Mini Bridge while in Photoshop, Bridge opens in the background. In CS6 when I browse in Mini Bridge, regular Bridge does not open, although I can open Bridge directly from Photoshop. The o

  • Java.lang.NoSuchMethodError: setBasename

    Hi All I recently migrated to jsf 1.2 while trying to access the login page i get the following error Can anyone help me out on this?? com.sun.faces.lifecycle.LifecycleImpl phase WARNING: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesCont