[CS4]  save on a local file without  user intervention

hey,...sorry for my english...
i work with a other application who need to have the
information written in the local file without an user intervention
so...
i would like to know if it s possible to write or rewrite on
a local file without intervention of the user...
whitout the ""save dialogue box" or with a managed save
dialogue box...
how to write in a local file without user intervention...
i need really an answer to make real my project...
thans for your conprehension

hey
thx a lot for your help ...
if i understand well ...
it is possible to write or rewrite in a specific folder
who is determinated by the application folder of
an specific AIR apllication
who during his install give the ""authorization to
write/rewrite /save in his specific installation foder"
so it s possible with combination of an AIR application.....
can you give me some information about this AIR application
that i must build...
some direction to ask help
because i dont have the knowledges to do that
what style/type of AIR application
what charachteristics of this AIR application....
so some information that can i use to ask help in the good
place...
one more time thx a lot for your help...;)

Similar Messages

  • Upload file without user intervention

    I know that there's been some topics like this before but I have more trouble.
    My goal is this: I file should be automaticly uploaded to my servlet and the I want the internet browser to handle the response.
    Because of the restrictions that lies, I think I need to create a small client program that simulates a post request to my servlet and then somehow make IE handle the response.
    I've gotten some source code for the simulation of the post request from previous posts in this forum (see below). I haven't really got it to work but that shouldn't be a big problem. The problem is, how do I get IE to handle the response?
    Here's the source code for the java program that simulates the post request:
    import java.util.*;
    import java.io.*;
    import java.net.*;
    class FileUpload
      // true globals
      // Anything that's unique will work
      static final String CONTENT_BOUNDARY =
    "-----------------------------7d22a63810058e";
      public FileUpload() {
      public static void main (String [] args) {
        // whatever file you care to upload
         String uploadFileName = "/testFile.txt";
         FileInputStream fis1 = null;
         OutputStream os1 = null;
         InputStream is1 = null;
         try
              File file1 = new File(uploadFileName);
              fis1 = new FileInputStream(file1);
              // the URL of your upload application
              URL testPost = new URL("http://localhost:8080/test/ReadFile");
              URLConnection huc1 = testPost.openConnection();
              huc1.setAllowUserInteraction(true);
              huc1.setDoOutput(true); // turns it into a post
              huc1.setRequestProperty("Content-Type", "multipart/form-data;boundary="+CONTENT_BOUNDARY);
              huc1.setRequestProperty("User-Agent", "Mozilla/4.7 [en] (WinNT; U)");
              huc1.setRequestProperty("Accept-Language", "en-us");
              huc1.setRequestProperty("Accept-Encoding", "gzip, deflate");
              huc1.setRequestProperty("Accept",
                   "image/gif, image/x-xbitmap,image/jpeg, image/pjpeg, "+
                   "application/vnd.ms-excel, application/msword, "+
                   "application/vnd.ms-powerpoint, application/pdf, application/x-comet, */*");
              huc1.setRequestProperty("CACHE-CONTROL", "no-cache");
              os1 = huc1.getOutputStream();
              // Field 1 a Field of data
              os1.write(
                   (CONTENT_BOUNDARY +
                   "\r\n"+
                   "Content-Disposition: form-data; name=\"txtTitle\"\r\n\r\nTest"+
                   "Segment\r\n"
                   ).getBytes());
              // Field 2 - the file, name is "uploadFile"
              os1.write(
                   (CONTENT_BOUNDARY + "\r\n" +
                   "Content-Disposition: form-data; name=\"source\"; filename=\"" +
                   uploadFileName +
                   "\"\r\nContent-Type: audio/x-pn-realaudio\r\n\r\n"
                   ).getBytes());
              byte [] fileStuff = new byte[512];
              int howMany = -1;
              int totMany = 0;
              howMany = fis1.read(fileStuff, 0, 512);
              while (howMany != -1)
                   totMany += howMany;
                   os1.write(fileStuff, 0, howMany);
                   howMany = fis1.read(fileStuff, 0, 512);
              System.err.println("read " + totMany + " bytes from file, wrote to outputstream.");
              fis1.close();
              fis1 = null;
              os1.write(("\r\n" + CONTENT_BOUNDARY + "--\r\n").getBytes());
              is1 = huc1.getInputStream();
              byte [] urlStuff = new byte[512];
              howMany = is1.read(urlStuff, 0, 512);
              while (howMany != -1)
                   System.out.write(urlStuff, 0, howMany);
                   howMany = is1.read(urlStuff, 0, 512);
              System.err.println("that was your output.");
              is1.close();
              is1 = null;
              os1.close();
              os1 = null;
         catch (Exception ex)
              System.err.println("Exception: " + ex);
              ex.printStackTrace();
             finally
              if (fis1 != null)
                   try
                        fis1.close();
                   catch(Exception ok_to_eat)
                     // ok to ignore this
              if (is1 != null)
              try
                   is1.close();
              catch(Exception ok_to_eat)
                // ok to ignore this
              if (os1 != null)
                   try
                          os1.close();
                   catch (Exception ok_to_eat)
                // ok to ignore this
    }Any suggestions are highly appreciated.
    Thanks / Daniel

    The problem is, how do I get IE to handle the response?You can't. The response has to be handled by whatever sent the request.

  • QuickView (run in backgroud) - How to auto save data to local file

    I am using Quickview to extract data. I want to run the Quickview query in background and auto save the data extracted into local file (ASCII file). Currently when I specify File Store (as my Output Format) and enter a file name (e.g C:\Temp\test.asc). Upon completion of extraction there is a little window popup that need me to select data format (e.g DAT, ASC) and click <Transfer> button to proceed to save data into local file.
    Is there a way that I can save data into local file without have to manually select ASC data format and click <Transfer> button. I will not be  able to schedule my QuickView query to run in background if I can't resolve this problem.
    Note that I don't have access to ABAP programming, therefore this option is out.
    Thanks in advance to anybody who can share your expertise experience.

    Tyr Fm's
    1. WS_UPLOAD
    2. GUI_UPLOAD
    But using gui_upload and ws_upload can only upload data from txt.
    actualy we have software to convert pdf to text file it freely availabe in internet...
    after conversion you can use thesr fms.
    plzz reward points usefull
    Cheers,
    Chandru

  • Upload file without user action.

    Hi,
    Here is my requirement: I need to upload file ( text / excel file ) from local PC without user interaction.
    I try using file_upload element and I set visible property as none ( so user doesn't see this element ) but I don't know how to get the file data. I only can set the file_name and mime_type property.
    Please help me how to get this file data. Or how to upload file from local PC without file_upload element.
    Regards,

    Hi Jatra.
    I guess there are several function modules you can use. Try this : UPLOAD_FILES.
    Maybe you can solve your issue with it. Otherwise search the Abap Forum on how to upload files from PC to WAS.
    Cheers,
    Sascha

  • Function - "Save list in local file"

    Hi,
    Do any one  know authorization object for executing the function "Save list in local file"  .
    Regards,
    Srinivas

    Assign S_GUI profile in user profile & try.
    http://wiki.sdn.sap.com/wiki/display/SMAUTH/S_GUI

  • Authorization to save lists in local files

    Hi,
    How to authorize a user to download (with the right click menu or Shift + F8) to save list in local file ?
    Thank in advance
    Best regards

    hm.
    try object:
    S_DATASET
    with values
    PROGRAM=SAPLSWT1
    ACTVT=34
    FILENAME=*
    Edited by: Mylene Euridice Dorias on Sep 30, 2009 1:36 PM
    when trying to download to Excel, an additional object occured: S_GUI with activity 04, 60 and 61

  • How do I save a password protected file without a password?

    Someone sent me a password protected file and I want to save it on my computer without the password.
    Thanks,
    Scott

    Hi Scott,
    It is not possible to save a password protected file without a password with Adobe Reader, you would require Adobe Acrobat to remove the password protection. Even with Adobe Acrobat you can only remove the security if you are aware about the password otherwise you need to contact the Author/creator of the PDF to remove the security.
    Regards,
    ~Pranav

  • ITS - Save as a Local File

    In the R/3 window we get a Menu Option System -> List -> Save -> Local File.
    And the same appear for Transaction iViews (SAP GUI for Windows)
    In cases of SAP GUI for HTML or for that matter any ITS URL for a transaction, where can we find an option to Save as a Local File?

    any help?

  • Creating a jar file without user compliation

    Hi, i got a problem here and i do not know how to go about doing it, any help will be much appreciated...
    I need a JAR file in my integration bin shell
    this bin shell will read my JAR file
    The user will create the MAIN class file with something call a template engine specifying some stuff that can be changed
    after which together with some existing .java class files, one .XML file(which the user specify with template engine) my program is to compile them automatically without user intervention and produce the JAR file.
    any suggestions? thannks

    Hmm, this sounds to me like a task for build tool like ANT.
    If you absolutely need to do this yourself look at java.util.jar and into the programmatic interface of javac (get the JDK source code distribution for this).

  • Is the iweb that comes with your computer complete? I am not able to save to a local file or send to my web site.  Do I need to purchase the complete one?

    I have an IMAC 10.6.8
    Is the iweb that comes with your computer complete? I am not able to save to a local file or send to my web site.  Do I need to purchase the complete one?

    If you have iWeb V 3 you need to go to the Site Publishing Settings page...
    http://www.iwebformusicians.com/iWeb/Publish-Website.html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Can You Play Multiple Playlists Without User Intervention

    Can you stack and play multiple playlists? ie if you had three playlists of 50 songs each, could you pick all three, play all the songs in the first playlist, when it is finished move automatically to the second playlist play its songs then automatically move to the third without user intervention? And if so, can you play each of these in shuffle mode?

    There's no "impromptu" method of doing so that I know of.
    As far as un-impromptu methods (it's always fun inventing words), it will depend on whether you want to listen to this mega-playlist on an iPod or just with iTunes.
    If it's just with iTunes, you can go to the File menu > New Folder command and create a new folder which we can call the Mega-Playlist folder. Drag the three playlists in question into that folder. When you select that folder and press Play, iTunes should go through all the songs.
    If it's on an iPod, since Folders don't transfer over from iTunes, the only solution I know of would be to create a Smart Playlist with iTunes that will -
    Match any of the following rules:
    Playlist is the first playlist +
    Playlist is the second playlist +
    Playlist is the third playlist.
    Synching this mega-playlist to your iPod will allow you to select it from the Playlist menu.
    Shuffle mode would shuffle songs from all three playlists together, not shuffle songs from the first playlist before moving on to shuffling songs from the second playlist before shuffling songs from the third playlist.

  • Generate a Report Dynamically without User Intervention and Output to XML

    Here's the scenario for which I am trying to find a solution. Any help would be greatly appreciated.
    I have a series of reports that the users generate from a UI by selecting the report, setting the values for a list of parameters, and then click a submit button. The report is generated in the UI for them to view. They can print it from here or export it to Excel.
    They would like to be able to schedule a report to run daily without user intervention using a saved set of parameters. The system would run the report automatically and email it to a defined set of email addresses.
    To do this, we need to have the report generated in a string or xml so a Java process can read it and email it.
    I see that I can change a report's template to export:xml so I feel that it is possible. How can I export a report to XML without user intervention? Can the report template be changd dynamically at runtime? Ideally, I need some way to call this same report and have it output as a string data or xml to be used by a Java process that would store and generate the report for email.

    Hi Kumar,
    From Program1 you are calling Program2, using submit syntax (inside Program1).
    While using submit, if you have correctly filled up the selection screen of program2, then it will AUTOMATICALLY get executed, WITHOUT F8.
    If there is any compulsary field in program 2, which does not get populated, then it will not run automatically, or unless some special code is written in program2.
    If you do not want the output of Program2 on screen, then u can use
    SUBMIT Program2 AND RETURN.
    In that case, no selection screen (of program2) will appear and neither the output of program 2.
    Regards,
    Amit Mittal.
    Edited by: Amit Mittal on Dec 23, 2009 4:10 PM

  • Material creation without user intervention

    i have to create a material without user intervention. i am using BAPI_MATERIAL_SAVEDATA for this. it is not showing any error. but the return is having the message 'No description found'. how to transfer the description to this bapi.
    this is the code i am trying:
    DATA:  mnum like zmara01-mno,
           mat_data like BAPIMATHEAD,
           plantx_data like BAPI_MARCX,
           salesx_data like BAPI_MVKEX,
           sale_data like bapi_mvke,
           plant_data like bapi_marc,
           mate_data like bapi_makt,
           E1BP_MAKT like E1BP_MAKT,
           cli_data like bapi_mara.
    DATA: E_RETURN LIKE BAPIRET2.
    data: MATERIALDESCRIPTION like BAPI_MAKT
                      occurs 0 with header line.
    *data: m(18) type c.
    CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              NR_RANGE_NR                  = '01'
              OBJECT                       = 'ZMNUMBER'
             QUANTITY                      = '1'
           IMPORTING
             NUMBER                        = mnum.
    message i003(zmsg) with mnum.
    mat_data-material = mnum.
    mat_data-ind_sector = 'I'.
    mat_data-matl_type = 'DIEN'.
    mat_data-basic_view = 'X'.
    cli_data-base_uom = 'EA'.
    cli_data-base_uom_iso = 'X'.
    sale_data-sales_org = 'EISO'.
    sale_data-distr_chan = 'SR'.
    salesx_data-sales_org = 'EISO'.
    salesx_data-distr_chan = 'SR'.
    plant_data-plant = 'EIHO'.
    plantx_data-plant = 'EIHO'.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        HEADDATA                   = mat_data
       CLIENTDATA                 = cli_data
      CLIENTDATAX                =
       PLANTDATA                  = plant_data
       PLANTDATAX                 = plantx_data
      FORECASTPARAMETERS         =
      FORECASTPARAMETERSX        =
      PLANNINGDATA               =
      PLANNINGDATAX              =
      STORAGELOCATIONDATA        =
      STORAGELOCATIONDATAX       =
      VALUATIONDATA              =
      VALUATIONDATAX             =
      WAREHOUSENUMBERDATA        =
      WAREHOUSENUMBERDATAX       =
       SALESDATA                  = sale_data
       SALESDATAX                 = salesx_data
      STORAGETYPEDATA            =
      STORAGETYPEDATAX           =
      FLAG_ONLINE                = ' '
      FLAG_CAD_CALL              = ' '
      NO_DEQUEUE                 = ' '
    IMPORTING
       RETURN                     = E_RETURN
    TABLES
       MATERIALDESCRIPTION        =  MATERIALDESCRIPTION
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    loop at materialdescription.
    message I004(I) with materialdescription-matl_desc.
    endloop .
    MESSAGE I004(I) WITH E_RETURN-TYPE.
        if sy-subrc = 0.
         message i005(zmsg).
        elseif sy-subrc <> 0.
         message e006(zmsg).
        endif.
    i am trying to give direct entries to test it . please help in this issue immediately.

    Hi dear,
    welcome on board!
    If you want an answer immediately I think you have to post your question in a more appropriate forum...
    take a look to https://www.sdn.sap.com/sdn/collaboration.sdn and choose one of the available forums !
    Good luck!
    Roberto

  • Animate elements one by one without user intervention

    Hi, Good Day,
    I have series of rectangles and textblocks on page.
    I need to show them moving at different places one by one according to the contents of textblock without user intervention.
    If I use for loop then it show movement of only last rectangle as I have to stop the storyboard in each iteration of loop.
    Is there any way to move these rectangles automatically one after another????
    sunaina

    A storyboard has a completed event.  I think that's the easiest way to handle this sort of requirement.
    You could chain them.
    So you get a reference to a storyboard, add a handler to it's completed event which starts the next storyboard...
    And start it.
    Obviously you will have storyboards which do something or other but here's how I attach anonymous completed eventhandlers to a storyboard:
    Storyboard sb1 = new Storyboard();
    Storyboard sb = new Storyboard();
    sb.Duration = new TimeSpan(0, 0, 1);
    sb.Completed += new EventHandler(delegate(object s, EventArgs a)
    sb1.Begin();
    sb.Begin();
    Hope that helps.
    Recent Technet articles:
    Property List Editing;  
    Dynamic XAML

  • ALV issue: when save list using Local File command will get run time error!

    help!!!!
    report list using ALV method when to save this list using Local File.
    i will get GETWA_NOT_ASSIGNED run time error information.
    how resolve it?
    source code :
    REPORT   ZIFT0103.
    TABLES :  MARA,MARC,CDHDR,CDPOS,MAKT.
    ******DEVK909212****************
    ****&#21033;&#29992;&#24037;&#21378;&#26469;&#21306;&#20998;&#19981;&#21516;&#30340;SERVER&#30340;FTP ADDRESS ,user ,PASSWORD
    DATA: FTP_WERKS LIKE MARC-WERKS.
    ********&#23450;&#20041;&#19968;&#20010;RANGE&#29992;&#26469;&#25235;&#21462;MARC&#30340;&#20449;&#24687;
    RANGES:R_MATNR FOR MARA-MATNR OCCURS 0.
    ********&#23450;&#20041;&#19968;&#20010;INTERNAL TABLE &#26469;&#25235;&#21462;MARC &#30340;&#20449;&#24687;
    DATA:BEGIN OF IT_MARC OCCURS 0,
          MATNR LIKE MARC-MATNR,
          WERKS LIKE MARC-WERKS,
          USERNAME TYPE CDHDR-USERNAME,
         UDATE    TYPE CDHDR-UDATE,
         FLAG_UI TYPE C,
         END OF IT_MARC.
    *******&#23450;&#20041;&#23384;&#25918;&#21271;&#20140;&#30340;&#25968;&#25454;&#30340;&#21464;&#37327;
    DATA : BEGIN OF FTP_BEIJING OCCURS 0 ,
                  MATNR(25) ,
                  MATNR1(25) ,
                  MAKTX(30) ,
           END OF FTP_BEIJING .
    ******&#23450;&#20041;&#31119;&#28165;&#30340;&#25968;&#25454;&#21464;&#37327;
    DATA : BEGIN OF FTP_FUQING OCCURS 0 ,
                  MATNR(25) ,
                  MATNR1(25) ,
                  MAKTX(30) ,
           END OF FTP_FUQING .
    *******DEVK909212*****************
    DATA : BEGIN OF FTP_ITEMDOC1 OCCURS 0 ,
                  MATNR(25) ,
                  MAKTX(30) ,
           END OF FTP_ITEMDOC1 .
    DATA : BEGIN OF FTP_ITEMDOC OCCURS 0 ,
                  MATNR(25) ,
                  MATNR1(25) ,
                  MAKTX(30) ,
           END OF FTP_ITEMDOC .
    DATA: WA_ZMSGTA TYPE ZMSGTA ,
          l_ersda  like MARA-ERSDA .
    ***********DEVK909553********************
    ****&#29992;&#26469;&#20915;&#23450;&#25191;&#34892;FTP&#36824;&#26159;&#26174;&#31034;LIST**********
    DATA:g_tcode_flag.
    ***********DEVK909553********************
    Error message process ******************************
    DEFINE EXPLAIN_MSG.
       break soe_richard.
      CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'
        EXPORTING
          ID                = &1   "SY-MSGID
          NUMBER            = &2   "SY-MSGNO
          LANGUAGE          = SY-LANGU
          TEXTFORMAT        = &3
          LINKPATTERN       =
          MESSAGE_V1        = &4                                "SY-MSGV1
          MESSAGE_V2        = &5                                "SY-MSGV2
          MESSAGE_V3        = &6                                "SY-MSGV3
          MESSAGE_V4        = &7                                "SY-MSGV4
        IMPORTING
          MESSAGE           = &8   "WA_ZMSGTA-MSE1
          RETURN            =
        TABLES
          TEXT              =
    END-OF-DEFINITION.
    DEFINE ERROR_MSG_UPDATA.
      CALL FUNCTION 'ZINSERT_MSG'  "IN UPDATE TASK
        EXPORTING
          XZMSGTA      = &1    "WA_ZMSGTA
        EXCEPTIONS
          UPDATE_ERROR = 1
          OTHERS       = 2.
    END-OF-DEFINITION.
    IF SY-TCODE = 'ZIFT103' .
      g_tcode_flag = 'L'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          PERCENTAGE = 0
          TEXT       = '&#35831;&#32784;&#24515;&#31561;&#20505;,&#31995;&#32479;&#27491;&#22312;&#25235;&#25968;&#25454;'.
    ENDIF.
    l_ersda = sy-datum - 1 .  "&#21462;&#21069;&#19968;&#22825;&#20135;&#29983;&#30340;&#29289;&#26009;&#21495;&#30721;&#12290;
    DATA:BEGIN OF it_change OCCURS 0,
         OBJECTID TYPE CDHDR-OBJECTID,
         USERNAME TYPE CDHDR-USERNAME,
         UDATE    TYPE CDHDR-UDATE,
         TABKEY   TYPE CDPOS-TABKEY,
         END OF it_change.
    DATA:BEGIN OF it_cDhdr OCCURS 0,
         OBJECTID type CDHDR-OBJECTID,
         CHANGENR TYPE CDHDR-CHANGENR,
         USERNAME TYPE CDHDR-USERNAME,
         UDATE    TYPE CDHDR-UDATE,
         END OF it_cdhdr.
    DATA:search_len TYPE I.
    DATA:BEGIN of it_insert OCCURS 0,
         MATNR TYPE MARA-MATNR,
         WERKS TYPE MARC-WERKS,
         END OF it_insert.
    DATA:BEGIN OF it_MAKT OCCURS 0,
         MATNR TYPE MAKT-MATNR,
         MAKTX TYPE MAKT-MAKTX,
         END OF it_makt.
    DATA IT_MARA TYPE TABLE OF MARA WITH HEADER LINE.
    DATA:BEGIN OF IT_OUT OCCURS 0,
         MATNR TYPE MARA-MATNR,
         WERKS TYPE MARC-WERKS,
         MTART TYPE MARA-MTART,
         MEINS TYPE MARA-MEINS,
         MATKL TYPE MARA-MATKL,
         MAKTX TYPE MAKT-MAKTX,
         PSTAT TYPE MARA-PSTAT,
         BRGEW TYPE MARA-BRGEW,
         NTGEW TYPE MARA-NTGEW,
         GEWEI TYPE MARA-GEWEI,
         FERTH TYPE MARA-FERTH,
         KZUMW TYPE MARA-KZUMW,
         ERNAM TYPE MARA-ERNAM,
         ERSDA TYPE MARA-ERSDA,
         END OF IT_OUT.
    *-- DECLARE DATA FOR ALV
    TYPE-POOLS: slis.
    DATA  : g_variant LIKE disvariant,
            g_save(1) TYPE c,
            g_exit(1) TYPE c,
            gx_variant LIKE disvariant.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE, "
          gt_events   TYPE slis_t_event,
          gt_list_top_of_page TYPE slis_t_listheader,
          gs_print TYPE slis_print_alv,
          gs_layout         TYPE slis_layout_alv .
    ******&#21482;&#33021;&#25235;&#20986;&#31995;&#32479;&#26377;&#20570;&#26356;&#25913;&#30340;&#25968;&#25454;***************
    ******&#32780;&#31532;&#19968;&#27425;INSERT MARA&#30340;&#25968;&#25454;&#25235;&#19981;&#20986;&#26469;********
    START-OF-SELECTION.
    SELECT AOBJECTID AUSERNAME AUDATE BTABKEY
    INTO TABLE it_change
    FROM ( CDPOS AS B INNER JOIN CDHDR AS A ON
         AOBJECTCLAS = BOBJECTCLAS AND
         AOBJECTID   = BOBJECTID   AND
         ACHANGENR   = BCHANGENR )
    WHERE A~OBJECTCLAS = 'MATERIAL'
    AND   A~UDATE = l_ersda
    AND   B~TABNAME = 'MARC'
    AND   B~CHNGIND = 'I'.
    LOOP AT it_change.
       search_len = STRLEN( it_change-TABKEY ).
       search_len = search_len - 4.
       IF search_len > 0.
         IT_MARC-WERKS = it_change-TABKEY+search_len(4).
       ENDIF.
       IT_MARC-MATNR = it_change-objectid+0(18).
       IT_MARC-USERNAME = it_change-username.
       IT_MARC-UDATE    = It_change-udate.
       IT_MARC-FLAG_UI  = 'U'.
       APPEND IT_MARC.
       CLEAR IT_MARC.
       CLEAR R_MATNR.
       R_MATNR-SIGN = 'I'.
       R_MATNR-OPTION = 'EQ'.
       R_MATNR-LOW = IT_MARC-MATNR.
       APPEND R_MATNR.
    ENDLOOP.
    ****CDPOS is Cluster TABLE &#25152;&#20197;&#27809;&#26377;&#21150;&#27861;&#29992;INNER JOIN******
      SELECT OBJECTID CHANGENR USERNAME UDATE
      INTO TABLE it_cdhdr
      FROM CDHDR
      WHERE OBJECTCLAS = 'MATERIAL'
      AND   UDATE = l_ersda.
    AND   TCODE = 'MM02'.
      LOOP AT IT_cdhdr.
        SELECT * FROM CDPOS
        WHERE OBJECTCLAS = 'MATERIAL'
        AND   OBJECTID  = IT_CDHDR-OBJECTID
        AND   CHANGENR  = IT_CDHDR-CHANGENR
        AND   TABNAME   = 'MARC'
        AND   CHNGIND = 'I'.
          search_len = STRLEN( CDPOS-TABKEY ).
          search_len = search_len - 4.
          IF search_len > 0.
            IT_MARC-WERKS = CDPOS-TABKEY+search_len(4).
          ENDIF.
          IT_MARC-MATNR = IT_cdhdr-objectid+0(18).
          IT_MARC-USERNAME = IT_cdhdr-username.
          IT_MARC-UDATE    = IT_cdhdr-udate.
          IT_MARC-FLAG_UI  = 'U'.
          APPEND IT_MARC.
         CLEAR IT_MARC.
          CLEAR R_MATNR.
          R_MATNR-SIGN = 'I'.
          R_MATNR-OPTION = 'EQ'.
          R_MATNR-LOW = IT_MARC-MATNR.
          APPEND R_MATNR.
          CLEAR IT_MARC.
        ENDSELECT.
      ENDLOOP.
      IF g_tcode_flag = 'L'.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            PERCENTAGE = 20
            TEXT       = '&#22788;&#29702;&#22909;&#24403;&#22825;CHANGE&#30340;&#25968;&#25454;'.
      ENDIF.
    *******&#25235;&#24403;&#22825;&#20570;&#20102;INSERT&#30340;&#25968;&#25454;*************
    *******&#19981;&#38656;&#35201;***********************
    SELECT BMATNR BWERKS INTO TABLE IT_INSERT
    FROM MARC AS B JOIN MARA AS A
    ON   AMATNR = BMATNR
    WHERE A~ERSDA = l_ersda.
    LOOP AT IT_INSERT.
       IT_MARC-MATNR = IT_INSERT-MATNR.
       IT_MARC-WERKS = IT_INSERT-WERKS.
       IT_MARC-FLAG_UI = 'I'.
       APPEND IT_MARC.
       CLEAR IT_MARC.
       CLEAR R_MATNR.
       R_MATNR-SIGN = 'I'.
       R_MATNR-OPTION = 'EQ'.
       R_MATNR-LOW = IT_MARC-MATNR.
       APPEND R_MATNR.
    ENDLOOP.
    IF g_tcode_flag = 'L'.
       CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
           PERCENTAGE = 40
           TEXT       = '&#22788;&#29702;&#22909;&#24403;&#22825;INSERT&#30340;&#25968;&#25454;'.
    ENDIF.
      IF g_tcode_flag = 'L'.
        PERFORM get_MAKTX.
        PERFORM get_mara.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            PERCENTAGE = 100
            TEXT       = '&#22788;&#29702;&#22909;&#25968;&#25454;,&#24182;&#24320;&#22987;&#26174;&#31034;&#25968;&#25454;'.
        PERFORM do_data.
        PERFORM display_alv.
      ELSE.
        PERFORM get_MAKTX.
        PERFORM do_ftp.
      ENDIF.
    *&      Form  get_marktx
          text
    FORM get_maktx.
      SELECT MATNR MAKTX INTO TABLE IT_MAKT FROM MAKT
      WHERE MATNR IN R_MATNR AND SPRAS = '1'.
    ENDFORM.                    "get_marktx
    *&      Form  get_mara
          text
    FORM get_mara.
      SELECT * INTO TABLE it_mara FROM MARA
      WHERE MATNR IN R_MATNR.
    ENDFORM.                    "get_mara
    *&      Form  do_data
          text
    FORM do_data.
      SORT IT_MARC BY MATNR WERKS.
      DELETE ADJACENT DUPLICATES FROM IT_MARC COMPARING MATNR WERKS.
      LOOP AT IT_MARC.
        CLEAR IT_MAKT.
        CLEAR IT_MARA.
        READ TABLE IT_MAKT WITH KEY MATNR = IT_MARC-MATNR.
        READ TABLE IT_MARA WITH KEY MATNR = IT_MARC-MATNR.
        MOVE-CORRESPONDING IT_MARA TO IT_OUT.
        IT_OUT-MAKTX = IT_MAKT-MAKTX.
        IT_OUT-WERKS = IT_MARC-WERKS.
        IF IT_MARC-FLAG_UI = 'U'.
          IT_OUT-ERNAM = IT_MARC-USERNAME.
        ENDIF.
        APPEND IT_OUT.
        CLEAR IT_OUT.
      ENDLOOP.
    ENDFORM.                    "do_data
    *SELECT AMATNR BMAKTX INTO CORRESPONDING
    *FIELDS OF FTP_ITEMDOC1 FROM MARA AS A JOIN MAKT AS B
    *ON AMATNR = BMATNR WHERE A~ERSDA = l_ersda
    *AND B~SPRAS = '1' . "&#20195;&#34920;&#20026;&#20013;&#25991;&#35828;&#26126;&#12290;
    APPEND FTP_ITEMDOC1.
    *******DEVK909212****************
    *******&#28155;&#21152;RANGE*****************
    CLEAR R_MATNR.
    R_MATNR-SIGN = 'I'.
    R_MATNR-OPTION = 'EQ'.
    R_MATNR-LOW = FTP_ITEMDOC1-MATNR.
    APPEND R_MATNR.
    CLEAR  FTP_ITEMDOC1.
    *******DEVK909212****************
    *ENDSELECT.
    *******DEVK909212****************
    ****get WERKS information from MARC*******
    *SELECT MATNR WERKS INTO TABLE IT_MARC
    *FROM MARC
    *WHERE MATNR IN R_MATNR.
    *******DEVK909212****************
    ******DEVK909212****************
    **MARK**************************
    *LOOP AT FTP_ITEMDOC1 .
    MOVE : FTP_ITEMDOC1-MATNR TO FTP_ITEMDOC-MATNR,
            FTP_ITEMDOC1-MATNR TO FTP_ITEMDOC-MATNR1,
            FTP_ITEMDOC1-MAKTX TO FTP_ITEMDOC-MAKTX.
    APPEND FTP_ITEMDOC.
    CLEAR FTP_ITEMDOC.
    *ENDLOOP.
    ******DEVK909212****************
    ******DEVK909212***********************************
    **&#26681;&#25454;IT_MARC&#20013;&#20449;&#24687;&#65292;&#24448;&#21271;&#20140;&#21644;&#31119;&#28165;&#30340;TABLE&#20889;&#25968;&#25454;*****
    FORM do_ftp.
      LOOP AT IT_MARC.
    ***&#31119;&#28165;&#30340;
        IF IT_MARC-WERKS = '1010' OR IT_MARC-WERKS = '1020'
           OR IT_MARC-WERKS = '1023' .
         READ TABLE FTP_ITEMDOC1 WITH KEY MATNR = IT_MARC-MATNR.
         MOVE : FTP_ITEMDOC1-MATNR TO FTP_FUQING-MATNR,
            FTP_ITEMDOC1-MATNR TO FTP_FUQING-MATNR1,
            FTP_ITEMDOC1-MAKTX TO FTP_FUQING-MAKTX.
          CLEAR IT_MAKT.
          READ TABLE IT_MAKT WITH KEY = IT_MARC-MATNR.
          MOVE : IT_MARC-MATNR TO FTP_FUQING-MATNR,
             IT_MARC-MATNR TO FTP_FUQING-MATNR1,
             IT_MAKT-MAKTX TO FTP_FUQING-MAKTX.
          APPEND FTP_FUQING.
          CLEAR FTP_FUQING.
        ENDIF.
    ***&#21271;&#20140;&#30340;
        IF IT_MARC-WERKS = '1041' OR IT_MARC-WERKS = '1042'.
         READ TABLE FTP_ITEMDOC1 WITH KEY MATNR = IT_MARC-MATNR.
         MOVE : FTP_ITEMDOC1-MATNR TO FTP_BEIJING-MATNR,
            FTP_ITEMDOC1-MATNR TO FTP_BEIJING-MATNR1,
            FTP_ITEMDOC1-MAKTX TO FTP_BEIJING-MAKTX.
          CLEAR IT_MAKT.
          READ TABLE IT_MAKT WITH KEY = IT_MARC-MATNR.
          MOVE : IT_MARC-MATNR TO FTP_BEIJING-MATNR,
                 IT_MARC-MATNR TO FTP_BEIJING-MATNR1,
                 IT_MAKT-MAKTX TO FTP_BEIJING-MAKTX.
          APPEND FTP_BEIJING.
          CLEAR FTP_BEIJING.
        ENDIF.
      ENDLOOP.
    ****&#28165;&#26970;&#37325;&#22797;&#30340;&#25968;&#25454;**********
      SORT FTP_FUQING.
      DELETE ADJACENT DUPLICATES FROM FTP_FUQING.
      SORT FTP_BEIJING.
      DELETE ADJACENT DUPLICATES FROM FTP_BEIJING.
    ***&#20256;&#36865;&#25968;&#25454;********
      REFRESH FTP_ITEMDOC.
      FTP_ITEMDOC[] = FTP_FUQING[].
      FTP_WERKS = '1010'.
      PERFORM ftp_work.
      REFRESH FTP_ITEMDOC.
      FTP_ITEMDOC[] = FTP_BEIJING[].
      FTP_WERKS = '1041'.
      PERFORM ftp_work.
    ******DEVK909212***********************************
    ENDFORM.                    "do_ftp
    *&      Form  ftp_work
         &#25226;&#20197;&#21069;FTP&#30340;&#24037;&#20316;&#20570;&#19968;&#20010;FORM
    *******DEVK909212**************************
    FORM ftp_work.
    *******DEVK909212**************************
      CHECK FTP_ITEMDOC[] IS NOT INITIAL.
    FTP function *****************************************************
      DATA : HDL TYPE I,
             L_SLEN TYPE I ,
             ERROR,
             KEY TYPE I VALUE 26101957,
             DEST TYPE RFCDES-RFCDEST VALUE 'SAPFTPA'.
      DATA: FTP_RESULT TYPE TABLE OF TEXT.
      DATA: P_FILE TYPE RLGRAP-FILENAME.
      DATA: L_USER(16) TYPE C VALUE 'SFIS',
            L_PWD(16) TYPE C VALUE 'SFIS',
            L_HOST(16) TYPE C VALUE '172.16.31.17'.
    *******DEVK909212**************************
    *****&#26681;&#25454;&#19981;&#21516;&#30340;&#24037;&#21378;&#26469;&#25235;FTP&#30340;&#20449;&#24687;
      CALL FUNCTION 'Z_FTP_SFIS'
        EXPORTING
          BLART = 'S'
          WERKS = FTP_WERKS
        IMPORTING
          HOST  = L_HOST
          USER1 = L_USER
          PASS1 = L_PWD.
    *******DEVK909212**************************
      CONCATENATE l_ersda '.KP' INTO P_FILE.
      SET EXTENDED CHECK OFF.
      ERROR = 0.
      CHECK HDL IS INITIAL.
    Connect to server
      L_SLEN = STRLEN( L_PWD ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = L_PWD
          SOURCELEN   = L_SLEN
          KEY         = KEY
        IMPORTING
          DESTINATION = L_PWD.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
         TEXT = 'Connect to FTP Server'.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          USER            = L_USER
          PASSWORD        = L_PWD
          HOST            = L_HOST
          RFC_DESTINATION = DEST
        IMPORTING
          HANDLE          = HDL
        EXCEPTIONS
          NOT_CONNECTED   = 1
          OTHERS          = 2.
      IF SY-SUBRC <> 0.
        MOVE: 'B' TO WA_ZMSGTA-BLART,
              l_ersda  TO WA_ZMSGTA-REFNUMBER,
              SY-MSGTY TO WA_ZMSGTA-MSGTY,
              'MARA' TO WA_ZMSGTA-TBMA_VAL.
        EXPLAIN_MSG SY-MSGID SY-MSGNO ' ' SY-MSGV1 SY-MSGV2 SY-MSGV3
                    SY-MSGV4 WA_ZMSGTA-MSE1.
        ERROR_MSG_UPDATA WA_ZMSGTA.
        EXIT.
      ENDIF.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          HANDLE        = HDL
          COMMAND       = 'ascii'
        TABLES
          DATA          = FTP_RESULT
        EXCEPTIONS
          TCPIP_ERROR   = 1
          COMMAND_ERROR = 2
          DATA_ERROR    = 3.
      IF SY-SUBRC <> 0.
        EXPLAIN_MSG SY-MSGID SY-MSGNO ' ' SY-MSGV1 SY-MSGV2 SY-MSGV3
                    SY-MSGV4 WA_ZMSGTA-MSE1.
        MOVE: 'B' TO WA_ZMSGTA-BLART,
              l_ersda  TO WA_ZMSGTA-REFNUMBER,
              SY-MSGTY TO WA_ZMSGTA-MSGTY,
              'MARA' TO WA_ZMSGTA-TBMA_VAL.
        ERROR_MSG_UPDATA WA_ZMSGTA.
        EXIT.
      ENDIF.
      CALL FUNCTION 'FTP_R3_TO_SERVER'
        EXPORTING
          HANDLE         = HDL
          FNAME          = P_FILE
          CHARACTER_MODE = 'X'
        TABLES
          TEXT           = FTP_ITEMDOC
        EXCEPTIONS
          TCPIP_ERROR    = 1
          COMMAND_ERROR  = 2
          DATA_ERROR     = 3
          OTHERS         = 4.
      IF SY-SUBRC <> 0.
        EXPLAIN_MSG SY-MSGID SY-MSGNO ' ' SY-MSGV1 SY-MSGV2 SY-MSGV3
                    SY-MSGV4 WA_ZMSGTA-MSE1.
        MOVE: 'B' TO WA_ZMSGTA-BLART,
              l_ersda  TO WA_ZMSGTA-REFNUMBER,
              SY-MSGTY TO WA_ZMSGTA-MSGTY,
              'MARA' TO WA_ZMSGTA-TBMA_VAL.
        ERROR_MSG_UPDATA WA_ZMSGTA.
        EXIT.
      ENDIF.
    *******DEVK909212**************************
    *******CLOSE FTP******************
      CHECK NOT HDL IS INITIAL.
      CALL FUNCTION 'FTP_DISCONNECT'
        EXPORTING
          HANDLE = HDL.
      CALL FUNCTION 'RFC_CONNECTION_CLOSE'
        EXPORTING
          DESTINATION = DEST
        EXCEPTIONS
          OTHERS      = 1.
      CLEAR HDL.
    ENDFORM.                    "ftp_work
    *******DEVK909212**************************
    FORM DISPLAY_ALV .
    *-- PREPARE ALV DATA
      PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
      PERFORM COMMENT_BUILD  USING GT_LIST_TOP_OF_PAGE[].
    *-- LAYOUT SETTING
      PERFORM PREPARE_ALV_FIELD USING GT_FIELDCAT[].
    *-- ALV DISPLAY
      PERFORM CALL_REUSE_ALV_GRID_DISPLAY.
    ENDFORM.                    " display_alv
    *&      Form  eventtab_build
          text
         -->P_GT_EVENTS[]  text
    FORM EVENTTAB_BUILD USING PT_EVENTS TYPE SLIS_T_EVENT.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 0
        IMPORTING
          ET_EVENTS   = PT_EVENTS.
      READ TABLE PT_EVENTS WITH KEY NAME =  SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        LS_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY PT_EVENTS FROM LS_EVENT INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " eventtab_build
    *&      Form  comment_build
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM COMMENT_BUILD  USING PT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER,
            L_DATE(30),
            l_v_BWKEY like T001W-BWKEY,  "Valuation area
            l_v_BUKRS like T001K-BUKRS.  "Firm/Company
    Listen&#57692;erschrift: Typ H
    CLEAR LS_LINE.
    LS_LINE-TYP  = 'H'.
    LS_LINE-KEY:  not used for this type
    select single BWKEY
       into l_v_BWKEY
       from t001w
       where WERKS IN s_WERKS.
    select single BUKRS
       into l_v_BUKRS
       from t001k
       where BWKEY = l_v_BWKEY.
    SELECT SINGLE butxt INTO LS_LINE-INFO
        FROM t001
       WHERE bukrs = l_v_BUKRS.
    APPEND LS_LINE TO PT_TOP_OF_PAGE.
    Kopfinfo: Typ S
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = '&#25253;&#34920;&#21517;&#31216;&#65306;'.
      LS_LINE-INFO = SY-TITLE.
      APPEND LS_LINE TO PT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = '&#25171;&#21360;&#26085;&#26399;&#65306;'.
      WRITE SY-DATUM TO LS_LINE-INFO.
    ls_line-info = sy-datum.
      APPEND LS_LINE TO PT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = '&#25171;&#21360;&#26178;&#38291;&#65306;'.
      WRITE SY-UZEIT TO LS_LINE-INFO.
    ls_line-info = sy-uzeit.
      APPEND LS_LINE TO PT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = '&#20351;&#29992;&#32773;&#65306;'.
      LS_LINE-INFO = SY-UNAME.
      APPEND LS_LINE TO PT_TOP_OF_PAGE.
    ENDFORM.                    " comment_build
    *&      Form  prepare_alv_field
          text
         -->P_GT_FIELDCAT[]  text
    FORM PREPARE_ALV_FIELD USING P_FIELDCAT TYPE  SLIS_T_FIELDCAT_ALV.
      DATA: LS_LINE TYPE  SLIS_FIELDCAT_ALV.
    *-- DEFINE MARCO
      DEFINE APPEND_ALV_FIELD.
        CLEAR LS_LINE.
        LS_LINE-FIELDNAME = &1.
        LS_LINE-TABNAME = &2.
        LS_LINE-REPTEXT_DDIC = &3.
        LS_LINE-SELTEXT_L = &3.
        LS_LINE-SELTEXT_M = &3.
        LS_LINE-SELTEXT_S = &3.
        LS_LINE-QFIELDNAME = &4.
        LS_LINE-QTABNAME = &5.
        LS_LINE-NO_OUT    = &6.
        LS_LINE-NO_ZERO   = &7.
        LS_LINE-OUTPUTLEN = &8.
        APPEND LS_LINE TO P_FIELDCAT.
      END-OF-DEFINITION.
      APPEND_ALV_FIELD: 'MATNR' 'IT_OUT' '&#26009;&#21495;'
                      'O' 'X' ''.
      APPEND_ALV_FIELD: 'WERKS' 'IT_OUT' '&#24037;&#21378;'
                       'O' 'X' ''.
      APPEND_ALV_FIELD: 'MTART' 'IT_OUT' 'MTyp'
                       'O' 'X' ''.
      APPEND_ALV_FIELD: 'MEINS' 'IT_OUT' 'BUn'
                       'O' 'X' ''.
      APPEND_ALV_FIELD: 'MATKL' 'IT_OUT' '&#29289;&#26009;&#32452;\&#20998;&#32676;&#30721;'
                       'O' 'X' ''.
      APPEND_ALV_FIELD: 'MATKX' 'IT_OUT' '&#29289;&#26009;&#25551;&#36848;'
                        'O' 'X' ''.
      APPEND_ALV_FIELD: 'PSTAT' 'IT_OUT' '&#32500;&#25252;&#29366;&#24577;'
                        'O' 'X' ''.
      APPEND_ALV_FIELD: 'BRGEW' 'IT_OUT' '&#27611;&#37325;'
                       'O' 'X' ''.
      APPEND_ALV_FIELD: 'NTGEW' 'IT_OUT' '&#20928;&#37325;'
                       'O' 'X' ''.
      APPEND_ALV_FIELD: 'GEWEI' 'IT_OUT' 'WUn'
                      'O' 'X' ''.
      APPEND_ALV_FIELD: 'FERTH' 'IT_OUT' '&#23545;&#22806;&#26426;&#31181;&#21517;'
                     'O' 'X' ''.
      APPEND_ALV_FIELD: 'KZUMW' 'IT_OUT' '&#39640;&#20851;&#31246;&#26631;&#35782;'
                   'O' 'X' ''.
      APPEND_ALV_FIELD: 'ERNAM' 'IT_OUT' '&#21019;&#24314;&#32773;'
                 'O' 'X' ''.
      APPEND_ALV_FIELD: 'ERSDA' 'IT_OUT' '&#21019;&#24314;&#26085;&#26399;'
              'O' 'X' ''.
    ENDFORM.                    " prepare_alv_field
    *&      Form  call_reuse_alv_grid_display
          text
    -->  p1        text
    <--  p2        text
    FORM CALL_REUSE_ALV_GRID_DISPLAY .
      gs_layout-f2code              = 'DISPLAY'.
      gs_print-no_print_listinfos   = 'X'.
      gs_layout-colwidth_optimize   = 'X'.       "&#21015;&#23485;&#24230;&#33258;&#21160;&#26681;&#25454;&#20869;&#23481;&#20248;&#21270;
    gs_layout-f2code              = '&ETA'.    "double check&#24377;&#20986;&#35814;&#32454;&#20449;&#24687;
      gs_layout-zebra               = 'X'.       "&#28165;&#21333;&#26465;&#32441;&#26174;&#31034;
      gs_layout-no_vline            = ''.        "&#26159;&#21542;&#26174;&#31034;&#21015;&#38388;&#38548;&#32447;
      gs_layout-box_fieldname       = ''.        "&#26159;&#21542;&#26174;&#31034;checkbox
      gs_layout-confirmation_prompt = ''.        "&#25512;&#20986;&#28165;&#21333;&#26159;&#21542;&#25552;&#31034;
      gs_layout-detail_titlebar     = '&#35814;&#32454;&#20449;&#24687;'."&#35814;&#32454;&#28165;&#21333;&#30340;&#26631;&#39064;
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM                = SY-CPROG
          I_BACKGROUND_ID                   = 'ALV_BACKGROUND'
         I_CALLBACK_PF_STATUS_SET          = 'ALV_PF_STATUS'
         I_CALLBACK_USER_COMMAND           = 'ALV_USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = GT_LIST_TOP_OF_PAGE[]
          IT_FIELDCAT                       = GT_FIELDCAT[]
          IT_EVENTS                         = GT_EVENTS[]
          I_STRUCTURE_NAME                  = 'IT_OUT'
          I_SAVE                            = 'A'
          IS_LAYOUT                         = GS_LAYOUT
          IS_PRINT                          = GS_PRINT
        TABLES
          T_OUTTAB                          = IT_OUT
        EXCEPTIONS
          PROGRAM_ERROR                     = 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.
    ENDFORM.                    " call_reuse_alv_grid_display
    *&      Form  PREPARE_ALV_FIELD
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.                    "TOP_OF_PAGE

    Hi,
    Please check your field catalog and refer field names once again.
    Check spelling, or Check strucutre properly.
    There are something wrong in your catalog definition
    aRs.

Maybe you are looking for