Submit with internal table

Hi.
  I have a function module with a internal table. This internal table has 30 fields and i have to it to a program vis SUBMIT, furthemore this program will be executed inside a job. Im trying to pass tha internal table with export and import but it doesn´t go.
  Anybody can help me???
  Thanks.

Hi Jorge
   Will try to answer basing on what i can understand
from you query.
   I guess you have an internal table in your FM with
some data. You are submitting a program within the FM
and you need the data in the internal table to be used
in the program.
   If my understanding is right, you can do it via
EXPORT/IMPORT statements.
   EXPORT <int_tab> TO MEMORY ID 'MID'. --> In FM.
   IMPORT <int_tab> FROM MEMORY ID 'MID". --> In Program
   Note that the internal table declaration should be
the same in FM and Program like name of the internal
table, all field names, data type everything should be
the same.
   Check if you are handling the same way.
Kind Regards
Eswar

Similar Messages

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

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

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

  • Performance with internal tables

    Hi everybody,
    I'm having trouble with the performance of a report.
    The reports selects data out of many different tables and merges them together in one extraction file. (I would really like it to be executable in dialog task, because I don't want to write the file on the application sever)
    I've done what I could using runtime analysis to improve performance of the db accesses. Now 97% of runtime is consumed by abap.
    I'm using several internal tables which will have many entries, and at the moment I'm using nested loops to gather the information out of the internal tables into one extraction file. (Reading the internal tables with key is not always possible, I do this whenever possible)
    I've tried to use loop... assigning <fs> instead of loop... into, but it doesn't really help too much.
    Any other suggestions?
    Thank you for your help, regards, Kathrin!

    Hi,
    Some of these might be able to help for improving the performance.
    1. Read table with key using binary search.
    2. While comparing two internal tables, user Kernal
       method. Eg: If I_TAB1[] = I_TAB2[]. Enfif.
    3. Instead of appending records within loop/endloop,
       use 'Append lines of'.
    4. When populate different internal tables, try to create
       with key field which will make a big difference while
       accessing the data.
    5. Sort the internal tables.
    6. Use Case/Endcase in place of If/Endif.
    7. While making values negative, use 0 - <field>, in
       place of <field> * -1.
    8. If the field structures are similar in two internal
       tables, for appending records use I_TAB2[] = I_TAB1[].
    9. After the complete usage of internal tables, release
       the resources using FREE/FREFRESH <internal table>.
    10. For data extraction, use field by field selection
        from database.
    11. Try to avoid using 'ALL ENTRIES'. If using and make
        sure that the ref.internal table have entries.
    12. Try using Inner Join using Foriegn key fields.
    13. To get sum or count use Aggregate functions.
    14. Try to use Views if need appropriately.
    Hope this helps.
    Gopakumar

  • ABAP transformation to XML for sap chart engine with internal table

    Hello.
    I am new to the SAP chart engine, XML and transformations so please be patient with me from an ABAP-program I am trying to call a Z-transformation and attach an internal table with two columns. In the ST program I want to loop through the table and for each row insert the two values from the table in the XML.
    In an ABAP-program I have an internal table containing datacoordinates for a scattered chart.
    The table looks like this:
    DATA: BEGIN OF coordinate,
                x_value TYPE f,
                y_value TYPE f,
               END OF coordinate,
               polygon_data LIKE STANDARD TABLE OF coordinate with header line.
    As a prototype I just add a few coordinates like this:
    polygon_data-x_value = '700'.
        polygon_data-y_value = '8'.
        APPEND polygon_data.
        polygon_data-x_value = '1400'.
        polygon_data-y_value = '3'.
        APPEND polygon_data.
        polygon_data-x_value = '1400'.
        polygon_data-y_value = '10'.
        APPEND polygon_data.
        polygon_data-x_value = '700'.
        polygon_data-y_value = '10'.
        APPEND polygon_data.
        polygon_data-x_value = '700'.
        polygon_data-y_value = '3'.
        APPEND polygon_data.
    I have created a Z-transformation and I call it like this (I also have a separate transformation for all the customizing generated with SAP chart designer but that one works fine):
    DATA: data_xml TYPE xstring.
    CALL TRANSFORMATION ztest_ce_tables2xml
          SOURCE polygon_data = polygon_data
          RESULT XML data_xml.
    Since I am trying to create a scattered chart I need to insert an X and Y value for each coordinate.In the manual SAP Chart engine - XML format description it looks like this:
    <ChartData>
    <Series>
    <Point>
    <Value type="x">1</Value>
    <Value type="y">1</Value>
    </Point>
    <Point>
    <Value type="x">2</Value>
    <Value type="y">2</Value>
    </Point>
    My ST-program that I cannot get to work looks like below. How can I loop through my internal table and get the X and thy Y value for each row in my internal table?
    BR Tommy (Sweden)
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
    <tt:root name="POLYGON_DATA"/>
    <tt:template>
    <ChartData>
    <Series>
    <tt:loop ref=".POLYGON_DATA">
       <Point>
         <Value type="x"><tt:copy ref=".POLYGON_DATA.X_VALUE"/></Value>
         <Value type="y"><tt:copy ref=".POLYGON_DATA.Y_VALUE"/></Value>
       </Point>
       </tt:loop>
    </Series>
    </ChartData>
    </tt:template>
    </tt:transform>

    Hello again.
    I found the solution and would like to share it with the forum, maybe it could help someone.
    My first error was in the call transformation statement:
    CALL TRANSFORMATION ztest_ce_tables2xml
          SOURCE polygon_data = polygon_data [] <----
    Do not forget these
          RESULT XML data_xml.
    I also had an error in the ST program, it should look like this:
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
    <tt:root name="POLYGON_DATA"/>
    <tt:template>
    <ChartData>
    <Series>
    <tt:loop ref=".POLYGON_DATA">
       <Point>
         <Value type="x"><tt:value ref="$ref.X_VALUE"/></Value>
         <Value type="y"><tt:value ref="$ref.Y_VALUE"/></Value>
       </Point>
       </tt:loop>
    </Series>
    </ChartData>
    </tt:template>
    </tt:transform>

  • Issue with internal table in object oriented ABAP.

    Hello Gurus,
    I am having trouble defining internal table in Object oriented ABAP. for following:
    DATA: BEGIN OF IT_TAB OCCURS 0.
            INCLUDE STRUCTURE ZCUSTOM.
    DATA    tot_sum   TYPE char40.
    DATA END OF IT_TAB.
    Can someone help ?
    Regards,
    Jainam.
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Moderator message - Please post in the correct forum. You can easily find out for yourself by looking at SAP help for internal tables using OOP - thread locked
    Edited by: Rob Burbank on Feb 5, 2010 2:49 PM

    No, you can not declare internal table with header line in OO context. You have to declare the work are/header line separately
    Example:
    TYPES: BEGIN OF ty_it_tab.
            INCLUDE STRUCTURE mara.
    TYPES:  tot_sum TYPE char40.
    TYPES: END OF ty_it_tab.
    DATA: it_tab TYPE STANDARD TABLE  OF ty_it_tab.
    DATA: wk_tab TYPE ty_it_tab.
    LOOP AT it_tab INTO wk_tab.
    ENDLOOP.
    Edited by: Dean Q on Feb 5, 2010 8:50 PM

  • Problem with Internal table

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

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

  • Finding duplicates:Minus set operator in dealing with internal tables

    Dear experts,
    I am newbie to ABAP developement,i have been given an assignment to find the duplicate list of vendors in lfa table.
    Now duplicate list doesnot means that text tokens will be just exact to conclude them as duplicate ,it could also be like
    1111 Vendor ABC
    1222 ABC Vendor
    If anybody has clue ,how to work on such a problem ,plz come forward.
    Right now i just tried initially how to find exact duplicates,i found  on change command,it do works.
    Then i am trying a new way which should just do the same thing.
    I did as per this algorithm
    1.Compute wholesome list in one internal table itab1
    2.Used delete adjacent duplicates in itab2.
    3.I feel itab3=itab1-itab2 will contain all duplicates in itab3.
    Can anyone give me a hint.How can i do A-B ?.

    Hi Arul,
    There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
    Best regards, Sergei

  • LEFT OUTER with internal tables

    hi all,
    I have a query to execute,
    SELECT SKATSAKNR SKATTXT20
      SUM( GLT0~HSLVT ) AS HSLVT
      INTO CORRESPONDING FIELDS OF TABLE ITAB_ZSTMGLRACC
      FROM SKAT
      LEFT OUTER JOIN GLT0 ON GLT0RACCT = SKATSAKNR
      AND GLT0~RYEAR = I_GJAHR
      AND GLT0~BUKRS = 'comp1'
      WHERE SKAT~KTOPL = 'EICA'
    GROUP BY SKATSAKNR SKATTXT20.
    here i want to replace GLT0~BUKRS = 'comp1' with multiple values from Internal table ITAB_T001
    since i used SUM ......FOR ALL ENTRIES IN ITAB_T001 cant be used .
    any one have options??
    thx
    Jose

    hi all,
    I have a query to execute,
    SELECT SKATSAKNR SKATTXT20
      SUM( GLT0~HSLVT ) AS HSLVT
      INTO CORRESPONDING FIELDS OF TABLE ITAB_ZSTMGLRACC
      FROM SKAT
      LEFT OUTER JOIN GLT0 ON GLT0RACCT = SKATSAKNR
      AND GLT0~RYEAR = I_GJAHR
      AND GLT0~BUKRS = 'comp1'
      WHERE SKAT~KTOPL = 'EICA'
    GROUP BY SKATSAKNR SKATTXT20.
    here i want to replace GLT0~BUKRS = 'comp1' with multiple values from Internal table ITAB_T001
    since i used SUM ......FOR ALL ENTRIES IN ITAB_T001 cant be used .
    any one have options??
    thx
    Jose

  • Left ouer join with internal table

    Good morning to everybody
    I need created a internal table with 2 internal table but 1 is primary.
    I tried use "left outer join" but it allows  only with table and not with internal tabel
    I would to be this result
    a             a xxx
    b                         
    c             c zzz
    d             d sss
    e
    f              f ttt
    How can i do it?
    Thanks a lot for your support
    Beste regatrds

    Hi,
    The following code is for your reference:
    data: begin of wa1,
          key type c,
          end of wa1.
    data: begin of wa2,
          key type c,
          var(3) type c,
          end of wa2.
    data: begin of wa3,
          key1 type c,
          key2 type c,
          var(3) type c,
          end of wa3.
    data: itab1 like standard table of wa1,
          itab2 like standard table of wa2,
          itab3 like standard table of wa3.
    wa1-key = 'a'.
    append wa1 to itab1.
    wa1-key = 'b'.
    append wa1 to itab1.
    wa1-key = 'c'.
    append wa1 to itab1.
    wa1-key = 'd'.
    append wa1 to itab1.
    wa1-key = 'e'.
    append wa1 to itab1.
    wa1-key = 'f'.
    append wa1 to itab1.
    clear wa1.
    wa2-key = 'a'.
    wa2-var = 'zzz'.
    append wa2 to itab2.
    wa2-key = 'c'.
    wa2-var = 'yyy'.
    append wa2 to itab2.
    wa2-key = 'd'.
    wa2-var = 'ttt'.
    append wa2 to itab2.
    wa2-key = 'f'.
    wa2-var = 'sss'.
    append wa2 to itab2.
    clear wa2.
    loop at itab1 into wa1.
      read table itab2 into wa2
      with key key = wa1-key
      binary search.
      if sy-subrc = 0.
        wa3-key1 = wa1-key.
        wa3-key2 = wa2-key.
        wa3-var = wa2-var.
        append wa3 to itab3.
        clear wa3.
      else.
        append wa1 to itab3.
      endif.
    endloop.
    loop at itab3 into wa3.
      write:/ wa3-key1, wa3-key2,wa3-var.
    endloop.
    Hope it helps.
    Regards,
    Chris Gu

  • Issue with Internal Table

    Hi All,
    I have defined an internal table 'with occurs 0'.
    While debuggining, i am observing that only 50,000 lines are getting populated in that internal table.
    How to increase the capacity of the internal table, so that it can hold more number of lines?
    Regards
    Pavan

    I would like to explaing you all about this issue.
    I have defined an internal table as follows...
    data:  IT_CATSDB       TYPE BAPICATS2 OCCURS 0 WITH HEADER LINE.
    I have used a BAPI called "BAPI_CATIMESHEETRECORD_GETLIST" which will retirieve the Timesheet details of all employees within a given date range.
    Now, the number of entries that we got from this BAPI are stored in the internal table it_catsdb.
    I have observed that this internal table is holding max of 50k lines.
    If i check the database table (CATSDB) for the same conditions in SE11, i am able to get around 1L lines.
    Hence my report is showing incorrect output.
    Kindly help me out with some logic, so that this internal table can hold as much as data possible without any restriction.....
    Regards
    Pavan

  • Working with internal table issue

    Hi all
    i have internal table with the follwing data
    and i want to move the entries (FNAM ,FVAL ) that relate to one screen 0101
    into new table and the entries for the new screen 7101 to diffrent table
    program        dynpro   dynbegin  fnam            fval
    SAPMF02D     0101     X
         0000                    BDC_CURSOR       RF02D-D0110
         0000                    BDC_OKCODE       /00
         0000                    RF02D-KUNNR       1000
         0000                    RF02D-D0110       X
    SAPMF02D     7101     X
         0000                    BDC_OKCODE       /EF12
         0000                    BDC_CURSOR       RF02D-KUNNR
    I want in table 1 for screen 0101
    fnam            fval
    BDC_CURSOR       RF02D-D0110
    BDC_OKCODE       /00
    RF02D-KUNNR       1000
    RF02D-D0110       X
    and in table 2 screen 7101
    BDC_OKCODE       /EF12
    BDC_CURSOR       RF02D-KUNNR
    what is the best way to do that assume the tables content can
    be change i.e. have more screens.
    Best regards
    Alex

    HI Raymond
    Thanks for replay
    I try your code with little adjustment
       TYPES: BEGIN OF dynpros,
             program TYPE  bdcdata-program,
             dynpro TYPE bdcdata-dynpro,
             bdcdata TYPE hrtb_bdcdata , <-- change it to table for the append statment  APPEND <f1> TO <f2>-bdcdata.
           END OF dynpros.
    and what i get in e_data is :
    E_DATA
    SAPMF02D     0101     Standard Table[1x5(618)]
    SAPMF02D     7101     Standard Table[1x5(618)]
    this is not really what i need
    i want to get all the FNAM and FVAL from the table like this
    I want in table 1 for screen 0101
    fnam            fval
    BDC_CURSOR       RF02D-D0110
    BDC_OKCODE       /00
    RF02D-KUNNR       1000
    RF02D-D0110       X
    and in table 2 screen 7101
    BDC_OKCODE       /EF12
    BDC_CURSOR       RF02D-KUNNR
    Best Regards
    Alex

  • TSV_TNEW_PAGE_ALLOC_FAILED  with internal table declared with occurs 0

    HI guys,
    when the internal table is declared as occurs 0, the dump TSV_TNEW_PAGE_ALLOC_FAILED is encountered, when changing the declaration into standard table, th dump disappears. Why is this so?
    Thanks!

    There are three type of tables: Standard, sorted and hashed tables (see [here|http://help.sap.com/abapdocu_70/en/ABAPDATA_ITAB.htm]). When you define a table using the keyword OCCURS you're still defining a standard table.
    Your exception indicates that you're running out of memory. The difference in the declarations that you mention shouldn't cause that. Main difference between the two declaration versions is probably that your table defined via OCCURS has a header line, whereas your other table doesn't (unless you declared it explicitly as WITH HEADER LINE).
    I don't think though that with that little information anybody could explain the short dump. Actually it sounds rather odd that the change you mention should cause the dump (or make it go away). So I suspect you probably have to post further details. You might want to check the shortdump yourself and place a breakpoint at this place and run it for each version. Maybe you can see some difference...

  • Logic issue with Internal Table

    Hi All,
    I have an internal table with following structure.
    Name of Internal table: ITAB
    Fields:   userid      login date     number
    Values:  abc         01012008    
                 abc         02012008
                 abc         02012008
                 abc         03012008
    Now i should store the value for the field itab-number, based on the ita-logindate.
    If the field logindate is having same date for 2 times (for the user 'abc'),
    the field itab-number should have the value as '2' .
    Basically i want to display a report to show how many times a user has logged into SAP system for a given date.......
    How to incorporate this logic?
    Regards
    Pavan

    Hi,
    Use the below logic.
    data: begin of itab1 occurs 0,
           uid  like sy-uname,
           date like sy-datum,
          end of itab1.
    data: begin of itab2 occurs 0,
           uid  like sy-uname,
           date like sy-datum,
           count type i,
          end of itab2.
    data v_count type i.
    start-of-selection.
    itab1-uid = 'abc'.
    itab1-date = '20080101'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080102'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080102'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080103'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080104'.
    append itab1.
    sort itab1 by uid date.
    loop at itab1.
    v_count = v_count + 1.
    at end of date.
    itab2-uid = itab1-uid.
    itab2-date = itab1-date.
    itab2-count = v_count.
    append itab2.
    clear  v_count.
    endat.
    endloop.

  • Function Module Extractor with Internal Table

    Hi All,
    I have a need to extract records from a complex SQL Statements, so I will be using different SQL Statements and merging the results in to a single internal table. In the function modules what will happen if I do not use cursor WITH HOLD option, (I know it maintains the cursor position) and what if I directly load into E_T_DATA  from my internal table. How this will affect the datapackage size?
    In the future I will have records beyond 1 million and I am concerned to send all the 1 million record in one package rather than multiple packages during extraction.
    Please give a solution if you have come acroos this kind of situation with your development.
    Thanks,
    Alex.

    Alex,
    I do not see why the complexity of ABAP statements should make you change the data processing logic proposed by SAP by way of the sample Function module.  
    It appears to me that you are changing something knowing fully well its implications and then trying to find a solution for it.
    Good Luck!
    Mathew.

  • Problem with internal table declaration in function gui_upload

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

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

Maybe you are looking for