Mapping Line type Data to table data

Hi,
I am trying to refer to a data element present in the line type of a table type which belongs to an import parameter of a smartform. How will i access the data element to use in the where clause of a select statement.
For Eg:
Import Parameter name: PARTNER_H
TYPE: CRMT_OUTPUT_PARTNER_H_COMT  (table type)
The line type attached to this table type is CRMT_OUTPUT_PARTNER_H_COM.
This line type is the structure that contains the data element that i need to use. the details are as below:
Component: RELATION_PARTNER
Component type: BU_PARTNER_GUID
I have written a select statement as below:
SELECT SINGLE * from BUT000 into I_FS_BUT000 where
  PARTNER_GUID = PARTNER_H-RELATION_H.
I have given the input parameter as  PARTNER_H.
It throws me an error that "PARTNER_H" is a table without a header line and therefore has no component called "RELATION_H".
Is this the correct way to access the data element?Please help.

Hi Neena,
               Since PARTNER_H is an internal table it may have multiple values. If you want only a single entry from BUT000, you ll have to determine which entry from PARTNER_H you need in select query.
If it is always going to have only a single value then , this will work :
data: wa_partner_h type line of CRMT_OUTPUT_PARTNER_H_COMT.
Read table partner_h into wa_partner_h index 1.
if sy-subrc is initial.
SELECT SINGLE * from BUT000 into I_FS_BUT000 where
PARTNER_GUID = WA_PARTNER_H-RELATION_H.
endif.
Regards,
Arun

Similar Messages

  • In "LOOP ... WHERE ..." the line type of the table must be statically defin

    Hi All,
            I have written the code, for greater than (GJAHR) 2007 and restricted company codes ( table name = ZGLCCODE).
         Here I have written the following the code which is giving an error
    In "LOOP ... WHERE ..." the line type of the table must be statically defin
    ZGLCCODE Contains only restricted company codes.
    Code is as follows
    TABLES : ZGLCCODE. 
    DATA : LT_DATAPACKAGE TYPE TABLE OF DTFIGL_4.
    DATA : LS_PACKAGE TYPE DTFIGL_4.
    TYPES: BEGIN OF LS_TZGLCCODE,
           ZBUKRS type BUKRS,
            END OF LS_TZGLCCODE.
    DATA : LT_ITZGLCCODE TYPE LS_TZGLCCODE OCCURS 0 WITH HEADER LINE.
    DATA : LI_NUM TYPE I,
           LC_ZGJAHR TYPE BSEG-GJAHR VALUE '2007'.
    SELECT ZBUKRS INTO TABLE LT_ITZGLCCODE FROM ZGLCCODE.
    Note:  "C_T_DATA" dynamic structure = "DTFIGL_4" structure
    *-  Remove from the DataSource Company Code -
    LOOP AT C_T_DATA INTO LS_PACKAGE WHERE GJAHR GE '2007'.
    READ TABLE LT_ITZGLCCODE WITH KEY ZBUKRS = LS_PACKAGE-BUKRS.
    IF SY-SUBRC <> 0.
       APPEND LS_PACKAGE TO LT_DATAPACKAGE.
    ENDIF.
      CLEAR LS_PACKAGE.
    ENDLOOP.
    IF LT_DATAPACKAGE[] IS NOT INITIAL.
    DESCRIBE TABLE LT_DATAPACKAGE LINES LI_NUM.
    IF LI_NUM GT 0.
       REFRESH C_T_DATA.
       APPEND LINES OF LT_DATAPACKAGE TO C_T_DATA.
       REFRESH LT_DATAPACKAGE.
       FREE LT_DATAPACKAGE.
    endif.
    ELSE.
       REFRESH C_T_DATA.
    ENDIF.
    Please give me your valuable suggestions.
    Thanks
    Ganesh Reddy.

    Hi Ganesh,
    whatever you do, you can try like this:
    1 - any code posted should be wrapped in \
    then try something like this:
    field-symbols:
      <tabrec> type any,
      <field>   type any.
    sort ITZGLCCODE by bukrs.
    LOOP AT C_T_DATA ASSIGNING <tabrec>.
      ASSIGN component 'GJAHR' of structure <tabrec> to <field>.
      check <field> <= 2007.
      ASSIGN component 'BUKRS' of structure <tabrec> to <field>.
      READ TABLE LT_ITZGLCCODE WITH KEY ZBUKRS = <field>
        BINARY SEARCH TRANSPORTING NO FIELDS. "speed up the volume.
      IF SY-SUBRC 0.
        MOVE-CORRESPONDING <tabrec> to  LS_PACKAGE.   
        APPEND LS_PACKAGE TO LT_DATAPACKAGE.
      ENDIF.
    ENDLOOP.
    Regards,
    Clemens

  • How to get the line type of a table type

    Hi,
      i want to indetify the line type of a table type dynamically in my program. how to do?
    For example:
    data: lv_ttype type type ROLLNAME value 'PRXCTRLTAB'.
    how to identify line type of lv_ttype in the program.
    Thanks,
    johnney.

    Hello Johnney,
    try like this...
    types: begin of ty_itab,
                matnr like mara-matnr,
                werks like marc-werks,
                maktx like makt-maktx,
              end of g_t_itab.
    data: g_t_itab type table of ty_itab.
    data: <b>wa_itab like line of g_t_itab.</b> " This is line type... so called work area.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.

  • Difference between line type and internal table?

    Hi..
    I wanted to know, what is the difference between Line type and Internal Table?

    Hi,
        Before the 4.7 release in SAP if we want to define an internal table we have to write the defination using the occurs statement and we need to define all the fields using INCLUDE STRUCTURE or indidually all the fields ine by one.
    From 4.7 release of R/3 SAP introduced the Line type concept and it's part of the ABAP OOPS concept. for internal table defination we don't need to use the occur statements. Instead INCLUDE structure  we need to create a Line type for that structure in Se11 and then we can define the internal table like :
    DATA : ITAB TYPE TABLE OF <LINE_TYPE>.
    Only thing is this table will be  a table without header. So for internal table processing we need to define a work area structure of type line of line type  . EX:
    DATA: WA_ITAB TYPE LINE OF <LINE_TYPE>.
    Hope this helps.
    Thanks,
    Greetson

  • SQL Developer can't commit edited data in Table Data pane

    When I try to commit changes in "Data" pane for selected table SQL Developer gives me a strange error:
    One error saving changes to table "TABLENAME".:
    Row XXX: Data got commited in another/same session, cannot update row.
    I can see in the log that SQL Developer tries to do something like:
    UPDATE "TABLENAME" set "COLUMN"="value1" where ROWNUM="xxxx1" and ROW_SCN=nnn1;
    UPDATE "TABLENAME" set "COLUMN"="value2" where ROWNUM="xxxx2" and ROW_SCN=nnn1;
    UPDATE "TABLENAME" set "COLUMN"="value3" where ROWNUM="xxxx3" and ROW_SCN=nnn2;
    If I update the same rows in SQL window by other condition and do commit - all is OK. Why so strange behaivour?
    My table has not a primary key and no other users try to change it. SQL Developer version 3.0.04 and Oracle 10.2.0.4 Linux.
    Best regards,
    Sergey Logichev

    That's because the inaccuracy of ROW_SCN.
    I suggest you turn off Preferences - Database - ObjectViewer - Use ORA_ROWSCN (as I did the very moment we got the option).
    Have fun,
    K.

  • How to create a line type in data dictionary

    How to create a line type in data dictionary?Please explain step by step?
    Thanks & Regads,
    Sairam

    Hi,
    the details abbout the line type.
    The line type of a table type can be defined by:
    o Specification of a type that already exists (data element,
    structure, table type, table, view) whose properties are then copie
    as properties of the defined table line.
    o Direct type input, where data type, number of positions, and, if
    required, decimal places, are entered directly.
    o Specification of a reference type.
    and SE11 and click on datatype and click on table type and enter the line type.
    Thanks
    Shiva

  • Data types in internal tables.

    Examples for LINE & KEY.

    Mithun,
    Internal Tables as Data Types
    Internal tables and structures are the two structured data types in ABAP. The data type of an internal table is fully specified by its line type, key, and table type.
    Line type
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    Key
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    If a table has a structured line type, its default key consists of all of its non-numerical columns that are not references or themselves internal tables. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty.
    The user-defined key can contain any columns of the internal table that are not references or themselves internal tables. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    Pls. reward if useful

  • Unable to see data in Table in smartform

    Hi all,
    I need to create a smartform where I have to print the header details at the start and then below that details for all line items for a particular document.
    so i have data ;ike :
    Header data :
    field 1 : field 2:
    Field3 : field4:
    field5: field6:
    Item data :
    field1 field2 field3 field4 --> Item 1
    field1 field2 field3 field4 -->Item 2
    field 1 field2 field3 field4 -->Item3
    For the Header data,Im planning to use a template in a secondary window.
    However for the item data,i need to use a table (As i know the no of records only at runtime).Also another reason for usng table would be that I dont need the header on each flloowing page but only the Line item details on the following pages.
    Now my ques is :
    1.I hav ecreated the form and put some constant /texts to just test the form.I am able to see the texts/data in the header data.However  Im unable to see the data for the Item i.e. in the TABLE.
    I have used template for Header details which I can see.
    I dont know what Im doing wrong.Is it because in the DATA tab under TABLES,I have given an interna table but there is no data in the table?
    I have defined only 1 line type in  my table an dthat has 4 cells (as I need to print 4 item fields under the Item data)
    PLease let me know what I am doig wrong because of which Im unable to see the item data in table form.
    Thanks!

    Hi,
    Have you used any exists?
    in exists is there any system date kind?
    Can you try to run your report thru RSRT and use debug option there.
    before reporting please check your all connected targets have data for reporting.
    mean at targets-->request tab, reporting symbol was there or not.
    Any master data objects included in multi provider?
    if yes then please check those, if any ACR was running then it may cause you.
    if possible try to develop simple query with as per needs(mean to see 2015 data only).
    As my guess selections/filters migth be hidden, please check those.
    Thanks

  • 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.

  • Table Types and Line Type

    What is the need of Table Types,
    when there is Tables.
    Even when iam using in the Abap Programs in se38..
    iam not getting any difference..
    Even i want to about the use of Line type
    when there is the structure..
    iam sap 4.7 they gave that Table type describe the structure and
    functional attributes  of an internal table.

    Way: 1:
    Go to SE84 --> Select ABAP Dict --> Table Types -->
    Enter the short names like ORDER wih leading and ending * on the Table Types Field. ---> F8
    This will bring all related entries of Table Types(Line Types) having ORDER has a part of its Name.
    Way:2:
    If you know the Table Name, then go SE11 --> Putch in the Table Name --> Press Display
    Now put the cursor on the Table Name field, press CNTLSHFTF3, on the WHERE USED LIST Pop up, Select only the TABLE TYPE Option and press EXECUTE.
    This will bring the Table Types and Line Types.
    SAP Table Types
    I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)
    • Allows secondary indexes (SE11->Display Table->Indexes)
    • Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.
    II. Pool Tables (match codes, look up tables)
    • Should be accessed via primary key or
    • Should be buffered (SE11->Display Table->technical settings)
    • No secondary indexes
    • Select * is Ok because all columns retrieved anyway
    III. Cluster Tables (BSEG,BSEC)• Should be accessed via primary key - very fast retrieval otherwise very slow
    • No secondary indexes
    • Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.
    • Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported
    • Can not be buffered
    IV. Buffered Tables (includes both Transparent & Pool Tables)
    While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.
    Table Types : A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command
    DATA : itab TYPE TTYP.
    Reafer these links below for clear ideas.
    http://help.sap.com/saphelp_nw04/helpdata/en/fb/f14736a1f0ad1fe10000009b38f839/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm
    Thanks
    Allot points if this helps!

  • Urgent : How to modify the line type and table type

    I am working on ALV Grid Control, i need to know how to modify the line type values to table type.
                 ls_celltab-fieldname = 'ZSAVINGS '.
                 ls_celltab-style = l_mode.
            INSERT ls_celltab INTO TABLE pt_celltab.
    Here ls_celltab is line type and pt_celltab is table type.
    Please give me the suggestion ASAP.
    C.Bharath Kumar

    Hi,
    Here is the example
    DATA: BEGIN OF LINE,
            LAND(3)  TYPE C,
            NAME(10) TYPE C,
            AGE      TYPE I,
            WEIGHT   TYPE P DECIMALS 2,
          END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE
              WITH NON-UNIQUE KEY LAND NAME AGE WEIGHT.
    LINE-LAND = 'G'.   LINE-NAME   = 'Hans'.
    LINE-AGE  = 20.    LINE-WEIGHT = '80.00'.
    INSERT LINE INTO TABLE ITAB.
    LINE-LAND = 'USA'. LINE-NAME   = 'Nancy'.
    LINE-AGE  = 35.    LINE-WEIGHT = '45.00'.
    INSERT LINE INTO TABLE ITAB.
    Regards
    Sudheer

  • Main Table data load u2013 UNSPSC fields is not loading

    I am new to SAP MDM
    I have the main table data that includes UNSPSC field. UNSPSC (hierarchy) table is already loaded.
    It works fine when I use import manager with field mapping and value mapping. (UNSPSC field value mapping is done).
    When I use the import server using the same map to load the main table data with UNSPSC field (in this case the UNSPSC field value is different but UNSPSC lookup table has that value) , UNSPSC field is not loading but all other fields are loaded including images and PDF's with new values
    If I go to the import manager and do the value mapping again for the UNSPSC field with the new value then save the map and use the import server to load the data then it is loading correctly.
    My question when we use the import server, main table data with UNSPSC codes value will be different  each time and it doesnu2019t make sense to go to the import manager and do the value mapping and saving the import map  before loading the data again.
    What I am missing here?.  Anyone can help me?

    Could anyone clarify this?
    Issue: UNSPSC field value mapping automatically by using the import server while loading the Main table.
    This issue was resolved yesterday and still works fine with the remote system MDC UNSPSC.
    Is there anyn settings in the ' Set MDIS Unmapped value handling'? (Right click on the field Product hierarchy  field at the destination side). By default it is setting to 'Add' for both the working remote system as well as the non working remote system
    SAP MDM 5.5 SP6 and I am using the standard Product Master repository
    I tried this in a different remote system MDC R/3 & ERP and it worked some time and didnu2019t work later. If it is working then during the UNSPSC code field mapping,  it automatically maps the values also.
    The destination side the main table Products and the destination side [Remote key] field is displayed.
    Source file, I have only 3 fields and they are Product No, Product Name and UNSPSC Category and UNSPSC Category is mapped to the destination field Product Hierarchy field(lookup hierarchy)
    Do I have to map any field  or clone any field and map to the [Remote Key Field]  in the destination side? If yes, what field I have to clone and map it to the Remote Key filed? Is there any other settings necessary. I am not using any matching with this field or any other field.
    Steve.
    Edited by: SteveLat on Oct 8, 2009 11:57 PM
    Edited by: SteveLat on Oct 9, 2009 12:03 AM
    Edited by: SteveLat on Oct 9, 2009 12:47 AM

  • Offline adobe forms using webservices-how to print table data

    HI,
    i have created offline adobe form using webservices which call rfc to pull the data ...to get inspection lot details ...
    iam getting header data....but iam not able to get multiple line items of the table data ..here in scenario there are 4 line items but only 1 line item is getting displayed in the form...
    is there any need to handle seperately to display  tables data in offline adobe forms if we call from webservices
    Tousif
    Moderator message: please have a look in the dedicated forum for "Adobe Interactive Forms".
    Edited by: Thomas Zloch on Jan 18, 2011 3:08 PM
    << Moderator message - New question asked, so this is locked >>
    Edited by: Rob Burbank on Jan 18, 2011 10:19 AM

    This is oofline adobe form which is created throgh webservices
    Edited by: tousif_ig on Jan 18, 2011 3:19 PM

  • Line type and structure.

    What is the difference between line type and structure?
    one real time use of both.
    instead of line type we can directly use the corresponding tables.
    Points assured.
    regards,
    Prabhu.

    Hi
    <b>The line type of a table type can be defined by:</b>
    Specification of a type that already exists (data element, structure, table type, table, view) whose properties are then copied as properties of the defined table line.
    Direct type input, where data type, number of positions, and, if required, decimal places, are entered directly.
    Specification of a reference type.
    <b>structure</b>
    The table category defines how the logical table description defined in the ABAP Dictionary is represented in the database.
    There are the following table categories:
    transparent table
    structure
    append structure
    For internal purposes, such as storing control data or update texts, there are in addition the following table categories:
    pooled table
    cluster table
    generated view structure
    <b>reward if usefull</b>

  • RFQ smartform /SMB40/MMRFQ_L line type DUNNING_INFO

    How can there be line type DUNNING_INFO for table TABLE_DATA when it is not defined in table tab of TABLE_DATA.  in node  SCHED_DUNNING_S of node DELIVERY_SCHEDULE_S of node ITM_DLV_SCHEDULE the text node QTY_URGED_S is referencing line type DUNNING_INFO.
    If you are NOT a SMARTFORMS expert please do not attempt to answer the question. 
    I found that I could add a line type TEST to the table and then add a TEXT node and assign the line type TEST.
    I then delete line type TEST and activated the SMARTFORM.  Voila!  QED!!!   But is this good practice???

    check this thread here a program is given to convert spool to doc use that and then attech the file to mail
    Convert a spool id into a word document
    кu03B1ятu03B9к
    Edited by: kartik tarla on Mar 5, 2009 12:42 PM

Maybe you are looking for

  • How do I unsync an iTunes account

    How do I unsync an iTunes account? My daughter synced her iPhone with her friend's dad's iTunes account and now her iphone is listed under his name when i go to sync it with my iTunes account.

  • Error loading XML Document from /analytics/saw.dll/common/privileges.xml

    I tested my procedure for upgrading from OBI 11.1.1.5 to 11.1.1.6 which was successful. I had to rollback to OBI 11.1.1.5 using my database backup and VM snapshot due to project requirements. The OBI application successfully comes up but users who lo

  • Group By clause in oracle 10g help needed

    Hi we have a requirement that get the AR aging details at customer level.I have written the following query to fetch the correct rows at invoice level.But now i need to sum the amounts and i should show at invoice level and customer level.Could you p

  • US Holiday Calendar not syncing

    Ok, so I use iOS devices and a PC for work. I use iCloud for my calendars, contacts, etc. I use the web portal to view my calendars. I wanted to add US holidays to my calendar for 2015. The built in one in iOS will not sync to iCloud. So I created a

  • B1DE Download problem link is empty

    Hello I need B1DE tool for sap 2004 i found link in download section but it failed. SAP Business One Development Environment Setup for SAP Business One SDK 2004 v1.3  Can enyone send mi this instal on my email [email protected] Thanks & Regards. Edit