To add the multiline data into an internal table from TextEdit

Hello Experts,
I have one requirement that I have to use the TextEdit field. and put the values into an internal table.
can you help me. with some sample code.
Thanks in Advance
Kuldeep

The problem is solved by using the following code
DATA: data TYPE REF TO CL_HTMLB_TEXTEDIT.
Data itab1 type itab.
data ?= CL_HTMLB_MANAGER=>GET_DATA(
                                request = runtime->server->request
                                 name    = 'textEdit'
                                 id      = 'txt1'
data text type string.
IF data IS NOT INITIAL.
  text = data->text.
ENDIF.
SPLIT text AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO
      TABLE itab1.
Kuldeep

Similar Messages

  • Field-Symbols: How to retrieve data into an internal table from FS

    Hello All,
    I am working on field symbols.I have declared the field symbols as shown.
    FIELD-SYMBOLS: <gt_pos_data>  TYPE table,
                               <wa_pos_data> like <gt_pos_data>.
    Data: Begin of itab occurs 0,
               field1(5) type c,
               field2(10)_type c,
             end of itab.
    The FS  <gt_pos_data> has 100 fields but I need to move only two fields from this FS to my internal table itab.I am doing the following.
    loop at <gt_pos_data> assigning <wa_pos_data>.
    itab-field1 = <wa_pos_data>-field1.
    itab-field2 = <wa_pos_data>-field2.
    append itab.
    clear itab.
    endloop.
    But it is giving me an error saying "<wa_pos_data> is a table without header line and therefore has no componet FIELD1".How to achieve this requirement?
    Thanks in advance
    Sandeep

    <wa_pos_data> should be defined LIKE LINE OF <gt_pos_data>, but it will still have no structure, so you need to assign a field symbol to the component as well.
    FIELD-SYMBOLS: <gt_pos_data> TYPE table,
                               <wa_pos_data> like LINE OF <gt_pos_data>,
                               <field> type any.
    Data: Begin of itab occurs 0,
    field1(5) type c,
    field2(10)_type c,
    end of itab.
    loop at <gt_pos_data> assigning <wa_pos_data>.
    assign componet 'FIELD1' of structure <wa_pos_data> to <field>.
    if sy-subrc  = 0.
    itab-field1 = <field>.
    endif.
    assign componet 'FIELD2' of structure <wa_pos_data> to <field>.
    if sy-subrc  = 0.
    itab-field2 = <field>.
    endif.
    append itab.
    clear itab.
    endloop.
    Regards,
    Rich Heilman

  • How to send multiple row data into an internal table??

    I have a view with table control.i want to select multiple row and send all the row data into an internal table.i am able to select multiple row but all the selected row data is not going to the internal table.....only a particular row data which is lead selected is going.
    Do anyone can help me regarding this issue?
    Thanks in advance,
    Subhasis.

    Hey,
    Some code example:
    declaring an internal table and work area to get all the elements from the node.
    data : lt_Elements type  WDR_CONTEXT_ELEMENT_SET,
             ls_Element type  WDR_CONTEXT_ELEMENT_SET,
    considering flights is my node.
             lt_data type sflight.
    Node_Flights is the ref of the node to which ur table is binded.
    Use Code Inspector to read the node.
    lt_Element = Node_Flights->GET_ELEMENTS
    loop at lt_elements into ls_Element.
    l_bollean =   ls_elements->is_selected ( returns abap true/false ).
        if l_bollean IS INITIAL.
           append ls_Element to lt_data.
       endif.
    Hope this would help.
    Cheers,
    Ashish

  • How can i add two table data into third internal table see below

    hi i insert diffferent table data into different internal table i did try to insert two different internal table data into third internal table by using move
    but only single data is coming please help me
    i want this two internal table data inot third internal table.
    sELECT  * FROM J_1IEXCHDR INTO CORRESPONDING FIELDS OF ITAB1 WHERE STATUS = 'P'.
    SELECT * FROM J_1IEXCDTL INTO CORRESPONDING FIELDS OF ITAB2  WHERE LIFNR = J_1IEXCHDR-LIFNR.
                             AND DOCYR  = J_1IEXCHDR-DOCYR,
                             AND DOCNO  = J_1IEXCHDR-DOCNO.
    WRITE: /  ITAB1-LIFNR,
              ITAB1-DOCNO,
              ITAB1-EXYEAR,
              ITAB1-BUDAT,
              ITAB2-EXBED,
              ITAB2-RDOC,
              ITAB2-ECS.
    ENDSELECT.
    ENDSELECT.
    thank you .

    hi
      Two add two internal tables data.  first we need to create third internal table with all the fields of first two internal tables.
    later u move the two internal tables data to third internal table
    by looping the internal table which have more records or depending on the requirement and move the corresponding fields of first internal table to the third internal table and use the read statement with condition based on primary key of first itab and get the corresponding data of 2table into 3table.
    i am sending the sample code to u.
    check it out. i think u will understand how to move.
    select vbeln waerk netwr erdat audat kunnr
       into table it_vbeln
       from vbak
       where vbeln in s_vbeln
         and erdat in s_erdat.
      if not it_vbeln[] is initial.
      select kunnr name1
       into table it_kunnr
       from  kna1
       for all entries in it_vbeln
         where kunnr = it_vbeln-kunnr.
      endif.
      loop at it_vbeln.
      clear it_final.
       it_final-vbeln = it_vbeln-vbeln.
       it_final-waerk = it_vbeln-waerk.
       it_final-netwr = it_vbeln-netwr.
       it_final-erdat = it_vbeln-erdat.
       it_final-audat = it_vbeln-audat.
      read table it_kunnr with key kunnr = it_vbeln-kunnr.
       it_final-name1 = it_kunnr-name1.
      append it_final.
      endloop.

  • How to read a table and transfer the data into an internal table?

    Hello,
    I try to read all the data from a table (all attribute values from a node) and to write these data into an internal table. Any idea how to do this?
    Thanks for any help.

    Hi,
    Check this code.
    Here i creates context one node i.e  flights and attributes are from SFLIGHT table.
    DATA: lo_nd_flights TYPE REF TO if_wd_context_node,
            lo_el_flights TYPE REF TO if_wd_context_element,
            ls_flights TYPE if_main=>element_flights,
            it_flights type if_main=>elements_flights.
    navigate from <CONTEXT> to <FLIGHTS> via lead selection
      lo_nd_flights = wd_context->get_child_node( 'FLIGHTS' ).
    CALL METHOD LO_ND_FLIGHTS->GET_STATIC_ATTRIBUTES_TABLE
      IMPORTING
        TABLE  = it_flights.
    now the table data will be in internal table it_flights.

  • Header data and item data into same internal table

    Hi Experts,
    I WANT TO KNOW THE LOGIC TO POPULATE HEADER DATA AND ITEM DATA INTO SAME INTERNAL TABLE AND AGAIN DOWNLOAD THE SAME TO EXCEL FILE .Output file should be displayed like this format
    Header1  rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.
    Item1  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Item2  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Header2: rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.
    Item1  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Thanks
    Moderator message: Please do not use all upper case in the future.
    Edited by: Thomas Zloch on May 12, 2010 3:10 PM

    Hi,
    for example we have 3 internal tables 
    1> it_header  2>it_items   3>it_final (which contains all the header and item fields)
    once  it_header   it_items  are filled
    loop at it_items.
    read table it_header with key xyz = it_item-xyz.
    if sy-subrc = 0.
      here move all the header fields to it_final like below.
    it_final -xfield  = it_header-xfield.
    endif.
      here move all the item fields to it_final like below.
    it_final -yfield  = it_item-yfield.
    append it_final.
    clear it_final.
    endloop.
    now header and item fileds will be fillled in it_item

  • Select data into deep internal table

    Dear Experts.
    I created a dynamiv deep internal table.
    while selecting data , into the internal table it is giving a dump. saying that deep structure.
    SELECT OBJTY OBJID ARBPL WERKS from crhd
    INTO CORRESPONDING FIELDS OF TABLE <f_tab>
    where WERKS = pr_werks.
    I used the field catalog also.even same error is comming.
    how to get data into deep internal table by select statement.
    Please help me,
    Regards,
    Rahul

    HI,
    Try creating dynamic internal table like:
    Field-symbols: <dyn_table> type standard table,
                                 <dyn_wa>   ,
                                 <dyn_field>.
      Data: dy_table      type ref to data,
                ifc                  type lvc_t_fcat ,
                xfc                 type lvc_s_fcat ,
               Count             type i          ,
               Count1           type i          ,
               Index              type i          ,
               dy_line           type ref to data.
             Data counter   type i.
      Data: line   type string       ,
                List    like table of line.
      Data: idetails           type abap_compdescr_tab,
                   xdetails           type abap_compdescr    .
      Data: ref_table_des type ref to cl_abap_structdescr.
    *Looping at field cat internal table to populate another field cat to be passed
    * In method used below for creating final dynamic internal table
      Loop at fieldcat into fieldcat1.
        Clear xfc.
           Xfc-fieldname            = fieldcat1-fieldname.
           Xfc-datatype              = fieldcat1-datatype.
           Xfc-intlen                    = fieldcat1-intlen.
         Append xfc            to ifc.
      endloop.
    Clear fieldcat1.
    *Method called to create dynamic internal table on the basis of field catalog created above
      Call method cl_alv_table_create=>create_dynamic_table
        Exporting
          it_fieldcatalog = ifc                     u201Cfield catalog appended above
        Importing
          ep_table        = dy_table.            u201CDynamic internal table which will be created
      Assign dy_table->* to <dyn_table>.
    *Create dynamic work area and assign to FS
      Create data dy_line like line of <dyn_table>.
      Assign dy_line->* to <dyn_wa>.
    Then use this dynamic internal table created from above method
    in the Select Query.
    Hope it helps
    Regards
    Mansi

  • Insert data into a database table from a string

    Hi,
    I am need to insert data into a table from  the text file. I pull the data into an internal table using GUI_UPLoad. I read the data into an internal table and concatenate data into a string. I need to do this because the structure of the table is dynamic. it is used to upload a series of tables each with different structure, But the data is stored in the string v_tabledata.  How to do that.
    after uploading the data  from the textt file into a table
    oop at i_final.
       v_tabname = i_final-table_name.
      concatenate i_final-table_rec1 i_final-table_rec2 i_final-table_rec3
                  i_final-table_rec4 i_final-table_rec5 into v_tabledata.
    from  'v_table data'  i need to upload the data into a table and the structue of the table is known dynamically. Any thoughts using field symbols?
    Thanks,
    VG

    Let me see if I've understood your issue
    You have a file to be uploaded into an internal table but this file has many different layouts and then you don't know how to link these fields with the internal table...is it your issue?
    Then you've read the internal table, you've sent it to a string divided by space or something else and then are you trying to read this string to send it to a table?
    We could read the standard tables which maintain the program names, table names etc... (DD* tables, as the DD03L table) and then create some rules...
    We could create a parameter table to read your file/table dynamically...
    Please, try to rewrite in other words your problem...because there are a lot of ways to achieve your issue...
    Alexandre Mendes

  • Download the KTOPL  field data and GLT0 table data into one Internal table

    Hi,
    I have downloaded GLT0 table fields  data to PC file . But i need to download KTOPL(Chart Of Accounts) data also. in GLT0 table there is no KTOPL field.
    But in SKA1 table have KTOPL field. Then what is the issue is GLT0 data & KTOPL field data needs to download into one Internal Table.
    anybody could you please solve this problem. immediately need to solve this.
    Below is the code.
    REPORT ZFXXEABL_1 NO STANDARD PAGE HEADING
                    LINE-SIZE 200.
    Tables Declaration
    TABLES : GLT0.
    Data Declaration
    DATA :   FP(8)           TYPE C,
             YEAR           LIKE GLT0-RYEAR,
             PERIOD(3)       TYPE C,
             DBALANCE         LIKE VBAP-NETWR VALUE 0 ,
             CBALANCE         LIKE VBAP-NETWR VALUE 0.
    *Internal table for for final data..
    DATA : BEGIN OF REC1 OCCURS 0,
           BAL             LIKE GLT0-TSLVT value 0,
           COAREA          LIKE GLT0-RBUSA,
          CA(4)           TYPE C,
           KTOPL           LIKE ska1-ktopl, 
           CCODE           LIKE GLT0-BUKRS,
           CREDIT          LIKE  VBAP-NETWR,
           CURRENCY        LIKE GLT0-RTCUR,
           CURTYPE(2)      TYPE N,
           DEBIT           LIKE VBAP-NETWR,
           YEAR(8)         TYPE C,
           FY(2)           TYPE C,
           ACCOUNT         LIKE GLT0-RACCT,
           VER             LIKE GLT0-RVERS,
           VTYPE(2)        TYPE N,
           CLNT            LIKE SY-MANDT,
           S_SYS(3)        TYPE C,
           INDICATOR      LIKE GLT0-DRCRK,
           END OF REC1.
    DATA : C(2) TYPE N,
           D(2) TYPE N.
    DATA REC1_H LIKE REC1.
    Variable declarations
    DATA :
           W_FILES(4) TYPE N,
           W_DEBIT LIKE GLT0-TSLVT,
           W_CREDIT LIKE GLT0-TSLVT,
           W_PCFILE LIKE RLGRAP-FILENAME ,
           W_UNIXFILE LIKE RLGRAP-FILENAME,
           W_PCFILE1 LIKE RLGRAP-FILENAME,
           W_UNIXFIL1 LIKE RLGRAP-FILENAME,
           W_EXT(3) TYPE C,
           W_UEXT(3) TYPE C,
           W_PATH LIKE RLGRAP-FILENAME,
           W_UPATH LIKE RLGRAP-FILENAME,
           W_FIRST(1) TYPE C VALUE 'Y',
           W_CFIRST(1) TYPE C VALUE 'Y',
           W_PCFIL LIKE RLGRAP-FILENAME.
    DATA: "REC LIKE GLT0 OCCURS 0 WITH HEADER LINE,
          T_TEMP LIKE GLT0 OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF REC3 OCCURS 0.
          INCLUDE STRUCTURE GLT0.
    DATA: KTOPL LIKE SKA1-KTOPL,
          END OF REC3.
    DATA: BEGIN OF T_KTOPL OCCURS 0,
          KTOPL LIKE SKA1-KTOPL,
          SAKNR LIKE SKA1-SAKNR,
          END OF T_KTOPL.
    Download data.
    DATA: BEGIN OF I_REC2 OCCURS 0,
           BAL(17),        "             like GLT0-TSLVT value 0,
           COAREA(4),      "          like glt0-rbusa,
           CA(4),          "  chart of accounts
           CCODE(4),       "           like glt0-bukrs,
           CREDIT(17),     "          like  vbap-netwr,
           CURRENCY(5),    "       like glt0-rtcur,
           CURTYPE(2),     "      type n,
           DEBIT(17),      "           like vbap-netwr,
           YEAR(8),        "  type c,
           FY(2),          " type c, fiscal yr variant
           ACCOUNT(10),    " like glt0-racct,
           VER(3),         "    like glt0-rvers,
           VTYPE(3),       " type n,
           CLNT(3),        "like sy-mandt,
           S_SYS(3),       "like sy-sysid,
           INDICATOR(1),   "   like glt0-drcrk,
          END OF I_REC2.
    Selection screen.                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK BL1  WITH FRAME TITLE TEXT-BL1.
    SELECT-OPTIONS : COMPCODE FOR GLT0-BUKRS,
                      GLACC FOR GLT0-RACCT,
                      FISYEAR   FOR GLT0-RYEAR,
                    no intervals no-extension,      "- BG6661-070212
                       FISCPER FOR GLT0-RPMAX,
                     busarea   for glt0-rbusa,
                      CURRENCY  FOR GLT0-RTCUR.
    SELECTION-SCREEN END   OF BLOCK BL1.
    SELECTION-SCREEN BEGIN OF BLOCK BL2  WITH FRAME TITLE TEXT-BL2.
    PARAMETERS:
      P_UNIX AS CHECKBOX,                  "Check box for Unix Option
      P_UNFIL LIKE RLGRAP-FILENAME,        " Unix file Dnload file name
       default '/var/opt/arch/extract/GLT0.ASC',  "- BG6661-070212
      P_PCFILE AS CHECKBOX,                "Check box for Local PC download.
      P_PCFIL LIKE RLGRAP-FILENAME         " PC file Dnload file name
                 default 'C:\GLT0.ASC'.           "- BG6661-070212
          DEFAULT 'C:\glt0_gl_balance_all.asc'.     "+ BG6661-070212
    SELECTION-SCREEN END   OF BLOCK BL2.
    *eject
    Initialization.                                                     *
    INITIALIZATION.
    Try to default download filename
    p_pcfil = c_pcfile.
    p_unfil = c_unixfile.
    if sy-sysid eq c_n01.
       p_unfil =   c_unixfile.
    endif.
    if sy-sysid eq c_g21.
       p_unfil =   c_g21_unixfile.
    endif.
    if sy-sysid eq c_g9d.
       p_unfil =   c_g9d_unixfile.
    endif.
    Default for download filename
    *{ Begin of BG6661-070212
      CONCATENATE C_UNIXFILE
                  SY-SYSID C_FSLASH C_CHRON C_FILENAME INTO P_UNFIL.
    *} End of BG6661-070212
    AT SELECTION-SCREEN OUTPUT.
    loop at screen.
       if screen-name = 'P_PCFIL'.        "PC FILE
         screen-input = '0'.
         modify screen.
       endif.
       if screen-name = 'P_UNFIL'.        "UN FILE
         screen-input = '0'.
         modify screen.
       endif.
    endloop.
      if w_first = 'Y'.
        perform path_file.
        w_first = 'N'.
      endif.
    if w_cfirst = 'Y'.
       perform cpath_file.
       w_cfirst = 'N'.
    endif.
    Start-of-Selection.                                                 *
    START-OF-SELECTION.
    *COLLECT DATA
      PERFORM COLLECT_DATA.
    *BUILD FILENAMES
      PERFORM BUILD_FILES.
    *LOCAL
      IF P_PCFILE = C_YES.
       PERFORM LOCAL_DOWNLOAD.
      ENDIF.
    *UNIX
      IF P_UNIX = C_YES.
        PERFORM UNIX_DOWNLOAD.
      ENDIF.
      IF P_PCFILE IS INITIAL AND P_UNIX IS INITIAL.
        MESSAGE I000(ZL) WITH 'Down load flags both are unchecked'.
      ENDIF.
    END-OF-SELECTION.
    IF P_PCFILE = C_YES.
    WRITE :/ 'PC File'  , C_UNDER, P_PCFIL.
    ENDIF.
    *&      Form  DOWNLOAD
          Download                                                       *
    FORM DOWNLOAD.
      P_PCFIL =  W_PATH.
      DATA LIN TYPE I.
      DESCRIBE TABLE I_REC2 LINES LIN.
      WRITE:/ 'No of Records downloaded = ',LIN.
      CALL FUNCTION 'WS_DOWNLOAD'
           EXPORTING
               FILENAME            =  P_PCFIL
               FILETYPE            =  C_ASC   "c_dat   "dat
           TABLES
                DATA_TAB            = I_REC2  " t_str
               fieldnames          = t_strhd
           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.
      IF SY-SUBRC EQ 0.
      ENDIF.
    ENDFORM.
    *&      Form  WRITE_TO_SERVER
          text                                                           *
    -->  p1        text
    <--  p2        text
    FORM WRITE_TO_SERVER.
      DATA : L_MSG(100) TYPE C,
             L_LINE(5000) TYPE C.
      P_UNFIL =  W_UPATH.
      DATA LIN TYPE I.                           
      DESCRIBE TABLE I_REC2 LINES LIN.           
      WRITE:/ 'No of Records downloaded = ',LIN. 
      OPEN DATASET P_UNFIL FOR OUTPUT IN TEXT MODE.        " message l_msg.
      IF SY-SUBRC <> 0.
        WRITE: / L_MSG.
      ENDIF.
    perform header_text1.
      LOOP AT I_REC2.
        TRANSFER I_REC2 TO P_UNFIL.
      ENDLOOP.
      CLOSE DATASET P_UNFIL.
      WRITE : / C_TEXT , W_UPATH.
      SPLIT W_UNIXFILE AT C_DOT INTO W_UNIXFIL1 W_UEXT.
      CLEAR W_UPATH.
      IF NOT W_UEXT IS INITIAL.
        CONCATENATE W_UNIXFIL1  C_DOT W_UEXT INTO W_UPATH.
      ELSE.
        W_UEXT = C_ASC. " c_csv.
        CONCATENATE W_UNIXFIL1 C_DOT W_UEXT INTO W_UPATH.
      ENDIF.
    ENDFORM.                               " WRITE_TO_SERVER
    *&      Form  BUILD_FILES
    FORM BUILD_FILES.
      IF P_PCFILE = C_YES.
        W_PCFILE = P_PCFIL.
    ***Split path at dot**
        SPLIT W_PCFILE AT C_DOT INTO W_PCFILE1 W_EXT.
        IF NOT W_EXT IS INITIAL.
          CONCATENATE W_PCFILE1 C_DOT W_EXT INTO W_PATH.
        ELSE.
          W_PATH = W_PCFILE1.
        ENDIF.
      ENDIF.
      IF P_UNIX = C_YES.
        W_UNIXFILE = P_UNFIL.
        SPLIT W_UNIXFILE AT C_DOT INTO W_UNIXFIL1 W_UEXT.
        IF NOT W_UEXT IS INITIAL.
          CONCATENATE W_UNIXFIL1  C_DOT W_UEXT INTO W_UPATH.
        ELSE.
          W_UPATH = W_UNIXFIL1.
        ENDIF.
      ENDIF.
    ENDFORM.
    FORM CPATH_FILE.
    CLEAR P_PCFIL.
       CONCATENATE C_PCFILE
                   C_COMFILE SY-SYSID C_UNDER SY-DATUM SY-UZEIT
                   C_DOT C_ASC INTO  P_PCFIL.
    ENDFORM.                    " CPATH_FILE
    FORM PATH_FILE.
    CLEAR P_UNFIL.
      if sy-sysid eq c_n01.
       CONCATENATE C_UNIXFILE
                   C_COMFILE SY-SYSID C_UNDER SY-DATUM SY-UZEIT
                    C_DOT C_ASC INTO  P_UNFIL.
      endif.
      if sy-sysid eq c_g21.
      concatenate c_g21_unixfile
                  c_comfile sy-sysid c_under sy-datum sy-uzeit
                   c_dot c_asc into  p_unfil.
      endif.
      if sy-sysid eq c_g9d.
      concatenate c_g9d_unixfile
                  c_comfile sy-sysid c_under sy-datum sy-uzeit
                   c_dot c_asc into  p_unfil.
      endif.
    ENDFORM.                    " PATH_FILE
    Local_Download                                                       *
          Local                                                          *
    FORM LOCAL_DOWNLOAD.
    perform header_text.
    LOOP AT REC1.
    REC1-CLNT = SY-MANDT.
    REC1-S_SYS = SY-SYSID.
    MOVE:  REC1-BAL TO I_REC2-BAL,
            REC1-COAREA TO I_REC2-COAREA,
           REC1-CA TO I_REC2-CA,         
            REC1-KTOPL TO I_REC2-CA,       
            REC1-CCODE TO I_REC2-CCODE,
            REC1-CREDIT TO I_REC2-CREDIT,
            REC1-CURRENCY TO I_REC2-CURRENCY,
            REC1-CURTYPE TO I_REC2-CURTYPE,
            REC1-DEBIT TO I_REC2-DEBIT,
            REC1-YEAR TO I_REC2-YEAR,
            REC1-FY TO I_REC2-FY,
            REC1-ACCOUNT TO I_REC2-ACCOUNT,
            REC1-VER TO I_REC2-VER,
            REC1-VTYPE TO I_REC2-VTYPE,
            REC1-CLNT TO I_REC2-CLNT,
            REC1-S_SYS TO I_REC2-S_SYS,
            REC1-INDICATOR TO I_REC2-INDICATOR.
    APPEND I_REC2.
    CLEAR  I_REC2.
    ENDLOOP.
      IF NOT I_REC2[] IS INITIAL.
        PERFORM DOWNLOAD .
        CLEAR I_REC2.
        REFRESH I_REC2.
       ELSE.
       WRITE : / ' no record exist due to unavailability of data'.
      ENDIF.
    ENDFORM.                               " LOCAL_DOWNLOAD
    *&      Form  UNIX_DOWNLOAD
    FORM UNIX_DOWNLOAD.
    LOOP AT REC1.
    REC1-CLNT = SY-MANDT.
    REC1-S_SYS = SY-SYSID.
    MOVE:  REC1-BAL TO I_REC2-BAL,
            REC1-COAREA TO I_REC2-COAREA,
          REC1-CA TO I_REC2-CA,         
            REC1-KTOPL TO I_REC2-CA,       
            REC1-CCODE TO I_REC2-CCODE,
            REC1-CREDIT TO I_REC2-CREDIT,
            REC1-CURRENCY TO I_REC2-CURRENCY,
            REC1-CURTYPE TO I_REC2-CURTYPE,
            REC1-DEBIT TO I_REC2-DEBIT,
            REC1-YEAR TO I_REC2-YEAR,
            REC1-FY TO I_REC2-FY,
            REC1-ACCOUNT TO I_REC2-ACCOUNT,
            REC1-VER TO I_REC2-VER,
            REC1-VTYPE TO I_REC2-VTYPE,
            SY-MANDT TO I_REC2-CLNT,
            SY-SYSID TO I_REC2-S_SYS,
            REC1-INDICATOR TO I_REC2-INDICATOR.
    APPEND I_REC2.
    CLEAR  I_REC2.
    ENDLOOP.
      IF NOT I_REC2[] IS INITIAL.
        PERFORM WRITE_TO_SERVER.
        CLEAR I_REC2.
        REFRESH I_REC2.
      ELSE.
       WRITE : / ' no record exist due to unavailability of data'.
      ENDIF.
    ENDFORM.                               " UNIX_DOWNLOAD
    *&      Form  HEADER_TEXT
          text                                                           *
    -->  p1        text
    <--  p2        text
    *form header_text.
      concatenate c_bal c_ba c_ca c_cc  c_credit c_currency c_curtype
         c_debit c_fisyear c_fisvar c_acct c_ver c_vtype c_indicator
               into t_strhd
               separated by c_comma.
      append t_strhd.
    *endform.                               " HEADER_TEXT
    *&      Form  HEADER_TEXT1
          text                                                           *
    *form header_text1.
      concatenate c_bal c_ba c_ca c_cc  c_credit c_currency c_curtype
        c_debit c_fisyear c_fisvar c_acct c_ver c_vtype c_indicator
               into t_strhd1
               separated by c_comma.
      append t_strhd1.
      transfer t_strhd1 to p_unfil.
    *endform.                    " HEADER_TEXT1
    *&      Form  COLLECT_DATA
          Collect Data                                                   *
    FORM COLLECT_DATA.
    SELECT * FROM GLT0 INTO  TABLE REC3
                        WHERE   BUKRS IN COMPCODE
                        AND     RYEAR IN FISYEAR
                        AND     RPMAX IN FISCPER
                        AND     RACCT IN GLACC
                        AND     RTCUR IN  CURRENCY.
    SELECT KTOPL FROM SKA1
                 INTO TABLE T_KTOPL
                 FOR ALL ENTRIES IN REC3
                 WHERE SAKNR = REC3-RACCT.
    LOOP AT REC3 .
       select *
       from glt0
       into table t_temp
       where rldnr = rec-rldnr
         and rrcty  = rec-rrcty
          and rvers  = rec-rvers
         and bukrs = rec-bukrs
         and ryear = rec-ryear
          and racct  = rec-racct
           and rbusa  = rec-rbusa
           and rtcur <> 'ZAR'
         and rpmax  = rec-rpmax.
    if sy-subrc = 0.
            rec1-bal = '0.00'.
    else.
      rec1-bal = rec-hslvt.
      endif.
    *READ TABLE T_KTOPL WITH KEY SAKNR = REC-RACCT BINARY SEARCH.
    MOVE T_KTOPL-KTOPL TO REC3-KTOPL.
    CLEAR:  CBALANCE, DBALANCE.
    REC1-BAL = REC3-HSLVT.
    IF REC3-DRCRK = 'S'.
    IF REC3-HSLVT NE C_ZERO.
           YEAR   = REC-RYEAR.
           PERIOD = '000'.
           CONCATENATE PERIOD C_DOT YEAR INTO FP.
           REC1-INDICATOR = REC-DRCRK.
           REC1-DEBIT = C_ZERO.
           REC1-CREDIT = C_ZERO.
           REC1-CCODE = REC-BUKRS.
           REC1-YEAR  = FP.
           REC1-CURRENCY = REC-RTCUR.
           REC1-ACCOUNT  = REC-RACCT.
           rec1-bal      = rec-hslvt.
           dbalance = rec1-bal.
           REC1-CURTYPE = C_CTYPE.
           REC1-FY      = C_FY.
           REC1-COAREA   = REC-RBUSA.
           REC1-VER     = REC-RVERS.
           REC1-VTYPE   = C_CTYPE.
           REC1-CA      = C_CHART.
           APPEND REC1.
            C = 0.
          PERFORM D.
    ENDIF.
    IF REC3-HSL01 NE C_ZERO.
            YEAR   = REC3-RYEAR.
            PERIOD = '001'.
            CONCATENATE PERIOD C_DOT YEAR INTO FP.
            REC1-INDICATOR = REC3-DRCRK.
            REC1-DEBIT = REC3-HSL01 .
            REC1-CCODE = REC3-BUKRS.
            REC1-YEAR  = FP.
            REC1-CURRENCY = REC3-RTCUR.
            REC1-ACCOUNT  = REC3-RACCT.
           rec1-bal      = REC3-hsl01 + dbalance.
           dbalance = rec1-bal.
            REC1-CURTYPE = C_CTYPE.
            REC1-FY      = C_FY.
            REC1-COAREA   = REC3-RBUSA.
            REC1-VER     = REC3-RVERS.
            REC1-VTYPE   = C_CTYPE.
          REC1-CA      = C_CHART. 
            REC1-KTOPL = REC3-KTOPL. 
            APPEND REC1.
            C = 1.
         PERFORM D.
    ENDIF.
    IF  REC3-HSL02 NE C_ZERO.
          REC1-DEBIT = REC3-HSL02.
       YEAR   = REC3-RYEAR.
       PERIOD = '002'.
      CONCATENATE PERIOD C_DOT YEAR INTO FP.
         REC1-INDICATOR = REC3-DRCRK.
       REC1-DEBIT = REC3-HSL02.
       REC1-CCODE = REC3-BUKRS.
       REC1-YEAR  = FP.
       REC1-CURRENCY = REC3-RTCUR.
       REC1-ACCOUNT  = REC3-RACCT.
      rec1-bal      = REC3-hsl02 + dbalance.
      dbalance = rec1-bal.
            REC1-CURTYPE = C_CTYPE.
            REC1-FY      = C_FY.
            REC1-COAREA   = REC3-RBUSA.
            REC1-VER     = REC3-RVERS.
            REC1-VTYPE   = C_CTYPE.
          REC1-CA      = C_CHART. "-BF7957-070503
            REC1-KTOPL = REC3-KTOPL.  "+BF7957-070503
       APPEND REC1.
       C = 2.
    PERFORM D.
    ENDIF.
    IF  REC3-HSL03 NE C_ZERO.
            YEAR   = REC3-RYEAR.
            PERIOD = '003'.
            CONCATENATE PERIOD C_DOT YEAR INTO FP.
               REC1-INDICATOR = REC3-DRCRK.
            REC1-DEBIT = REC3-HSL03.
            REC1-CCODE = REC3-BUKRS.
            REC1-YEAR  = FP.
            REC1-CURRENCY = REC3-RTCUR.
            REC1-ACCOUNT  = REC3-RACCT.
           rec1-bal      = REC3-hsl03 + dbalance .
           dbalance =  rec1-bal.
            REC1-CURTYPE = C_CTYPE.
            REC1-FY      = C_FY.
            REC1-COAREA   = REC3-RBUSA.
            REC1-VER     = REC3-RVERS.
            REC1-VTYPE   = C_CTYPE.
           REC1-CA      = C_CHART. "-BF7957-070503
             REC1-KTOPL = REC3-KTOPL. "+BF7957-070503
            APPEND REC1.
          C = 3.
    PERFORM D.
    ENDIF.
    IF  REC3-HSL04 NE C_ZERO.
           REC1-DEBIT = REC3-HSL04.
              YEAR   = REC3-RYEAR.
              PERIOD = '004'.
             CONCATENATE PERIOD C_DOT YEAR INTO FP.
                REC1-INDICATOR = REC3-DRCRK.
             REC1-DEBIT = REC3-HSL04.
              REC1-CCODE = REC3-BUKRS.
              REC1-YEAR  = FP.
              REC1-CURRENCY = REC3-RTCUR.
              REC1-ACCOUNT  = REC3-RACCT.
             rec1-bal      = REC3-hsl04 + dbalance .
            REC1-CURTYPE = C_CTYPE.
            REC1-FY      = C_FY.
            REC1-COAREA   = REC3-RBUSA.
            REC1-VER     = REC3-RVERS.
            REC1-VTYPE   = C_CTYPE.
          REC1-CA      = C_CHART.  "-BF7957-070503
            REC1-KTOPL = REC3-KTOPL.  "+BF7957-070503
            APPEND REC1.
             dbalance = rec1-bal.
              C = 4.
              PERFORM D.
    ENDIF.
    Thanks and Regards,
    Ram

    use logical database SDF, nodes ska1 and  skc1c
    A.

  • Problem in moving the data into final internal table

    Hello all,
    I am stuck in apeculair situation.
    I have a internal table having header record and a internal table having its line items.
    Header record ::    90006103  A   20080110   ALBERTA    3456
    Detail   record ::    90006103  D2  2219CR1710441
                               90006103  D2  2219M11710443
                               90006103  D2  2219M21710442
                               90006103  A    20080115   ALBERTA    3456
                               90006103  D2  2219CR1710441
                               90006103  D2  2219M11710443
                               90006103  D2  2219M21710442
    I collected the header record in one internal table and another internal table having all the line items.But the problem is when i am moving the values to the final inernal table i am getting the same payment date
    20080110 (Date field in first record of header internal table) for all the line items .
    But my requirement is that date should be 20080110 for the first 3 line items of first header record and similarly date should be 20080115 for all the line items of the next header record.
    Kindly suggest.
    Regards,
    Arun

    assumption: some mistake in ur posting that, How belnr and date r same for both header records, so i guess, either one is different.
    try with AT NEW - ENDAT.
    AT NEW belnr.
    here use looping, READing of ur itabs.---> so, u need to build couple of itabs to move forth and back.
    ENDAT.
    pls. note that, when u use this AT NEW all the CHAR fileds of itab wuld show as STARS **.....so, this is the necessity behind building new itabs.
    thanq
    Edited by: SAP ABAPer on Dec 30, 2008 6:24 PM

  • Conversion of PDF file data  into ABAP internal table

    Hi all,
    I am unable to convert the binary data into text format by using some function modules and classes .please find tthe function modules names and classes:
    SCMS_BINARY_TO_TEXT,SCMS_BIN_TO_TEXT, CL_ABAP_CONV_IN_CE,CL_ABAP_CONV_OBJ. But these are not working as per my requirement.
    My requirement is we need to upload PDF file (legecy file)which is saved under the PC into SAP and display the same PDF data into the adobe interactive form. For thise i have done coding by using above function modules and classes but i got the unwant on the adobe form i.e display lke "##############$$%%^^&&*((((()))%%%%%%###*^^&&***"
    Thanks,
    Ramana

    I don't understand, the pdf is put into an internal table at
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF
    the table is pdf and all info for the pdf is there already in a table?
    if you continue the source code the only thing is that the table is combined with a file name and makes it happen that you get an actual file.
    or do you want to have the pdf in a single field ?
    or do you want to store the document on a server where the location is stored in an internal table ??
    kind regards
    arthur de smidt

  • Sql/Plsql code to export data into a temporary table from a text file

    Dear all,
    I need to create a temporary table getting data from a text file. I am very new to data loading could you please help me how to read the text file in to a temporary table.
    i have text file like as below:
    order items : books Purchasing
    start date:
    8-11-09
    Notes: Books are selling from aug10 to aug 25
    Action performed
    Time
    Verified By
    sold out from shop, sold out date:_________
    1.
    physics _______ book sold to ravi
    2.
    social _______ book this is a good book
    sold to kiran
    aug10th
    ronald
    3.
    maths book to sal
    4.
    english book__________ this was a newbook
    to raj
    jak
    return to shop, return date:____________
    1.
    maths book return by:_____________ Verify book
    aug11th
    john
    2.
    story book by:_________ checked
    aug14th
    Now i need to create a temporary table and insert the data into the table from this text file.
    Now i need to create a temporary table named as books_order with 5columns(order,Status,Action_Performed,Time,Verified_By) like as below:
    Order     status     Action_Performed     Time     Verified_By
    books Purchasing     sold     physics _______ book sold to ravi     _______     _________
    books Purchasing     sold     social _______ book this is a good book sold to kiran aug10th     ronald
    books Purchasing sold     maths book to sal     _____     __________
    books Purchasing     sold     english book__________ this was a newbook to raj __________     jak
    books Purchasing return     maths book return by:_____________ Verify book aug11th     john
    books Purchasing     return     story book by:_________ checked aug14th     _________
    Thanks in advance.

    Isn't school work marvelous?
    Create an external table.
    http://www.morganslibrary.org/reference/externaltab.html
    Getting the data into a temporary table may make sense in SQL Server ... but not in Oracle.

  • How to populate data into Dynamic Internal Table.

    Hi Experts,
    I had created one Dynamic Internal table and one static internal table.I want to move data from Static Internal table to Dynamic interal table.And aslo the number of coloum of these two tables are not same.
    So please help me for solving this issue.
    Thanks,
    <u><i><b>Seema.</b></i></u>

    Hi,
    Check out this sample program for dynamictable report.
    REPORT  YMS_DYNAMICDEMO
                 NO STANDARD PAGE HEADING
                 MESSAGE-ID zcs_c2c_001.
    type-pools : abap.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: dy_table type ref to data,
          dy_line  type ref to data,
          xfc type lvc_s_fcat,
          ifc type lvc_t_fcat.
    selection-screen begin of block b1 with frame.
    parameters: p_table(30) type c default 'T001'.
    selection-screen end of block b1.
    start-of-selection.
      perform get_structure.
      perform create_dynamic_itab.
      perform get_data.
      perform write_out.
    form get_structure.
    data : idetails type abap_compdescr_tab,
           xdetails type abap_compdescr.
    data : ref_table_des type ref to cl_abap_structdescr.
    Get the structure of the table.
      ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( p_table ).
      idetails[] = ref_table_des->components[].
      loop at idetails into xdetails.
        clear xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype = xdetails-type_kind.
        xfc-intlen = xdetails-length.
        xfc-decimals = xdetails-decimals.
        append xfc to ifc.
      endloop.
    endform.
    form create_dynamic_itab.
    Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = ifc
                   importing
                      ep_table        = dy_table.
      assign dy_table->* to <dyn_table>.
    Create dynamic work area and assign to FS
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
    endform.
    form get_data.
    Select Data from table.
      select * into table <dyn_table>
                 from (p_table).
    endform.
    form write_out.
    Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index
             of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    endform.
    Thanks,
    Shankar

  • Inserting data into dynamic internal tables

    Hello everyone, i need some suggestions on the following problem:
    I have created a dynamic table that consist of storage locations(SL) belonging to a plant. Each record in the internal table would need to display all the SL on the same line. I have succesfully created it and displayed it on an ALV, the problem now is how to insert data for the dynamically created storage locations:
    EXAMPLE: Created dynamic itab
    colA | colB | SL1 | SL2 | ... | SLn | colC | <--header
    data | data | 100 | 120 | ... | 200 | data | <--record
    I would like to insert data from the fields of another itab into SL1 to SLn. How can i go about doing it?
    Data from ColA to ColC has been filled through:
    <i>loop at itab into w_itab.
    move-corresponding w_itab to <dyn_tab>.
    endloop.</i>
    I cannot do the same to the SLs as the fields is dynamically created during runtime and the fieldname is different from the data that i am to insert in into.
    Any ideas?

    Hi,
      I have the following code in my BADI:
    ct_value_list is defined in the parameters of the method as a type standard table.
    Create values list reference
    CREATE DATA lv_value_list_ref LIKE LINE OF ct_value_list.
    ASSIGN lv_value_list_ref->* TO <lfs_value_list>.
      IF CT_VALUE_LIST IS INITIAL.
        lv_tabix = sy-tabix.
        IF NOT LT_DATA[] IS INITIAL.
          LOOP AT lt_data assigning <lfs_data>.
            assign <lfs_data> to <lfs_value_list>.
          assign <lfs_value_list> to <lv_value_list>.
            ASSIGN COMPONENT lc_prvar OF STRUCTURE <lfs_value_list>
            TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
    Get the material id
            READ TABLE it_matkey_tab ASSIGNING <lfs_matkey>
              WITH KEY matnr = <lfs_attribute>.
            IF sy-subrc = 0.
              lv_matid = <lfs_matkey>-matid.
            ENDIF.
            ENDIF.
            ASSIGN COMPONENT lc_mktgr OF STRUCTURE <lfs_value_list>
              TO <lfs_attribute>.
            IF <lfs_value_list> IS ASSIGNED.
            READ TABLE it_loc ASSIGNING <lfs_loc>
              WITH KEY locno = <lfs_attribute>.
            IF sy-subrc = 0.
              lv_locid = <lfs_loc>-locid.
            ENDIF.
            READ TABLE it_matloc ASSIGNING <lfs_matloc_int>
              WITH KEY matid = lv_matid
                       locid = lv_locid.
           if sy-subrc = 0.
          MATLOC: Assignment of Values - START
              ASSIGN COMPONENT 'MATLOCID'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-matlocid.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
                INSERT <lfs_matloc_int> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'PLANNER_SNP'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-planner_snp.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT101'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at101.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT102'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at102.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT103'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at103.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT104'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at104.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
              ASSIGN COMPONENT 'AT105'
                OF STRUCTURE <lfs_matloc_int> TO <lfs_attribute>.
              IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_matloc_int>-at105.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
              ENDIF.
            endif.
           ENDIF.
            ASSIGN COMPONENT 'PRVAR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-prvar.
               INSERT <lfs_value_list> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PARPR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-parpr.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VARID'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-varid.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VARCT'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-varct.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VARTX'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-vartx.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'DMOAP'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-dmoap.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PRDID'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-prdid.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRFAM'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-brfam.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MATKL'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-matkl.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRDIF'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-brdif.
               INSERT <lfs_attribute> INTO TABLE ct_value_list.
            ENDIF.
            ASSIGN COMPONENT 'MEIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-meind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKLEN'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mklen.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PCKTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-pckty.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'ITPCK'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-itpck.
               INSERT <lfs_attribute> INTO TABLE ct_value_list.
            ENDIF.
            ASSIGN COMPONENT 'PMEIN'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-pmein.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKTHK'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mkthk.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'FLIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-flind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDTID'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-edtid.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BNDTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-bndty.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'ITBND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-itbnd.
                INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'ITCSE'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-itcse.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'TPCOL'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-tpcol.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'SPFLV'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-spflv.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'PRSHP'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-prshp.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKTGR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mktgr.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'SUBMK'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-submk.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BOMHD'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-bomhd.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRDSC'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-brdsc.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MKSTR'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mkstr.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDDSC'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-eddsc.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDCAT'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-edcat.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'CCIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-ccind.
             INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'CGSTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-cgsty.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'FLTTY'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-fltty.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'CPIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-cpind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MBIND'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-mbind.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'USPRP'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-usprp.
             INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'EDDET'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-eddet.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'BRGEW'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-brgew.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'NTGEW'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-ntgew.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'GEWEI'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-gewei.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VOLUM'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-volum.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'VOLEH'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-voleh.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'DMOAPP1'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-dmoapp1.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'MAKTX'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
               <lfs_attribute> = <lfs_value_list>-maktx.
               INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
            ASSIGN COMPONENT 'RPLVL'
                OF STRUCTURE <lfs_value_list> TO <lfs_attribute>.
            IF <lfs_attribute> IS ASSIGNED.
              <lfs_attribute> = <lfs_value_list>-rplvl.
              INSERT <lfs_attribute> INTO TABLE <lv_value_list>.
            ENDIF.
         ENDLOOP.
        ENDIF.
    ENDIF.
    I get a shortdump in the code for the above code. There are diff types of inserts that I am trying to do and each one gives a short dump.
    Looking forward to your inputs.
    Your program is not applicable in my case as I have ct_value_list passed as a changing parameter of type standard table in my APO BADI.
    cheers
    Aveek

  • Regarding passing of the modified data back to internal table form alv

    Hi,
       My requirement is i hav a fld in my alv grid checkbox which iam checking when i output the list on the alv grid and I hav to execute an action on all the checked rows the poblem is even iam checking the checkbox it is not being passed back to internal table.I hav used methods to create and display alv grid.This is really urgent can anyone provide any inf on this .
    Thanks and Regards,
    Rajashree

    Hello Tathagata,
    I have a similar problem.
    I need to react on a change of an input-field of the
    grid-control.
    When i call the method "->check_changed_data"
    i allways get e_valid == 'X'.
    The problem is, i have to react in any case, when the
    user presses <ENTER> and if the user has changed
    a field-entry, i have to read additional data
    and store it into the internal datarow of
    the grid-table.
    I have'nt found an event like "ON DATA CHANGED" ...
    How can i solve this problem.
    Thank You very much in advance
    Michael

Maybe you are looking for

  • Data collection table in database

    Hi, In our SAP ME WIP databse we are not able to see the parameter values for data collection ,as entered by operator. We tried searchin in WIP db as system rule setting for ' Store Data Collection Results in ODS ' is false. Are there any other setti

  • Problem exporting from large sequences

    I'm reposting here becase it could be hardware related (the system is new), and because it wasn't answered on the CS5 forum and quickly got buried beneath 100 other threads.  There's usually more in-depth support on this forum.  Here goes: I'm runnin

  • COUNTIFS with 3 arguments?

    Hi, I've created a sheet to record various employee details, such as lieu, annual leave, sickness, leave of abscence etc over each month (please see link below): http://flic.kr/p/aBeviB This has been working really well for the last couple of years a

  • I bought an ipod classic 160, do i need itunes installed to play music?, i bought an ipod classic 160, do i need itunes installed to play music?

    Hi, i bought an ipod classic 160, and i am new to this. Do i need to install itunes to play music? I have installed music on to the ipod, and i can see the songs via my pc, but i cannot see the songs on the ipod to play them? Thanks for the advice

  • Packages help (linux)

    i would like to know in what directory should i put my jar packages that i use in my program? and also how to instal the mysql connector.. thx in advance