How to update database table from Internal Table

hi experts,
    Can anyone please assist me in inserting records to a database table from an Internal Table
whose structures are identical.
Thanks in Advance,
Sudhaa............

Hi Sudha,
Here are some example of update and insert:
UPDATE SFLIGHT SET PLANETYPE = 'A310'
PRICE = PRICE - '100.00'
WHERE CARRID = 'LH' AND CONNID = '0402'.
This example overwrites the contents of the PLANETYPE column with A310 and decreases the value of the PRICE column by 100 for each entry in SFLIGHT where CARRID contains u2018LHu2019 and CONNID contains u2018402u2019.
TABLES SPFLI.
DATA WA TYPE SPFLI.
MOVE 'AA' TO WA-CARRID.
MOVE '0064' TO WA-CONNID.
MOVE 'WASHINGTON' TO WA-CITYFROM.
UPDATE SPFLI FROM WA.
MOVE 'LH' TO SPFLI-CARRID.
MOVE '0017' TO SPFLI-CONNID.
MOVE 'BERLIN' TO SPFLI-CITYFROM.
UPDATE SPFLI.
CARRID and CONNID are the primary key fields of table SPFLI. All fields of those lines where the primary key fields are "AA" and "0064", or "LH" and "0017", are replaced by the values in the corresponding fields of the work area WA or the table work area SPFLI.
DATA: ITAB TYPE HASHED TABLE OF SPFLI
WITH UNIQUE KEY CARRID CONNID,
WA LIKE LINE OF ITAB.
WA-CARRID = 'UA'. WA-CONNID = '0011'. WA-CITYFROM = ...
INSERT WA INTO TABLE ITAB.
WA-CARRID = 'LH'. WA-CONNID = '1245'. WA-CITYFROM = ...
INSERT WA INTO TABLE ITAB.
WA-CARRID = 'AA'. WA-CONNID = '4574'. WA-CITYFROM = ...
INSERT WA INTO TABLE ITAB.
UPDATE SPFLI FROM TABLE ITAB.
This example fills a hashed table ITAB and then overwrites the lines in SPFLI that have the same primary key (CARRID and CONNID) as a line in the internal table.
Insert statement :
TABLES SPFLI.
DATA WA TYPE SPFLI.
WA-CARRID = 'LH'.
WA-CITYFROM = 'WASHINGTON'.
INSERT INTO SPFLI VALUES WA.
WA-CARRID = 'UA'.
WA-CITYFROM = 'LONDON'.
INSERT SPFLI FROM WA.
SPFLI-CARRID = 'LH'.
SPFLI-CITYFROM = 'BERLIN'.
INSERT SPFLI.
If the database table does not already contain a line with the same primary key as specified in the work area, the operation is completed successfully and SY-SUBRC is set to 0. Otherwise, the line is not inserted, and SY-SUBRC is set to 4.
Regards,
Premraj kaushik

Similar Messages

  • Updating database table from internal table

    I am updating the database table from internal table for this is have used the following syntax
    Update kna1 from table itab.
    And it is giving error message as the work are itab is not long enough.
    Please help me.

    Hi,
       Refer this code
    *&      Form  SUB_READ_UPDATE_BSEG
          text
    FORM sub_read_update_bseg.
      IF NOT it_final[] IS INITIAL.
        LOOP AT it_final INTO wa_final.
          UPDATE bseg SET zuonr = wa_final-ccnum
                      WHERE bukrs EQ wa_final-bukrs
                      AND   belnr EQ wa_final-vbeln
                      AND   rfzei EQ wa_final-rfzei
                      AND   saknr NE ' '.
        ENDLOOP.
    *--Message data updated successfully
        MESSAGE i888 WITH text-002.
        LEAVE LIST-PROCESSING.
      ELSE.
    *--Message No data found
        MESSAGE i888 WITH text-003.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " SUB_READ_UPDATE_BSEG
    Regards,
    PRashant

  • Modify database table from internal table

    Hi All,
    I need to update database table from internal table which is having around 30000 records.
    I am using MODIFY tabname FROM TABLE int_tabname...
    Using this statement, I can modify the databse records very well. But user has some additional requirement.
    He wants that the table should be modified from the internal table and after modification we should have the erroneous records to be displayed if any.
    e.g. if 1500 records out of 30000 are erroneous then only 28500 records should be updated and 1500 records should be displayed as erroneous records so that the user can correct them and use them again for executing the program.
    Is there any FM which imports the database table name and internal table, modifies the database and exports an internal tanle with erroneous records?
    Any help will be appriciated,
    Regards,
    Neha

    Hi
    modifying datbase table useing internal table
    <b>advises</b> before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    and finally unlock the table
    <b>example</b>
    *To lock table for further operations
      constants: lc_tabname TYPE  rstable-tabname  VALUE 'FKKVKP'  . "FKKVKP
      CALL FUNCTION 'ENQUEUE_E_TABLE'
        EXPORTING
          tabname        = lc_tabname
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc EQ 0.
      To fetch all the contract accounts for customers of the segment
      Households/SME.
        PERFORM fetch_contract_accounts using lc_tabname .
      ENDIF.                    " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    *unlock the tbale
      CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
         TABNAME   =  uc_tabname .
    <b>Reward if usefull</b>

  • Can not insert or update [TABLE] from internal table in method

    I've faced a problem with OO abap. I've tried to insert into [ TABLE ] from internal table, but i've got error msg after i compiled.
    "An explicit work area is necessary in the OO context. Use "INSERT wa INTO [TABLE] itab""
    After  i changed to loop in work area and INSERT INTO  [TABLE] VALUES gw_data., everything is fine, can compile and run.
    This is error code.
      METHOD set_data_to_table.
        REFRESH gi_data.
        CLEAR gi_data.
        IF gi_file[] IS NOT INITIAL.
    * Set data for modify table
          LOOP AT gi_file INTO gw_file.
            MOVE-CORRESPONDING gw_file TO gw_data.
            me->conversion_input( EXPORTING im_vendor = gw_data-vendor
                                  CHANGING  ch_vendor = gw_data-vendor ).
            APPEND gw_data TO gi_data.
          ENDLOOP.
          INSERT [TABLE] FROM TABLE gi_data.
    *      LOOP AT gi_data INTO gw_data.
    *        INSERT INTO  [TABLE] VALUES gw_data.
    *        IF sy-subrc = 0.
    *          COMMIT WORK.
    *        ELSE.
    *          ROLLBACK WORK.
    *        ENDIF.
    *      ENDLOOP.
        ELSE.
          MESSAGE 'No data found' TYPE 'I'.
        ENDIF.
      ENDMETHOD.                    "set_data_to_table

    Hi Matthew,
    I think there is no difference in database insert between OO and non-OO.
    The correct syntax according to ECC600 online documentation is
    [Inserting Several Lines|http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm]
    To insert several lines into a database table, use the following:
    INSERT target FROM TABLE itab \[ACCEPTING DUPLICATE KEYS].
    This writes all lines of the internal table itabto the database table in one single operation. If one or more lines cannot be inserted because the database already contains a line with the same primary key, a runtime error occurs. You can prevent the runtime error occurring by using the addition ACCEPTING DUPLICATE KEYS.
    Whenever you want to insert more than one line into a database table, it is more efficient to work with an internal table than to insert the lines one by one.
    I think the syntax
    INSERT my_dbtable FROM TABLE gi_data.
    should work, your suggestion may lead to syntax error.
    Regards,
    Clemens

  • Fill database table from internal table

    I made one table ZDISP_CHDOC_CC and want to fill that table from internal table.and i got runtime error. that duplicate entry
    and two entry are like 10 200000    likhp 10
                                        10 200000    likp   10
    DESCRIBE TABLE IT_CHDOC .
        LOOP AT IT_CHDOC.
        INSERT ZDISP_CHDOC_CC FROM  IT_CHDOC.
        endloop.
        IF SY-SUBRC = 0.
          COMMIT WORK.
        ELSE.
    and when i used following then only one entry is insreted.
    DESCRIBE TABLE IT_CHDOC .
        LOOP AT IT_CHDOC.
        INSERT ZDISP_CHDOC_CC FROM  IT_CHDOC.
        IF SY-SUBRC = 0.
          COMMIT WORK.
    endloop.
        ELSE.

    Hi,
    Replace your current code
    DESCRIBE TABLE IT_CHDOC .
    LOOP AT IT_CHDOC.
    INSERT ZDISP_CHDOC_CC FROM IT_CHDOC.
    endloop.
    IF SY-SUBRC = 0.
    COMMIT WORK.
    ELSE.
    WITH THE ONE GIVEN BELOW
    DESCRIBE TABLE IT_CHDOC .
    INSERT ZDISP_CHDOC_CC FROM TABLE IT_CHDOC ACCEPTING DUPLICATE KEYS.
    IF SY-SUBRC = 0.
    COMMIT WORK.
    ELSE.
    Regards,
    Siddarth

  • How to download leading zeros from internal table to XL file

    Hi,
    i am dowanloading data from interna table to XL file using GUI_DOWNLOAD FM. i want download the leading zeros  also into xl file
    EX: 012345
    at present only "12345" is down loading into XL file. But i want "012345" into XL file.
    Please help me.

    Hi,
    Can you try with DBF format(Pass FILETYPE = 'DBF'? I remember that in this format data will be downloaded in database storage format. Just check and update if it works!!!
    This is what FM documentation says.
    'DBF' :
    The data is downloaded in dBase format. With this format, the data types are stored as well, For this reason, import problems can be avoided - for example, problems with Microsoft Excel. In particular, you can avoid problems with the interpretation of numeric values.
    Thanks,
    Vinod.

  • Problem while creating MS-ACCESS tables from Internal tables

    Hi All,
    I need to create Access tables from the Internal tables of an ABAP program.
    I am using RIACCESS program to create Access table and  FM TABLE_EXPORT_TO_MSACCESS for populating the records into Access table.
    Internal table name is ITAB1. I have created Z table with the same number of fields of ITAB1.
    Key fields of Ztable is MANDT and Project ID.
    I have two problems.
    1. When I am trying to create access table from RIACCESS, the Access table is not having the MANDT and Project ID as key fields. Is there any way to pass the Internal table with key fields to the selection parameter of RIACCESS?
    2. How to avoid the MANDT field from the Access table.
    Please help me.
    Thanks,
    Prabhakar

    select * from tablo@aaa;
    ERROR at line 1:
    ORA-02085: database link AAA.US.ORACLE.COM connects to HO.WORLD
    Why is it unsuccessful?
    02085, 00000, "database link %s connects to %s"
    // *Cause: a database link connected to a database with a different name.
    //  The connection is rejected.
    // *Action: create a database link with the same name as the database it
    //  connects to, or set global_names=false.
    //Maybe a configuration mismatch somewhere? What's your global_names setting?
    you should look in the trace files, enable listenner logging and tracing to get more clues about EOF error.
    Yoann.

  • Fill dinamic internal table from internal table

    Hi gurus i need to know how can i fill a dinamic interna table from another internal table
    example i have  the table called it_info with the followin information
    field1    field2         field3
    Alex     Ross           1
    Rita      Campos       1
    because i have the same value in field 3 i have to agroup register 1 and 2  in the same line so the data should be in the next way
    Field1 field2  field3  field4 field5
    Alex    Ross   1        Rita    Campos
    I have made a dinamic interna table so my table has the 5 fields but i dont know how to trasfer the data to my dinamic internal table, any idea? my source code:
          it_campos-campo = 'Field1'. APPEND it_campos.
          it_campos-campo = 'Field2'. APPEND it_campos.
          it_campos-campo = 'Field3'. APPEND it_campos.
          it_campos-campo = 'Field4'. APPEND it_campos
        loop at  it_campos .
          t_fieldcat_wa-col_pos = SY-TABIX.
          t_fieldcat_wa-fieldname = it_campos-campo.
          APPEND t_fieldcat_wa TO t_fieldcat.
        endloop  .
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
            it_fieldcatalog            = t_fieldcat
        IMPORTING
            ep_table                   = tabla
        EXCEPTIONS
            GENERATE_SUBPOOL_DIR_FULL  = 1
        others                         = 2.
        ASSIGN tabla->* TO <l_table>.
        CREATE DATA ep_line LIKE LINE OF <l_table>.
        ASSIGN ep_line->* TO <l_line>.
    Now my dinamic internal table <l_table> is ready but how should i trasnfer the it_info data to this other table?

    This method (cl_alv_table_create=>create_dynamic_table) is really old-fashioned and counter-performant and limited as it uses GENERATE SUBROUTINE POOL statement.
    Instead you should now use RTTC to create data, search forum for more information (sometimes referred as RTTS or RTTI, though this last one doesn't correspond to creation; you'll have to use CREATE DATA statement).
    That said, your question has been asked many times in the forum: http://www.sdn.sap.com/irj/scn/advancedsearch?query=filldynamicinternal+table.
    To help you a little bit, you need to use ASSIGN and FIELD-SYMBOLS statements (ASSIGN COMPONENT field_name OF STRUCTURE <fs_line> TO <fs_field>)

  • How to get multiple records from internal table through BDC

    PERFORM DYNPRO USING:
      'X'  'SAPMM61L'  '0500',
      ' '  'BDC_OKCODE'  '=NEWC',
      'X'  'SAPMM61L'  '0500',
      ' '  'BDC_CURSOR'  'PLPTU-PLWRK(01)',
      ' '  'BDC_OKCODE'  '=TAKE',
      ' '  'PLPTU-PLWRK(01)' '2531'. (2531 is a plant)
    This is the recording used to get plant via BDC of MS31.
    Using this code i can get only single plant...
    If i want to get multiple plants from an internal table,how i can change this code?
    Since it is a recording i cant put this code in LOOP..ENDLOOP.
    Suggest any method for doing this....
    Awaiting for ur reply...

    Hi,
    While recording also record the scroll down button.
    The you can place different plant in the BDC using loop and endloop
    Regards
    Arun

  • I need insert /update/modify  ztable from  internal table or work area

    I have one simple problem.
    TYPES: BEGIN OF t_account,
            acc_no          LIKE zztaccountheader-acc_no,
            cust_id         LIKE zztaccountheader-cust_id,
            acc_type        LIKE zztaccountheader-acc_type,
            od_option       LIKE zztaccountheader-od_option,
            od_limit        LIKE zztaccountheader-od_limit,
            od_issue_date   LIKE zztaccountheader-od_issue_date,
            END OF t_account.
    data: lwa_account TYPE  t_account,
         li_account TYPE STANDARD TABLE OF t_account,
    bu scerrin i am inputing data :
    i want modify updare or insert record into ztable by work area  i put following thing
    MOVE : zztaccountheader-acc_no        TO lwa_account-acc_no,
               zztcustomer-cust_id            TO lwa_account-cust_id,
               zztaccountheader-acc_type      TO lwa_account-acc_type,
               zztaccountheader-od_option     TO lwa_account-od_option,
               zztaccountheader-od_limit      TO lwa_account-od_limit,
               zztaccountheader-od_issue_date TO lwa_account-od_issue_date.
        INSERT   zztaccountheader CLIENT SPECIFIED FROM lwa_account .
        CLEAR lwa_account.
      ENDIF.
    i am etting error
    The type of the database table and work area (or internal table)
    "LWA_ACCOUNT" are not Unicode convertible.
    please solve it

    hi,
    decalre like this.
    tables : zztaccountheader.
    data : t_account like zztaccountheader occurs 0 with header line.
    data: lwa_account TYPE t_account,
    li_account TYPE STANDARD TABLE OF t_account,
    MOVE : zztaccountheader-acc_no TO lwa_account-acc_no,
    zztcustomer-cust_id TO lwa_account-cust_id,
    zztaccountheader-acc_type TO lwa_account-acc_type,
    zztaccountheader-od_option TO lwa_account-od_option,
    zztaccountheader-od_limit TO lwa_account-od_limit,
    zztaccountheader-od_issue_date TO lwa_account-od_issue_date.
    INSERT zztaccountheader CLIENT SPECIFIED FROM lwa_account .
    CLEAR lwa_account.
    ENDIF.
    rgss
    anver
    if hlped mark points

  • How to pass the values from internal table to field groups

    hi all,
    how can i pass the internal  table values to field groups?
    already field groups are holding some values.. INSERT STATEMENT IS NOT WORKING as it is ovewriting the existing values..
    Use full answers will be rewared.
    Thanks.
    Moderator message - duplicate post locked
    Edited by: Rob Burbank on Jun 23, 2009 9:51 AM

    Hi,
    You can use INSERT statement to put a work area of an Internal table in Field-group
    and use Extract to get info out of it.
    Hope it helps,
    Raj

  • How to fetch previous record from internal table?

    Hi,
    My final internal table (it_final) has all the data month wise year wise.(opening and closing qty)
    but if
    Material   Batch    Month   Year        opening_qty         closing_qty
    FC5431   abc        08        2008        100                       50
    FC5431   ABC       09        2009         0                          100
    Suppose I want to take PREVIOUS record(closing_qty = 50  in my 09/2009  openin_qty = 50)  how will Ido this?
    Any solution????????? BTW i m using S033 for opening an closing qt monthwise.
    Plz reply soon if anyone knows.
    Thanks and Regards,
    Archana

    Hi,
    Test the following Sample code hope will solve out your problem,
    TYPES:  BEGIN OF ty_test,
            m(3),
            open_qty TYPE i,
            close_qty TYPE i,
            END OF ty_test.
    DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE,
          wa_test LIKE LINE OF it_test,
          ctabix LIKE sy-tabix,
          ptabix LIKE sy-tabix.
    it_test-m = 'AAA'. it_test-open_qty = 100. it_test-close_qty = 50. append it_test.
    it_test-m = 'AAA'. it_test-open_qty =  0. it_test-close_qty = 100. append it_test.
    LOOP AT it_test.
      ctabix = sy-tabix.
      IF sy-tabix > 1.
        ptabix = sy-tabix - 1.
        READ TABLE it_test into wa_test INDEX ptabix.
        IF sy-subrc = 0.
          it_test-open_qty = wa_test-close_qty.
        ENDIF.
        MODIFY it_test INDEX ctabix.
      ENDIF.
    ENDLOOP.
    LOOP AT it_test.
      WRITE: it_test-m, it_test-open_qty, it_test-close_qty, /.
    ENDLOOP.
    Regards,
    Faisal

  • How to update multiple columns from different tables using cursor.

    Hi,
    i have two tables test1 and test2. i want to udpate the column(DEPT_DSCR) of both the tables TEST1 and TEST2 using select for update and current of...using cursor.
    I have a code written as follows :
    DECLARE
    v_mydept1 TEST1.DEPT_CD%TYPE;
    v_mydept2 TEST2.DEPT_CD%TYPE;
    CURSOR C1 IS SELECT TEST1.DEPT_CD,TEST2.DEPT_CD FROM TEST1,TEST2 WHERE TEST1.DEPT_CD = TEST2.DEPT_CD AND TEST1.DEPT_CD = 'AA' FOR UPDATE OF TEST1.DEPT_DSCR,TEST2.DEPT_DSCR;
    BEGIN
    OPEN C1;
         LOOP
              FETCH C1 INTO v_mydept1,v_mydept2;
              EXIT WHEN C1%NOTFOUND;
              UPDATE TEST2 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
              UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
         END LOOP;
         COMMIT;
    END;
    The above code when run says that it runs successfully. But it does not updates the desired columns[DEPT_DSCR].
    It only works when we want to update single or multiple columns of same table...i.e. by providing these columns after "FOR UPDATE OF"
    I am not sure what is the exact problem when we want to update multiple columns of different tables.
    Can anyone help me on this ?

    oops my mistake.....typo mistake...it should have been as follows --
    UPDATE TEST1 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
    UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
    Now here is the upated PL/SQL code where we are trying to update columns of different tables --
    DECLARE
    v_mydept1 TEST1.DEPT_CD%TYPE;
    v_mydept2 TEST2.DEPT_CD%TYPE;
    CURSOR C1 IS SELECT TEST1.DEPT_CD,TEST2.DEPT_CD FROM TEST1,TEST2 WHERE TEST1.DEPT_CD = TEST2.DEPT_CD AND TEST1.DEPT_CD = 'AA' FOR UPDATE OF TEST1.DEPT_DSCR,TEST2.DEPT_DSCR;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO v_mydept1,v_mydept2;
    EXIT WHEN C1%NOTFOUND;
    UPDATE TEST1 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
    UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
    END LOOP;
    COMMIT;
    END;
    Please let us know why it is not updating by using using CURRENT OF

  • Add records to the physical table from Internal table

    Hello,
    I am trying to insert the records from IT table to physical table. But, its not inserting. Please let me know how do I add the records to the table zebp_iv_cf_log.
    I have used only few fields for example *
    After looping I get about 800 records in it_non_ebp tab *
    loop at non_ebp_inv.
        it_non_ebp-zspgrv = non_ebp_inv-spgrv.
        it_non_ebp-zspgrq = non_ebp_inv-spgrq.
        it_non_ebp-zspgrs = non_ebp_inv-spgrs.
        it_non_ebp-inv_ref_num = non_ebp_inv-xblnr.
        it_non_ebp-zspgrc = non_ebp_inv-spgrc.
        it_non_ebp-zlifnr = non_ebp_inv-lifnr.
        append it_non_ebp.
        endloop.
        insert   zebp_iv_cf_log from table it_non_ebp[] accepting duplicate keys .
    I also tried inserting one by one by putting insert syntex within a loop but, it takes keeps processing.
    Shall appreciate the response.
    Thks & Rgds,
    Hemal
    Edited by: hemalgandhi on Jun 12, 2009 6:27 PM

    Hi,
    for the internal table you are using for appending , you must declare it with the header line option
    as
    data it_non_ebp type table of zebp_iv_cf_log with HEADER LINE.
    or else you can have a separate workarea of type zebp_iv_cf_log
    as
    data wa_zebp_iv_cf_log type zebp_iv_cf_log.
    then the code should be like :
    loop at non_ebp_inv.
    wa_zebp_iv_cf_log -zspgrv = non_ebp_inv-spgrv.
    wa_zebp_iv_cf_log -zspgrq = non_ebp_inv-spgrq.
    wa_zebp_iv_cf_log -zspgrs = non_ebp_inv-spgrs.
    wa_zebp_iv_cf_log -inv_ref_num = non_ebp_inv-xblnr.
    wa_zebp_iv_cf_log -zspgrc = non_ebp_inv-spgrc.
    wa_zebp_iv_cf_log -zlifnr = non_ebp_inv-lifnr.
    append wa_zebp_iv_cf_log to it_non_ebp.
    clear wa_zebp_iv_cf_log .
    endloop.
    and use 
       modify zebp_iv_cf_log from table it_non_ebp accepting duplicate keys .
    instead of
       insert zebp_iv_cf_log from table it_non_ebp[] accepting duplicate keys .
    Please try out and let me know of you face any problem

  • How to update/modify the ALV internal table once it is displayed

    Hi All,
    I have a alv grid report using fm reuse_alv_grid_dispaly. My requirement is to create sales order using bapi (up to here it is working fine) and once the SO is created update the function module tables field with the created sales order.
    Example:
    My alv grid display before creating SO:
    Customer Material    SalesOrder
    1000001  material1 
    My alv grid display after creating SO:
    Customer Material    SalesOrder
    1000001  material1  3025642
    How can I achieve this functionality. Because the field catalog is already displayed, how can I modify/update it by adding the sales order number to it. Experts, suggest me.
    Thanks.

    FORM callback_ucomm USING ucomm LIKE sy-ucomm
                                   selfield TYPE slis_selfield.
    CASE ucomm.
        WHEN 'CRE'.
    * Logic to create sales order here...
    * Show the Sales order column
        CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
          IMPORTING
            et_fieldcat   = gt_fieldcat
          EXCEPTIONS
            no_infos      = 1
            program_error = 2
            OTHERS        = 3.
        if sy-subrc eq 0.
          read table gt_fieldcat into gs_fieldcat with key fieldname = 'VBELN'.
          if sy-subrc eq 0.
            gs_fieldcat-no_out = space.
            gs_fieldcat-tech   = space.
            modify gt_fieldcat from gs_fieldcat index sy-tabix transporting no_out tech.
          endif.
          CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_SET'
            EXPORTING
              it_fieldcat          = gt_fieldcat[].
        endif.
    ENDFORM.

Maybe you are looking for

  • Local vs NFS disk access

    We're buying a new platform for our Oracle server. It'll be... (4) 1.3ghz 64 bit (Madisons) 48gb memory (2) 36gb drives - For OS and Swap (2) 146gb drives - For general work space The question is where to put the disks that will contain the database

  • Display list of objects via Function

    Hi Gurus, BANNER Oracle Database 10g Release 10.2.0.3.0 - 64bit Production PL/SQL Release 10.2.0.3.0 - Production CORE    10.2.0.3.0      Production TNS for Linux: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production I do have an ob

  • How to save HTML file with images present in the server to local machine

    Hi all In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved. The code i am using is below :- l                     File fname = new File

  • Netctl and WPA2 Personal AES, problem with authentication

    I having trouble to connect to my WPA2 Personal 5ghz wireless AES (only) network using netctl. When I were using wicd it wasnt any problems. I assume there is something wrong in my profile but i cant find out what. My config /etc/netctl/wlp4s0-limbo2

  • Hello Login Help Required

    Hello Everyone, Can anyone help me out to login in sqlplus environment as sysdba. Regds Amar