Uploading the data to application server

Hi,
I have created a report.In the selection screen I have created 2 check boxes(screen,server).If I click on the screen check box the o/p should be displayed on the screen.If I click on the server checkbox the o/p should be sent to the application server.How can I send the data to application server?
Regards,
Hema

Hi Hema,
Since the location that you have mentioned is some outside the systema nd no the Application Server,this third party location can be done only when there is some other T-code that has been integrated with the system.
If in case,you want to send the data to the Presentation server when you clikc on the Checkbox for it, and else,it should save it on the Applicaton server ,the code is mentioned below:
*& Report  ZHYPERION                                                   *
*& Project : SubSea7
Created on : 07/02/2007
Created by : Puneet Jhari.
*& Purpose : For SAP Interface download Hyperion.
REPORT  zhyperion NO STANDARD PAGE HEADING  MESSAGE-ID zhyper.
Start of Data Declaration
TYPE-POOLS : truxs,vrm.
TABLES : glpct,cepc.
DATA : var TYPE i,
        total TYPE f.
DATA : BEGIN OF wa2,
       ryear LIKE glpct-ryear,
       rbukrs LIKE glpct-rbukrs,
       racct LIKE glpct-racct,
       ksl01 LIKE glpct-ksl01,
       END OF wa2.
DATA : BEGIN OF wa3,
       ryear LIKE glpct-ryear,
       rbukrs LIKE glpct-rbukrs,
       racct LIKE glpct-racct,
       ksl01 LIKE glpct-ksl01,
       END OF wa3.
DATA : BEGIN OF wa4,
       racct LIKE glpct-racct,
       END OF wa4.
DATA : BEGIN OF wa5,
       rbukrs LIKE glpct-rbukrs,
       racct LIKE glpct-racct,
       total1(8) TYPE p DECIMALS 2,
       END OF wa5.
DATA : BEGIN OF wa9,
       khinr LIKE cepc-khinr,
       racct LIKE glpct-racct,
       total1(8) TYPE p DECIMALS 2,
       END OF wa9.
DATA : BEGIN OF wa6,
       khinr LIKE cepc-khinr,
       prctr LIKE cepc-prctr,
       rprctr LIKE glpct-rprctr,
       ryear LIKE glpct-ryear,
       rbukrs LIKE glpct-rbukrs,
       racct LIKE glpct-racct,
       ksl01 LIKE glpct-ksl01,
       END OF wa6.
DATA : BEGIN OF wa7,
       khinr LIKE cepc-khinr,
       prctr LIKE cepc-prctr,
       rprctr LIKE glpct-rprctr,
       ryear LIKE glpct-ryear,
       rbukrs LIKE glpct-rbukrs,
       racct LIKE glpct-racct,
       ksl01 LIKE glpct-ksl01,
       END OF wa7.
DATA : itab3 LIKE TABLE OF wa2,
       itab4 LIKE TABLE OF wa3,
       itab5 LIKE TABLE OF wa4 WITH HEADER LINE,
       itab6 LIKE TABLE OF wa5 WITH HEADER LINE,
       itab7 LIKE TABLE OF wa6,
       itab8 LIKE TABLE OF wa7,
       itab10 LIKE TABLE OF wa9.
DATA : flag(1) TYPE c,
       temp(6) TYPE c.
DATA : itab2 TYPE truxs_t_text_data,
       itab9 TYPE truxs_t_text_data WITH HEADER LINE.
DATA : name TYPE vrm_id,
       list TYPE vrm_values,
       value LIKE LINE OF list,
       FILNAM11 TYPE STRING,
       FILNAM21 TYPE STRING.
End of Data Declaration
Begin of Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: r1 DEFAULT 'X' RADIOBUTTON GROUP g1 USER-COMMAND rad1,
r2 RADIOBUTTON GROUP g1 .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.
PARAMETERS: rbukrs1 TYPE glpct-rbukrs MODIF ID ful,
            khinr1 TYPE cepc-khinr AS LISTBOX VISIBLE LENGTH 20
            MODIF ID sam ,
            ryear1 TYPE glpct-ryear MODIF ID ful,
            ryear2 TYPE glpct-ryear MODIF ID sam,
            rpmax1 TYPE i MODIF ID ful,
            rpmax2 TYPE i MODIF ID sam,
            filnam1 TYPE rlgrap-filename MODIF ID ful,
            filnam2 TYPE RLGRAP-FILENAME MODIF ID sam.
SELECTION-SCREEN END OF BLOCK b3.
End of Selection Screen
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
PERFORM populate.          "For populating the drop-down list.
CLEAR VALUE.
REFRESH LIST.
NAME = 'KHINR1'.
VALUE-KEY = '1S7_NOCASV'.
VALUE-TEXT = '1S7_NOCASV'.
APPEND VALUE TO LIST.
VALUE-KEY = '1S7_NOCJOT'.
VALUE-TEXT = '1S7_NOCJOT'.
APPEND VALUE TO LIST.
LOOP AT SCREEN.            "For toggling between the selection screens.
    IF r1 EQ 'X'.
      IF screen-group1 = 'SAM'.
        screen-active = 0.
      ENDIF.
    ELSEIF r2 EQ 'X'.
      IF screen-group1 = 'FUL'.
        screen-active = 0.
      ENDIF.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
For the Drop-Down Listbox
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id                    = name
      values                = list
EXCEPTIONS
  ID_ILLEGAL_NAME       = 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.
Begin of Data Selection
START-OF-SELECTION.
When Company Code radio button is selected.
  IF r1 EQ 'X'.            "If Company Code radio button is selected.
    IF rbukrs1 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
    IF rpmax1 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
    IF ryear1 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
    IF filnam1 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
MOVE FILNAM1 TO FILNAM11.
    CASE rpmax1.
      WHEN '01'.
        SELECT ryear rbukrs racct ksl01
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '02'.
        SELECT ryear rbukrs racct ksl02
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '03'.
        SELECT ryear rbukrs racct ksl03
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '04'.
        SELECT ryear rbukrs racct ksl04
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '05'.
        SELECT ryear rbukrs racct ksl05
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '06'.
        SELECT ryear rbukrs racct ksl06
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '07'.
        SELECT ryear rbukrs racct ksl07
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '08'.
        SELECT ryear rbukrs racct ksl08
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '09'.
        SELECT ryear rbukrs racct ksl09
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '10'.
        SELECT ryear rbukrs racct ksl10
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '11'.
        SELECT ryear rbukrs racct ksl11
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '12'.
        SELECT ryear rbukrs racct ksl12
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '13'.
        SELECT ryear rbukrs racct ksl13
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '14'.
        SELECT ryear rbukrs racct ksl14
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '15'.
        SELECT ryear rbukrs racct ksl15
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
      WHEN '16'.
        SELECT ryear rbukrs racct ksl16
FROM glpct INTO TABLE itab3 WHERE rbukrs EQ rbukrs1 AND ryear EQ ryear1.
    ENDCASE.
    MOVE itab3 TO itab4.
    LOOP AT itab3 INTO wa2.
      flag = 0.
      LOOP AT itab5 INTO wa4.
        IF wa2-racct EQ wa4-racct.
          flag = 1.
          EXIT.
        ENDIF.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab5.
      IF flag = 1.
        CONTINUE.
      ENDIF.
      LOOP AT itab4 INTO wa3.
        IF wa2-rbukrs EQ wa3-rbukrs AND wa2-racct EQ wa3-racct AND
        wa2-ryear EQ wa3-ryear.
          total = total + wa3-ksl01.
        ENDIF.
      ENDLOOP.
      wa5-rbukrs = wa2-rbukrs.
      wa5-racct = wa2-racct+4(6).
      wa5-total1 = total.
      APPEND wa5 TO itab6.
      CLEAR total.
      APPEND wa2-racct TO itab5.
    ENDLOOP.
If no data is available corresponding to the values entered.
    IF itab6[] IS INITIAL.
      MESSAGE i003.
    ENDIF.
For making the file Comma separated
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ','
I_LINE_HEADER              =
  I_FILENAME                 =
  I_APPL_KEEP                = ' '
      TABLES
        i_tab_sap_data             = itab6
     CHANGING
       i_tab_converted_data       = itab2
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.
For downloading it to the Presentation Server
   MOVE itab2[] TO itab9[].
   OPEN DATASET filnam1 FOR OUTPUT IN LEGACY TEXT MODE.
   LOOP AT itab9.
     TRANSFER itab9 TO filnam1.
   ENDLOOP.
   CLOSE DATASET filnam1.
   IF sy-subrc EQ 0.
     MESSAGE s004.
   ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
  BIN_FILESIZE                    =
    filename                        = FILNAM11
  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                      = ' '
  WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
IMPORTING
  FILELENGTH                      =
  tables
    data_tab                        = itab2
  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 eq 0.
message s004.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
When Region radio button is selected.
  ELSEIF r2 EQ 'X'.
    IF khinr1 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
    IF rpmax2 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
    IF ryear2 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
    IF filnam2 IS INITIAL.
      MESSAGE i002.
      LEAVE TO SCREEN 1000.
    ENDIF.
MOVE FILNAM2 TO FILNAM21.
    CASE rpmax2.
      WHEN '01'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl01
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '02'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl02
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '03'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl03
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '04'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl04
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '05'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl05
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '06'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl06
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '07'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl07
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '08'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl08
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '09'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl09
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '10'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl10
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '11'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl11
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '12'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl12
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '13'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl13
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '14'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl14
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '15'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl15
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
      WHEN '16'.
       SELECT ckhinr cprctr grprctr gryear grbukrs gracct g~ksl16
       INTO CORRESPONDING FIELDS OF TABLE itab7
       FROM (  glpct AS g
               INNER JOIN cepc AS c ON grprctr = cprctr )
       WHERE c~khinr = khinr1 AND
             g~ryear = ryear2.
    ENDCASE.
    MOVE itab7 TO itab8.
    LOOP AT itab7 INTO wa6.
      flag = 0.
      LOOP AT itab5 INTO wa4.
        IF wa6-racct EQ wa4-racct.
          flag = 1.
          EXIT.
        ENDIF.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM itab5.
      IF flag = 1.
        CONTINUE.
      ENDIF.
      LOOP AT itab8 INTO wa7.
        IF wa6-rbukrs EQ wa7-rbukrs AND wa6-racct EQ wa7-racct AND
        wa6-ryear EQ wa7-ryear.
          total = total + wa7-ksl01.
        ENDIF.
      ENDLOOP.
      wa9-khinr = khinr1.
      wa9-racct = wa6-racct+4(6).
      wa9-total1 = total.
      APPEND wa9 TO itab10.
      CLEAR total.
      APPEND wa6-racct TO itab5.
    ENDLOOP.
*If no data is available corresponding to the values entered.
    IF itab10 IS INITIAL.
      MESSAGE i003.
    ENDIF.
For making the file Comma separated
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ','
  I_LINE_HEADER              =
  I_FILENAME                 =
  I_APPL_KEEP                = ' '
      TABLES
        i_tab_sap_data             = itab10
     CHANGING
       i_tab_converted_data       = itab2
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.
For downloading it to the Presentation Server
   MOVE itab2[] TO itab9[].
   OPEN DATASET filnam2 FOR OUTPUT IN LEGACY TEXT MODE.
   LOOP AT itab9.
     TRANSFER itab9 TO filnam2.
   ENDLOOP.
   CLOSE DATASET filnam2.
   IF sy-subrc EQ 0.
     MESSAGE s004.
   ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
  BIN_FILESIZE                    =
    filename                        = FILNAM21
  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                      = ' '
  WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
IMPORTING
  FILELENGTH                      =
  tables
    data_tab                        = itab2
  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 eq 0.
message s004.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
  ENDIF.
*&      Form  POPULATE
      text
FORM populate.
  CLEAR value.
  REFRESH list.
  name = 'KHINR1'.
  value-key = '1S7_SUBSEA'.
  value-text = '1S7_SUBSEA'.
  APPEND value TO list.
  value-key = '1S7_GEN'.
  value-text = '1S7_GEN'.
  APPEND value TO list.
  value-key = '1S7'.
  value-text = '1S7'.
  APPEND value TO list.
  value-key = '1S7_CORPTP'.
  value-text = '1S7_CORPTP'.
  APPEND value TO list.
  value-key = '1S7_BRRE'.
  value-text = '1S7_BRRE'.
  APPEND value TO list.
  value-key = '1S7_BRCON'.
  value-text = '1S7_BRCON'.
  APPEND value TO list.
  value-key = '1S7_BRCJOB'.
  value-text = '1S7_BRCJOB'.
  APPEND value TO list.
  value-key = '1S7_BRCJBU'.
  value-text = '1S7_BRCJBU'.
  APPEND value TO list.
  value-key = '1S7_BRCJCO'.
  value-text = '1S7_BRCJCO'.
  APPEND value TO list.
  value-key = '1S7_BRCJIR'.
  value-text = '1S7_BRCJIR'.
  APPEND value TO list.
  value-key = '1S7_BRCJEN'.
  value-text = '1S7_BRCJEN'.
  APPEND value TO list.
  value-key = '1S7_BRCJPI'.
  value-text = '1S7_BRCJPI'.
  APPEND value TO list.
  value-key = '1S7_BRCJSU'.
  value-text = '1S7_BRCJSU'.
  APPEND value TO list.
  value-key = '1S7_BRCJFL'.
  value-text = '1S7_BRCJFL'.
  APPEND value TO list.
  value-key = '1S7_BRCJOT'.
  value-text = '1S7_BRCJOT'.
  APPEND value TO list.
  value-key = '1S7_BRCASV'.
  value-text = '1S7_BRCASV'.
  APPEND value TO list.
  value-key = '1S7_BRCASE'.
  value-text = '1S7_BRCASE'.
  APPEND value TO list.
  value-key = '1S7_BRCOOC'.
  value-text = '1S7_BRCOOC'.
  APPEND value TO list.
  value-key = '1S7_BRCOHD'.
  value-text = '1S7_BRCOHD'.
  APPEND value TO list.
  value-key = '1S7_BRCGEN'.
  value-text = '1S7_BRCGEN'.
  APPEND value TO list.
  value-key = '1S7_BRDRI'.
  value-text = '1S7_BRDRI'.
  APPEND value TO list.
  value-key = '1S7_BRDJOB'.
  value-text = '1S7_BRDJOB'.
  APPEND value TO list.
  value-key = '1S7_BRDASV'.
  value-text = '1S7_BRDASV'.
  APPEND value TO list.
  value-key = '1S7_BRDASE'.
  value-text = '1S7_BRDASE'.
  APPEND value TO list.
  value-key = '1S7_BRDAEW'.
  value-text = '1S7_BRDAEW'.
  APPEND value TO list.
  value-key = '1S7_BRDAEO'.
  value-text = '1S7_BRDAEO'.
  APPEND value TO list.
  value-key = '1S7_BRDAET'.
  value-text = '1S7_BRDAET'.
  APPEND value TO list.
  value-key = '1S7_BRDOOC'.
  value-text = '1S7_BRDOOC'.
  APPEND value TO list.
  value-key = '1S7_BRDOHD'.
  value-text = '1S7_BRDOHD'.
  APPEND value TO list.
  value-key = '1S7_BRVER'.
  value-text = '1S7_BRVER'.
  APPEND value TO list.
  value-key = '1S7_BRVJOB'.
  value-text = '1S7_BRVJOB'.
  APPEND value TO list.
  value-key = '1S7_BRVASV'.
  value-text = '1S7_BRVASV'.
  APPEND value TO list.
  value-key = '1S7_BRVASE'.
  value-text = '1S7_BRVASE'.
  APPEND value TO list.
  value-key = '1S7_BRVOOC'.
  value-text = '1S7_BRVOOC'.
  APPEND value TO list.
  value-key = '1S7_BRVOHD'.
  value-text = '1S7_BRVOHD'.
  APPEND value TO list.
  value-key = '1S7_UKRE'.
  value-text = '1S7_UKRE'.
  APPEND value TO list.
  value-key = '1S7_UKCON'.
  value-text = '1S7_UKCON'.
  APPEND value TO list.
  value-key = '1S7_UKCJOB'.
  value-text = '1S7_UKCJOB'.
  APPEND value TO list.
  value-key = '1S7_UKCJBU'.
  value-text = '1S7_UKCJBU'.
  APPEND value TO list.
  value-key = '1S7_UKCJCO'.
  value-text = '1S7_UKCJCO'.
  APPEND value TO list.
  value-key = '1S7_UKCJIR'.
  value-text = '1S7_UKCJIR'.
  APPEND value TO list.
  value-key = '1S7_UKCJEN'.
  value-text = '1S7_UKCJEN'.
  APPEND value TO list.
  value-key = '1S7_UKCJPI'.
  value-text = '1S7_UKCJPI'.
  APPEND value TO list.
  value-key = '1S7_UKCJSU'.
  value-text = '1S7_UKCJSU'.
  APPEND value TO list.
  value-key = '1S7_UKCJFL'.
  value-text = '1S7_UKCJFL'.
  APPEND value TO list.
  value-key = '1S7_UKCJOT'.
  value-text = '1S7_UKCJOT'.
  APPEND value TO list.
  value-key = '1S7_UKCASV'.
  value-text = '1S7_UKCASV'.
  APPEND value TO list.
  value-key = '1S7_UKCASE'.
  value-text = '1S7_UKCASE'.
  APPEND value TO list.
  value-key = '1S7_UKCOOC'.
  value-text = '1S7_UKCOOC'.
  APPEND value TO list.
  value-key = '1S7_UKBA'.
  value-text = '1S7_UKBA'.
  APPEND value TO list.
  value-key = '1S7_UKBATE'.
  value-text = '1S7_UKBATE'.
  APPEND value TO list.
  value-key = '1S7_UKCOHD'.
  value-text = '1S7_UKCOHD'.
  APPEND value TO list.
  value-key = '1S7_UKCGEN'.
  value-text = '1S7_UKCGEN'.
  APPEND value TO list.
  value-key = '1S7_UKDRI'.
  value-text = '1S7_UKDRI'.
  APPEND value TO list.
  value-key = '1S7_UKDJOB'.
  value-text = '1S7_UKDJOB'.
  APPEND value TO list.
  value-key = '1S7_UKDASV'.
  value-text = '1S7_UKDASV'.
  APPEND value TO list.
  value-key = '1S7_UKDASE'.
  value-text = '1S7_UKDASE'.
  APPEND value TO list.
  value-key = '1S7_UKDAEW'.
  value-text = '1S7_UKDAEW'.
  APPEND value TO list.
  value-key = '1S7_UKDAEO'.
  value-text = '1S7_UKDAEO'.
  APPEND value TO list.
  value-key = '1S7_UKDAET'.
  value-text = '1S7_UKDAET'.
  APPEND value TO list.
  value-key = '1S7_UKDOOC'.
  value-text = '1S7_UKDOOC'.
  APPEND value TO list.
  value-key = '1S7_UKDOHD'.
  value-text = '1S7_UKDOHD'.
  APPEND value TO list.
  value-key = '1S7_UKVER'.
  value-text = '1S7_UKVER'.
  APPEND value TO list.
  value-key = '1S7_UKVJOB'.
  value-text = '1S7_UKVJOB'.
  APPEND value TO list.
  value-key = '1S7_UKVASV'.
  value-text = '1S7_UKVASV'.
  APPEND value TO list.
  value-key = '1S7_UKVASE'.
  value-text = '1S7_UKVASE'.
  APPEND value TO list.
  value-key = '1S7_UKVOOC'.
  value-text = '1S7_UKVOOC'.
  APPEND value TO list.
  value-key = '1S7_UKVOHD'.
  value-text = '1S7_UKVOHD'.
  APPEND value TO list.
  value-key = '1S7_NORE'.
  value-text = '1S7_NORE'.
  APPEND value TO list.
  value-key = '1S7_NOCON'.
  value-text = '1S7_NOCON'.
  APPEND value TO list.
  value-key = '1S7_NOCJOB'.
  value-text = '1S7_NOCJOB'.
  APPEND value TO list.
  value-key = '1S7_NOCJBU'.
  value-text = '1S7_NOCJBU'.
  APPEND value TO list.
  value-key = '1S7_NOCJCO'.
  value-text = '1S7_NOCJCO'.
  APPEND value TO list.
  value-key = '1S7_NOCJIR'.
  value-text = '1S7_NOCJIR'.
  APPEND value TO list.
  value-key = '1S7_NOCJEN'.
  value-text = '1S7_NOCJEN'.
  APPEND value TO list.
  value-key = '1S7_NOCJPI'.
  value-text = '1S7_NOCJPI'.
  APPEND value TO list.
  value-key = '1S7_NOCJSU'.
  value-text = '1S7_NOCJSU'.
  APPEND value TO list.
  value-key = '1S7_NOCJFL'.
  value-text = '1S7_NOCJFL'.
  APPEND value TO list.
  value-key = '1S7_NOCJOT'.
  value-text = '1S7_NOCJOT'.
  APPEND value TO list.
  value-key = '1S7_NOCASV'.
  value-text = '1S7_NOCASV'.
  APPEND value TO list.
  value-key = '1S7_NOCASE'.
  value-text = '1S7_NOCASE'.
  APPEND value TO list.
  value-key = '1S7_NOCOOC'.
  value-text = '1S7_NOCOOC'.
  APPEND value TO list.
  value-key = '1S7_NOCOHD'.
  value-text = '1S7_NOCOHD'.
  APPEND value TO list.
  value-key = '1S7_NOCGEN'.
  value-text = '1S7_NOCGEN'.
  APPEND value TO list.
  value-key = '1S7_NODRI'.
  value-text = '1S7_NODRI'.
  APPEND value TO list.
  value-key = '1S7_NODJOB'.
  value-text = '1S7_NODJOB'.
  APPEND value TO list.
  value-key = '1S7_NODASV'.
  value-text = '1S7_NODASV'.
  APPEND value TO list.
  value-key = '1S7_NODASE'.
  value-text = '1S7_NODASE'.
  APPEND value TO list.
  value-key = '1S7_NODAEW'.
  value-text = '1S7_NODAEW'.
  APPEND value TO list.
  value-key = '1S7_NODAEO'.
  value-text = '1S7_NODAEO'.
  APPEND value TO list.
  value-key = '1S7_NODAET'.
  value-text = '1S7_NODAET'.
  APPEND value TO list.
  value-key = '1S7_NODOOC'.
  value-text = '1S7_NODOOC'.
  APPEND value TO list.
  value-key = '1S7_NODOHD'.
  value-text = '1S7_NODOHD'.
  APPEND value TO list.
  value-key = '1S7_NOVER'.
  value-text = '1S7_NOVER'.
  APPEND value TO list.
  value-key = '1S7_NOVJOB'.
  value-text = '1S7_NOVJOB'.
  APPEND value TO list.
  value-key = '1S7_NOVASV'.
  value-text = '1S7_NOVASV'.
  APPEND value TO list.
  value-key = '1S7_NOVASE'.
  value-text = '1S7_NOVASE'.
  APPEND value TO list.
  value-key = '1S7_NOVOOC'.
  value-text = '1S7_NOVOOC'.
  APPEND value TO list.
  value-key = '1S7_NOVOHD'.
  value-text = '1S7_NOVOHD'.
  APPEND value TO list.
  value-key = '1S7_GORE'.
  value-text = '1S7_GORE'.
  APPEND value TO list.
  value-key = '1S7_GOCON'.
  value-text = '1S7_GOCON'.
  APPEND value TO list.
  value-key = '1S7_GOCJOB'.
  value-text = '1S7_GOCJOB'.
  APPEND value TO list.
  value-key = '1S7_GOCJBU'.
  value-text = '1S7_GOCJBU'.
  APPEND value TO list.
  value-key = '1S7_GOCJCO'.
  value-text = '1S7_GOCJCO'.
  APPEND value TO list.
  value-key = '1S7_GOCJIR'.
  value-text = '1S7_GOCJIR'.
  APPEND value TO list.
  value-key = '1S7_GOCJEN'.
  value-text = '1S7_GOCJEN'.
  APPEND value TO list.
  value-key = '1S7_GOCJPI'.
  value-text = '1S7_GOCJPI'.
  APPEND value TO list.
  value-key = '1S7_GOCJSU'.
  value-text = '1S7_GOCJSU'.
  APPEND value TO list.
  value-key = '1S7_GOCJFL'.
  value-text = '1S7_GOCJFL'.
  APPEND value TO list.
  value-key = '1S7_GOCJOT'.
  value-text = '1S7_GOCJOT'.
  APPEND value TO list.
  value-key = '1S7_GOCASV'.
  value-text = '1S7_GOCASV'.
  APPEND value TO list.
  value-key = '1S7_GOCASE'.
  value-text = '1S7_GOCASE'.
  APPEND value TO list.
  value-key = '1S7_GOCOOC'.
  value-text = '1S7_GOCOOC'.
  APPEND value TO list.
  value-key = '1S7_GOCOHD'.
  value-text = '1S7_GOCOHD'.
  APPEND value TO list.
  value-key = '1S7_GOCGEN'.
  value-text = '1S7_GOCGEN'.
  APPEND value TO list.
  value-key = '1S7_GODRI'.
  value-text = '1S7_GODRI'.
  APPEND value TO list.
  value-key = '1S7_GODJOB'.
  value-text = '1S7_GODJOB'.
  APPEND value TO list.
  value-key = '1S7_GODASV'.
  value-text = '1S7_GODASV'.
  APPEND value TO list.
  value-key = '1S7_GODASE'.
  value-text = '1S7_GODASE'.
  APPEND value TO list.
  value-key = '1S7_GODAEW'.
  value-text = '1S7_GODAEW'.
  APPEND value TO list.
  value-key = '1S7_GODAEO'.
  value-text = '1S7_GODAEO'.
  APPEND value TO list.
  value-key = '1S7_GODAET'.
  value-text = '1S7_GODAET'.
  APPEND value TO list.
  value-key = '1S7_GODOOC'.
  value-text = '1S7_GODOOC'.
  APPEND value TO list.
  value-key = '1S7_GODOHD'.
  value-text = '1S7_GODOHD'.
  APPEND value TO list.
  value-key = '1S7_GOVER'.
  value-text = '1S7_GOVER'.
  APPEND value TO list.
  value-key = '1S7_GOVJOB'.
  value-text = '1S7_GOVJOB'.
  APPEND value TO list.
  value-key = '1S7_GOVASV'.
  value-text = '1S7_GOVASV'.
  APPEND value TO list.
  value-key = '1S7_GOVASE'.
  value-text = '1S7_GOVASE'.
  APPEND value TO list.
  value-key = '1S7_GOVOOC'.
  value-text = '1S7_GOVOOC'.
  APPEND value TO list.
  value-key = '1S7_GOVOHD'.
  value-text = '1S7_GOVOHD'.
  APPEND value TO list.
  value-key = '1S7_GVRE'.
  value-text = '1S7_GVRE'.
  APPEND value TO list.
  value-key = '1S7_GVCON'.
  value-text = '1S7_GVCON'.
  APPEND value TO list.
  value-key = '1S7_GVCJOB'.
  value-text = '1S7_GVCJOB'.
  APPEND value TO list.
  value-key = '1S7_GVCJBU'.
  value-text = '1S7_GVCJBU'.
  APPEND value TO list.
  value-key = '1S7_GVCJCO'.
  value-text = '1S7_GVCJCO'.
  APPEND value TO list.
  value-key = '1S7_GVCJIR'.
  value-text = '1S7_GVCJIR'.
  APPEND value TO list.
  value-key = '1S7_GVCJEN'.
  value-text = '1S7_GVCJEN'.
  APPEND value TO list.
  value-key = '1S7_GVCJPI'.
  value-text = '1S7_GVCJPI'.
  APPEND value TO list.
  value-key = '1S7_GVCJSU'.
  value-text = '1S7_GVCJSU'.
  APPEND value TO list.
  value-key = '1S7_GVCJFL'.
  value-text = '1S7_GVCJFL'.
  APPEND value TO list.
  value-key = '1S7_GVCJOT'.
  value-text = '1S7_GVCJOT'.
  APPEND value TO list.
  value-key = '1S7_GVCASV'.
  value-text = '1S7_GVCASV'.
  APPEND value TO list.
  value-key = '1S7_GVCASE'.
  value-text = '1S7_GVCASE'.
  APPEND value TO list.
  value-key = '1S7_GVCOOC'.
  value-text = '1S7_GVCOOC'.
  APPEND value TO list.
  value-key = '1S7_GVCOHD'.
  value-text = '1S7_GVCOHD'.
  APPEND value TO list.
  value-key = '1S7_GVCGEN'.
  value-text = '1S7_GVCGEN'.
  APPEND value TO list.
  value-key = '1S7_GVDRI'.
  value-text = '1S7_GVDRI'.
  APPEND value TO list.
  value-key = '1S7_GVDJOB'.
  value-text = '1S7_GVDJOB'.
  APPEND value TO list.
  value-key = '1S7_GVDASV'.
  value-text = '1S7_GVDASV'.
  APPEND value TO list.
  value-key = '1S7_GVDASE'.
  value-text = '1S7_GVDASE'.
  APPEND value TO list.
  value-key = '1S7_GVDOOC'.
  value-text = '1S7_GVDOOC'.
  APPEND value TO list.
  value-key = '1S7_GVDOHD'.
  value-text = '1S7_GVDOHD'.
  APPEND value TO list.
  value-key = '1S7_GVVER'.
  value-text = '1S7_GVVER'.
  APPEND value TO list.
  value-key = '1S7_GVVJOB'.
  value-text = '1S7_GVVJOB'.
  APPEND value TO list.
  value-key = '1S7_GVVASV'.
  value-text = '1S7_GVVASV'.
  APPEND value TO list.
  value-key = '1S7_GVVASE'.
  value-text = '1S7_GVVASE'.
  APPEND value TO list.
  value-key = '1S7_GVVOOC'.
  value-text = '1S7_GVVOOC'.
  APPEND value TO list.
  value-key = '1S7_GVVOHD'.
  value-text = '1S7_GVVOHD'.
  APPEND value TO list.
  value-key = '1S7_GCRE'.
  value-text = '1S7_GCRE'.
  APPEND value TO list.
  value-key = '1S7_GCCON'.
  value-text = '1S7_GCCON'.
  APPEND value TO list.
  value-key = '1S7_GCCJOB'.
  value-text = '1S7_GCCJOB'.
  APPEND value TO list.
  value-key = '1S7_GCCJBU'.
  value-text = '1S7_GCCJBU'.
  APPEND value TO list.
  value-key = '1S7_GCCJCO'.
  value-text = '1S7_GCCJCO'.
  APPEND value TO list.
  value-key = '1S7_GCCJIR'.
  value-text = '1S7_GCCJIR'.
  APPEND value TO list.
  value-key = '1S7_GCCJEN'.
  value-text = '1S7_GCCJEN'.
  APPEND value TO list.
  value-key = '1S7_GCCJPI'.
  value-text = '1S7_GCCJPI'.
  APPEND value TO list.
  value-key = '1S7_GCCJSU'.
  value-text = '1S7_GCCJSU'.
  APPEND value TO list.
  value-key = '1S7_GCCJFL'.
  value-text = '1S7_GCCJFL'.
  APPEND value TO list.
  value-key = '1S7_GCCJOT'.
  value-text = '1S7_GCCJOT'.
  APPEND value TO list.
  value-key = '1S7_GCCASV'.
  value-text = '1S7_GCCASV'.
  APPEND value TO list.
  value-key = '1S7_GCCASE'.
  value-text = '1S7_GCCASE'.
  APPEND value TO list.
  value-key = '1S7_GCCOOC'.
  value-text = '1S7_GCCOOC'.
  APPEND value TO list.
  value-key = '1S7_GCCOHD'.
  value-text = '1S7_GCCOHD'.
  APPEND value TO list.
  value-key = '1S7_GCCRD'.
  value-text = '1S7_GCCRD'.
  APPEND value TO list.
  value-key = '1S7_GCCGEN'.
  value-text = '1S7_GCCGEN'.
  APPEND value TO list.
  value-key = '1S7_GCDRI'.
  value-text = '1S7_GCDRI'.
  APPEND value TO list.
  value-key = '1S7_GCDJOB'.
  value-text = '1S7_GCDJOB'.
  APPEND value TO list.
  value-key = '1S7_GCDASV'.
  value-text = '1S7_GCDASV'.
  APPEND value TO list.
  value-key = '1S7_GCDASE'.
  value-text = '1S7_GCDASE'.
  APPEND value TO list.
  value-key = '1S7_GCDOOC'.
  value-text = '1S7_GCDOOC'.
  APPEND value TO list.
  value-key = '1S7_GCDOHD'.
  value-text = '1S7_GCDOHD'.
  APPEND value TO list.
  value-key = '1S7_GCVER'.
  value-text = '1S7_GCVER'.
  APPEND value TO list.
  value-key = '1S7_GCVJOB'.
  value-text = '1S7_GCVJOB'.
  APPEND value TO list.
  value-key = '1S7_GCVASV'.
  value-text = '1S7_GCVASV'.
  APPEND value TO list.
  value-key = '1S7_GCVASE'.

Similar Messages

  • Need Sample code to upload the data to Application Server

    Hi ,
    I need to upload the data to application server.
    The output should be an XML file.
    Can anybody send me sample code for this.
    Reward points are assured.
    Best Regards
    Bhagat.

    may be this code wil help ,first to downjload the XML fine -
    1)
    REPORT  zhr_test2_tk.
    TYPE-POOLS: ixml.
    TYPES: BEGIN OF xml_line,
            data(256) TYPE x,
           END OF xml_line.
    DATA: l_ixml            TYPE REF TO if_ixml,
          l_streamfactory   TYPE REF TO if_ixml_stream_factory,
          l_ostream         TYPE REF TO if_ixml_ostream,
          l_renderer        TYPE REF TO if_ixml_renderer,
          l_document        TYPE REF TO if_ixml_document.
    DATA: l_element_position TYPE REF TO if_ixml_element,
          l_element_title    TYPE REF TO if_ixml_element,
           l_element_flight  TYPE REF TO if_ixml_element,
           l_element_from    TYPE REF TO if_ixml_element,
           l_element_to      TYPE REF TO if_ixml_element,
            l_element_dummy   TYPE REF TO if_ixml_element,
             l_value           TYPE string.
    DATA: l_xml_table       TYPE TABLE OF xml_line,
          l_xml_size        TYPE i,
          l_rc              TYPE i.
    DATA: lt_erec TYPE TABLE OF hrp5126,
          l_erec TYPE hrp5126.
    DATA: date(10),
          time(4),
          filepath TYPE string.
    CONSTANTS: filedir TYPE string VALUE 'C:\tmp\',
               filename TYPE string VALUE 'ZHR_test'.
    START-OF-SELECTION.
    fill internal table
      SELECT * FROM hrp5126 INTO TABLE lt_erec.
    Start filling xml DOM object from internal table lt_erec.
      LOOP AT lt_erec INTO l_erec.
    *Create the root node 'position'
        IF sy-tabix EQ 1.
        create an ixml factory
          l_ixml = cl_ixml=>create( ).
        create Document Object Model
          l_document = l_ixml->create_document( ).
       Fill root node with value 'position'
          l_element_position = l_document->create_simple_element(
                         name   = 'position'
                         parent = l_document ).
        ENDIF.
        IF sy-tabix GT 1.
        create element jobtitle as child of position
          l_value = l_erec-jobtitle.
          l_element_title = l_document->create_simple_element(
                             name   = 'job_title'
                             parent = l_element_position
                             value  = l_value ).
          l_value = l_erec-empl_start_date.
          l_element_dummy = l_document->create_simple_element(
                             name   = 'StartDate'
                             parent = l_element_title
                             value  = l_value ).
          l_value = l_erec-empl_end_date.
          l_element_dummy = l_document->create_simple_element(
                             name   = 'EndDate'
                             parent = l_element_title
                             value  = l_value ).
        ENDIF.
      ENDLOOP.
      IF sy-subrc NE 0.
        WRITE: 'No data in table hrp5125'.
      ENDIF.
    create a stream factory
      l_streamfactory = l_ixml->create_stream_factory( ).
    connect internal XML table to streamfactory
      l_ostream = l_streamfactory->create_ostream_itable(
                      table = l_xml_table ).
    render the document
      l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                            document = l_document ).
      l_rc = l_renderer->render( ).
    Get time and date
      WRITE sy-uzeit2(2) TO time2(2).
      WRITE sy-uzeit0(2) TO time0(2).
      WRITE sy-datum4(2) TO date0(2).
      WRITE sy-datum6(2) TO date2(2).
      WRITE sy-datum0(4) TO date4(4).
    *Build filename with date and time reference
    CONCATENATE filedir filename date time '.xml' INTO filepath.
    <i>* This is the code I hope to modify in order to save the xml structure on the application server, with a specified filepath.</i>
    <b>  OPEN DATASET filepath FOR OUTPUT IN BINARY MODE.
      LOOP AT lt_erec into l_erec.
        TRANSFER  l_erec TO filepath.
      ENDLOOP.
      CLOSE DATASET filepath.</b>
    save XML document
      l_xml_size = l_ostream->get_num_written_raw( ).
    *This is the code for download to local computer
    CALL METHOD cl_gui_frontend_services=>gui_download
       EXPORTING
         bin_filesize            = l_xml_size
         filename                = filepath
         filetype                = 'BIN'
       CHANGING
         data_tab                = l_xml_table
       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.
    2) uploading tht PC XML file to APPliaction server -
    DATA rec like QISRS_XML_LINE.
    OPEN DATASET filepath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT l_xml_table into rec.
    TRANSFER rec TO filepath.
    ENDLOOP.
    CLOSE DATASET filepath.

  • Uploading the data from Application server to Database

    Hi,
    I am trying to upload tab delimited file from application server into database.
    I have upload the file from presentation to application server by CGZ3
    and i am able to see file in app server with #s and it appers in application server as
    10140#A#E#120#abcd#
    10146#M#P#300#a.b#
    10152#M#P#200#dat123.com##
    140#A#P#300#blicksat123.com#
    10140#A#E#260#cust1at123.com##
    And my notepad records looks like
    10140     A     E     120     abcd
    10146     M     P     300     a.b
    10152     M     P     200     dat123.com     
    140     A     P     300      blicksat123.com
    10140     A     E      260     cust1at123.com
    I am using open data set and read dataset to read the file as shown below
    DATA:
        l_htab      TYPE c,                " Horizontal tab
        l_line(100) TYPE c.                " Content in the file
      l_htab = cl_abap_char_utilities=>horizontal_tab.
    Open dataset
      OPEN DATASET pp_afname FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc EQ 0.
        DO.
    Read dataset
          READ DATASET pp_afname INTO l_line.
          IF sy-subrc EQ 0.
            SPLIT l_line AT l_htab
                       INTO fs_file-carrid
                            fs_file-autoind
                            fs_file-commtype
                            fs_file-resptime
                            fs_file-smtpaddr.
            APPEND fs_file TO pt_afile.
          ELSE.
            EXIT.
          ENDIF.                           " IF SY-SUBRC EQ 0.
        ENDDO.                             " DO.
        CLOSE DATASET pp_afname.
      ELSE.
        MESSAGE 'Problem in opening the App.Server file' TYPE con_msgtyp_i.
      ENDIF.                               " IF sy-subrc EQ 0.
    Load the data to the database
      PERFORM load_data_to_database USING t_afile.
    When i am trying to upload it is taking me to dump and the errpr analysis is like
    "The program attempted to interpret the value "26 0 " as a number, but
    since the value contravenes the rules for correct number formats,
    this was not possible."
    Any suggestions on this
    Regards
    VEnk@

    Hi,
    Thats the line feed character. After reading  the application server file, use this
    data: lv_feed type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.
    loop at itab.
    replace all occurrences of lv_feed in itab-field with space.
    modify itab.
    endloop.
    Vikranth

  • How can I download the data to Application Server and Network Drive

    Hi Experts
    I am having problem with download the data to Application Server and Network Drive in back ground. its working in foregorund but not in back ground.please suggest me . Thanks for advance.
    Thanks & Regards
    Raghava

    Hi Experts
    I am using like this
    P_Back is a check box on the selection-screen.
    it_fihrst_out-its internal table
    sy-batch -Program is running in the background
    IF sy-batch IS INITIAL.
        IF p_back = 'X'.
          OPEN DATASET file_01 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
          IF sy-subrc = 0.
            LOOP AT it_fihrst_out.
              TRANSFER it_fihrst_out TO file_01.
            ENDLOOP.
          ENDIF.
          CLOSE DATASET file_01.
          CASE sy-subrc.
            WHEN 0.
              WRITE: / file_01, / 'successfully generated.'.
            WHEN OTHERS.
              WRITE: / file_01, 'Unexpected error occurred.'.
          ENDCASE.
        ELSE.
          CALL FUNCTION 'WS_DOWNLOAD'
            EXPORTING
              filename                = file_01
              filetype                = 'ASC'
            TABLES
              data_tab                = it_fihrst_out
            EXCEPTIONS
              file_open_error         = 1
              file_write_error        = 2
              invalid_filesize        = 3
              invalid_type            = 4
              no_batch                = 5
              unknown_error           = 6
              invalid_table_width     = 7
              gui_refuse_filetransfer = 8
              customer_error          = 9
              OTHERS                  = 10.
          CASE sy-subrc.
            WHEN 0.
              WRITE: / file_01, / 'successfully generated.'.
            WHEN 2.
              WRITE: / file_01, 'Output Error: File still open'.
            WHEN OTHERS.
              WRITE: / file_01, 'Unexpected error occurred.'.
          ENDCASE.
        ENDIF.
      ELSE.
        LOOP AT it_fihrst_out.
          WRITE:/ it_fihrst_out.
        ENDLOOP.
      ENDIF.
    This is the code .

  • How to bring the data from application server to presentation server

    hi,
    i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this  topic.folowing is the code .
    *& Report  ZPFA_HIER_LOAD
    REPORT  ZFPA_HIER_LOAD.
    *---- Declaration of Oracle connectioN
    DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
    DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
    DATA : mfilename type string.
    data: begin of matab1 occurs 0,
          MFL1(9) TYPE C,
          MFL2(5) TYPE C,
          MFL3(9) TYPE C,
          MFL4(2) TYPE C,
          MFL5(8) TYPE C  ,
         end of matab1 .
    data: setid(8) type c.
    data: begin of source occurs 0,
          setid(8) type c,
          end of source.
    *PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
    *PARAMETERS : m_bsenty(8). " type c obligatory.
    *mfilename = P_PFILE.
    EXEC SQL.
      SET CONNECTION :con_name
    ENDEXEC.
    EXEC SQL.
      CONNECT TO :con_name
    ENDEXEC.
    EXEC SQL PERFORMING get_source.
      SELECT set_id FROM UNIT_SET INTO
      :setid
      ORDER BY SET_ID
    ENDEXEC.
    start-of-selection.
    LOOP AT SOURCE.
      REFRESH matab1. CLEAR matab1.
      EXEC SQL PERFORMING evaluate.
    SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
    :MFL5
    where set_id = :SOURCE-SETID ORDER BY MEM_ID
      ENDEXEC.
      if SOURCE-SETID = '80000000'.
       mfilename = '/tmp/aesorg'.
      elseif SOURCE-SETID = '80000006'.
       mfilename = '/tmp/Consolidation_Manager'.
      elseif SOURCE-SETID = '80000010'.
       mfilename = '/tmp/10org'.
      elseif SOURCE-SETID = '80000012'.
       mfilename = '/tmp/20org'.
      elseif SOURCE-SETID = '80000018'.
       mfilename = '/tmp/30org'.
      elseif SOURCE-SETID = '80000025'.
       mfilename = '/tmp/40org'.
      Endif.
      mfilename = '/usr/test.dat'.
    ************************This was i tried***********************
      open dataset mfilename for output in text mode encoding default." IN
    *TEXT MODE ENCODING DEFAULT.
    if sy-subrc <> 0.
    exit.
    endif.
    close dataset mfilename.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         FILENAME         = MFILENAME
         FILETYPE         = 'ASC'
       TABLES
         data_tab         = matab1
       EXCEPTIONS
         file_write_error = 1
         invalid_type     = 2
         no_authority     = 3
         unknown_error    = 4
         OTHERS           = 10.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
      clear matab1.
    ENDLOOP.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
    close dataset mfilename.
         MFL5 = '0'.
       CLEAR MFL5.
    FORM evaluate.
      if MFL5 = -1.
        MFL5 = ''.
      ENDIF.
      concatenate MFL1 ','   into MFL1.
      concatenate MFL1 ','   into MFL3.
      matab1-MFL1 = MFL1.
      matab1-MFL2 = 'ZBUE,'.
      matab1-MFL3 = MFL3.
      matab1-MFL4 = ' ,'.
      matab1-MFL5 = MFL5.
      append matab1 .
      CLEAR MFL1.
      CLEAR MFL2.
      CLEAR MFL3.
      CLEAR MFL4.
      CLEAR MFL5.
    ENDFORM.
                     "evaluate
    *&      Form  GET_SOURCE
          text
    FORM GET_SOURCE.
      source-setid = setid.
      append source.
      clear source.
    ENDFORM.                    "GET_SOURCE

    Hi Rammohan,
    You cannot use OPEN DATASET to transfer data from application server to presentation server.
    You can do the following :
    <b>Do 1st point in BACKGROUND</b>
    1. Read the data file from application server into an internal table using OPEN DATASET
    <b>Do 2nd point in Foreground</b>
    2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
    You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
    Best regards,
    Prashant

  • Regarding uploading the file from Application Server

    I am trying to upload a .csv file to Application Server through CG3Z tcode.
    But i am getting dump ad below..
    What happened?
        While a text was being converted from code page '4102' to '1100', one
        the following occurred:
        - an character was discovered that could not be represented in one of
        the two code pages;
        - the system established that this conversion is not supported.
        The running ABAP program, 'SAPLC13Z' had to be terminated, since the
        conversion could cause incorrect data to be generated.
        1 characters could not be represented (and thus could not converted).
        If 1 = 0, a second or a different error has occurred.
    Please let me know..how can i resolve this??
    Thanks
    Priyanka

    Check if your CSV file is UNICODE encoding.
    If CG3Z steel not works you can check on OSS SUPPORT if a note solve your problem.

  • Transaction code used to upload the data in the application server SCM syst

    Hi
    Could you please anyone tell me the transaction code which has been used to upload the data into the application server in SCM ( APO) system from presentation server. 
    For ex : R/3 system CG3Y , CG3Z has been used to upload the data into application server similarly way could you please tell me the transaction code is used in the APO system for uploading the data into application server.
    Thanks advance for your support.
    Regards,
    Kiran

    try tcode SXDA_TOOLS - copy
    (1st you must fill all obligatory fields)
    A.

  • How to upload data from application server

    Hi,
    please help me out in uploading the data from application server which is a tab delemited file into an internal table.
    Thanks
    kumar

    hi,
    Use this sample code as an example.
    table declaration
    tables: mara.
    *data declaration
    data: begin of it_lfa1 occurs 0,
    vendor like lfa1-lifnr,
    land1 like lfa1-land1,
    name1 like lfa1-name1,
    ort01 like lfa1-ort01,
    end of it_lfa1.
    selection screen
    selection-screen: begin of block b1 with frame.
    parameters: p_file type rlgrap-filename obligatory.
    selection-screen: end of block b1.
    at selection screen
    at selection-screen on value-request for p_file.
    *& start-of-selection
    start-of-selection.
    perform transfer_file using p_file.
    perform write.
    *& Form transfer_file
    text
    -->P_P_FILE text
    form transfer_file using p_p_file.
    data: l_message(30) type c.
    ***opening dataset for reading
    open dataset p_p_file for input in text mode encoding default message
    l_message.
    if sy-subrc ne 0.
    message i001(zerr2) with p_p_file.
    endif.
    *******transferring data from file to app server.
    do.
    read dataset p_p_file into it_lfa1.
    if sy-subrc = 0.
    append it_lfa1.
    clear it_lfa1.
    else.
    exit.
    endif.
    enddo.
    *******closing dataset
    close dataset p_p_file.
    endform. " transfer_file
    *& Form write
    text
    --> p1 text
    <-- p2 text
    form write .
    loop at it_lfa1.
    write:/ it_lfa1-vendor,
    it_lfa1-land1,
    it_lfa1-name1,
    it_lfa1-ort01.
    endloop.
    endform. " write
    Thanks
    Aneesh.

  • Uploading data to application server

    Hi,
    I am working on a report,where in I have to upload the data to application server.Here data is getting uploaded to application server ,but everything is getting clubbed.There is no space between each field.Can anyone send an example for this?
    Regards,
    Hema

    Hi Hema,
    To upload into application server with space, you have to store into another internal table from base inernal table.
    suppose you have int_table is the table from where u are currently uploading data, then  move into another internal table.
    the new internal table will be with one field of length more than total lenght of all fields of base table.
    move the data from base table to another internal table.
    loop at int_table into wa_table
    move wa_table to wa_table1 separated by space
    append wa_table1 to int_table1
    endloop
    now upload from int_table1.
    Hope it will work fine.
    Regards
    krishnendu

  • How to Down load Data in Application server into the Internal Table

    hi freinds,
    iam having a file in the application server.
    now i need to send the data in the file to the internal table.
    is there any Function Module?
    i need with out using the OPEN DATA SET and CLOSE DATA SET Keywords.
    is there any possible?
    Regard's,
    Ranjith.

    Hi,
    There is no other option for uploading the data from the application server to the internal table without using OPEN DATASET and CLOSE DATASET. Even if you find the FM internal logic in FM uses these keywords to read the data from Application server.

  • ERROR while uploading the data into ztable with background processing

    Hi gurus,
    i am trying to upload the data from excel file to internal table 
    its working fine ..
    but........
    if i try to upload the data with background processing , in sm37 it is saying "error during the upload of clipboard contents".
    Regards,
    Sri

    Hi,
    FM GUI_UPLOAD doesnt work in background, use dataset to upload it from application server.
    refer below code
    *--Local Variables
      DATA : l_file  TYPE string,
             l_line  TYPE string,
             l_index TYPE sy-tabix.
    *--Clear
      CLEAR : l_file.
      l_file = p_ipfile.
    *--Read the data from application server file.
      OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
    *--Error in opening file
        MESSAGE i368(00) WITH text-005.
      ENDIF.
    *--Get all the records from the specified location.
      DO.
        READ DATASET l_file INTO l_line.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
                          INTO st_ipfile-vbeln
                               st_ipfile-posnr
                               st_ipfile-edatu
                               st_ipfile-wmeng.
          APPEND st_ipfile TO it_ipfile.
        ENDIF.
      ENDDO.
    Regards,
    Prashant

  • Load ODS data to Application server file

    Hi,
        I need to upload ODS data to application server.
        I can not use Open Hub service.  I need to do the upload process in background as there is around 5 million data in ODS. Can anybody please guide
    deep

    Hi,
    You can use Analytic Process Designer for your requirement.
    Use 'RSANWB'.
    It will allow you to select the source as DSO and also you can choose target as some logical path where you can define Application server path as Physical path. Use "FILE'
    Also you can schedule the process in background.
    Further you can refere to :
    http://help.sap.com/saphelp_nw04/helpdata/en/49/7e960481916448b20134d471d36a6b/frameset.htm
    Regards,
    anil

  • Error while uploading the file from Allpcation server in LSMW-7th step

    Hi Experts,
    what should be the specific CODE PAGE should be maintained while uploading the file from application server in LSMW-7th Step
    Thanks in advance,
    KSR

    Hi
    I mean that there is any seperate CODE PAGE which comes at the bottom of screen while uploading the file from the application server in 7th step.
    Is there any specific CODE PAGE to be maintained...
    Thanks in advance
    Oarsk

  • Can we download the data to App. server after extracting

    Hello All,
                Is it possible to download the data to application server after  extracting . Please let me know where we have to specify the path to download.
    Thanks in Advance for help
    Regards
    Raj

    Hi,
    You can do this by using infospoke or you can directly take the dump to application server. 
    For taking the dump directly from cube u have to follow the below steps.
    Create a file name in Application server take the path.
    Go to the manage of the Cube click on contents. remove maximum hits... below u will find the option as store into app server and specify the path there. click on execute in background.
    Khaja

  • FM to upload the Internal table data into application server.

    Hi,
      Could you please give me Function module to Upload the Internal table data into Application server ie., in Tcode AL11.
    I know for downloading the Application server file into itab is "SUBST_GET_FILE_LIST" FM and using open dtaa set we get the data.
    Regards,
    deepthi.

    Hi Deepthi
    Incase you are looking to upload data in the AL11 through a program , then you can make use of OPEN DATASET...CLOSE DATASET statements.
    Here's the code snippet:
    IF tb_alvdisplay[] IS INITIAL.
        MESSAGE e999(/dcsea/zais_msg) WITH text-e01.
      ELSE.
        IF  NOT cb_ufile IS INITIAL  "Download to file
         AND sy-pagno = 0.            "Only down page headers for first page
          PERFORM fm_concatenate_path_name USING    p_path
                                                    p_file
                                           CHANGING v_file.
    *Open file for download.
          PERFORM fm_open_file USING v_file .
        ENDIF.
        LOOP AT tb_alvdisplay.
          IF  NOT cb_ufile IS INITIAL.
    *Passing the values of the respective headings to the structure.
            ws_rec-vend_no     = tb_alvdisplay-vendno.
            ws_rec-vend_nm     = tb_alvdisplay-vendnm.
            ws_rec-title       = tb_alvdisplay-vendtl.
            ws_rec-add         = tb_alvdisplay-add.
            ws_rec-city1       = tb_alvdisplay-city1.
            ws_rec-region      = tb_alvdisplay-region.
            ws_rec-country     = tb_alvdisplay-country.
            ws_rec-pobox       = tb_alvdisplay-po.
            ws_rec-phone       = tb_alvdisplay-telf1.
            ws_rec-extn        = tb_alvdisplay-extn.
            ws_rec-fax         = tb_alvdisplay-telfx.
            ws_rec-zterm       = tb_alvdisplay-zterm.
            ws_rec-remark      = tb_alvdisplay-remark.
            ws_rec-email       = tb_alvdisplay-email.
    *Passing the separator 'PIPE' to the structure.
              ws_rec-sep01  = co_sep.
              ws_rec-sep02  = co_sep.
              ws_rec-sep03  = co_sep.
              ws_rec-sep04  = co_sep.
              ws_rec-sep05  = co_sep.
              ws_rec-sep06  = co_sep.
              ws_rec-sep07  = co_sep.
              ws_rec-sep08  = co_sep.
              ws_rec-sep09  = co_sep.
              ws_rec-sep10  = co_sep.
              ws_rec-sep11  = co_sep.
              ws_rec-sep12  = co_sep.
              ws_rec-sep13  = co_sep.
            TRANSFER ws_rec TO v_file.
          ENDIF.
          AT LAST.
            IF NOT cb_ufile IS INITIAL.
    *Closing the DATASET file.
              CLOSE DATASET v_file.
              IF sy-subrc <> 0.
    *Failure Message.
                MESSAGE e999(/dcsea/zais_msg) WITH text-t04 text-t06.
              ELSE.
    *Success message.
                MESSAGE s999(/dcsea/zais_msg) WITH text-t05.
              ENDIF.
            ENDIF.
          ENDAT.
        ENDLOOP.
      ENDIF.
    Also as Gautham suggested you can use tcode CG3Z or CG3Y incase you are looking to upload the data directly.
    FInally, you can search SCN using the keywords, "Upload to AL11" and you'll get loads of results.
    Hope this helps.
    Harsh

Maybe you are looking for

  • Provident fund

    Hi friends some of the employees has retire/separate in may 2008 but in september their provident fund  is coming wage type are /3F3 Er PF contribution  =65 /3F4 Er Pension contribution  = -65 same  scenario is coming for some employees. please advis

  • How can i use two iPads to play a different AU-Instrument for each Pad at the same time via WLAN?

    We have two iPads connected to the MacBook with two different Midi-Sessions. Now we want to connect the every Session to a single AU-Instrument to record live but don´t get it right. In Cubase we just had to choose the Sessions as Midi-Input. (Sorry

  • DisK Utility Not Repairing Permissions

    Hello, I have a problem with my iMac. The problem is as following: I cannot repair permission using Disk Utility. What happened first was that I wanted to install a program from a mounted drive, however a Pop up occurred and said the framework of ins

  • Hard drive data cable issues

    I have a 2010 13" Macbook pro. It was refurbished when bought in 2011, and I've had it since May of 2011. The first time I had the flashing folder with a question mark was about a year after it was bought in summer 2012, and the data cable connecting

  • DUAL LAYER BURNING for Power MAc G5 dual 2.5

    I am trying to upgrade my manufacturer installed superdrive ( PowerMAc G5 2.5 dual late 2005 model) I was wondering if any body could help me choose the right one. I was thinking on buying a Pioneer 16X DL SuperDrive DVR 111D . Please advice Thanks