Upload longtext in QP01 transaction ?

Hi All,
I need to upload long text in qp01 transaction...can anyone tel me how to do it.....both the long text and other data has to be uploaded in a single program or ..... ? can you people tel the procedures involved ?
thanks,
Siva

BDC - Creating Inspections Plans using T-Code QP01
cheers
Aveek

Similar Messages

  • Lsmw by bapi for qm to upload inspection plan qp01

    I want to upload Inspection plan by Transaction qp01
    <Edited by Moderator - Bhavesh Kantilal. Removed all Capitals post. User has been warned and request to move this thread to the appropriate forum has been raised.>
    Edited by: Bhavesh Kantilal on Dec 20, 2008 1:50 AM

    Post it here:
    ABAP Connectivity
    Also, Please do not use all CAPS.
    It is understood as shouting at people.
    Regards,
    Ravi

  • How can we upload longtext data in BDC?

    Hi All,
    i want to upload data for a transaction QA11.
    In that i have to upload data for fields
    QALS-PRUEFLOS',
    RQEVA-VCODEGRP,
    RQEVA-VCODE'
    and one text field (255) is there in that transction.
    How can i update that text(255) in to database from internal table.
    ie.how can i upload longtext in BDC.?
    Regards,
    Ravi.

    Hi,
    The uploading of the long text into the transaction can be done in the same way as you do it for other fields. If the flat file from which you upload contains the long text refer that field in your recording and the field would get uploaded into the transaction.
    For updating in the database table use the insert statement in case of new records to be updated or the modify statement in case of altering the already existing records in the DB table.
    Reward points if helpful.
    Thanks,
    Archana
    Edited by: Archana Sirsi on Apr 10, 2008 9:30 AM

  • BDC of qp01 transaction.

    HELLO,
        I am writting BDC program for qp01 transaction, In which i have to upload master inspection charactoristics. o.k.
       When i  run the bdc program cursor is not moving from line item 18 to 19 line number.
      i have used scroll dowm arrow  button , but still it is not working.
        Any solution for this please.

    Hi Santosh,
    While MIC recording for a particular operation,
    Use CTU_PARAMS as mentioned below .
    data : wa_params type ctu_params.
    wa_params-dismode = 'A'.
    wa_params-updmode = 'S'.
    wa_params-defsize = 'X'.
    call function 'BDC_INSERT'
    exporting
    tcode = c_tcode
    ctuparams = wa_params
    tables
    dynprotab = i_bdcdata
    EXCEPTIONS
    INTERNAL_ERROR = 1
    NOT_OPEN = 2
    QUEUE_ERROR = 3
    TCODE_INVALID = 4
    PRINTING_INVALID = 5
    POSTING_INVALID = 6
    OTHERS = 7
    *IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    Probably it will solve your problem.
    Regards
    VJ

  • In Bdc I have huge volume of data to upload for the given transaction

    Hi gurus,
    In Bdc I have huge volume of data to upload for the given transaction, here am using session method, it takes lots of exection time to complete the whole transaction, Is there any other method to process the huge volume with minimum time,
    reward awaiting
    with regards
    Thambe

    Selection of BDC Method depends on the type of the requirement you have. But you can decide which one will suite requirement basing the difference between the two methods. The following are the differences between Session & Call Transaction.
    Session method.
    1) synchronous processing.
    2) can tranfer large amount of data.
    3) processing is slower.
    4) error log is created
    5) data is not updated until session is processed.
    Call transaction.
    1) asynchronous processing
    2) can transfer small amount of data
    3) processing is faster.
    4) errors need to be handled explicitly
    5) data is updated automatically
    Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is
    not bi-directional.
    BDC works on the principle of simulating user input for transactional screen, via an ABAP program.
    Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.
    In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in
    Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.
    Batch Input (BI) programs still use the classical BDC approach but doesn’t require an ABAP program to be written to format the BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and invokes the transaction mentioned in the header record of the file.
    Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are not available for all application areas.
    synchronous & Asynchronous updating:
    http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/keyConcepts4.html
    synchronous & Asynchronous processings
    Asynchronous refers to processes that do not depend on each other's outcome, and can therefore occur on different threads simultaneously. The opposite is synchronous. Synchronous processes wait for one to complete before the next begins. For those Group Policy settings for which both types of processes are available as options, you choose between the faster asynchronous or the safer, more predictable synchronous processing.
    By default, the processing of Group Policy is synchronous. Computer policy is completed before the CTRLALTDEL dialog box is presented, and user policy is completed before the shell is active and available for the user to interact with it.
    Note
    You can change this default behavior by using a policy setting for each so that processing is asynchronous. This is not recommended unless there are compelling performance reasons. To provide the most reliable operation, leave the processing as synchronous.

  • Uploading texts in vl02n transaction

    Hi all,
    can anyone tell me how to upload texts(in vlo2n transaction->goto->header->texts)
    in vl02n transaction. plz send me some coding for this scenario.
    Thanks,
    Satish.

    This is Routing long text upload - CA22 Transaction example code :
    Report     : ZMPPC016
    Type       : Data upload
    Author     : Seshu Maramreddy
    Date       : 05/27/2005
    Transport  : DV3K920205
    Transaction: ??
    Description: This ABAP/4 Program Upload the long text into CA22
                 Transaction It accepts tab-delimited spreadsheet input
                 and it will run Call Transaction
    report ZMPPC016
           no standard page heading
           line-size 120.
    Constants
    constants : c_r type c value 'R', " PLNTY Value
                C_X TYPE C VALUE 'X', " Value for dynbegin.
                c_tcode like tstc-tcode value 'CA22', " Transaction code
                c_mode(1) type c value 'A', " BDC Mode
                c_tdformat type tline-tdformat value '*',"Tag column
                c_tdid type thead-tdid value 'PLPO', " Text ID
                c_tdform type thead-tdform value 'SYSTEM'." Form name
    Variables
    data : v_date like sy-datum, " date
           v_date1(4) type c,
           v_date2(2) type c,
           v_date3(2) type c,
           TNAME LIKE THEAD-TDNAME,
           v_mandt(3) type c,
           v_matnr(18) type c,
           flag type c.
    Internal table for file
    data : begin of t_file occurs 0,
           matnr(18) type c, " Material Number
           werks(4) type c,  " Plant
           vornr(4) type c,  " Operation Number
           tseq(3) type n,   " Line number in the long text
           text1(70) type c, " Long text
           plnal(2) type n,  " Group counter
           end of t_file.
    data : begin of t_text occurs 0,
           matnr(18) type c, " Material Number
           werks(4) type c,  " Plant
           plnal(2) type n,  " Group counter
           vornr(4) type c,  " Operation Number
           tseq(3) type n,   " Line number in the long text
           text1(70) type c, " Long text
           end of t_text.
    Internal table for MAPl
    data : begin of t_mapl occurs 0,
           plnnr like mapl-plnnr,
           end of t_mapl.
      Internal Table for PLAS and PLPO Table
    data : begin of t_plpo occurs 0,
           mandt like plpo-mandt,
           plnty like plpo-plnty,
           plnnr like plpo-plnnr,
           plnkn like plpo-plnkn,
           zaehl like plpo-zaehl,
           end of t_plpo.
    data t_long like tline occurs 0 with header line.
    Work area for t_text Internal table
    data : wa_text like t_text.
    data:  t_header like thead.         " long text
    Internal table for BDCDATA Structure
    data : begin of itab_bdc_tab occurs 0.
            include structure bdcdata.
    data : end of itab_bdc_tab.
    Selection-screen
    selection-screen : begin of block blk with frame .
    parameter : P_file like rlgrap-filename obligatory.
    selection-screen : end of block blk.
    initialization.
      p_file = 'C:\My Documents\InputFile.txt'.
    at selection-screen on value-request for p_file.
    F4 value for file
      perform file_get.
    start-of-selection.
    Get file data into Internal Table.
      perform get_data.
      sort t_text by matnr werks  vornr  plnal tseq.
    Save the long text into CA22 Transaction
      perform load_data.
    top-of-page.
      CALL FUNCTION 'Z_HEADER'
    EXPORTING
       FLEX_TEXT1       =
       FLEX_TEXT2       =
       FLEX_TEXT3       =
      skip 1.
    *&      Form  file_get
          F4 Value for file
    FORM file_get.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_PATH         = 'C:\Temp\'
                MASK             = ',.,..'
                MODE             = 'O'
                TITLE            = 'Select File'(007)
           IMPORTING
                FILENAME         = P_file
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    ENDFORM.                    " file_get
    *&      Form  get_data
          Get file data into Internal Table.
    FORM get_data.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                FILENAME                = p_file
                FILETYPE                = 'DAT'
           TABLES
                DATA_TAB                = t_file
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                FILE_OPEN_ERROR         = 2
                FILE_READ_ERROR         = 3
                INVALID_TYPE            = 4
                NO_BATCH                = 5
                UNKNOWN_ERROR           = 6
                INVALID_TABLE_WIDTH     = 7
                GUI_REFUSE_FILETRANSFER = 8
                CUSTOMER_ERROR          = 9
                OTHERS                  = 10.
      if sy-subrc eq 0.
        sort t_file by matnr werks plnal vornr tseq.
        delete t_file where matnr = ''.
        loop at t_file.
       Get the material number from tables ZMSMI_FERR_RAW,
       ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW
          perform get_matnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
               EXPORTING
                    INPUT  = t_file-vornr
               IMPORTING
                    OUTPUT = t_file-vornr.
          move : t_file-matnr to t_text-matnr,
                 t_file-werks to t_text-werks,
                 t_file-vornr to t_text-vornr,
                 t_file-tseq  to t_text-tseq,
                 t_file-text1 to t_text-text1,
                 t_file-plnal to t_text-plnal.
          append t_text.
          clear t_text.
        endloop.
      else.
        WRITE: / 'Error reading input file'.
        stop.
      endif.
    ENDFORM.                    " get_data
    *&      Form  call_bdc
          BDC Script for CA22 Transaction
    FORM call_bdc.
    Screen 1010
      perform bdc_screen using  'SAPLCPDI'     '1010'.
      perform bdc_field  using  'BDC_OKCODE'   '=VOUE'.
      perform bdc_field  using  'RC27M-MATNR'   SPACE.
      perform bdc_field  using  'RC27M-WERKS'   SPACE.
      perform bdc_field  using  'RC271-VBELN'   SPACE.
      perform bdc_field  using  'RC271-POSNR'   SPACE.
      perform bdc_field  using  'RC271-PLNNR'   T_PLPO-PLNNR.
      perform bdc_field  using  'RC271-AENNR'   SPACE.
      clear :  v_date,
               v_date1,
               v_date2,
               v_date3.
      v_date1 = sy-datum+0(4).
      v_date2 = sy-datum+4(2).
      v_date3 = sy-datum+6(2).
      concatenate v_date2 v_date3 v_date1 into v_date.
      perform bdc_field  using  'RC271-STTAG'  v_date .
      perform bdc_field  using  'RC271-REVLV'   SPACE.
      perform bdc_field  using  'RC271-WERKS'   SPACE.
      perform bdc_field  using  'RC271-PLNAL'   WA_TEXT-PLNAL.
      perform bdc_field  using  'RC271-STATU'   SPACE.
      perform bdc_field  using  'RC271-VAGRP'   SPACE.
      perform bdc_field  using  'RC271-PROFIDNETZ'   SPACE.
    Screen 5400
      perform bdc_screen using  'SAPLCPDI'     '5400'.
      perform bdc_field  using  'BDC_OKCODE'   '=OSEA'.
    Screen 1010
      perform bdc_screen using  'SAPLCP02'     '1010'.
      perform bdc_field  using  'BDC_OKCODE'   '=ENT1'.
      perform bdc_field  using  'RC27H-VORNR'  WA_TEXT-VORNR.
    Screen 5400
      perform bdc_screen using  'SAPLCPDI'     '5400'.
      perform bdc_field  using  'BDC_OKCODE'   '=LTXT'.
      perform bdc_field  using  'RC27X-FLG_SEL(01)'  C_X.
    Screen 1100
      perform bdc_screen using  'SAPLSTXX'     '1100'.
      perform bdc_field  using  'BDC_OKCODE'   '=XEIN'.
    Screen 0999
      perform bdc_screen using  'SAPLWB_CUSTOMIZING'     '0999'.
      perform bdc_field  using  'BDC_OKCODE'   '=CONT'.
      PERFORM BDC_FIELD  USING  'RSEUMOD-GRA_EDITOR' SPACE.
    Screen 1100
      perform bdc_screen using  'SAPLSTXX'     '1100'.
      perform bdc_field  using  'BDC_CURSOR'   'RSTXT-TXPARGRAPH'.
      perform bdc_field  using  'BDC_OKCODE'   '=TXBA'.
      perform bdc_field  using  'RSTXT-TXPARGRAPH(03)'   '*'.
      perform bdc_field  using  'RSTXT-TXLINE(03)'
    Screen 5400
      perform bdc_screen using  'SAPLCPDI'     '5400'.
      perform bdc_field  using  'BDC_OKCODE'   '=BU'.
      call transaction c_tcode
           using itab_bdc_tab mode 'N'
           update 'S'.
      refresh itab_bdc_tab.
      if sy-subrc eq 0 and sy-msgty ne 'E'.
        v_mandt = t_plpo-mandt.
        CONCATENATE v_mandt
                    t_plpo-plnty
                    t_plpo-plnnr
                    t_plpo-plnkn
                    t_plpo-zaehl into tname.
        commit work.
        CALL FUNCTION 'DELETE_TEXT'
          EXPORTING
          CLIENT                  = SY-MANDT
            ID                    = c_tdid
            LANGUAGE              = 'E'
            NAME                  =  TNAME
            OBJECT                = 'ROUTING'
            SAVEMODE_DIRECT       = 'X'
         TEXTMEMORY_ONLY       = ' '
         LOCAL_CAT             = ' '
         EXCEPTIONS
           NOT_FOUND             = 1
           OTHERS                = 2
        if sy-subrc ne 0.
          write:/3  wa_text-matnr,24 wa_text-werks,
                    30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                    60 ' -',
                    67 'Error Deleting Existing Long Text'.
        endif.
      else.
        write:/3  wa_text-matnr,24 wa_text-werks,
                       30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                       60 ' -',
                       67 'Error Executing BDC'.
      endif.
    ENDFORM.                    " call_bdc
    *&      Form  bdc_screen
          BDC Script for Screen fields
         -->P_PROG   Program name
         -->P_SCRN   Screen Number
    FORM bdc_screen USING    p_prog
                             p_scrn.
      clear itab_bdc_tab.
      itab_bdc_tab-program = p_prog.
      itab_bdc_tab-dynpro = p_scrn.
      itab_bdc_tab-dynbegin = c_x.
      append itab_bdc_tab.
    ENDFORM.                    " bdc_screen
    *&      Form  bdc_field
          BDC Script for Screen fileds
         -->P_NAM   Field name
         -->P_VAL   Field value
    FORM bdc_field USING    p_nam
                            p_val.
      clear itab_bdc_tab.
      itab_bdc_tab-fnam = p_nam.
      itab_bdc_tab-fval = p_val.
      append itab_bdc_tab.
    ENDFORM.                    " bdc_screen
    *&      Form  load_data
          Save the long text into CA22 Transaction
    FORM load_data.
      loop at t_text.
        move t_text to wa_text.
        at new vornr.
    Read the data in MAPL Table
          select single plnnr from mapl into t_mapl-plnnr
                                 where matnr  = wa_text-matnr
                                 and   werks  = wa_text-werks
                                 and   plnty  = c_r
                                 and   loekz  = space.
          if sy-subrc eq 0.
    Read the data from PLAS and PLPO Table
            select SINGLE  a~mandt
                    a~plnty
                    a~plnnr
                    a~plnkn
                    a~zaehl into  t_plpo
                   from plpo as a inner join plas as b on aplnty = bplnty
                                                      and aplnnr = bplnnr
                                                      and aplnkn = bplnkn
                    where b~plnty = c_r
                    and   b~plnnr = t_mapl-plnnr
                    and   b~plnal = wa_text-plnal
                    and   b~loekz = space
                    and   a~vornr = wa_text-vornr
                    and   a~loekz = space.
            if sy-subrc eq 0.
              perform call_bdc.
            else.
            flag = 'X'.
              write:/3  wa_text-matnr,24 wa_text-werks,
                     30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                     60 ' -',
                     67 'Matching routing group\Operation not found'.
              continue.
            endif.
          else.
            flag = 'X'.
            write:/3 wa_text-matnr,24 wa_text-werks,
                     40 ' -',
                     45 'Material Does not Exists or Material',
                     82 'not Available in MAPL Table'.
            continue.
          endif.
        endat.
        if flag ne 'X'.
          t_long-tdline = wa_text-text1.
          t_long-tdformat = c_tdformat.
          append t_long.
        endif.
        at end of vornr.
          if flag ne 'X'.
            v_mandt = t_plpo-mandt.
            CONCATENATE v_mandt
                      t_plpo-plnty
                      t_plpo-plnnr
                      t_plpo-plnkn
                      t_plpo-zaehl into tname.
            T_HEADer-TDOBJECT = 'ROUTING'.
            t_HEADer-TDNAME   = tname.
            T_HEADer-TDID     = c_tdid.
            t_header-tdform   = c_tdform.
            T_HEADer-TDSPRAS  = 'E'.
    Save the text
            CALL FUNCTION 'SAVE_TEXT'
              EXPORTING
                CLIENT                = SY-MANDT
                HEADER                = t_header
                SAVEMODE_DIRECT       = 'X'
         OWNER_SPECIFIED       = ' '
         LOCAL_CAT             = ' '
       IMPORTING
         FUNCTION              =
         NEWHEADER             =
              TABLES
                LINES                 = t_long
             EXCEPTIONS
               ID                    = 1
               LANGUAGE              = 2
               NAME                  = 3
               OBJECT                = 4
               OTHERS                = 5
            if sy-subrc eq 0.
              CALL FUNCTION 'COMMIT_TEXT'
                   EXPORTING
                        OBJECT   = t_header-TDOBJECT
                        NAME     = t_header-TDNAME
                        ID       = t_header-TDID
                        LANGUAGE = t_header-TDSPRAS.
              write:/3   wa_text-matnr,24 wa_text-werks,
                         30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                         60 ' -',
                         67 'Long Text Loaded Successfully'.
            else.
              write:/3   wa_text-matnr,24 wa_text-werks,
                         30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                         60 ' -',
                         67 'Error Uploading Long Text'.
            endif.
            refresh t_long.
            else.
            write:/3 wa_text-matnr, 24 wa_text-werks,
                   45 'Long text not uploaded'.
            clear flag.
           endif.
          endat.
        endloop.
      ENDFORM.                    " load_data
    *&      Form  get_matnr
          Get the material number from tables ZMSMI_FERR_RAW,
    FORM get_matnr.
      clear v_matnr.
      case t_file-werks.
        when '0101'.
          select single cmatnr from zmsmi_simp_raw
                 into v_matnr  where matnr = t_file-matnr.
         if sy-subrc eq 0.
          if not v_matnr is initial.
            clear t_file-matnr.
            t_file-matnr = v_matnr.
          endif.
        when '0103'.
          select single cmatnr from zmsmi_ferr_raw
                 into v_matnr  where matnr = t_file-matnr.
         if sy-subrc eq 0.
          if not v_matnr is initial.
            clear t_file-matnr.
            t_file-matnr = v_matnr.
          endif.
        when '0102' or '0110' or '0111' or '0112' or '0113'
             or '0114' or '0115' or '0116' or '0117'.
          select single cmatnr from zmsmi_snap_raw
                 into v_matnr  where matnr = t_file-matnr.
         if sy-subrc eq 0.
          if not v_matnr is initial.
            clear t_file-matnr.
            t_file-matnr = v_matnr.
          endif.
      endcase.
    ENDFORM.                    " get_matnr
    Reward points if it is useful
    Thanks
    Seshu

  • In which method i can upload data to two transactions at a time and how ?

    Hi,
    Can any body tell me  <b>In which method i can upload datas to two transactions at a time and how</b>
    Pls tell me the steps if possible.
    Thanks
    Prabhudutta

    Hi,
    I hope u are talking abt BDC,
    If it is BDC's Then you can use both the methods.
    Call Transaction or
    Session Method.
    Ex ..if already a vendor exists then call transaction xk02
    if vendor no is not yet created then call transaction xk01.
    hope this helps.
    santhosh

  • How to upload data using SXDA Transaction

    HI,
    Can any one explain step by step procedure to upload data using SXDA transaction.
    I have already uploaded to txt file in Application server.
    I have created a project and  entered into the sub-project wizard and selected the object type as BKPF and then pressed continue, then i enter into task tab....
    There i see convert data , Check file,File split,load data,
    In convert data i have selected the program name as RFBIBL00.
    In check file i have selected the file type as Physical file and selected the file name from F4 button.
    I am fasing the probelm in load data ....
    Can any one please explain how to proceed further..

    Hi Yogesh,
    Use this function module
    ALSM_EXCEL_TO_INTERNAL_TABLE to upload the excel sheet data into internal table.
    Then from the internal table data use KE13 transaction to upload data.
    Regards
    Arun

  • Uploading longtexts for Routings

    Hi,
      I want to upload longtexts for Routing(for each operation)
      by using LSMW object.
      I am using standard Batch input object(0170-Routing) and   method(0001- Batch Input).But longtexts are not uploading.
    How can I solve this problem?
    Edited by: TINTU on Jan 3, 2008 12:13 PM

    Hai,
    Check this.
    Re: upload longtext from excel file  
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.
    http://www.sapdevelopment.co.uk/file/file_upexcel.htm
    Regards.
    Sowjanya.b

  • Uploading longtext

    Hi,
      I want to upload lontext(purchase order text) by using LSMW.
      In my input file, there are 2  longtext for a particular material number.While I am uploading, first lontext is overwritting by second longtext.
    I am using the program  '/SAPDMC/SAP_LSMW_IMPORT_TEXTS' .
    How can I solve this problem??Please help me.......
    Regards,
    Tintu

    Hi,
    Check with the field mapping as suggested by the other friend of ours. If mapping is correct then try paasing the  first line as blank and then the two lines of your long text which you want to upload. I had faced the same issue and I could solve the same this way.
    Reward if you find the answer useful!
    Regards,
    Lalit Kabra

  • Offline Interactive Form Upload for creating Business Transaction

    Hi All,
    I am using CRM Web Request for creating Business Transaction through Offline Interactive Adobe Form.
    For that i have done PDF upload coding and then converting the PDF form to XML format.
    Now the XML format of form is converted to string from xstring.
    And then passing the XML to function module CRM_WEBREQ_EXTERN_CREATE_DOC along with the corresponding request category configured for the web request.Created the corresponding request category structure also.
    still the business transaction is not getting created, the following error message is coming "XML incompatible for data structure of request category" .
    Please respond if anybody has done the same scenario.
    Or is there any other process that can be followed to upload offline interactive adobe form to create one order object.
    Regards,
    Madhu

    Hi Maarten,
    Is that aatribute binded to Dropdown field lying under a node of cardinality 1..1??
    I think if that's so, ur error can be resolved by just putting this attribute in a node with cardinality 1..n.
    Hope this helps..!!
    Thanks,
    Amita

  • Regarding Bank stmt upload using mt940 format transaction ff_5

    Hi Experts,
    Please help me in the mt940 upload using transaction ff_5.
    i am getting all the items except cheque number.
    please help me how i can get the cheque number in the output of the report.
    where the cheque number i should pass in mt940 formt.

    Hi ,
    Check SAPnote 13283. This has information on
    Multicash
    SWIFT MT940
    DTAUS
    BAZ
    MAOBE
    SAP.TXT and SAPKURZ.TXT
    Also you can see the link  http://www.swedbank.lv/lib/en/SWIFT_MT_940_formata_apraksts_ENG.doc
    for the detailed description of SWIFT MT940 File.
    Hope it helps
    SJ

  • Uploading data in sales transaction

    I want to upload data using transaction crmd_bus2000115 for sales. Is there any standard program for this? I am unable to do this by lsmw since I am getting error in recording. Please suggest.

    I want to upload data using transaction crmd_bus2000115 for sales. Is there any standard program for this? I am unable to do this by lsmw since I am getting error in recording. Please suggest.

  • How to upload file in AL11 transaction

    Hi,
    I have created folder in the directory in AL11 transaction.
    Now I want to upload the file to the folder.
    Can anybody please tell me the procedure?
    Thanks.

    Hi,
    It's not possible to upload a file with AL11...
    Regards,
    Olivier

  • I am having BDC upload problem . 2 transaction upload in one pgm.

    Hi ,
    I am having problems .In one BDC program that i have written. The data is plopulating the first tcode screens i.e of T Code KL01  but its not populating screen of  TCode  KP26.
    Please can you let me the reason why the screen of t code KP26 is not getting populated correctly .
    please help  me with directions of where i am going wrong
    The code is below .
    report ZPM_ACTIVITY_UPLOAD
           no standard page heading line-size 255.
    *include bdcrecx1.
    ***************DATA DECLARATION**************************
    DATA : message like  bdcmsgcoll occurs 0.
    DATA : bdcdata type standard table of bdcdata with header line .
    data : file type string,
            v_msg(255).
    DATA:Begin of itab_main occurs 0,
      LSTAR      type  CSLAZ-LSTAR,
      DATAB_ANFO(10),
    DATAB_ANFO type CSLAZ-DATAB_ANFO,
      KTEXT      type CSLAZ-KTEXT,
      LTEXT      type CSLAZ-LTEXT,
      LEINH_CHAR type CSLAZ-LEINH_CHAR,
      KSTTY      type CSLAZ-KSTTY,
      LATYP      type CSLAZ-LATYP,
      VKSTA      type CSLAZ-VKSTA,
      VERSN      type CCSS-VERSN,
      PERBL      type RKPLN-PERBL,
      PERBL1      type RKPLN-PERBL,
      GJAHR      type CCSS-GJAHR,
      KOSTL      type CCSS-KOSTL,
      LSTAR1      type CCSS-LSTAR,
      TKV        type RKPLN-TKV,
    End of itab_main.
    Data :v_file type string.
    Data :Begin of itab_KL01 occurs 0,
                KL01_LSTAR      type  CSLAZ-LSTAR,
                KL01_DATAB_ANFO(10),             " type CSLAZ-DATAB_ANFO,
               KL01_DATAB_ANFO type CSLAZ-DATAB_ANFO,
                KL01_KTEXT      type CSLAZ-KTEXT,
                KL01_LTEXT      type CSLAZ-LTEXT,
                KL01_LEINH_CHAR type CSLAZ-LEINH_CHAR,
                KL01_KSTTY      type CSLAZ-KSTTY,
                KL01_LATYP      type CSLAZ-LATYP,
                KL01_VKSTA      type CSLAZ-VKSTA,
           End of itab_KL01.
    Data : Begin of error_itab occurs 0,
            msg(255),
           End of error_itab.
    Data :wa_error_itab like line of error_itab.
    Data : Begin of itab_KP26 occurs 0,
               KP26_VERSN      type CCSS-VERSN,
               KP26_PERBL      type RKPLN-PERBL,
               KP26_PERBL1     type RKPLN-PERBL,
               KP26_GJAHR      type CCSS-GJAHR,
               KP26_KOSTL      type CCSS-KOSTL,
               KP26_LSTAR      type CCSS-LSTAR,
               KP26_TKV        type RKPLN-TKV,
           End of itab_KP26.
    data : l_v_tab type abap_char1
                     value cl_abap_char_utilities=>horizontal_tab.
    data : counter type c value 0,
           countere type c value 0,
           counters type c value 0.
    PARAMETER: p_file TYPE ibipparms-path obligatory." Needed to upload the file
    At selection-screen on value-request  for p_file.
      Perform get_file.
    start-of-selection.
      perform file_upload.
      Perform split_itab.
    ****************************************KL01
    loop at itab_KL01.
    refresh  bdcdata.
      perform bdc_dynpro      using 'SAPLKMA6' '0200'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'CSLAZ-LSTAR'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_field       using 'CSLAZ-KOKRS'
                                    '1000'.
      perform bdc_field       using 'CSLAZ-LSTAR'
                                     itab_KL01-KL01_LSTAR .
      perform bdc_field       using 'CSLAZ-DATAB_ANFO'
                                     itab_KL01-KL01_DATAB_ANFO.
      perform bdc_field       using 'CSLAZ-DATBI_ANFO'
                                    '31.12.9999'.
      perform bdc_dynpro      using 'SAPLKMA6' '0299'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BU'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'CSLAZ-TARKZ'.
      perform bdc_field       using 'CSLAZ-KTEXT'
                                    itab_KL01-KL01_KTEXT.
      perform bdc_field       using 'CSLAZ-LTEXT'
                                    itab_KL01-KL01_LTEXT.
      perform bdc_field       using 'CSLAZ-LEINH_CHAR'
                                     itab_KL01-KL01_LEINH_CHAR.
      perform bdc_field       using 'CSLAZ-KSTTY'
                                     itab_KL01-KL01_KSTTY.
      perform bdc_field       using 'CSLAZ-LATYP'
                                     itab_KL01-KL01_LATYP.
      perform bdc_field       using 'CSLAZ-VKSTA'
                                     itab_KL01-KL01_VKSTA .
    call transaction 'KL01' using BDCDATA MODE 'A' update 's' messages into message .
    If sy-subrc eq 0.
    counters = counters + 1.
    else.
    countere = countere + 1 .
          perform error_msg.
          wa_error_itab-msg = v_msg.
          append  wa_error_itab-msg to error_itab.
          clear  wa_error_itab-msg.
    endif.
    Endloop.
    Loop at itab_KP26.
    refresh  bdcdata.
      perform bdc_dynpro      using 'SAPLSPO4' '0300'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'SVALD-VALUE(01)'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=FURT'.
      perform bdc_field       using 'SVALD-VALUE(01)'
                                    '1000'.
      perform bdc_dynpro      using 'SAPLKPP0' '1000'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'KPP0B-VALUE(09)'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=CSUB'.
      perform bdc_field       using 'KPP1B-ONLY'
                                    'X'.
      perform bdc_field       using 'KPP0B-VALUE(01)'
                                     itab_KP26-KP26_VERSN .
      perform bdc_field       using 'KPP0B-VALUE(02)'
                                    itab_KP26-KP26_PERBL.
      perform bdc_field       using 'KPP0B-VALUE(03)'
                                     itab_KP26-KP26_PERBL1 .
      perform bdc_field       using 'KPP0B-VALUE(04)'
                                    itab_KP26-KP26_GJAHR  .
      perform bdc_field       using 'KPP0B-VALUE(06)'
                                     itab_KP26-KP26_KOSTL .
      perform bdc_field       using 'KPP0B-VALUE(09)'
                                     itab_KP26-KP26_LSTAR.
      perform bdc_dynpro      using 'SAPLKPP2' '0112'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'K-BK_0403'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=CBUC'.
      perform bdc_field       using 'Z-BDC08(01)'
                                    itab_KP26-KP26_TKV  .
    call transaction 'KP26' using BDCDATA MODE 'A' update 'S' messages into message .
    If sy-subrc eq 0.
    counters = counters + 1.
    else.
    countere = countere + 1 .
          perform error_msg.
          wa_error_itab-msg = v_msg.
          append  wa_error_itab-msg to error_itab.
          clear  wa_error_itab-msg.
    endif.
    Endloop.
    counter = countere + counters.
      write /: 'Total Number of Records is',counter .
      Write /: 'Total Number of Successfull records',counters.
      Write /: 'Total Number of error records',countere.
      If countere GT 0.
        Write :/'The error out record message are'.
        Loop at error_itab.
          write:/ error_itab-msg.
        Endloop.
    Endif.
    *&      Form  file_upload
          text
    -->  p1        text
    <--  p2        text
    FORM file_upload .
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = v_file
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = l_v_tab
        TABLES
          DATA_TAB                = itab_main
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      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.                    " file_upload
    *&      Form  split_itab
          text
    -->  p1        text
    <--  p2        text
    FORM split_itab .
      loop at itab_main.
    MOVE     itab_main-LSTAR       TO  itab_KL01-KL01_LSTAR.
    MOVE     itab_main-DATAB_ANFO  TO itab_KL01-KL01_DATAB_ANFO.
    MOVE     itab_main-KTEXT       TO itab_KL01-KL01_KTEXT.
    MOVE     itab_main-LTEXT       TO itab_KL01-KL01_LTEXT.
    MOVE     itab_main-LEINH_CHAR  TO itab_KL01-KL01_LEINH_CHAR.
    MOVE     itab_main-KSTTY       TO itab_KL01-KL01_KSTTY.
    MOVE     itab_main-LATYP       TO itab_KL01-KL01_LATYP.
    MOVE     itab_main-VKSTA       TO itab_KL01-KL01_VKSTA.
    MOVE     itab_main-VERSN       TO itab_KP26-KP26_VERSN.
    MOVE     itab_main-PERBL       TO itab_KP26-KP26_PERBL.
    MOVE     itab_main-PERBL1      TO itab_KP26-KP26_PERBL1.
    MOVE     itab_main-GJAHR       TO itab_KP26-KP26_GJAHR.
    MOVE     itab_main-KOSTL       TO itab_KP26-KP26_KOSTL.
    MOVE     itab_main-LSTAR1      TO itab_KP26-KP26_LSTAR.
    MOVE     itab_main-TKV         TO itab_KP26-KP26_TKV.
    APPEND itab_KL01.
    APPEND itab_KP26.
    CLEAR itab_KL01.
    CLEAR itab_KP26.
      endloop.
    ENDFORM.                    " split_itab
    *&      Form  get_file
          text
    -->  p1        text
    <--  p2        text
    FORM get_file .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = p_file.
    ENDFORM.                    " get_file
           Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      append bdcdata.
    endform.                    "bdc_dynpro
           Insert field                                                  *
    form bdc_field using fnam fval.
      if fval <> space.
        clear bdcdata.
        bdcdata-fnam = fnam.
        bdcdata-fval = fval.
        append bdcdata.
      endif.
    endform.                    "bdc_field
    *&      Form  error_msg
          text
    -->  p1        text
    <--  p2        text
    FORM error_msg .
      call function 'FORMAT_MESSAGE'
        EXPORTING
          id        = sy-msgid
          lang      = 'E'
        IMPORTING
          msg       = v_msg
        EXCEPTIONS
          not_found = 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.                    " error_msg

    Hi ,
    I am having problems .In one BDC program that i have written. The data is plopulating the first tcode screens i.e of T Code KL01  but its not populating screen of  TCode  KP26.
    Please can you let me the reason why the screen of t code KP26 is not getting populated correctly .
    please help  me with directions of where i am going wrong
    The code is below .
    report ZPM_ACTIVITY_UPLOAD
           no standard page heading line-size 255.
    *include bdcrecx1.
    ***************DATA DECLARATION**************************
    DATA : message like  bdcmsgcoll occurs 0.
    DATA : bdcdata type standard table of bdcdata with header line .
    data : file type string,
            v_msg(255).
    DATA:Begin of itab_main occurs 0,
      LSTAR      type  CSLAZ-LSTAR,
      DATAB_ANFO(10),
    DATAB_ANFO type CSLAZ-DATAB_ANFO,
      KTEXT      type CSLAZ-KTEXT,
      LTEXT      type CSLAZ-LTEXT,
      LEINH_CHAR type CSLAZ-LEINH_CHAR,
      KSTTY      type CSLAZ-KSTTY,
      LATYP      type CSLAZ-LATYP,
      VKSTA      type CSLAZ-VKSTA,
      VERSN      type CCSS-VERSN,
      PERBL      type RKPLN-PERBL,
      PERBL1      type RKPLN-PERBL,
      GJAHR      type CCSS-GJAHR,
      KOSTL      type CCSS-KOSTL,
      LSTAR1      type CCSS-LSTAR,
      TKV        type RKPLN-TKV,
    End of itab_main.
    Data :v_file type string.
    Data :Begin of itab_KL01 occurs 0,
                KL01_LSTAR      type  CSLAZ-LSTAR,
                KL01_DATAB_ANFO(10),             " type CSLAZ-DATAB_ANFO,
               KL01_DATAB_ANFO type CSLAZ-DATAB_ANFO,
                KL01_KTEXT      type CSLAZ-KTEXT,
                KL01_LTEXT      type CSLAZ-LTEXT,
                KL01_LEINH_CHAR type CSLAZ-LEINH_CHAR,
                KL01_KSTTY      type CSLAZ-KSTTY,
                KL01_LATYP      type CSLAZ-LATYP,
                KL01_VKSTA      type CSLAZ-VKSTA,
           End of itab_KL01.
    Data : Begin of error_itab occurs 0,
            msg(255),
           End of error_itab.
    Data :wa_error_itab like line of error_itab.
    Data : Begin of itab_KP26 occurs 0,
               KP26_VERSN      type CCSS-VERSN,
               KP26_PERBL      type RKPLN-PERBL,
               KP26_PERBL1     type RKPLN-PERBL,
               KP26_GJAHR      type CCSS-GJAHR,
               KP26_KOSTL      type CCSS-KOSTL,
               KP26_LSTAR      type CCSS-LSTAR,
               KP26_TKV        type RKPLN-TKV,
           End of itab_KP26.
    data : l_v_tab type abap_char1
                     value cl_abap_char_utilities=>horizontal_tab.
    data : counter type c value 0,
           countere type c value 0,
           counters type c value 0.
    PARAMETER: p_file TYPE ibipparms-path obligatory." Needed to upload the file
    At selection-screen on value-request  for p_file.
      Perform get_file.
    start-of-selection.
      perform file_upload.
      Perform split_itab.
    ****************************************KL01
    loop at itab_KL01.
    refresh  bdcdata.
      perform bdc_dynpro      using 'SAPLKMA6' '0200'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'CSLAZ-LSTAR'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_field       using 'CSLAZ-KOKRS'
                                    '1000'.
      perform bdc_field       using 'CSLAZ-LSTAR'
                                     itab_KL01-KL01_LSTAR .
      perform bdc_field       using 'CSLAZ-DATAB_ANFO'
                                     itab_KL01-KL01_DATAB_ANFO.
      perform bdc_field       using 'CSLAZ-DATBI_ANFO'
                                    '31.12.9999'.
      perform bdc_dynpro      using 'SAPLKMA6' '0299'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BU'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'CSLAZ-TARKZ'.
      perform bdc_field       using 'CSLAZ-KTEXT'
                                    itab_KL01-KL01_KTEXT.
      perform bdc_field       using 'CSLAZ-LTEXT'
                                    itab_KL01-KL01_LTEXT.
      perform bdc_field       using 'CSLAZ-LEINH_CHAR'
                                     itab_KL01-KL01_LEINH_CHAR.
      perform bdc_field       using 'CSLAZ-KSTTY'
                                     itab_KL01-KL01_KSTTY.
      perform bdc_field       using 'CSLAZ-LATYP'
                                     itab_KL01-KL01_LATYP.
      perform bdc_field       using 'CSLAZ-VKSTA'
                                     itab_KL01-KL01_VKSTA .
    call transaction 'KL01' using BDCDATA MODE 'A' update 's' messages into message .
    If sy-subrc eq 0.
    counters = counters + 1.
    else.
    countere = countere + 1 .
          perform error_msg.
          wa_error_itab-msg = v_msg.
          append  wa_error_itab-msg to error_itab.
          clear  wa_error_itab-msg.
    endif.
    Endloop.
    Loop at itab_KP26.
    refresh  bdcdata.
      perform bdc_dynpro      using 'SAPLSPO4' '0300'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'SVALD-VALUE(01)'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=FURT'.
      perform bdc_field       using 'SVALD-VALUE(01)'
                                    '1000'.
      perform bdc_dynpro      using 'SAPLKPP0' '1000'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'KPP0B-VALUE(09)'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=CSUB'.
      perform bdc_field       using 'KPP1B-ONLY'
                                    'X'.
      perform bdc_field       using 'KPP0B-VALUE(01)'
                                     itab_KP26-KP26_VERSN .
      perform bdc_field       using 'KPP0B-VALUE(02)'
                                    itab_KP26-KP26_PERBL.
      perform bdc_field       using 'KPP0B-VALUE(03)'
                                     itab_KP26-KP26_PERBL1 .
      perform bdc_field       using 'KPP0B-VALUE(04)'
                                    itab_KP26-KP26_GJAHR  .
      perform bdc_field       using 'KPP0B-VALUE(06)'
                                     itab_KP26-KP26_KOSTL .
      perform bdc_field       using 'KPP0B-VALUE(09)'
                                     itab_KP26-KP26_LSTAR.
      perform bdc_dynpro      using 'SAPLKPP2' '0112'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'K-BK_0403'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=CBUC'.
      perform bdc_field       using 'Z-BDC08(01)'
                                    itab_KP26-KP26_TKV  .
    call transaction 'KP26' using BDCDATA MODE 'A' update 'S' messages into message .
    If sy-subrc eq 0.
    counters = counters + 1.
    else.
    countere = countere + 1 .
          perform error_msg.
          wa_error_itab-msg = v_msg.
          append  wa_error_itab-msg to error_itab.
          clear  wa_error_itab-msg.
    endif.
    Endloop.
    counter = countere + counters.
      write /: 'Total Number of Records is',counter .
      Write /: 'Total Number of Successfull records',counters.
      Write /: 'Total Number of error records',countere.
      If countere GT 0.
        Write :/'The error out record message are'.
        Loop at error_itab.
          write:/ error_itab-msg.
        Endloop.
    Endif.
    *&      Form  file_upload
          text
    -->  p1        text
    <--  p2        text
    FORM file_upload .
      v_file = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = v_file
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = l_v_tab
        TABLES
          DATA_TAB                = itab_main
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      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.                    " file_upload
    *&      Form  split_itab
          text
    -->  p1        text
    <--  p2        text
    FORM split_itab .
      loop at itab_main.
    MOVE     itab_main-LSTAR       TO  itab_KL01-KL01_LSTAR.
    MOVE     itab_main-DATAB_ANFO  TO itab_KL01-KL01_DATAB_ANFO.
    MOVE     itab_main-KTEXT       TO itab_KL01-KL01_KTEXT.
    MOVE     itab_main-LTEXT       TO itab_KL01-KL01_LTEXT.
    MOVE     itab_main-LEINH_CHAR  TO itab_KL01-KL01_LEINH_CHAR.
    MOVE     itab_main-KSTTY       TO itab_KL01-KL01_KSTTY.
    MOVE     itab_main-LATYP       TO itab_KL01-KL01_LATYP.
    MOVE     itab_main-VKSTA       TO itab_KL01-KL01_VKSTA.
    MOVE     itab_main-VERSN       TO itab_KP26-KP26_VERSN.
    MOVE     itab_main-PERBL       TO itab_KP26-KP26_PERBL.
    MOVE     itab_main-PERBL1      TO itab_KP26-KP26_PERBL1.
    MOVE     itab_main-GJAHR       TO itab_KP26-KP26_GJAHR.
    MOVE     itab_main-KOSTL       TO itab_KP26-KP26_KOSTL.
    MOVE     itab_main-LSTAR1      TO itab_KP26-KP26_LSTAR.
    MOVE     itab_main-TKV         TO itab_KP26-KP26_TKV.
    APPEND itab_KL01.
    APPEND itab_KP26.
    CLEAR itab_KL01.
    CLEAR itab_KP26.
      endloop.
    ENDFORM.                    " split_itab
    *&      Form  get_file
          text
    -->  p1        text
    <--  p2        text
    FORM get_file .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = p_file.
    ENDFORM.                    " get_file
           Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      append bdcdata.
    endform.                    "bdc_dynpro
           Insert field                                                  *
    form bdc_field using fnam fval.
      if fval <> space.
        clear bdcdata.
        bdcdata-fnam = fnam.
        bdcdata-fval = fval.
        append bdcdata.
      endif.
    endform.                    "bdc_field
    *&      Form  error_msg
          text
    -->  p1        text
    <--  p2        text
    FORM error_msg .
      call function 'FORMAT_MESSAGE'
        EXPORTING
          id        = sy-msgid
          lang      = 'E'
        IMPORTING
          msg       = v_msg
        EXCEPTIONS
          not_found = 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.                    " error_msg

Maybe you are looking for