I am getting problem with internal table & work area declaration.

I am working with 'makt' table ..with the table makt i need to work with styles attributes ..so i declared like this
TYPES : BEGIN OF ty_makt,
         matnr TYPE makt-matnr,
         spras TYPE makt-spras,
         maktx TYPE makt-maktx,
         maktg TYPE makt-maktg,
         celltab TYPE lvc_t_styl,
       END OF ty_makt.
DATA : i_makt TYPE TABLE OF ty_makt.
DATA : wa_makt TYPE ty_makt .
    But end of program i need to update dbtable "makt"...i am getting problem with internal table & work area declaration.
i think makt table fields mapping and internal table/work area mapping is not correct. so please help me to get out from this.

Hi Nagasankar,
TYPES : BEGIN OF TY_MATNR,
              MATNR TYPE MAKT-MATNR,
              SPRAS TYPE MAKT-SPRAS,
              MAKTX TYPE MAKT-MAKTX,
              MAKTX TYPE MAKT-MAKTG,
              CELLTAB TYPE LVC_T_STYL,  " Its Working perfectly fine..
             END OF TY_MAKT.
DATA: IT_MAKT TYPE STANDARD TABLE OF TY_MAKT,
          WA_MAKT TYPE TY_MAKT.
Its working perfectly fine. if still you are facing any issue post your complete code.
Thanks,
Sandeep

Similar Messages

  • Moving internal table work area data to string

    Hi, I am running a program  with unicode enable.I am moving data from work area to string where i am getting a error like String & work area are not mutually convertable in Uni code program.
    Can any one help me how to resolve this problem.
    Thanks & Regards,
    Pratap.

    Hi Pratap kumar,
    sorry, need to do some redesign:
    You could poiibly concatenate the components of the structure into a string - if they are all character-like. And you will loose leading and trailing spaces.
    Non-character-componets must be converted (WRITE TO) into character-like fields.
    If you need the exact position in your string, you have to place all values at calculatzed offset in a (big enough) character field like CHAR1024.
    Altogether it might be easier to re-think and re-build according to results required. As you did not mention where you have this question, I have no special idea on how to solve.
    Regards,
    Clemens

  • Problem with internal table initialisation in EBP system

    Hi
    I work in EBP system, and i made a specific work in LBBP_POCF0o program. It is in the displaying items of a purchase order.
    This is what i done:
    LOOP AT t_screen_items WHERE del_ind NE 'X'.
            w_old_total = w_old_total + t_screen_items-value.
            CLEAR:t_screen_items.
    ENDLOOP.
    loop at gt_item where del_ind ne 'X'.
          w_new_total = w_new_total +
              ( gt_item-GROSS_PRICE * gt_item-quantity ).
          clear: gt_item.
    endloop.
        if w_new_total GT w_old_total.   
           MESSAGE I001(ZBBP_PO) WITH
             'elle possède un montant supérieur'
             ' à celui déterminé intialement.'
             'Veuillez modifier la commande.'.
           MOVE 'X' TO w_checksum_flag.
        endif.
    My problem is that if i use the elevator at the screen, the system is looping only at the first element visible on the screen, so the "LOOP AT t_screen_items" is wrong. i don't understand why the sytem doesn't count all the elements of the internal table t_screen_items...
    Thank you for your help.

    Well, i will try to be more clearly...
    My problem is very suprising..In the purchase order screen, if there's more than 10 items, there's an elevator (or ascencor) to permit displaying the items which are hidden. And so, when i use the elevator, and when i want to see the details of the item, the "loop at t_item_screens" only begins at the first item visible. For exemple, if i have 13 items, i want to see the 11th item, i have to use the elevator, and then in the "loop at t_item_screens", the loop will do only 3 times the loop, it will begin only from the 11th item... The loop won't begin at the first element.... I really don't understand.
    Sorry if i'm not clearly... Anyway, thank you for your help.

  • Problem with internal table declaration in function gui_upload

    hi friends,
    can u tell me how should i define internal table when i use this function?
    i get error that in oo my declaration not good.
    thanks,
    dana.

    see this example:-
    DATA: BEGIN OF itab OCCURS 0,
            tdname   TYPE mara-matnr,
            tdline1  TYPE tline-tdline,
            tdline2  TYPE tline-tdline,
            tdline3  TYPE tline-tdline,
            tdline4  TYPE tline-tdline,
            tdline5  TYPE tline-tdline,
                  END OF itab.
    DATA: BEGIN OF itab_error OCCURS 0,
            tdname  TYPE mara-matnr,
            error   TYPE string,
          END OF itab_error.
    DATA: lines    TYPE STANDARD TABLE OF tline WITH HEADER LINE.
    DATA: temp     TYPE string.
    DATA: tdspras  TYPE thead-tdspras.
    DATA: tdname   TYPE thead-tdname.
    DATA: tdobject TYPE thead-tdobject.
    DATA: tdid     TYPE thead-tdid.
    DATA :flag     TYPE c.
    At Selection Screen Event
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p1.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p1.
    At Start of Selection Event
    START-OF-SELECTION.
      PERFORM upload_data.
      PERFORM upload_text.
    *&      Form  upload_data
          text
    -->  p1        text
    <--  p2        text
    FORM upload_data .
      temp = p1.
    **& Upload Data from Excel
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = temp
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab.
    ENDFORM.                    " upload_data
    *&      Form  upload_text
          text
    -->  p1        text
    <--  p2        text
    FORM upload_text .
      tdspras  = 'EN'.
      tdid = 'BEST'.
      tdobject = 'MATERIAL'.
      LOOP AT itab.
        REFRESH lines.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = itab-tdname
          IMPORTING
            output = itab-tdname.
        TRANSLATE itab-tdname TO UPPER CASE.
        tdname = itab-tdname.
        PERFORM check_material.
        lines-tdline = itab-tdline1.
        APPEND lines.
        CLEAR lines.
        lines-tdline = itab-tdline2.
        APPEND lines.
        CLEAR lines.
        lines-tdline = itab-tdline3.
        APPEND lines.
        CLEAR lines.
        lines-tdline = itab-tdline4.
        APPEND lines.
        CLEAR lines.
        lines-tdline = itab-tdline5.
        APPEND lines.
        CLEAR lines.
        CALL FUNCTION 'CREATE_TEXT'
          EXPORTING
            fid       = tdid
            flanguage = tdspras
            fname     = tdname
            fobject   = tdobject
          TABLES
            flines    = lines.
      ENDLOOP.
      IF itab_error[] IS NOT INITIAL.
        WRITE : / 'PO Text For Following Material is not Uploaded'.
        WRITE : / .
        WRITE : / 'Material', '              Error'.
        LOOP AT itab_error.
          WRITE : / itab_error-tdname, '   ',  itab_error-error.
        ENDLOOP.
      ELSE.
        MESSAGE s001(38) WITH 'Data Uploaded Succcesfully'.
      ENDIF.
    ENDFORM.                    " upload_text
    *&      Form  check_material
          text
    -->  p1        text
    <--  p2        text
    FORM check_material .
      DATA : w_matnr TYPE mara-matnr.
      SELECT SINGLE matnr
      INTO w_matnr
      FROM mara
      WHERE matnr = itab-tdname.
      IF sy-subrc = 0.
        flag = 'X'.
      ELSE.
        MOVE-CORRESPONDING itab TO itab_error.
        itab_error-error = 'Material does not exist'.
        APPEND itab_error.
      ENDIF.
    ENDFORM.                    " check_material

  • Problem with Internal table

    HI,
    I need to DMBE2 value as with respective of Month, Year and Inception date.
    I need the output to be like
    HKONT  BLART PRCTR DMBE2(Month) DMBE2 (Year) DMBE3 (Year)
    Below is my code
    DATA : BEGIN OF gt_lkorr OCCURS 0,
              hkont LIKE bsis-hkont,
              prctr LIKE bsis-prctr,
              bewar LIKE bsis-bewar,
              dmbe2 LIKE bsis-dmbe2,
              belnr LIKE bsis-belnr,
              budat LIKE bsis-budat,
              monat LIKE bsis-monat,
              gjahr LIKE bsis-gjahr,
              blart LIKE bsis-blart,
              shkzg like bsis-shkzg,
           END OF gt_lkorr.
    *DATA : wa_lkorr LIKE gt_lkorr OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF wa_lkorr OCCURS 0,
              hkont LIKE bsis-hkont,
              prctr LIKE bsis-prctr,
              bewar LIKE bsis-bewar,
              dmbe2 LIKE bsis-dmbe2,
              belnr LIKE bsis-belnr,
              budat LIKE bsis-budat,
              monat LIKE bsis-monat,
              gjahr LIKE bsis-gjahr,
              blart LIKE bsis-blart,
             dmbe2_2 LIKE bsis-dmbe2,
             dmbe2_3 LIKE bsis-dmbe2,
           END OF wa_lkorr.
    DATA : gt_final_lkorr LIKE wa_lkorr OCCURS 0 WITH HEADER LINE.
    FORM f_get_t030hb_tr.
      SELECT hkont lkorr FROM t030hb INTO CORRESPONDING FIELDS OF
                          TABLE gt_tr_t030hb
                          WHERE ktopl = 'KCOA'
                          AND   bwber = 'TR'
                          AND hkont IN so_hkont.
      IF gp_pprct IS INITIAL.
        SELECT hkont prctr bewar dmbe2 belnr budat monat gjahr blart
                           FROM bsis INTO CORRESPONDING
                           FIELDS OF TABLE gt_lkorr FOR ALL ENTRIES
                           IN gt_tr_t030hb
                           WHERE bukrs IN so_bukrs
                           AND gjahr IN so_gjahr
                           AND prctr IN so_prctr
                           AND hkont = gt_tr_t030hb-lkorr
                           AND vbund IN so_vbund.
      ELSE.
        LOOP AT gt_prctr.
          SELECT hkont prctr bewar dmbe2 belnr budat monat gjahr blart
                             FROM bsis INTO CORRESPONDING
                             FIELDS OF TABLE gt_lkorr FOR ALL ENTRIES
                             IN gt_tr_t030hb
                             WHERE bukrs IN so_bukrs
                             AND gjahr   IN so_gjahr
                             AND prctr = gt_prctr-prctr
                             AND hkont = gt_tr_t030hb-lkorr
                             AND vbund IN so_vbund.
        ENDLOOP.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM gt_lkorr COMPARING ALL FIELDS.
    ENDFORM.                    "f_get_t030hb_tr
    *&      Form  f_get_yearwise_data
          text
    FORM f_get_yearwise_data.
      DATA : lv_period LIKE t009b-poper.
      DATA : lv_year LIKE bsis-gjahr,
             lv_dmbe2 LIKE bsis-dmbe2.
      LOOP AT gt_lkorr.
        CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date               = sy-datum
             I_MONMIT             = 00
            i_periv              = 'K4'
         IMPORTING
           e_buper              = lv_period
             E_GJAHR              =
        EXCEPTIONS
          input_false          = 1
          t009_notfound        = 2
          t009b_notfound       = 3
          OTHERS               = 4
        IF gt_lkorr-monat EQ lv_period.
            wa_lkorr-hkont = gt_lkorr-hkont.
            wa_lkorr-prctr = gt_lkorr-prctr.
            wa_lkorr-bewar = gt_lkorr-bewar.
            wa_lkorr-dmbe2 = gt_lkorr-dmbe2.
            wa_lkorr-blart = gt_lkorr-blart.
            if gt_lkorr-shkzg = 'H'.
              wa_lkorr-dmbe2 = - wa_lkorr-dmbe2.
            endif.
          COLLECT wa_lkorr.
        endif.
    ENDLOOP.
          LOOP AT wa_lkorr INTO gt_final_lkorr.
            write  : / gt_final_lkorr-hkont,
                     gt_final_lkorr-prctr,
                     gt_final_lkorr-bewar,
                     gt_final_lkorr-dmbe2,
                     gt_final_lkorr-blart.
          ENDLOOP.
    write : ' Inception to date'.
      LOOP AT gt_lkorr.
        CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date               = sy-datum
             I_MONMIT             = 00
            i_periv              = 'K4'
         IMPORTING
          e_buper              = lv_period
              e_gjahr              = lv_year
        EXCEPTIONS
          input_false          = 1
          t009_notfound        = 2
          t009b_notfound       = 3
          OTHERS               = 4
        IF gt_lkorr-gjahr EQ lv_year.
            wa_lkorr-hkont = gt_lkorr-hkont.
            wa_lkorr-prctr = gt_lkorr-prctr.
            wa_lkorr-bewar = gt_lkorr-bewar.
            wa_lkorr-dmbe2 = gt_lkorr-dmbe2.
            wa_lkorr-blart = gt_lkorr-blart.
            if gt_lkorr-shkzg = 'H'.
              wa_lkorr-dmbe2 = - wa_lkorr-dmbe2.
            endif.
          COLLECT wa_lkorr.
        endif.
    ENDLOOP.
          LOOP AT wa_lkorr into gt_final_lkorr.
            WRITE : / gt_final_lkorr-hkont,
                      gt_final_lkorr-prctr,
                      gt_final_lkorr-bewar,
                      gt_final_lkorr-dmbe2,
                      gt_final_lkorr-blart.
             move : wa_lkorr-dmbe2_2 to gt_final_lkorr-dmbe2_2.
             modify gt_final_lkorr.
             clear gt_final_lkorr.
          ENDLOOP.
    loop at gt_lkorr.
            wa_lkorr-hkont = gt_lkorr-hkont.
            wa_lkorr-prctr = gt_lkorr-prctr.
            wa_lkorr-bewar = gt_lkorr-bewar.
            wa_lkorr-dmbe2 = gt_lkorr-dmbe2.
            wa_lkorr-blart = gt_lkorr-blart.
            if gt_lkorr-shkzg = 'H'.
              wa_lkorr-dmbe2 = - wa_lkorr-dmbe2.
            endif.
          COLLECT wa_lkorr.
    ENDLOOP.
          LOOP AT wa_lkorr into gt_final_lkorr.
            WRITE : / gt_final_lkorr-hkont,
                      gt_final_lkorr-prctr,
                      gt_final_lkorr-bewar,
                      gt_final_lkorr-dmbe2,
                      gt_final_lkorr-blart.
          ENDLOOP.
    Please let me know how to do it?
    Thanks,
    Pavan.

    I think you need to insert a field in your wa_lkorr internal table for key which you should populate as M for month data, Y2 for Year data and Y3 for dmbe3 data.
    So when you want to display they are three different records.

  • Internal Table - Work Area issue

    Guru's:
    I am selecting the mentioned fields from TVAKT into t_itt1 (internal table) - I however an encountering "you canot use an internal table as a work area" as an error.
    DATA: s_bezei LIKE tvakt-bezei,
          s_auart LIKE tvakt-auart.
    DATA t_itt1 LIKE tvakt OCCURS 0.
    DATA z_itt LIKE tvakt.
    its at this stage of the code that I am facing this problem
    SELECT spras auart bezei FROM tvakt
    INTO t_itt1
    WHERE bezei IN s_bezei
    AND auart IN s_auart.
    would appreciate your help.

    Hello,
    You need to change the declaration of the s_spras to use the IN clause:
    See these for more informations: http://help.sap.com/saphelp_nw04/helpdata/en/18/a1f251e28b11d295f500a0c929b3c3/frameset.htm and Create a Ranges Table Type.
    Regards.

  • Internal table - work area not long enough

    Subject changed by moderator.  Please try to use a more meaningful subject in future
    The work area "ITAB" is not long enough. how to solve this problem.
    Edited by: Matt on Nov 14, 2008 10:20 AM

    please check the order of the fields you are passing to your internal table.
    Their can be many  possible cases .
    a)
    internal table has less number of fields and u are passing more fields.
    b)
    suppose Itab has field Vbeln and it`s length is 10 and u are passing filed having length
    12.
    Please check that.
    Regards
    Neha

  • Internal table & Work area

    Hi Experts,
    I am a novice to ABAP. Can anyone tell me whats the difference b/w internal table and work area. In writing function modules how these will be utilized and in what way.
    Regards
    ss

    HI,
    Internal tables are a standard data type object which exists only during the runtime of the program. They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
    Difference between Work Area and Header Line
    While adding or retrieving records to / from internal table we have to keep the record temporarily.
    The area where this record is kept is called as work area for the internal table.  The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    Header line is a implicit work area for the internal table.  It depends on how the internal table is declared that the itab will have the header line or not.
    e.g.
    data: begin of itab occurs 10,
               ab type c,
               cd type i,
            end of itab.  " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table.  It is the default work area for the internal table
    1) The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line
    2)work area / field string and internal table
    which one is prefarable for good performance any why ?
    -The header line is a field string with the same structure as a row of the body, but it can only hold a single row , whereas internal table can have more than one record.
    In short u can define a workarea of an internal table which means that area must have the same structure as that of internal table and can have one record only.
    Example code:
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    http://www.allsaplinks.com/faq_abap_internaltables.html
    Do reward if it helps,
    Regards,
    Laxmi

  • Getting Problem with af:table

    hi
    i have a af table grid table grid havaing dynamic data based on id.
    in this table grid i have 3 columns (Sno,Name,Designation).
    Designation is drop down list which has different desingnation name and its id.
    here i want to update the designation for each employee but every time i m getting the old designation .....
    can any body plz help this is very urgent as i have to implement in my project
    thanks and regards
    Harish

    hi
    thanks for ur suggestion..
    i implemented what ever u r suggested ..
    but even i m not getting the new value..
    can u plz suggest some thing else also
    thanks
    Harish

  • OTF to PDF - Getting blank PDF Internal table with CONVERT_OTF func module

    All
    i've captured OTF from smartforms and tried converting to PDF through 'CONVERT_OTF_2_PDF' FUNCTIOn module and after emailing to external email id, i found logo is completely disturbed (characters in logo got mixed up)..... later i tried converting with ''CONVERT_OTF' function module, but here i'm getting blank PDF internal table....
    what am i missing in both ?
    my intention is converting otf to pdf and emailing...though there are thousands of similar threads are available , none of them are related to my exact problem, which is logo is getting mixed up or disturbed.... any suggestions ?
    Thanks in advance

    Hi,
    You need to use the function module SX_OBJECT_CONVERT_OTF_PDF to create the PDF from OTF ..
    Here is an example program
    report ZPDFPRNT no standard page heading.
    TABLES: TST05.
    DATA: BEGIN OF ITAB OCCURS 0,
       TLINE(255),
    END OF ITAB.
    DATA: BEGIN OF ITAB2 OCCURS 0,
      TLINE(255),
    END OF ITAB2.
    DATA: BEGIN OF ITAB3 OCCURS 0,
      TLINE(255),
    END OF ITAB3.
    DATA: BEGIN OF OTF_TAB OCCURS 0,
      TLINE(255),
    END OF OTF_TAB.
    DATA: LEN_OUT LIKE SOOD-OBJLEN.
    DATA: LEN_IN LIKE SOOD-OBJLEN.
    DATA: BEGIN OF DATA_SET OCCURS 200,
      DATA_LENGTH(5),
      PRECOL(1),
      DATA_LINE(1000),
    END OF DATA_SET.
    DATA: BEGIN OF OTF_PAGE OCCURS 200.
      INCLUDE STRUCTURE ITCOO.
    DATA: END OF OTF_PAGE,
    OTF_PAGES TYPE P,
    OTF_MAX_PAGES TYPE P VALUE 10.
    DATA: BEGIN OF OTF_CONTROL.
      INCLUDE STRUCTURE ITCPP.
    DATA: END OF OTF_CONTROL,
    FORCE_RAW_OTF VALUE ' ',
    L100_EXCLUDE(4) VALUE 'OTFJ',
    BEGIN OF OTF_PAGE_INDEX OCCURS 20,
      LINE_NUM TYPE P,
    END OF OTF_PAGE_INDEX,
    CUR_OTF_PAGE VALUE 1.
    DATA: DATA_SET_LINECOUNT TYPE P,
    DATA_SET_MAX_LINES TYPE P VALUE 100000,
    DATA_SET_VALID TYPE C VALUE ' ',
    DATA_SET_IS_OTF TYPE C VALUE ' ',
    DATA_SET_LENGTH(5) TYPE C,
    LINE_SPECIAL LIKE DATA_SET-DATA_LINE,
    NEED_LINE_SPECIAL TYPE C,
    DSN_TYPE(8) TYPE C.
    DATA: FCODE(4) TYPE C,
    DATE TYPE D,
    TIME TYPE T,
    RC(10) TYPE C,
    ERRMSG(100) TYPE C,
    PRINTJOB_CREATED(1) TYPE C,
    PRINTJOB_CLEARED(1) TYPE C,
    PRINTJOB_LIST(1) TYPE C,
    DISPLAY_MODE(1) TYPE C,
    LINE_MAX TYPE P VALUE '100000',
    NEW_SCREEN_300(1) TYPE C,
    MULTI_PRINT_300(1) TYPE C,
    PRINT_ALL_300(1) TYPE C,
    PRINT_COUNT_300 TYPE I,
    SHOW_USER_100 TYPE C VALUE ' ',
    ERROR_DISPLAY_LEVEL TYPE C VALUE '9',
    NEXT_ERROR_DISPLAY_LEVEL TYPE C,
    PREV_ERROR_DISPLAY_LEVEL TYPE C,
    START_300(5) TYPE C, END_300(5) TYPE C,
    SEP LIKE SY-VLINE,
    DEFAULT_PRI,
    TSP01_BUF LIKE TSP01,
    TSP01_CURLINE LIKE SY-STARO,
    TSP01_CURCOL LIKE SY-CUCOL,
    TSP01_CURROW LIKE SY-CUROW.
    DATA: BEGIN OF DATA_SET_LINE,
      DATA_LENGTH(5),
      PRECOL(1),
    DATA_LINE(1000),
    END OF DATA_SET_LINE.
    DATA: STATUS LIKE SY-SUBRC.
    DATA: WGF_MESSAGE(80).
    DATA: H_PATH(20) TYPE C.
    DATA: H_MASK(20) TYPE C VALUE ',.pdf ,.pdf. '.
    DATA: FILE_NAME(20).
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    DATA: IMPORT(132).
    PARAMETERS: IDENT(5) TYPE C.
    PERFORM GET_OTF_TAB.
    LOOP AT OTF_PAGE.
       OTF_TAB-TLINE = OTF_PAGE.
       APPEND OTF_TAB.
    ENDLOOP.
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
      FORMAT_SRC = 'OTF'
      FORMAT_DST = 'PDF'
      DEVTYPE = 'ASCIIPRI'
      LEN_IN = LEN_IN
    IMPORTING
      LEN_OUT = LEN_OUT
    TABLES
      CONTENT_IN = OTF_TAB
      CONTENT_OUT = ITAB2
    EXCEPTIONS
      ERR_CONV_FAILED = 1
      OTHERS = 2.
    PERFORM GET_PATH USING 'PDF_FILE'.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      FILENAME = FILENAME
      FILETYPE = 'BIN'
      BIN_FILESIZE = LEN_OUT
    TABLES
      DATA_TAB = ITAB2
    EXCEPTIONS
      FILE_OPEN_ERROR = 1
      FILE_WRITE_ERROR = 2
      INVALID_FILESIZE = 3
      INVALID_TABLE_WIDTH = 4
      INVALID_TYPE = 5
      NO_BATCH = 6
      UNKNOWN_ERROR = 7
      OTHERS = 8.
    *& Form GET_OTF_TAB
    FORM GET_OTF_TAB.
    DATA: PART(4) VALUE '0001',
    BEGIN OF MSG,
      A(40),
      B(40),
      C(40),
    END OF MSG.
    REFRESH DATA_SET.
    DATA_SET_LINECOUNT = 0.
    DATA_SET_IS_OTF = ' '.
    OTF_PAGES = 0.
    REFRESH OTF_PAGE_INDEX.
    CALL 'RSPOACSD'.
    SELECT * FROM TST05 WHERE DTHREAD = 'X'.
    CALL 'RSPOAOSD'
    ID 'ID' FIELD IDENT
    ID 'TYPE' FIELD TST05-DTYPE
    ID 'RECTYP' FIELD 'VYL----'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    STATUS = SY-SUBRC.
    IF STATUS = 0.
      DSN_TYPE = TST05-DTYPE.
      IF DSN_TYPE(3) = 'OTF'.
        DATA_SET_IS_OTF = 'X'.
      ENDIF.
    ENDIF.
    IF STATUS <> 24. EXIT. ENDIF.
    ENDSELECT.
    DATA_SET_VALID = 'X'.
    DATA_SET_MAX_LINES = ( LINE_MAX * '1.1' ) + 100.
    DO.
    CLEAR: DATA_SET_LINE, DATA_SET_LENGTH.
    CALL 'RSPOARSD'
    ID 'BUFF' FIELD DATA_SET_LINE+5
    ID 'DATALEN' FIELD DATA_SET_LENGTH
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    STATUS = SY-SUBRC.
    IF STATUS = 36.
    WHILE STATUS = 36.
    CALL 'RSPOACSD'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    ADD 1 TO PART.
    IF DATA_SET_IS_OTF = ' '.
    CALL 'RSPOAOSD'
    ID 'ID' FIELD IDENT
    ID 'TYPE' FIELD DSN_TYPE
    ID 'PART' FIELD PART
    ID 'RECTYP' FIELD 'VYL----'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    ELSE.
    CALL 'RSPOAOSD'
    ID 'ID' FIELD IDENT
    ID 'PART' FIELD PART
    ID 'TYPE' FIELD DSN_TYPE
    ID 'RECTYP' FIELD 'VYL----'
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    ENDIF.
    IF SY-SUBRC NE 0. EXIT. ENDIF.
    CLEAR: DATA_SET_LINE, DATA_SET_LENGTH.
    CALL 'RSPOARSD'
    ID 'BUFF' FIELD DATA_SET_LINE+5
    ID 'DATALEN' FIELD DATA_SET_LENGTH
    ID 'RC' FIELD RC
    ID 'ERRMSG' FIELD ERRMSG.
    STATUS = SY-SUBRC.
    ENDWHILE.
    ENDIF.
    IF STATUS <> 0 AND STATUS <> 40. EXIT. ENDIF.
    DATA_SET = DATA_SET_LINE.
    IF NOT ( DATA_SET_LENGTH IS INITIAL ).
    DATA_SET-DATA_LENGTH = DATA_SET_LENGTH - 1.
    ENDIF.
    APPEND DATA_SET.
    ADD 1 TO DATA_SET_LINECOUNT.
    IF DATA_SET_IS_OTF = ' '.
    IF DATA_SET_LINECOUNT >= DATA_SET_MAX_LINES.
    CLEAR DATA_SET.
    APPEND DATA_SET.
    MOVE '----
    ' TO DATA_SET-DATA_LINE.
    APPEND DATA_SET.
    CLEAR DATA_SET.
    APPEND DATA_SET.
    WRITE: 'Abbruch nach'(029) TO MSG-A.
    WRITE: DATA_SET_MAX_LINES TO MSG-B.
    WRITE: 'Zeilen.'(030) TO MSG-C.
    CONDENSE MSG.
    DATA_SET-DATA_LINE = MSG.
    APPEND DATA_SET.
    EXIT.
    ENDIF.
    ELSE.
    MOVE DATA_SET_LINE-DATA_LINE TO OTF_PAGE.
    APPEND OTF_PAGE.
    IF OTF_PAGE(2) = 'EP'.
      ADD 1 TO OTF_PAGES.
      IF OTF_PAGES >= OTF_MAX_PAGES.
        MESSAGE S229(PO) WITH OTF_MAX_PAGES.
        EXIT.
      ENDIF.
    ELSEIF OTF_PAGE(2) = 'OP'.
      OTF_PAGE_INDEX-LINE_NUM = DATA_SET_LINECOUNT.
      APPEND OTF_PAGE_INDEX.
    ENDIF.
    ENDIF.
    ENDDO.
    IF STATUS <> 0 AND STATUS <> 12.
      CALL 'RSPOACSD'.
      MESSAGE E112(PO) WITH STATUS RC ERRMSG.
    ENDIF.
    CALL 'RSPOACSD'.
    STATUS = SY-SUBRC.
    IF STATUS <> 0.
      MESSAGE E112(PO) WITH STATUS RC ERRMSG.
    ENDIF.
    ENDFORM. " GET_OTF_TAB
    *& Form GET_PATH
    FORM GET_PATH USING P_FILENAME.
    CLEAR: H_PATH, FILE_NAME.
    FILE_NAME = P_FILENAME.
    CALL FUNCTION 'WS_QUERY'
    EXPORTING
    QUERY = 'CD' "// Current Directory
    IMPORTING
    RETURN = H_PATH.
    CONCATENATE FILE_NAME '.pdf' INTO FILE_NAME.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      DEF_FILENAME = FILE_NAME
      DEF_PATH = H_PATH
      MASK = H_MASK
      MODE = 'O'
    IMPORTING
      FILENAME = FILENAME"dbname
    EXCEPTIONS
      INV_WINSYS = 1
      NO_BATCH = 2
      SELECTION_CANCEL = 3
      SELECTION_ERROR = 4
      OTHERS = 5.
    ENDFORM. " GET_PATH
    Regards
    Sudheer

  • Please Help:  A Problem With Oracle-Provided 'Working' Example

    A Problem With Oracle-Provided 'Working' Example Using htp.formcheckbox
    I followed the simple steps in the Oracle-provided example:
    Doc ID: Note:116534.1
    Subject: How to use checkbox in webdb for bulk update using webdb report
    However, when I select a checkbox and click on the Update button, I get a "ORA-01036: illegal variable name/number" error. Please advise. This was a very promising feature.
    Fred
    Below are step-by-step instructions provided by Oracle to create this "working" example:
    How to use a checkbox in WEBDB 2.2 report for bulk update.
    PURPOSE
    This article shows how checkbox can used placed on WEBDB report
    and how to use it.
    SCOPE & APPLICATION
    The following example to guide through the steps to create a working
    example of this.
    In this example, the checkbox is used to select the records. On clicking
    the update button, the pl/sql procedure is called which will update col1 to
    the string 'OK'.
    After the update is done, the PL/SQL procedure calls the report again.
    Since the report only select records where col1 is null, the updated
    records will not be displayed when the report is called again.
    Step 1 - Create Table
    From Sqlplus, log in as scott/tiger and execute the following:
    drop table chkbox_example;
    create table chkbox_example
    (id varchar2(10) not null,
    comments varchar2(20),
    col1 varchar2(10));
    Step 2 - Insert Test Data
    From Sqlplus, still logged in as scott/tiger , execute the following:
    declare
    l_i number;
    begin
    for l_i in 1..50 loop
    insert into chkbox_example values (l_i, 'Comments ' || l_i , NULL);
    end loop;
    commit;
    end;
    Step 3 -Create SQL Query based WEBDB report
    Logon to a WEBDB site which has access to the database the above tables are created.
    Create a SQL based Report.
    Name the report :RPT_CHKBOX
    The select statement for the report is :
    select c.id, c.comments, c.col1,
    htf.formcheckbox('p_qty',c.id) Tick
    from SCOTT.chkbox_example c
    where c.col1 is null
    In Advanced PL/SQL, (REPORT, Before displaying the form), put the following code
    htp.formOpen('scott.chkbox_process');
    htp.formsubmit('p_request','Update');
    htp.br;
    htp.br;
    Step 4 - Create a stored procedure in the database
    Log on to the database as scott/tiger and execute the following to create the
    procedure.
    Note: Replace WEBDB to the appropriate webdb user for your installation.
    In my database, I had installed webdb using WEBDB username, hence user webdb owns
    the packages.
    create or replace procedure chkbox_process
    ( p_request in varchar2 default null,
    p_qty in wwv_utl_api_types.vc_arr ,
    p_arg_names in wwv_utl_api_types.vc_arr ,
    p_arg_values in wwv_utl_api_types.vc_arr
    is
    i number;
    begin
    for i in 1..p_qty.count loop
    if p_qty(i) is not null then
    begin
    update chkbox_example
    set col1 = 'OK'
    where chkbox_example.id = p_qty(i);
    end;
    end if;
    end loop;
    commit;
    /* To Call Report again after updating */
    SCOTT.RPT_CHKBOX.show
    (p_request=>'Run Report',
    p_arg_names=>webdb.wwv_standard_util.string_to_table2(' '),
    p_arg_values=>webdb.wwv_standard_util.string_to_table2(' '));
    end;
    Summary
    There are essentially 2 main modules, The WEBDB report and the pl/sql procedure (chkbox_process)
    A button is created via the advanced pl/sql coding which shows on top of the report. (The
    button cannot be placed at the bottom of the report due to the way WEBDB creates the procedure
    internally)
    When any button is clicked on the report, it calls the pl/sql procedure chkbox_process.
    The procedure is called , WEBDB always passes the parameters p_request,p_arg_names and o_arg_values.
    p_qty is another parameter that we are passing additionally, This comes from the checkbox created
    using the htf.formcheckbox in the report select statement.
    The pl/sql procedure calls the report again after processing. This is done to
    show how to call the report.
    Restrictions:
    -The Next and Prev buttons on the report will not work.
    So it is important that the report can fit in 1 page only.
    (This may mean that you will not select(not ticked) 'Paginate' under
    'Display Option' in the WEBDB report. If you do this,
    then in Step 4, remove p_arg_names and p_arg_values as input parameters
    to the chkbox_process)

    If your not so sure you can use the instanceof
    insurance,
    Object o = evt.getSource();
    if (o instanceof Button) {
    Button source = (Button) o;
    I haven't thoroughly read the thread, but I use something like this:if (evt.getSource() == someObjRef) {
        // do that voodoo
    ]I haven't looked into why you'd be creating a new reference...

  • Problem with internal speakers of MacBook Pro

    Hi,
    I wanted to know if anyone have experienced a problem with internal speakers of Mac Book Pro. In my MackBook the Internal speaker volume goes down automatically. I checked the System Preferences>Sound>Output , from there I check that it is in the middle ( Balance) However, the problem is still the exists. Just for testing I played an audio file and I moved the bar toward the right speaker it is the same and when I move toward the left speaker the whole sound goes off . Looks like one speaker stops working completely. Then I checked the Utilities > Audio MIDI Setup > Configure Speakers  from there I checked both left and right speakers and the channel frequency is fine. Still same issue.  I have no idea what is going on , I really need your suggestions to get this fixed.
    Thanks in advance.

    Try the following:
    http://support.apple.com/kb/HT1411 Apple Portables: Resetting the System Management Controller (SMC) and http://support.apple.com/kb/PH11243 OS X Mountain Lion: Reset your computer’s PRAM 
    Also, consider installing Boom

  • Error while updating custom db table with internal table

    Hi experts,
    My question is : I define a itable like
    types begin of ty_data,
            f1(3)  type  c,
            f2(4)  type  c,
           end of ty_data.
    data itab type standard table of  ty_data.
    and my custom table(YDATA) is also same structure of  itab.
    then  I use insert statement like this
    loop at itab into wa_data.
      INSERT into YDATA values wa_data.
    endloop.
    my problem is I get  an error like this
    The type of the database table and work area (or internal table)          
    "wa_data" are not Unicode-convertible . . . . . . . . . .     
    please give me the solution for this error.
    Thanks     
    durga prasad

    Please post ABAP-questions in one of the <a href="https://forums.sdn.sap.com/index.jspa#42">ABAP forums</a>.
    My small addition to the existing hints: define the work area using LIKE LINE OF, the LIKE keyword is a very nice way of ensuring that data types match. You can reference input parameters, other locally defined variables and more.
    DATA: t_ydata TYPE STANDARD TABLE OF ydata,
          l_ydata LIKE LINE OF t_ydata[].

  • Problems with a table in PDF`S footer

    Dear sirs,
    We are having problems when trying to run a PDF with Adobe LiveCycle Designer tool.
    We are working with a PDF which is composed of a header, the main body and a footer. We have created a table (table1) at the footer and
    another one at the main body (table2). This last table (table2) may overflow therefore it will genarate two pages for our PDF.
    On both pages appear the header and the footer correctly but in the last page it does not write the data from the table included in the footer (table1).
    We have no problems with the table included in the main body
    In the attachments, I send you the screenshots of both pages in which I have marked in red the part where we have error.
    May you help us to solve our problem?
    Thanks in advance your help.
    Edited by: emgaitan on Mar 16, 2010 2:18 PM

    Wardell,
    Check the data in RSA3 for the extractor that you use to bring data .
    You must be using the data source 0CO_OM_CCA_09. Check the data and reconcile and you will get it.
    Let me know if you need anything else.
    Thanks
    Ravi Thothadri
    [email protected]

  • GET statement and internal table

    Hi community,
    I use the GET statement and I want to use some older code segments.
    I read somewhere that I can use the result of GET like an internal table.
    So I tried to get the content of bsid into my internal table it_bsid. But that doesn't seem to work.
    Do you have any advice in this?
    I wanted to do the following:
    TABLES:
            KNA1,
            BSID,
            BKPF.
    DATA:
          it_bsid TYPE TABLE OF bsid WITH HEADER LINE,
          is_bsid LIKE LINE OF it_bsid,
    GET bsid.
    LOOP AT bsid.
      APPEND it_bsid.
    ENDLOOP.
    -or-
    GET bsid.
    LOOP AT bsid INTO is_bsid.
      APPEND is_bsid TO it_bsid.
    ENDLOOP.
    But in both cases I get an error.
    ' "VERSION ... ." expected after "BSID" '
    Do you know what is the reason for that?
    Regards
    Tobias
    Edited by: Tobias Oelschlaeger on Feb 29, 2008 4:18 PM

    Hi Tobias,
    first you have to assign a logical database which has BSID to your program (in program attributes).
    Then GET is the event triggered by the next BSID record according to your selection. You can not LOOP here but you may append to an internal table. This table may be processed using LOOP in the END-OF-SELECTION event.
    Read some documentation about LDB [Logical Databases|http://help.sap.com/erp2005_ehp_01/helpdata/en/f0/ca4584260211d28a430000e829fbbd/content.htm] - it may help to understand the concept of this obsolete technique.
    Regards,
    Clemens

Maybe you are looking for

  • Sharing itunes library among more than one user

    Hi I would like to know how to share an itunes library. I have 2 accounts on my imac and wish both to have access to the same library. Thanks.

  • Including a dependent dll in an executable

    I am creating an executable on my windows development system (LV2011) and want to run it on one of my windows target systems, which has the appropriate runtime engine (2011) installed. In general I usually don't have problems running executables on t

  • Approval of PO by two approvers

    Dear experts, Our requirement is that we want the 2 approvals in the hierarchy for the PO. and the approvals are at the same level , there is no difference between these approvers.When PO is sent for the approval it goes to both approvers but the err

  • How do I update InDesign plug-ins?

    Hello, I'm fairly new to InDesign and a complete novice regarding plug-ins. I'm trying to open someone else's InDesign file I was given, in InDesign CS4. I believe the file was also created in InDesign CS4, however it won't open. The message says: Ca

  • Wierdness with NIO socket on Solaris 2.10 part I

    i tried the following NioClient and MockServer, and saw some weird behavior. 1. If i run both the client and server on the same machine on Windows, the client connects to the server, queries the instrument and gets the list of instruments back. 2. if