Can we split and fetch the records in Database Adapter

Hi,
I designed a Database Adapter to fetch the records from oracle Database. Some time, the Database Adapter need to fetch around 5000, or 10,000 records in single shot. In that case my BPEL process is choking and getting error as
java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
Could someone help me to resolve this?
In Database Adapter can we split and fetch the records, if number of records more then 1000.
ex. First 100 rec as one set and next 100 as 2nd set like this.
Thank you.

You can send the records as batches useing the debatching feature of db adapter. Refer documentation for implementation details.

Similar Messages

  • Where can I find and include the "record" radio buttons in Logic 9?

    Ok, I feel like a real dummy but for some reason when I installed the Logic 9 upgrade (upgraded from Logic 8) all the "record" radio buttons on the audio channel strips were missing. (They are there on the instrument channel strips.) Can anyone tell me how to get them back? I checked all the preferences I could find but somehow I'm not finding the one that will get me back my "record" radio buttons.
    Help!
    Mark

    They should be there on both. Only frozen SI tracks loose theirs (obviously), but my question earlier is irrelevant: even with no input selected there still ought to be a record button on the track header.
    OP: have you looked at the configuration of the track header? ctrl-click in it to find out.

  • Split and mark the records

    Hi all,
    I have the below scenario where i need to mark every 4 records with a number. The count of ids can vary for example i am taking 10 id's. Can any one suggest a sql statement to achieve this. Thanks for looking into it.
    id         mark_id
    1            1
    2            1
    3            1
    4            1
    5            2
    6            2
    7            2
    8            2
    9            3
    10           3

    Hi,
    Here's one way:
    SELECT       id
    ,       CEIL ( ROW_NUMBER () OVER (ORDER BY id)
                / 4
                )     AS mark_id
    FROM       table_x
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • Fetch the records from cache

    say i have emp table
    eno ename sales
    1 david 1100
    2 lara 200
    3 james 1000
    1 david 1200
    2 lara 5400
    4 white 890
    3 james 7500
    1 david 1313
    eno can be duplicate
    when i give empno is 1
    i want to display his sales i.e 1100,1200,1313
    first time i will go to database and fetch the records
    but next time onwards i dont go to database; i will fetch the records from cache;
    i thought doing it using hashmap or hasptable ;both those two don't allow duplicate values(empno has duplicate values);
    How to solve this problem.

    Hi,
    Ever considered splitting that table up. You are thinking about caching thats a
    very good idea. But doesnt it make it vary evident that the table staructure that you have
    keeps a lot of redundant data. Specially it hardly makes a sense to have sales
    figures in a emp table. Instead you can have Emp table containing eno and
    ename with eno as the primary key and have another table called sales with eno
    and sales columns and in this case the eno references the Emp table.
    If you still want to continue with this structure then I think you can go ahead with
    the solution already suggested to you
    Aviroop

  • I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    video
    What version of Premiere Elements do you have and on what computer operating system is it running?
    Please review the following workflow.
    ATR Premiere Elements Troubleshooting: PE11: Project Assets Organization for Scene and Highlight Grabs from Collection o…
    But please also determine if your project goal is supported by
    a. format of your source
    and
    b. computer resources
    More later based on details that you will post.
    ATR

  • Best way to Fetch the record

    Hi,
    Please suggest me the best way to fetch the record from the table designed below. It is Oracle 10gR2 on Linux
    Whenever a client visit the office a record will be created for him. The company policy is to maintain 10 years of data on the transaction table but the table holds record count of 3 Million records per year.
    The table has the following key Columns for the Select (sample Table)
    Client_Visit
    ID Number(12,0) --sequence generated number
    EFF_DTE DATE --effective date of the customer (sometimes the client becomes invalid and he will be valid again)
    Create_TS Timestamp(6)
    Client_ID Number(9,0)
    Cascade Flg vahrchar2(1)
    On most of the reports the records are fetched by Max(eff_dte) and Max(create_ts) and cascade flag ='Y'.
    I have following queries but the both of them are not cost effective and takes 8 minutes to display the records.
    Code 1:
    SELECT   au_subtyp1.au_id_k,
                                       au_subtyp1.pgm_struct_id_k
                                  FROM au_subtyp au_subtyp1
                                 WHERE au_subtyp1.create_ts =
                                          (SELECT MAX (au_subtyp2.create_ts)
                                             FROM au_subtyp au_subtyp2
                                            WHERE au_subtyp2.au_id_k =
                                                                au_subtyp1.au_id_k
                                              AND au_subtyp2.create_ts <
                                                     TO_DATE ('2013-01-01',
                                                              'YYYY-MM-DD'
                                              AND au_subtyp2.eff_dte =
                                                     (SELECT MAX
                                                                (au_subtyp3.eff_dte
                                                        FROM au_subtyp au_subtyp3
                                                       WHERE au_subtyp3.au_id_k =
                                                                au_subtyp2.au_id_k
                                                         AND au_subtyp3.create_ts <
                                                                TO_DATE
                                                                    ('2013-01-01',
                                                                     'YYYY-MM-DD'
                                                         AND au_subtyp3.eff_dte < =
                                                                TO_DATE
                                                                    ('2012-12-31',
                                                                     'YYYY-MM-DD'
                                   AND au_subtyp1.exists_flg = 'Y'
    Explain Plan
    Plan hash value: 2534321861
    | Id  | Operation                | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |           |     1 |    91 |       | 33265   (2)| 00:06:40 |
    |*  1 |  FILTER                  |           |       |       |       |            |          |
    |   2 |   HASH GROUP BY          |           |     1 |    91 |       | 33265   (2)| 00:06:40 |
    |*  3 |    HASH JOIN             |           |  1404K|   121M|    19M| 33178   (1)| 00:06:39 |
    |*  4 |     HASH JOIN            |           |   307K|    16M|  8712K| 23708   (1)| 00:04:45 |
    |   5 |      VIEW                | VW_SQ_1   |   307K|  5104K|       | 13493   (1)| 00:02:42 |
    |   6 |       HASH GROUP BY      |           |   307K|    13M|   191M| 13493   (1)| 00:02:42 |
    |*  7 |        INDEX FULL SCAN   | AUSU_PK   |  2809K|   125M|       | 13493   (1)| 00:02:42 |
    |*  8 |      INDEX FAST FULL SCAN| AUSU_PK   |  2809K|   104M|       |  2977   (2)| 00:00:36 |
    |*  9 |     TABLE ACCESS FULL    | AU_SUBTYP |  1404K|    46M|       |  5336   (2)| 00:01:05 |
    Predicate Information (identified by operation id):
       1 - filter("AU_SUBTYP1"."CREATE_TS"=MAX("AU_SUBTYP2"."CREATE_TS"))
       3 - access("AU_SUBTYP2"."AU_ID_K"="AU_SUBTYP1"."AU_ID_K")
       4 - access("AU_SUBTYP2"."EFF_DTE"="VW_COL_1" AND "AU_ID_K"="AU_SUBTYP2"."AU_ID_K")
       7 - access("AU_SUBTYP3"."EFF_DTE"<=TO_DATE(' 2012-12-31 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "AU_SUBTYP3"."CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00')
           filter("AU_SUBTYP3"."CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00' AND
                  "AU_SUBTYP3"."EFF_DTE"<=TO_DATE(' 2012-12-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
       8 - filter("AU_SUBTYP2"."CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00')
       9 - filter("AU_SUBTYP1"."EXISTS_FLG"='Y')Code 2:
    I already raised a thread a week back and Dom suggested the following query, it is cost effective but the performance is same and used the same amount of Temp tablespace
    select au_id_k,pgm_struct_id_k from (
    SELECT au_id_k
          ,      pgm_struct_id_k
          ,      ROW_NUMBER() OVER (PARTITION BY au_id_k ORDER BY eff_dte DESC, create_ts DESC) rn,
          create_ts, eff_dte,exists_flg
          FROM   au_subtyp
          WHERE  create_ts < TO_DATE('2013-01-01','YYYY-MM-DD')
          AND    eff_dte  <= TO_DATE('2012-12-31','YYYY-MM-DD') 
          ) d  where rn =1   and exists_flg = 'Y'
    --Explain Plan
    Plan hash value: 4039566059
    | Id  | Operation                | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |           |  2809K|   168M|       | 40034   (1)| 00:08:01 |
    |*  1 |  VIEW                    |           |  2809K|   168M|       | 40034   (1)| 00:08:01 |
    |*  2 |   WINDOW SORT PUSHED RANK|           |  2809K|   133M|   365M| 40034   (1)| 00:08:01 |
    |*  3 |    TABLE ACCESS FULL     | AU_SUBTYP |  2809K|   133M|       |  5345   (2)| 00:01:05 |
    Predicate Information (identified by operation id):
       1 - filter("RN"=1 AND "EXISTS_FLG"='Y')
       2 - filter(ROW_NUMBER() OVER ( PARTITION BY "AU_ID_K" ORDER BY
                  INTERNAL_FUNCTION("EFF_DTE") DESC ,INTERNAL_FUNCTION("CREATE_TS") DESC )<=1)
       3 - filter("CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00' AND "EFF_DTE"<=TO_DATE('
                  2012-12-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))Thanks,
    Vijay

    Hi Justin,
    Thanks for your reply. I am running this on our Test environment as I don't want to run this on Production environment now. The test environment holds 2809605 records (2 Million).
    The query output count is 281699 (2 Hundred Thousand) records and the selectivity is 0.099. The Distinct values of create_ts, eff_dte, and exists_flg is 2808905 records. I am sure the index scan is not going to help out much as you said.
    The core problem is both queries are using lot of Temp tablespace. When we use this query to join the tables, the other table has the same design as below so the temp tablespace grows bigger.
    Both the production and test environment are 3 Node RAC.
    First Query...
    CPU used by this session     4740
    CPU used when call started     4740
    Cached Commit SCN referenced     21393
    DB time     4745
    OS Involuntary context switches     467
    OS Page reclaims     64253
    OS System time used     26
    OS User time used     4562
    OS Voluntary context switches     16
    SQL*Net roundtrips to/from client     9
    bytes received via SQL*Net from client     2487
    bytes sent via SQL*Net to client     15830
    calls to get snapshot scn: kcmgss     37
    consistent gets     52162
    consistent gets - examination     2
    consistent gets from cache     52162
    enqueue releases     19
    enqueue requests     19
    enqueue waits     1
    execute count     2
    ges messages sent     1
    global enqueue gets sync     19
    global enqueue releases     19
    index fast full scans (full)     1
    index scans kdiixs1     1
    no work - consistent read gets     52125
    opened cursors cumulative     2
    parse count (hard)     1
    parse count (total)     2
    parse time cpu     1
    parse time elapsed     1
    physical write IO requests     69
    physical write bytes     17522688
    physical write total IO requests     69
    physical write total bytes     17522688
    physical write total multi block requests     69
    physical writes     2139
    physical writes direct     2139
    physical writes direct temporary tablespace     2139
    physical writes non checkpoint     2139
    recursive calls     19
    recursive cpu usage     1
    session cursor cache hits     1
    session logical reads     52162
    sorts (memory)     2
    sorts (rows)     760
    table scan blocks gotten     23856
    table scan rows gotten     2809607
    table scans (short tables)     1
    user I/O wait time     1
    user calls     11
    workarea executions - onepass     1
    workarea executions - optimal     9
    Second Query
    CPU used by this session     1197
    CPU used when call started     1197
    Cached Commit SCN referenced     21393
    DB time     1201
    OS Involuntary context switches     8684
    OS Page reclaims     21769
    OS System time used     14
    OS User time used     1183
    OS Voluntary context switches     50
    SQL*Net roundtrips to/from client     9
    bytes received via SQL*Net from client     767
    bytes sent via SQL*Net to client     15745
    calls to get snapshot scn: kcmgss     17
    consistent gets     23871
    consistent gets from cache     23871
    db block gets     16
    db block gets from cache     16
    enqueue releases     25
    enqueue requests     25
    enqueue waits     1
    execute count     2
    free buffer requested     1
    ges messages sent     1
    global enqueue get time     1
    global enqueue gets sync     25
    global enqueue releases     25
    no work - consistent read gets     23856
    opened cursors cumulative     2
    parse count (hard)     1
    parse count (total)     2
    parse time elapsed     1
    physical read IO requests     27
    physical read bytes     6635520
    physical read total IO requests     27
    physical read total bytes     6635520
    physical read total multi block requests     27
    physical reads     810
    physical reads direct     810
    physical reads direct temporary tablespace     810
    physical write IO requests     117
    physical write bytes     24584192
    physical write total IO requests     117
    physical write total bytes     24584192
    physical write total multi block requests     117
    physical writes     3001
    physical writes direct     3001
    physical writes direct temporary tablespace     3001
    physical writes non checkpoint     3001
    recursive calls     25
    session cursor cache hits     1
    session logical reads     23887
    sorts (disk)     1
    sorts (memory)     2
    sorts (rows)     2810365
    table scan blocks gotten     23856
    table scan rows gotten     2809607
    table scans (short tables)     1
    user I/O wait time     2
    user calls     11
    workarea executions - onepass     1
    workarea executions - optimal     5Thanks,
    Vijay
    Edited by: Vijayaraghavan Krishnan on Nov 28, 2012 11:17 AM
    Edited by: Vijayaraghavan Krishnan on Nov 28, 2012 11:19 AM

  • I called 888 442 4551 and when the recording told me to press any number its not working,

    I called 888 442 4551 and when the recording ask me to press any number on dial pad its not working, means I can not make any choices,,,

    No, Apple does not support downgrading iOS. Never has.
    Start with a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.
    If that doesn't work, you may need do a full restore.

  • Query not fetched the record

    Hello,
    Could someone help me please ?
    I have a listing of my sales orders and I want to make changes in my order by opening the form and fetched with that record. When I click on that particular orderno in my listing of order and call the form to display the details, it calls the form but says "Query could not fetch the record". I do not know why ? Please help me with the solution.
    Thanx

    Hello,
    I think you are passing orderno to called form as a parameter. If you are using parameter list check..
    1. If parameter data is getting in form correctly ?
    2. Next, have you changed where clause of other block,so that is will display record with passed orderno ?
    I am expecting more details from you.
    Thanx
    Adi

  • Fetch the records based on number

    Hi experts,
        I have a req like if user give input as 5..it should fetch 5 records from database.
    for example database values are
    SERNR                MATNR
    101                                              A
    102                                              A
    103                                              A
    104                                              A
    105                                              A
    106                                              A
    107                                              A
    If user gives the input as 5 it should fetch 5 records like 101 to 105....Can any body plz help me how to write select query for this..
    Thanks in advance,
    Veena.
    Edited by: s veena on Jan 18, 2011 5:52 AM

    Hi Veena,
    You can use UPTO in your select query. For example
    SELECT MATNR FROM MARA INTO TABLE IT_MATNR UPTO P_NUMBER ROWS.
    "Here P_NUMBER is the Selection Screen Parameter
    It will fetch records based on the number in the parameter.
    Thanks & Regards,
    Faheem.

  • Call the database table on commit operation and fetch the rows

    Hi
    I am new to Bpel. I have a task to call the database table on commit operation and fetch the rows and call a webservice iteratively for fetching the data into a file?
    Can anybody help me on this
    Thanks and regards
    Richa

    HI,
    update ZYBKP set MATNR = <b>zcore_2-ZDUMMY</b> where matnr = <b>zcore_2-ZDUMMY</b>.
    update ZY310 set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
    update ZYBCS_LOT set MATNR = zcore_2-ZDUMMY where matnr = zcore_2-ZDUMMY.
    <b>YOU ARE COMPARING SAME MATERIAL AND UPDATING WITH THE SAME..</b> AND ALSO ZCORE_2 IS A DATABASE TABLE AND MAY NOT CONTAIN ANY VALUE AT THAT POINT...
    in these statments you say that
    update table set matnr = 'MATNR' WHERE MATNR = 'MATNR'.
    EVEN THOUGH THIS STATMENT IS EXECUTED THERE WILL NOT BE ANY CHANGE IN THE TABLE...
    Thanks,
    Mahesh

  • Comparing two internal tables and deleting the record not present in second

    Hi All,
    I have a internal table itaba with PERNR as primary key and various other columns (1000 records) and table B with PERNR as primary key and 800 records.
    Now what is the best way to compare these two and delete the record from table A when its corresponding record is not present in table B?
    Thanks and Regards,
    Mohan

    HI SIR
    u trained us in accenture
    Hi all
    when ever m running this session in SM35 , M getting error as :
    "LEAVE TO TRANSACTION" MARA-BISMT is not allow
    in batch input
    REPORT YASEC_BDC_NIK_SESSION
    no standard page heading
    message-id zmm
    line-count 65
    line-size 150.
    tables : mara.
    *Top includr program
    INCLUDE YNEW_MAIN_TOP.
    *include yasec_bdc_nik_session_top.
    ***********selection screen *******************
    selection-screen begin of block b1 with frame title text-001.
    selection-screen skip.
    PARAMETERS: p_ifile(128) TYPE c .
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: rad1 TYPE c RADIOBUTTON GROUP 1 USER-COMMAND gr1,
    rad2 TYPE c RADIOBUTTON GROUP 1 .
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_sess TYPE c.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK b1.
    Subroutine call***************************
    INCLUDE YNEW_MAIN_F01.
    *include yasec_bdc_nik_session_f01.
    *********At selection event triggered *************
    at selection-screen on value-request for p_ifile.
    To get F4 help for the input file path
    PERFORM f_f4_input_file.
    AT SELECTION-SCREEN ON p_ifile.
    To validate and upload the input file
    PERFORM f_load_file.
    AT SELECTION-SCREEN ON p_sess.
    To validate the Number of Sessions field
    IF rad2 IS NOT INITIAL AND sy-ucomm EQ c_onli.
    PERFORM f_check_sessions.
    ENDIF.
    ***********Start of selection *******************
    start-of-selection.
    *To process BDC
    PERFORM f_process_bdc.
    TOP OF PAGE
    TOP-OF-PAGE.
    Writes the report heading and for displaying line number.
    PERFORM f_report_header.
    TYPES : BEGIN OF t_final,
    matnr(50) TYPE c,
    bismt(18) type c,
    end of t_final.
    TYPES: BEGIN OF t_fdata,
    data(256) TYPE c,
    END OF t_fdata.
    TYPES: BEGIN OF t_error,
    message(100) TYPE c,
    END OF t_error.
    *Internal table declarations
    *Internal table to load the data from the file that is changed throgh BDC
    DATA : i_final TYPE STANDARD TABLE OF t_final,
    wa_final TYPE t_final.
    *Internal table to store the error messages
    DATA : i_error TYPE STANDARD TABLE OF t_error,
    wa_error TYPE t_error.
    *Internal table to load the raw data
    DATA : i_fdata TYPE STANDARD TABLE OF t_fdata,
    wa_fdata TYPE t_fdata.
    *Internal table to store records of BDC
    DATA : i_bdcdata TYPE STANDARD TABLE OF bdcdata INITIAL SIZE 0,
    wa_bdcdata TYPE bdcdata.
    Internal table to store BDC messages
    DATA: i_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,
    wa_bdcmsgcoll TYPE bdcmsgcoll.
    VARIABLE DECLARATIONS
    DATA: v_ifile TYPE string,
    v_input TYPE i,
    c_delimiter TYPE c VALUE 'X',
    v_mode TYPE c VALUE 'A',
    v_sessions TYPE i.
    CONSTANTS
    CONSTANTS : c_flagx TYPE c VALUE 'X',
    c_slash TYPE c VALUE '/',
    c_onli(4) TYPE c VALUE 'ONLI',
    c_vl02(4) TYPE c VALUE 'VL02',
    c_s TYPE c VALUE 'A'.
    FORM f_f4_input_file .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_ifile.
    ENDFORM. " f_f4_input_file
    *& Form f_load_file
    FORM f_load_file .
    v_ifile = p_ifile.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_ifile
    filetype = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = i_fdata
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    IF sy-subrc <> 0.
    *Text-103-Input file does not exist.
    MESSAGE e000 WITH text-103 .
    ELSEIF NOT i_fdata IS INITIAL.
    DELETE i_fdata WHERE data = space.
    DESCRIBE TABLE i_fdata LINES v_input.
    ENDIF.
    IF v_input EQ 0.
    Text-104 - Input file is empty.
    MESSAGE e000 WITH text-104 .
    ENDIF.
    ENDFORM. " f_load_file
    *& Form f_check_sessions
    FORM f_check_sessions .
    IF p_sess IS INITIAL.
    MESSAGE e000 WITH text-106.
    ELSE.
    v_sessions = v_input DIV p_sess.
    ENDIF.
    ENDFORM. " f_check_sessions
    *& Form f_process_bdc
    text
    FORM f_process_bdc.
    LOOP AT i_fdata INTO wa_fdata.
    SPLIT wa_fdata AT cl_abap_char_utilities=>horizontal_tab
    INTO wa_final-matnr
    wa_final-bismt.
    APPEND wa_final TO i_final.
    CLEAR wa_fdata.
    ENDLOOP.
    IF rad1 = c_flagx.
    PERFORM f_passbdc_vl02.
    ELSEIF rad2 = c_flagx.
    PERFORM f_sessions_vl02.
    ENDIF.
    ENDFORM. "f_process_bdc
    To populate the Screen information
    p_program Program Name
    p_dynpro Screen Number
    FORM bdc_dynpro USING p_program TYPE any
    p_dynpro TYPE any.
    CLEAR wa_bdcdata.
    Populate the BDC structure with the Screen Information.
    Move the Program name PROGRAM
    wa_bdcdata-program = p_program.
    Move the Screen Number DYNPRO
    wa_bdcdata-dynpro = p_dynpro.
    Indicate the beginning of a new screen
    wa_bdcdata-dynbegin = c_flagx.
    APPEND wa_bdcdata TO i_bdcdata.
    ENDFORM. "f_bdc_dynpro
    *& Form f_passbdc_vl02
    text
    FORM f_passbdc_vl02.
    DATA: l_lines_im TYPE i.
    SORT i_final BY matnr ASCENDING.
    CLEAR wa_final.
    LOOP AT i_final INTO wa_final.
    CLEAR: i_bdcmsgcoll[],
    wa_bdcmsgcoll,
    wa_bdcdata.
    CLEAR: i_bdcdata[].
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RMMG1-MATNR'
    wa_final-matnr.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-BISMT'.
    perform bdc_field using 'MARA-BISMT'
    wa_final-bismt.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'MM02'.
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'MM03'.
    CALL TRANSACTION 'MM02' USING i_bdcdata
    MODE v_mode
    UPDATE c_s
    MESSAGES INTO i_bdcmsgcoll.
    If error occurred in call transaction 'VA02' then stores all
    information of failed records into internal table i_error_im.
    IF sy-subrc NE 0.
    DESCRIBE TABLE i_bdcmsgcoll LINES l_lines_im.
    CLEAR wa_bdcmsgcoll.
    READ TABLE i_bdcmsgcoll INTO wa_bdcmsgcoll INDEX l_lines_im.
    To capture success and error messages in BDC.
    CALL FUNCTION 'FORMAT_MESSAGE' "#EC *
    EXPORTING
    id = wa_bdcmsgcoll-msgid
    lang = wa_bdcmsgcoll-msgspra
    no = wa_bdcmsgcoll-msgnr
    v1 = wa_bdcmsgcoll-msgv1
    v2 = wa_bdcmsgcoll-msgv2
    v3 = wa_bdcmsgcoll-msgv3
    v4 = wa_bdcmsgcoll-msgv4
    IMPORTING
    msg = wa_error-message
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    ENDIF.
    ELSE.
    WRITE: text-111 COLOR 7.
    ENDIF.
    CLEAR: wa_final.
    REFRESH i_bdcdata.
    ENDLOOP.
    ENDFORM. "f_passbdc_va02
    *& Form bdc_field
    text
    -->P_FNAM text
    -->P_FVAL text
    FORM bdc_field USING p_fnam TYPE any
    p_fval TYPE any.
    CLEAR wa_bdcdata.
    Populate the Field Name
    wa_bdcdata-fnam = p_fnam.
    Populate the field value
    wa_bdcdata-fval = p_fval.
    APPEND wa_bdcdata TO i_bdcdata.
    ENDFORM. "f_bdc_field
    *& Form f_sessions_vl02
    text
    FORM f_sessions_vl02 .
    DATA: l_sindex TYPE sy-tabix VALUE 1,
    l_eindex TYPE sy-tabix,
    l_flag TYPE c VALUE space.
    l_eindex = v_input.
    SORT i_final BY matnr ASCENDING.
    DO p_sess TIMES.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    client = sy-mandt
    group = 'Y_VL02_NIK'
    user = sy-uname
    keep = c_flagx
    EXCEPTIONS
    client_invalid = 1
    destination_invalid = 2
    group_invalid = 3
    group_is_locked = 4
    holddate_invalid = 5
    internal_error = 6
    queue_error = 7
    running = 8
    system_lock_error = 9
    user_invalid = 10
    OTHERS = 11.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CLEAR wa_final.
    CLEAR: i_bdcdata[].
    LOOP AT i_final INTO wa_final FROM l_sindex TO l_eindex .
    IF l_flag = v_sessions.
    CLEAR l_flag.
    EXIT.
    ENDIF.
    l_flag = l_flag + 1.
    CLEAR: i_bdcdata[].
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RMMG1-MATNR'
    wa_final-matnr.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_CURSOR'
    'MARA-BISMT'.
    perform bdc_field using 'MARA-BISMT'
    wa_final-bismt.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'MM02'.
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPLMGMM' '4004'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    perform bdc_transaction using 'MM03'.
    l_sindex = l_sindex + 1.
    ENDLOOP.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    not_open = 1
    queue_error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDDO.
    ENDFORM. " f_sessions_vl02
    *& Form f_report_header
    FORM f_report_header .
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    ULINE.
    text-201 - Company: Carrier
    text-102- Batch Data Communication.
    text-202 - System: SAP
    WRITE: /1 sy-vline,
    3 text-201,
    50 text-102,
    100 text-202,
    AT sy-linsz sy-vline.
    text-203 - Program:
    text-204 - Date/Time:
    WRITE: /1 sy-vline,
    3 text-203, sy-repid ,
    100 text-204,sy-datum ,c_slash, sy-uzeit,
    AT sy-linsz sy-vline.
    text-205 - User ID:
    text-206 - Page:
    WRITE: /1 sy-vline,
    3 text-205, sy-uname,
    100 text-206, sy-pagno,
    AT sy-linsz sy-vline.
    FORMAT COLOR OFF.
    ULINE.
    ENDFORM. " f_report_header
    FORM bdc_transaction USING tcode.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    tcode = tcode
    TABLES
    dynprotab = i_bdcdata
    EXCEPTIONS
    internal_error = 1
    not_open = 2
    queue_error = 3
    tcode_invalid = 4
    printing_invalid = 5
    posting_invalid = 6
    OTHERS = 7.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    WRITE: / text-109 ,wa_final-matnr,
    text-110 .
    ENDIF.
    ENDFORM. "bdc_transaction

  • Can do  MIGO and confirm the material into stock without UD.

    Dear Experts
    I can do MIGO and confirm the material into stock while I did not do UD yet. I did only  RR. Whatu2019s wrong? can anybody give me the logic about this.
    Thanks in Advance

    Dear,
    I think you are taking about the inspection lot 03.
    Process is that if 03 type inspection lot is generated then after result recording or UD complition are done or not. You can able to do the confirmation. It is depend on you and your company policies.
    Process Order --> lot generated --> result recording done --> order confirm --> UD of lot.
    03 type lot is used only for inspection. Not relevant to stock.
    -Sandip

  • I have multiple iPhoto libraries w/ duplicates in several. How can I consolidate and find the dupes? Some photos are versions of the original.

    I have multiple iPhoto libraries w/ duplicates in several. How can I consolidate and find the dupes? Some photos are versions of the original. On my iMac, I also have many folders containing some of the same photos. My computer is used for both personal and business purposes. My libraries should be separated, one for each.

    To merge libraries use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  or Aperature
    To find duplicates within an iPhoto library use iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - 
    Photos that are not in an iPhoto library can be imported telling iPhoto not to import duplicates (an imperfect procews) and then IPLM can find the duplicates
    As to keeping seperate libraries - only you can do that - IPLM can move photos between libraries for you but only you can know which photos should be in which library
    LN

  • What if my ipod touch 4th generation can't update and now the only option is to restore it. And i don't know what happens if i press restore?

    What if my ipod touch 4th generation can't update and now the only option is to restore it.
    And i don't know what happens if i press restore?
    Will it show my back up and back it up or what?
    And if that does happen will all my pictures stil be there?
    Also i'm not on a apple computer.

    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:           
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    Either a PC or Mac work the same.
    The photos in our iPod's Camera Roll album will be restored as will the last 30 days of photos in our PhotoStream album

  • Can we load and unload the files in the run time?

    Can we load and unload the files in the run time?
    For example there are four files named "test1.h & test1.c" and another set "test2.h & test2.c" (I attached them as attachment to this post).
    test1.h contains code:
    int variable; //variable declared as integer
    test1.c contains code:
    variable = 1; //variable assigned a value
    test1.h contains code:
    char *variable; //variable declared as string
    test1.c contains code:
    variable = "EXAMPLE"; //variable assigned a string
    So here, in this case can I dynamically load / unload the first & second group of files so that the same variable name "variable" can be used both as integer and string? And if yes, how is that to be done?
    Solved!
    Go to Solution.
    Attachments:
    test.zip ‏1 KB

    What do you mean by "dynamically"?
    If you want to have a variable that either is an int or a char in the same program run, I'm afraid your only option is to define it as a variant and assign from time to time the proper data type in the variant according to some condition. Next, every time you access the variable you must firstly check which data type is stored in it, next access it in the proper way.
    If on the other hand your option or to have a run in which the variable is an int, next you stop the program and in a following run it is a char, you may have it by using some appropriade preprocessor clause:
    #ifdef  CHAR_TYPE
    #include "test1.h";        // variable defined as a char
    #else
    #include "test2.h";        // variable defined as int
    #endif
    Next, every time you want to access the variable you must proceed in the same vay:
    #ifdef  CHAR_TYPE
      variable = "string";
    #else
      variable = 1;
    #endif
    Does it worth the effort?
    Additionally, keep in mind that this "dynamical" approach can work only in the IDE, where you can properly #define your CHAR_TYPE or not depending on your wishes: when you compile the program, it will have only one #include depending on the definition of the macro.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

Maybe you are looking for