BDC tab delimeter

Hey guys,
While writing the call function UPLOAD in BDC program if the text file has fields separated by a tab delimeter...
how should that be coded in the program?
Regards

Hi,
*Has_field_separator = 'X'*   " for specifying that in the file field values separated by TAB space
[Sample code|GUI_UPLOAD;
Regards
Narin Nandivada

Similar Messages

  • Call transaction using bdc tab and also skip first screen??

    Hi,
    Please help.
    I want to call transaction PA30 fill it with values which are determined only at runtime and then skip first screen.
    The screen doesn't have parameter fields so i cannot use 'set parameter id'.
    I also cannot create a transaction with parameters as I only have these at runtime.
    Anyone done anything like this???

    hi,
      you might be populateing the itab bdc_tab with the corresponding values fronm the recording.
    while doing the recording go until to the screen wher u want to finsih.
    and populate the bdc_tab wit the ok code,screen number and the value.
    this will do.
    for eg see the code below.
    METHOD analyze_log.
      DATA : wrk_extid TYPE balhdr-extnumber.
      DATA : wrk_date(10) TYPE c.
      DATA : it_rspar TYPE TABLE OF rsparams .
      DATA : wa_rspar TYPE rsparams.
      DATA: it_bdcdata TYPE STANDARD TABLE OF bdcdata,
          wa_bdcdata TYPE bdcdata.
      DATA: params TYPE ctu_params.
      CONSTANTS : object TYPE balhdr-object VALUE 'ZKIV_LOG'.
      IF wa_kopf-vertr_nr IS NOT INITIAL.
        CONCATENATE wa_kopf-vertr_nr '/' wa_kopf-nachtr_nr  INTO wrk_extid.
        wrk_date = '01.09.2006'.
        SET PARAMETER ID 'BALOBJ' FIELD object .
        SET PARAMETER ID 'BALEXT' FIELD wrk_extid.
        wa_rspar-selname = 'ALDATE'.
        wa_rspar-sign = 'I'.
        wa_rspar-kind = 'P'.
        wa_rspar-option = 'EQ'.
        wa_rspar-low = wrk_date.
        APPEND wa_rspar TO it_rspar.
      ELSE.
        CLEAR wrk_extid.
        SET PARAMETER ID 'BALEXT' FIELD wrk_extid.
      ENDIF.
    Update BDC tab
    --Call SLG1 using BDC--&
      params-dismode = 'E'. "Show errors only
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = 'SAPLSLG3'.
      wa_bdcdata-dynpro   = '0100'.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_CURSOR'.
      wa_bdcdata-fval = 'BALHDR-ALDATE'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BALHDR-ALDATE'.
      wa_bdcdata-fval = wrk_date.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_OKCODE'.
      wa_bdcdata-fval = '=SELE'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = 'SAPLSLG3'.
      wa_bdcdata-dynpro   = '0100'.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_OKCODE'.
      wa_bdcdata-fval = '=&F03'.
      APPEND wa_bdcdata TO it_bdcdata.
      CLEAR wa_bdcdata.
      wa_bdcdata-fnam = 'BDC_SUBSCR'.
      wa_bdcdata-fval = 'SAPLSBAL_DISPLAY                        0101SUBSCREEN'.
      APPEND wa_bdcdata TO it_bdcdata.
      CALL TRANSACTION 'SLG1' USING it_bdcdata OPTIONS FROM params.
    --End of BDC--&
    ENDMETHOD.
    here wat i m doing is that i dont want the subscreen 101 to be displayed..
    Message was edited by:
            Sandeep S

  • Tab delimeter in 4.6c

    Hi Experts,
    I want to put the fields  in a file seperated by tab delimeter  adn down load to application server.
      unfortunately the class CL_ABAP_CHAR_UTILITIES is not availbe with 4.6c.
    how to do this in 4.6c please help if any body knows.
    Thanks and Regards,
    Shashikumar.G

    HI,
    Use
      CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
               filename                = w_filename
               filetype                = 'ASC'
    WRITE_FIELD_SEPARATOR
    = 'X'           mode                    = ' '
         IMPORTING
              filelength              = w_final
           TABLES
                data_tab                = t_output
            FIELDNAMES              =
          EXCEPTIONS
               file_open_error         = 1
               file_write_error        = 2
               invalid_filesize        = 3
               invalid_type            = 4
               no_batch                = 5
    Regards
    Raju Chitale

  • Tab delimeted text file

    Hi Group,
    How to upload tab delimeted text file using FM KCD_CSV_FILE_TO_INTERN_CONVERT or is there any other way.
    I am using text file with header text and the data will start from second row.

    Hi ,
      Use like this .
    constants: c_hex_tab    type x value 9.
    call function 'KCD_CSV_FILE_TO_INTERN_CONVERT'
         exporting
              i_filename      = filename
              i_separator     = l_separator
         tables
              e_intern        = l_intern
         exceptions
              upload_csv      = 1
              upload_filetype = 2
              others          = 3.
    where l_separator = c_hex_tab.  " for tab delimitter
    Regards,
    GSR.

  • RE-FX:call transaction using bdc-tab:No bdc_okcode for swapping table-entry

    Hello,
    I am trying to call transaction RERAOP (module RE-FX) to make an accounting transaction. There is 1 debit posting and 1 credit posting in a grid. Selecting the debit posting, a details scrren is shown, consisting of 2 registers.
    On the first register you have to fill different fields. At this point it isn't possible to select the second register. The second (credit) posting is diplayed when you hit the enter key. After the fields in the details screen of this (credit) postings have been filled, it is possible to swap back to the first (debit) posting with a double-click on the first entry of the postings-table.
    Finally I come to the point ...
    If I record these steps (batch-input recorder) and generate an report of this code there is no bdc_okcode for the above mentioned swap back to the debit posting. While executing this report I get a lot of error message because the swap back to the debit posting doesn't work (--> because of the missing bdc_okcode) and therefore the batch input tries to fill fields which are not on the active screen (because they are on the 2. register which is not displayed).
    Hope that there is someone out there who:
    1. Understands my miserable english   and
    2. has an advice for me.
    Thanks in advance!!!
      Stephan
    Edited by: Stephan Scholze on Apr 22, 2008 1:34 PM
    Edited by: Stephan Scholze on Apr 22, 2008 2:24 PM
    Edited by: Stephan Scholze on Apr 22, 2008 3:19 PM

    Not sure how much I can help as we don't run RE-FX (RERAOP - what's the program name btw?) at any sites I work at, but a couple of general BDC things you might try (based on problems I've had with BDCs to other Tcodes)...
    When you are in that transaction normally do a right click to see what function codes are defined as there might be one there that allows you to switch between these debit & credit data entry places (how are they rendered, btw - are they ALV grids or what?  If they are table controls then you should be able to position the cursor on row 1 and trigger an F2 double-click)... also look at the PF-STATUS carefully in case (once again) there is a function code that lets you swap from DR to CR & vice versa... and even browse the source code in the user-command for the screen might give a clue as to how to achieve this.  Of course it may not be possible if the data entry is control based i.e. the input areas are provided in the SAPGui not the application server (such as the text editor & ALV grids)... in which case you start hunting for BAPIs and function modules and the like, or end up having to pass data into the transaction via something like an "export" and catch it inside a user exit or enhancement via an "import"... all rather messy, but quite possible.
    Jonathan

  • Tab Delimeter

    Hi all,
    I want to down load itab data into Text file.
    After Downloading i want to put "|" delemeter after each field value.
    This is urgent.Plz send me response.
    Thanks, Rayeez.

    hi,
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = W_FILENAME
       FILETYPE                        = 'ASC'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      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                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = itab
      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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Error in my BDC SESSION METHOD

    Hi,
    I was trying work on BDC SESSION METHOD AND MY TCODE IS XK01.
    Here is my code can some one tell me where i am doing wrong becoz its not giving the output as I expected. And I am uploading a tab delimeter file.
    report ZAN_BDCVENDOR
           no standard page heading line-size 255.
    include bdcrecx1.
    DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF RECORD OCCURS 0,
    LIFNR(016),
    BURKS(004),
    EKORG(004),
    KTOKK(004),
    AKONT(010),
    FDGRV(010),
    WAERS(005),
    END OF RECORD.
    start-of-selection.
    perform open_group.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\VENDOR.TXT'
    FILETYPE                      = 'ASC'
      tables
        data_tab                      = RECORD
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT RECORD.
    perform bdc_dynpro      using 'SAPMF02K' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'USE_ZAV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  '8765'.
    perform bdc_field       using 'RF02K-BUKRS'
                                  '1000'.
    perform bdc_field       using 'RF02K-EKORG'
                                  '1000'.
    perform bdc_field       using 'RF02K-KTOKK'
                                  '0001'.
    perform bdc_field       using 'USE_ZAV'
                                  'X'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFB1-AKONT'
                                  '160000'.
    perform bdc_field       using 'LFB1-FDGRV'
                                  'A1'.
    perform bdc_dynpro      using 'SAPMF02K' '0310'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFM1-WAERS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFM1-WAERS'
                                  'usd'.
    perform bdc_transaction using 'XK01'.
    ENDLOOP.
    perform close_group.
                  CALL FUNCTION 'BDC_OPEN_GROUP'
                   EXPORTING
                    CLIENT                    = SY-MANDT
                    DEST                      = FILLER8
                     GROUP                     = 'SESSION1'
                    HOLDDATE                  = FILLER8
                    KEEP                      = FILLER1
                     USER                      = SY-UNAME
                    RECORD                    = FILLER1
                    PROG                      = SY-CPROG
                  IMPORTING
                    QID                       =
                  EXCEPTIONS
                    CLIENT_INVALID            = 1
                    DESTINATION_INVALID       = 2
                    GROUP_INVALID             = 3
                    GROUP_IS_LOCKED           = 4
                    HOLDDATE_INVALID          = 5
                    INTERNAL_ERROR            = 6
                    QUEUE_ERROR               = 7
                    RUNNING                   = 8
                    SYSTEM_LOCK_ERROR         = 9
                    USER_INVALID              = 10
                    OTHERS                    = 11
                  IF sy-subrc <> 0.
                  WRITE 'ERROR IN OPEN_GROUP'.
                  ENDIF.
                   CALL FUNCTION 'BDC_INSERT'
                   EXPORTING
                     TCODE                  = TCODE
                     POST_LOCAL             = NOVBLOCAL
                     PRINTING               = NOPRINT
                     SIMUBATCH              = ' '
                     CTUPARAMS              = ' '
                     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.
                   CALL FUNCTION 'BDC_CLOSE_GROUP'
                   EXCEPTIONS
                     NOT_OPEN          = 1
                     QUEUE_ERROR       = 2
                     OTHERS            = 3
                   IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                   ENDIF.
    I appreciate

    Hi,
    i guess, the error is due to, u didnt pass the TCODE parameter in BDC_INSERT FM.
    Try by passing it...
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = TCODE*
    POST_LOCAL = NOVBLOCAL
    PRINTING = NOPRINT
    SIMUBATCH = ' '
    CTUPARAMS = ' '
    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
    Hope it works!!
    Regards,
    Pavan

  • Facing problem during uploadation of Routing data using CA01-BDC - URGENT

    Dear All,
    When I am trying to upload Routing data using CA01 in the Table Control scenario, then I am facing problem as my last 2 records are not getting uploaded from my Test file.
    For example, I am having 47 records in my Test File and after setting ‘Default size’ parameters (to avoid screen resolution problem)
    I have 15 table control line items data per page. The Page down logic ('=P+') is working fine, but my below BDC code failed to take
    the remainder last 2 records from the Test File.
    Analysis: When I am running my “Call Transaction” bdc in foreground, then the 1st page down occurs after 15th record, 2nd page down occurs after 29th record( as in Table Control 1st page’s 15th record is coming on the Top of 2nd page). 3rd page down occurs after 43rd record
    (as 2nd page’s 29th record is coming on the top of 3rd page). In the 4th Table Control Page 43rd record of previous page is coming on top, and then it’s taking 44th & 45th records from the Test File and then it is triggering SAVE (=BU). Thus, our last 2 records
    (i.e. 46th, 47th record) are not getting uploaded in the routing screen from our Test File.
    If anybody has encountered this scenario previously, please help me URGENTLY in fixing the bugs here. It’s VERY, VERY URGENT…
    FYI. For others 45 successful records already uploaded, all the screen fields values are coming properly in the routing screen, and here there is no issue.
    Thanks very much…
    Thanks & Regards
    Sudipta – Project Lead
    Volvo Client Location
    I am pasting my BDC source code below:
    REPORT ZRT1_UPLOAD_CA01_F
                           NO STANDARD PAGE HEADING
                           LINE-SIZE 255.
                            I N C L U D E S                              *
    Include for Data Declarations
    INCLUDE zrout_top.
    Include for Forms
    INCLUDE zrout_form.
    INCLUDE zrout_include_f_ca01.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field>
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    Attaching F4 help with filename
      PERFORM F1001_GET_F4.
               S T A R T   -   O F  -  S E L E C T I O N                 *
    START-OF-SELECTION.
    Perform to read the input file
      PERFORM f_read_file.
    Perform to fill the BDC data
      PERFORM f_fill_bdctab.
                   E N D   -   O F  -  S E L E C T I O N                 *
    END-OF-SELECTION.
      FREE: i_bdcdata,
            i_messtab,
            i_record.
    x----
    *&  Include           ZROUT_TOP                                        *
                      D A T A B A S E    T A B L E S                     *
    TABLES: t100.          "Messages
                    D A T A    D E C L A R A T I O N S                   *
    T A B L E    T Y P E S *****************************
    For input data
    TYPES: BEGIN OF ty_record,
            matnr(18),  "Material Number
            werks(4),   "Plant
            verwe(3),   "Usage
            statu(3),   "Status
            arbpl(8),   "Work Center
            steus(4),   "Control Key
            ltxa1(40),  "Description of Operation
            bmsch(13),  "Base Quantity
            meinh(3),   "Unit of Measure
            vgw01(11),  "Machine
            vge01(3),   "Unit of measure of activity
          END OF ty_record.
    I N T E R N A L    T A B L E S ***********************
    Internal Table for input file name
    DATA: i_file_tab  TYPE STANDARD TABLE OF sdokpath   INITIAL SIZE 0.
    Internal Table for BDC Data
    DATA: i_bdcdata   TYPE STANDARD TABLE OF bdcdata    INITIAL SIZE 0.
    Internal Table for BDC Messages
    DATA: i_messtab   TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0.
    Internal Table for Input file
    DATA: i_record TYPE STANDARD TABLE OF ty_record INITIAL SIZE 0.
    W O R K      A R E A S *************************
    Work Area for input file name
    DATA: wa_file_tab LIKE sdokpath.
    Work Area for BDC Data
    DATA: wa_bdcdata LIKE bdcdata.
    Work Area for BDC Messages
    DATA: wa_messtab LIKE bdcmsgcoll.
    Work Area for Input file
    DATA: wa_record TYPE ty_record.
    V A R I A B L E S ****************************
    DATA: v_filename TYPE string,
          v_fnam(40) TYPE c.
    DATA: wa_opt TYPE ctu_params.
    C O N S T A N T S ***************************
    CONSTANTS: c_werks TYPE rc27m-werks VALUE 'tp',
               c_steus TYPE plpod-steus VALUE 'PP01'.
    *Selection Screen.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS:
              Input file name
                P_FILE TYPE rlgrap-filename OBLIGATORY. " DEFAULT 'C:\'.
    SELECTION-SCREEN END OF BLOCK B1.
    x----
    *&  Include           ZROUT_FORM                                       *
    *&      Form  f_fill_bdctab
          Form to fill the BDC Data
    FORM f_fill_bdctab.
      TABLES mapl.          "Assignment of Task Lists to Materials
      DATA: l_cnt_item(3)  TYPE n VALUE 1.    "Line item counter
      DATA: first(3)  TYPE n VALUE 16.    "Line item counter
      DATA: next(3)  TYPE n .    "Line item counter
      DATA: lin(3) TYPE n .    "Line item counter
      DATA: l_v_bmsch(13),   "Base qty
            l_v_meinh(3),    "Unit of Measure
            l_v_vgw01(11),   "Machine
            l_v_vgw02(11),   "Labour
            l_v_vge01(3).    "Unit of measure of activity
      DATA l_v_nextline TYPE sy-tabix.
      DATA wa_temp TYPE ty_record.
        Initialize Counter
          l_cnt_item = 1.
      SORT i_record BY matnr.
      LOOP AT i_record INTO wa_record.
    AT NEW matnr.
        REFRESH: i_bdcdata,
                 i_messtab.
        SET PARAMETER ID 'PLN' FIELD space.
        SET PARAMETER ID 'PAL' FIELD space.
        PERFORM f_bdc_dynpro      USING 'SAPLCPDI' '1010'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
      Material Number
        PERFORM f_bdc_field       USING 'RC27M-MATNR'
                                        wa_record-matnr.
       Plant
        PERFORM f_bdc_field       USING 'RC27M-WERKS'
                                        c_werks.
        PERFORM f_bdc_field       USING 'RC271-PLNNR'
      Check if routing already exits for the material
        SELECT * FROM mapl
                      INTO mapl
                                WHERE matnr EQ wa_record-matnr
                                  AND werks EQ c_werks
                                  AND plnty EQ 'N'.
          IF sy-subrc EQ 0.
            PERFORM f_bdc_dynpro      USING 'SAPLCPDI' '1200'.
            PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                            '=ANLG  '.
          ENDIF.
        ENDSELECT.
        perform f_bdc_dynpro      USING 'SAPLCPDA' '1200'.
        perform f_bdc_field       USING 'BDC_OKCODE'
                                  '=VOUE'.
    Group Counter
        perform f_bdc_field       USING 'PLKOD-PLNAL'
      Usage
        PERFORM f_bdc_field       USING 'PLKOD-VERWE'
                                        '1'.
      Status
        PERFORM f_bdc_field       USING 'PLKOD-STATU'
                                        '4'.
    ENDAT.
        PERFORM f_bdc_dynpro      USING 'SAPLCPDI' '1400'.
      Check if page is full
        IF l_cnt_item EQ '16'.
        Page down
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                               '=P+'.
          l_cnt_item = 1.
    ELSE.
    PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    ENDIF.
       CLEAR v_fnam.
      Populate item level details
    Work Center
        CONCATENATE 'PLPOD-ARBPL(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        wa_record-arbpl.
      Control Key
        CONCATENATE 'PLPOD-STEUS(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        c_steus.
      Description of Operation
        CONCATENATE 'PLPOD-LTXA1(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        wa_record-ltxa1.
      Base Quantity
        CONCATENATE 'PLPOD-BMSCH(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        wa_record-bmsch.
      Unit of Measure
        CONCATENATE 'PLPOD-MEINH(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        wa_record-meinh.
      Machine
        CONCATENATE 'PLPOD-VGW01(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        wa_record-vgw01.
      Labour
       CONCATENATE 'PLPOD-VGW02(' l_cnt_item ')' INTO v_fnam.
       PERFORM f_bdc_field       USING v_fnam
                                       wa_record-vgw02.
      Unit of measure of activity
        CONCATENATE 'PLPOD-VGE01(' l_cnt_item ')' INTO v_fnam.
        PERFORM f_bdc_field       USING v_fnam
                                        wa_record-vge01.
          l_cnt_item = l_cnt_item + 1.
       CLEAR wa_record.
    AT END OF matnr.
         PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
          PERFORM f_bdc_field         USING 'BDC_OKCODE'
                                  '=BU'.
         wa_opt-DISMODE = 'A'.
         wa_opt-DEFSIZE = 'X'.
         wa_opt-UPDMODE = 'S'.
        PERFORM f_bdc_transaction USING 'CA01'.
       Initialize Counter
         l_cnt_item = 1.
    ENDAT.
      ENDLOOP.
    ENDFORM.                    " f_fill_bdctab
    x----
    *&  Include           ZROUT_INCLUDE_F_CA01                             *
    *&      Form  f_read_file
          Form to read the file from presentation server
    FORM f_read_file .
    To get the file name
      DATA l_v_file TYPE string.
    l_v_file = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename                = l_v_file
            filetype                = 'ASC'
            has_field_separator     = 'X'
          TABLES
            data_tab                = i_record
          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.
    ENDIF.
    ENDFORM.                    " f_read_file
    *&      Form  f_bdc_dynpro
          Form to populate BDC Tab for new screen
         -->fp_program   Screen program name
         -->fp_dynpro    Screen Number
           Start new screen                                              *
    FORM f_bdc_dynpro USING fp_program fp_dynpro.
      CLEAR wa_bdcdata.
      wa_bdcdata-program  = fp_program.
      wa_bdcdata-dynpro   = fp_dynpro.
      wa_bdcdata-dynbegin = 'X'.
      APPEND wa_bdcdata TO i_bdcdata.
    ENDFORM.                    "f_bdc_dynpro
    *&      Form  f_bdc_field
           Insert field                                                  *
    FORM f_bdc_field USING fp_fnam fp_fval.
      IF NOT fp_fval IS INITIAL.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam = fp_fnam.
        wa_bdcdata-fval = fp_fval.
        APPEND wa_bdcdata TO i_bdcdata.
      ENDIF.
    ENDFORM.                    "f_bdc_field
    *&      Form  f_bdc_transaction
          Call transaction and error handling
         -->fp_tcode   Transaction code
    FORM f_bdc_transaction  USING fp_tcode.
      DATA: l_mstring(480),
            l_color         TYPE i,
            l_mode          TYPE c.
      REFRESH i_messtab.
    CALL TRANSACTION fp_tcode USING i_bdcdata
                       OPTIONS FROM wa_opt
                       MESSAGES INTO i_messtab.
    Messages during upload
      LOOP AT i_messtab INTO wa_messtab.
        CASE wa_messtab-msgtyp.
          WHEN 'S'.
            l_color = 5.
          WHEN 'E'.
            l_color = 6.
          WHEN 'W'.
            l_color = 3.
        ENDCASE.
        FORMAT COLOR = l_color.
        SELECT SINGLE * FROM t100 WHERE sprsl = wa_messtab-msgspra
                                  AND   arbgb = wa_messtab-msgid
                                  AND   msgnr = wa_messtab-msgnr.
        IF sy-subrc = 0.
          l_mstring = t100-text.
          IF l_mstring CS '&1'.
            REPLACE '&1' WITH wa_messtab-msgv1 INTO l_mstring.
            REPLACE '&2' WITH wa_messtab-msgv2 INTO l_mstring.
            REPLACE '&3' WITH wa_messtab-msgv3 INTO l_mstring.
            REPLACE '&4' WITH wa_messtab-msgv4 INTO l_mstring.
          ELSE.
            REPLACE '&' WITH wa_messtab-msgv1 INTO l_mstring.
            REPLACE '&' WITH wa_messtab-msgv2 INTO l_mstring.
            REPLACE '&' WITH wa_messtab-msgv3 INTO l_mstring.
            REPLACE '&' WITH wa_messtab-msgv4 INTO l_mstring.
          ENDIF.
          CONDENSE l_mstring.
          WRITE: / wa_messtab-msgtyp, l_mstring(250).
        ELSE.
          WRITE: / wa_messtab.
        ENDIF.
        FORMAT COLOR OFF.
      ENDLOOP.
      SKIP.
    ENDFORM.                    " f_bdc_transaction
    FORM F1001_GET_F4.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                PROGRAM_NAME  = SY-REPID
                DYNPRO_NUMBER = SY-DYNNR
                FIELD_NAME    = P_FILE
           CHANGING
                FILE_NAME     = P_FILE
           EXCEPTIONS
                MASK_TOO_LONG = 1
                OTHERS        = 2.
      IF SY-SUBRC <> 0.
      File is not selected
       MESSAGE I000 WITH TEXT-M01.
      ENDIF.
    ENDFORM.                    " F1001_GET_F4

    Sudipta,
    Would request you to post this to ABAP-Forum for Immediate response.
    I had this problem, but the ABAP guy did something to correct this...it was more of screen resoultion difference between the recorded system and uploading system. Please try to use the same system which was used to record and try.
    Regards,
    Prasobh

  • Custom header delimeter

    My company is used to exporting data from MAX using a custom header with the tab delimeter.  I am trying to make a LabVIEW program that automatically writes the data and header to the file.  My company already has software to make a custom header text file but the problem is that this file contains the text:  {delimiter} where each tab should be.  Is there a way when reading this custom header from the file to add a tab when this {delimiter} shows up such as MAX does? 

    Use "search and replace string",
    search string= {delimiter}
    replace string=tab diagram constant
    replace all=true.
    LabVIEW Champion . Do more with less code and in less time .

  • How to output tab character in c:out

    Here is the problem, and I would appreciate your help. I am trying to output text data to Excel. The data must be tab-delimeted.
    This works:
    <%response.setContentType("application/vnd.ms-excel");
    String sCsv = "aaa\tbbb\tccc\txxx<br>";
    out.print(sCsv);%>
    But when I try to use <c:out, it fails:
    <c:out value="aaa\\tbbb2c&#09;cc3x\txxg\\\taaaa"/>
    As you see, I am trying to get tabulation in different ways, but all of them fail. Excel always reads the text in one column. Is there anyway I can insert tab-symbol and use it with <c:out?
    Thank you

    Unfortunately, this is not so simple. Normally, I could probably use an output stream in a servlet. But my environment is a report inside the Oracle Portal 10.2
    And I am not even talking about OC4J server; it is a JSP file that Portal allows to use through its design UI, and which is stored somewhere in its medadata database (not a physical file). I needed a quick solution, and don't have time to dig deep into details how it all works together. Shortly, I cannot use servlets, just JSP

  • Subscreen in BDC

    hi guru's ,
    how to handle subscreen in BDC.
    my requirement is 'i have two header line , and 5 item lines in each header.
      in item there is droupdown box for a field.
    if we select this dropdown box the subscreen changes according to the selected value.
    plese help me
    thanks in advance.

    Hi,
    U have 2 chioces: u can define a single scenario each time - for example run first all the lines which have a value X in the dropdown box, then all the lines with value Y and change the values in the BDC tab in between. The 2nd chioce is to change the data u enter dynamicly the BDC tab - check the value in the field you are about to enter to the dropdown box and according to that value change the BDC tab (u'll probably have to change only the bdcdata-dynpro value to the number of the different screen called for each value of the dropdown box).
    Award point if helpful...
    Igal

  • Separation of tab delimited string

    Hello,
    I want to separate a tab delimited field in a query. It consists of three names and I have to put each of these 3 names into a separate field. How can this be accomplished?
    Example:
    in field 1 we have the string 'John Anderson Smith'
    in field 2 to filed 4 I want to see the following values:
    field 2: John
    field 3: Anderson
    field 4: Smith
    It has to be done with many names having different length.

    Tab delimeted eh... ok, that's chr(9) in the ascii set...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'John    Anderson        Smith' as txt from dual)
      2  --
      3  -- end of test data
      4  --
      5  select regexp_substr(txt, '[^'||chr(9)||']+', 1, 1) as nm1
      6        ,regexp_substr(txt, '[^'||chr(9)||']+', 1, 2) as nm2
      7        ,regexp_substr(txt, '[^'||chr(9)||']+', 1, 3) as nm3
      8        ,txt
      9* from   t
    SQL> /
    NM1                 NM2                 NM3                 TXT
    John                Anderson            Smith               John        Anderson        Smith
    SQL>You just need to repeat the regexp_substr for the maximum number of names that can be in the string.

  • ALV Questions

    <b>Hi,
       Please answer the following questions.
    1.  What is the difference b/w classical report and ALV  report and in classical report can we produce output more than 255 characters?
    2.  Did you used classes to create ALV reports  and how is superior over using    function modules in ALV report generation?
    3.  If we don't know the  exact number of blocks to be generated then Can we generate the output with different number of blocks in 
         ALV   reports?
    4.  In report if we have write statements in initialization, top of page and in start of selection then which event is first excuted and what
         is  the output?
    5.  In interactive report what is the use of exit key word?
    6.  what are nested structures and deep structures?
    7.  how can we write BDC program to  upload  data from  CSV, XL, TAB delimeter type flat files?
    8.  In BDC if the flat file consist of header and multiple line items then how to upload the load, does we create a single internal table for
         both header and body or different internal tables?
    9.  In call transaction and session method which method is prefered one?
    10. why can't we use call transaction method to upload large amount of data?
    11.what is the use of standard text in sap scripts, why can't we hard code the same information in form itself?
    12.what are user exits and how can we create them?
    13. can we modify  the  sap provided  code?
    14. what are oss notes?
    15. what are the different types of performance techniques?
    16. can we do modifications on output of   ALV reports, how?
    17. what are the classes that are used in ALV reporting?
    Thanks
    Manju.
    Points will be rewarded.</b>

    Hi manju
    1.Diff b/w classical and interactive
       classical report
              1)complicated
              2)Logo is not possible
              3)sorting,total ,etc...we have to write code
    4. top-of-page will trigger when ever it find a write statement after that all the
         events get triggered
        initialization
            write :/ 'Hi i am below the top-of-page'.
        top-of-page
            write :/ 'Hi i am the top'.
            output
            Hi i am the top
            Hi i am below the top-of-page
    5.we can use exit command inside a loop .
        if condition goes wrong straight away it comes out from the loop.
    9.session
    12. If we want to customize the SAP standard transaction that time we go for  User  exits
       There are
                screen exits,field exits,menu exits,and function module exits
      Important transactions
                CMOD,SMOD
      Important tables
               MODACT,MODSAP
    13. we have to get the access key to modify the standard code
    14. Online Service System - if we are not able to solve or we can find any complication in sap related issue we can raise a oss note ,the problem will be rectified by the SAP team and we have to pay for that.
    15.    SE30 - runtime analysis
             ST05 - SQL trace
    Regards
    P.Thangaraj

  • Can any one answer these interview questions

    CTS INTERVIEW QUESTIONS( 24/02/07 )
    1.  What is the difference b/w classical report and ALV  report and in classical report can we produce output more than 255 characters?
    2.  Did you used classes to create ALV reports  and how is superior over using    function modules in ALV report generation?
    3.  If we don't know the  exact number of blocks to be generated then Can we generate the output with different number of blocks in 
         ALV   reports?
    4.  In report if we have write statements in initialization, top of page and in start of selection then which event is first excuted and what
         is  the output?
    5.  In interactive report what is the use of exit key word?
    6.  what are nested structures and deep structures?
    7.  how can we write BDC program to  upload  data from  CSV, XL, TAB delimeter type flat files?
    8.  In BDC if the flat file consist of header and multiple line items then how to upload the load, does we create a single internal table for
         both header and body or different internal tables?
    9.  In call transaction and session method which method is prefered one?
    10. why can't we use call transaction method to upload large amount of data?
    11.what is the use of standard text in sap scripts, why can't we hard code the same information in form itself?
    12.what are user exits and how can we create them?
    13. can we modify  the  sap provided  code?
    14. what are oss notes?
    15. what are the different types of performance techniques?
    16. can we do modifications on output of   ALV reports, how?
    17. what are the classes that are used in ALV reporting?

    hi bhushan,
    1. What is the difference b/w classical report and ALV report and in classical report can we produce output more than 255 characters?
    Ans. Classical report ---Consist of one program that create a single list.This means that when list is displayed,it has to contain all data
    requested,regardless of the number of details the user wants to see.This procdeure may result in extensive and cluttered list from which the user has to pick the relvent data.(desired selection much be made before hand).
    Mian thing in classical report is it is not interactive(you will have cluttered information).
    Alv report _ IS interactive reporting (it is a set of function modules).(in alv we use both classical and interactive).
    in classical report we can't produce output more than 255 characters(but in ALV we can have the report contains columns more than 255 characters in length).
    ALV is very efficient tool for dynamically sorting and arranging the columns from a report output.
    2. Did you used classes to create ALV reports and how is superior over using function modules in ALV report generation?
    Ans. its upto you(did you use classes in ALV then say yes)
    3. If we don't know the exact number of blocks to be generated then Can we generate the output with different number of blocks in
    ALV reports?
    4. In report if we have write statements in initialization, top of page and in start of selection then which event is first excuted and what
    is the output?
    ANS. TOP_OF_PAGE is triggered.
    this event is triggered with the first WRITE statement or whenever new page is triggered. if you donts have any write statement before top-of-page or
    in start-of-selection then this event is not triggered.
    5. In interactive report what is the use of exit key word?
    Ans.
    6. what are nested structures and deep structures?
    7. how can we write BDC program to upload data from CSV, XL, TAB delimeter type flat files?
    Ans use FM 'GUI_UPLOAD'(CSV/TAB is .XLS)
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'D:PERSONALF1.XLS'
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = ' '
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = itab[]
    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.
    You can also use.
    Use GUI_UPLOAD FM with exporting parameter
    has_field_separator = 'X'
    8. In BDC if the flat file consist of header and multiple line items then how to upload the load, does we create a single internal table for
    both header and body or different internal tables?
    ans. To know more- /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    /people/william.li/blog/2006/03/21/minimize-memory-usage-during-message-mapping-when-replicating-an-element
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    No Documentation for Mapping Function useOneAsMany (Mapping Problem)
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
      Re: BDC - Header with multiple line items.   
    Posted: Sep 18, 2006 6:53 PM    in response to: sap innova       Reply      E-mail this post 
    http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    When you have enter multiple line in BDC for a table control use call transaction tcode using i_bdcdata options from opt message into i_messages.
    Check the below example.
    data: lws_cnt type char2,
    lws_field type char15.
    LOOP AT i_invoicing_plan INTO wa_invoicing_plan.
    lws_cnt = sy-tabix.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = lws_cnt
    IMPORTING
    output = lws_cnt .
    CONCATENATE 'FPLT-AFDAT(' lws_cnt ')' INTO lws_field.
    CONCATENATE wa_invoicing_plan-date+6(2)
    wa_invoicing_plan-date+4(2)
    wa_invoicing_plan-date+0(4) INTO lws_date
    SEPARATED BY '.'.
    PERFORM bdc_field USING lws_field lws_date.
    CONCATENATE 'FPLT-FPROZ(' lws_cnt ')' INTO lws_field.
    lws_perct = wa_invoicing_plan-percentage.
    CONDENSE lws_perct.
    PERFORM bdc_field USING lws_field lws_perct.
    ENDLOOP.
    While calling the transaction give like this:
    DATA: opt TYPE ctu_params.
    opt-dismode = 'N'.
    opt-updmode = 'A'.
    opt-defsize = 'X'.
    CALL TRANSACTION tcode
    USING i_bdcdata OPTIONS FROM opt MESSAGES INTO i_messages.
    LOOP AT i_messages.
    ENDLOOP.
    9. In call transaction and session method which method is prefered one?
    Ans. it depends on data if data is small then go for call transaction method.
    10. why can't we use call transaction method to upload large amount of data?
    Ans.there are chances of many errors.
    11.what is the use of standard text in sap scripts, why can't we hard code the same information in form itself?
    Ans.Assume ur company has stored some text which will printed on sapscript based on certain conditions and not taken thru driver program .
    For eg .for a plant 1000
    You have to print 'Plant is 1000 and stock is 1000'.
    for plant 1010
    You have to print 'Plant is 4000 and stock is 3000'.
    Then you will create a standard text thru SO10 create a text name and id would be ST and language as EN .
    AND YOU PLace the text You have to print 'Plant is 1000 and stock is 1000'.
    and this will create one standard text and another standard text for another .
    then in the sapscript you will check the plant
    use the command in the sapscript and write
    Include text name 'zzz' id ST lanuage en.
    When you execute
    Sapscript will read the include and bring the text from SO10 and print on the screen .
    Check T-Code NACE
    Check link for more on SAP Scripts.
    http://www.sap-img.com/sapscripts.htm
    12.what are user exits and how can we create them?
    User exits -> They are the provisions given by the sap standard program to add some extra functionality to their program .
    Which will be present till there is any version change .
    1. User exits were nothing but
    subroutines
    FORM/PERFORM
    called from standard programs.
    2. The FORM defintion was placed inside
    an empty include file.
    3. So It was called EVERYTIME.
    and we need to MODIFY/REPAIR the
    standard include .
    USER EXITS
    1. Introduction:
    User exits (Function module exits) are exits developed by SAP.
    The exit is implementerd as a call to a functionmodule.
    The code for the function module is writeen by the developer.
    You are not writing the code directly in the function module,
    but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:
    EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    13. can we modify the sap provided code?
    Ans. Yes,but you need to have access key and i thing you need to have permission also.
    14. what are oss notes?
    ans.SAP provides support in the form of Notes also and this is called OSS. Can check the link Sree provided.
    Just for an example if you face any error in your system. Then there is error number associated with the error. Then you can search for the OSS not for the error number, and the note will give you possible solution to your problem.
    You do have notes for any details for every thng and any thing related to SAP.
    ans.YES! It is Online Suppor System from SAP. It is official.
    Search in http://service.sap.com support portal link with keywork 'OSS' / 'OSS User Guide' to get more info and 'how to' guides.
    OSS (online support system) .You can get this support from WWW.SAP.COM site..SAP will issue OSS userid and password to the customers with each licence to their packages..Here you will get all suppost packages information and how to use the things..These kind of info you will get it..Ask your Project customer about this id.. OSS1 is the transaction code to check the oss notes from SAP...
    15. what are the different types of performance techniques?
    Ans. Use se30--- simply gives you an over view of the time spent on the application processing against the time spend selecting from the database.
         use sto5 _SQL trace tool ---Overview of exactly how the prog is hitting against the database and shows you the individual SQL statements used with which index was used.
    16. can we do modifications on output of ALV reports, how?
    ans.
    17. what are the classes that are used in ALV reporting?
    ans.Check out this tutorial
    An Easy Reference for ALV Grid Control.pdf
    and also demo programs in your system.
    BCALV_GRID_*.
    Check these out:
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    http://www.geocities.com/mpioud/Abap_programs.html
    Award points,if it is helpful

  • Uploading data in exel sheet

    hi,
    how to upload data from excel sheet to sap using call tranaction or session input or lsmw ?

    Hi ,
    In LSMW it is not possible to upload the data in Excel format, you need to save the excel sheet data as a tab delimeted file and then upload the data using LSMW.
    For BDC or Call transaction you can upload the Excel file by using the function module ''ALSM_EXCEL_TO_INTERNAL_TABLE''.
    See the foloowing sample code:
    UPLOAD OF EXCEL FILE:
    REPORT  ZRAJESH..
    TYPE-POOLS : slis.
    DATA : BEGIN OF it_fin OCCURS 1,
            f1(20),
            f2(30),
            f3(20),
            f4 TYPE i,
           END OF it_fin.
    DATA : intern1 TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
    REFRESH it_fin[].CLEAR it_fin.
    CLEAR intern1.
    PARAMETERS fl_name TYPE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR fl_name.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
      PROGRAM_NAME        = SYST-REPID
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
         static              = 'X'
      MASK                = ' '
        CHANGING
          file_name           = fl_name
    EXCEPTIONS
      MASK_TOO_LONG       = 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.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = fl_name
          i_begin_col             = '1'
          i_begin_row             = '1'
          i_end_col               = '4'
          i_end_row               = '35'
        TABLES
          intern                  = intern1
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR fl_name.
      FIELD-SYMBOLS : <fs1> TYPE ANY,
                      <fs2> TYPE ANY.
      data: v_col(3) type n ,
            v_col2(3) type n value '003'.
      LOOP AT intern1.
        v_col = intern1-col.
        ASSIGN component v_col2 of structure intern1 TO <fs1>.
        ASSIGN component v_col  of structure it_fin TO <fs2>.
        <fs2> = <fs1>.
       CASE INTERN1-COL.
         WHEN '001'.
           IT_FIN-F1 = INTERN1-VALUE.
         WHEN '002'.
           IT_FIN-F2 = INTERN1-VALUE.
         WHEN '003'.
           IT_FIN-F3 = INTERN1-VALUE.
         WHEN '004'.
           IT_FIN-F4 = INTERN1-VALUE.
       ENDCASE.
        AT END OF row.
          APPEND it_fin.
          CLEAR: it_fin,v_col.
        ENDAT.
      ENDLOOP.
      DATA : v_prgname TYPE sy-repid VALUE sy-repid,
             it_fldcat TYPE slis_fieldcat_alv OCCURS 1,
             wa_fldcat TYPE slis_fieldcat_alv,
             it_sort TYPE slis_sortinfo_alv OCCURS 1,
             wa_sort TYPE slis_sortinfo_alv.
      wa_fldcat-fieldname = 'F1'.
      wa_fldcat-col_pos   = 1.
      wa_fldcat-tabname  = 'IT_FIN'.
      wa_fldcat-seltext_m = 'VENDOR NO'.
      APPEND wa_fldcat TO it_fldcat.
      CLEAR wa_fldcat.
      wa_fldcat-fieldname = 'F2'.
      wa_fldcat-col_pos   = 2.
      wa_fldcat-tabname  = 'IT_FIN'.
      wa_fldcat-seltext_m = 'VENDOR NAME'.
      APPEND wa_fldcat TO it_fldcat.
      CLEAR wa_fldcat.
      wa_fldcat-fieldname = 'F3'.
      wa_fldcat-col_pos   = 3.
      wa_fldcat-tabname  = 'IT_FIN'.
      wa_fldcat-seltext_m = 'VENDOR CITY'.
      APPEND wa_fldcat TO it_fldcat.
      CLEAR wa_fldcat.
      wa_fldcat-fieldname = 'F4'.
      wa_fldcat-col_pos   = 4.
      wa_fldcat-tabname  = 'IT_FIN'.
      wa_fldcat-seltext_m = 'AMOUNT'.
    *wa_fldcat-do_sum = 'X'.
      APPEND wa_fldcat TO it_fldcat.
      CLEAR wa_fldcat.
    *wa_sort-fieldname = 'F3'.
    *wa_sort-tabname = 'IT_FIN'.
    *wa_sort-up = 'X'.
    *wa_sort-subtot = 'X'.
    *append wa_sort to it_sort.
    *clear wa_sort.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                =  v_prgname
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         it_fieldcat                       = it_fldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
        it_sort                           =  it_sort[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_fin
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

Maybe you are looking for

  • How to find change in customer reconciliation account

    Hi Experts We have an issue where total customer balance is not tallying with the balance as per Reconciliation account. We feel this could be because reconciliation account of a customer would have been changed. Can you please let me know a) If ther

  • Credit card statement printing in color when black and white chosen.  Wasting INK!  Not a printer problem.

    I have tried to print my business cc statement 3 times and even though I have my printer default to black and white and I verified that in the print dialog box it still printed in color three times.  I called printer company - no problems with that..

  • Restore documents cleared in iCloud

    Hi, Ich habe versehentlich vom iPod aus Dateien gelöscht. Damit waren die Dokumente sowohl am iPod als auch in der iCloud als auch am iPad weg. Auch ein Backup hat mir die Daten nicht wiedergebracht. Dabei dachte ich, die iCloud soll gerade den verse

  • Schedule a Session in a Job

    Dear friends, I have a LSMW which creates multiple sessions with 2000 records each. For example, the LSMW creates 10 sessions( in Tx. SM35 ) with 2000 records, say material master. Is there any way to schedule every session in a job at particular tim

  • How to edit customizing view in production system?

    Hi, I wonder if it is possible to edit customizing view (ex: tcode OAV8) directly in production system. I need a method that doesn't require repair. Any help will be appreciated..