Skip to Content
avatar image
Former Member

ABAP in InfoPackage

Hi Gurus,

Has someone a simple ABAP code for InfoPackage from Flat File for:

1) Create Routine for name of the file (Tab External Data).

2) Subsequent Process (Tab Schedule).

Thnaks in advance.

Riccardo.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 03, 2006 at 02:48 PM

    hi Riccardo,

    not sure understand your question correctly

    attached sample code to upload with selection from file.

    info for file etc stored in table RSLDPSEL

    The sme variable in data selection of inpopackage and value in transfer rul

    Access InfoPackage Selection in Transfer Rule

    Access infoPackage Selection in start routine of update rule

    hope this helps.

    data: debug_flag(1),

    l_idx like sy-tabix,

    begin of it_kunnr occurs 0,

    kunnr(10),

    end of it_kunnr.

    CALL FUNCTION 'WS_UPLOAD'

    EXPORTING

    • CODEPAGE = ' '

    FILENAME = 'c:\upload\customer'

    FILETYPE = 'ASC'

    • HEADLEN = ' '

    • LINE_EXIT = ' '

    • TRUNCLEN = ' '

    • USER_FORM = ' '

    • USER_PROG = ' '

    • IMPORTING

    • FILELENGTH =

    TABLES

    DATA_TAB = it_kunnr

    EXCEPTIONS

    CONVERSION_ERROR = 1

    FILE_OPEN_ERROR = 2

    FILE_READ_ERROR = 3

    INVALID_TABLE_WIDTH = 4

    INVALID_TYPE = 5

    NO_BATCH = 6

    UNKNOWN_ERROR = 7

    GUI_REFUSE_FILETRANSFER = 8

    CUSTOMER_ERROR = 9

    OTHERS = 10.

    *do.

    • if debug_flag = 'X'.

    • exit.

    • endif.

    *enddo.

    read table l_t_range with key

    fieldname = 'KUNNR'.

    l_idx = sy-tabix.

    *....

    DELETE l_t_range

    WHERE iobjnm = '0CUSTOMER'

    and fieldname = 'KUNNR'.

    L_t_RANGE-SIGN = 'I'.

    L_t_RANGE-OPTION = 'EQ'.

    loop at it_kunnr.

    L_t_RANGE-LOW = it_kunnr-kunnr.

    append l_t_range.

    endloop.

    modify l_t_range index l_idx.

    p_subrc = 0.

    Add comment
    10|10000 characters needed characters exceeded