FM to extarct and update into a structure

Hi All,
i have a requirement , where i need to extract the data from two tables in R3. Those two tables have the same fields but the user may post transaction in any table. so i have to extract the data from those two tables.
any one can help with the code ...
thanks in advance.

Hi Aswath,
Table A code :
TYPES: BEGIN OF t_aXX,
            kschl           TYPE AX-ksXXl,
            knumXX       TYPE AXX-knumXX,
            vkorgXX       TYPE AXX-vkorg,
            END OF t_aXX.
  DATA: wa_aXX1 TYPE t_aXX,
        it_aXX TYPE STANDARD TABLE OF t_aXX.
  SELECT * FROM aXX1 (Actual Table)  INTO CORRESPONDING FIELDS OF TABLE it_aXX.
  LOOP AT it_aXX INTO wa_aXX1.
  ENDLOOP.
Similarly i have written the code for Table B
Now how to populate the data for Main Structure.

Similar Messages

  • Combine select and update into single statement,without bind-variable

    I have a problem, that I think is not possible to solve the way I want to, but I just wanted to check before leaving the idea...
    I am looking for a way to combine the select and the update statement into one single statement. This is what I wan't to achive: select some data, and update the data selected before returning them.
    On this site http://www.psoug.org/reference/update.html I see that the following are possible:
    var bnd1 NUMBER
    var bnd2 VARCHAR2(30)
    var bnd3 NUMBER
    UPDATE employees
    SET job_id ='SA_MAN', salary = salary + 1000,
    department_id = 140
    WHERE last_name = 'Jones'
    RETURNING salary*0.25, last_name, department_id
    INTO :bnd1, :bnd2, :bnd3;
    I need to have this as a single statement, and cannot use bind-variables. So I was hoping that something like this could be possible:
    UPDATE customer c
    SET c.HAS_CREDIT ='1'
    WHERE c.HAS_CREDIT = '0'
    RETURNING c.CUSTOMER_NO, c.FIRSTNAME, c.LASTNAME
    where c.HAS_CREDIT = '1'
    But this doesn't compile, complaining of missing into (ORA-00925: missing INTO keyword). And even though I would like this to be possible because this would solve my current problem, I think it would be very confusing. For instance; would the where clause of the returning part be operating after the update or before?
    Any comments or suggestions on how to get it work in a single statement, or should I just leave this path straight away?

    Hi,
    RETURNING only works with bind variables, see
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/returninginto_clause.htm#sthref3006
    The real problem is that the form of RETURNING clause with bind variables is only valid for single row update or insert statements.
    To update (or insert) multiple rows and return the data, you will need to use
    RETURNING BULK COLLECT INTO clause. See
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2236
    Cheers,
    Colin

  • Reading files and converting into xml structure

    Hi,
    In my application a client requests for the folder structure information to a server through RMI. The server needs to read files and folders on local machine and convert it into some structure (I am thinking of using xml) and send it back. For eg: I am planning to have Server send back something like:
    <directory name = "parentdirectory">
    <file name = "abc.jpg"/>
    <file name = "def.bmp"/>
    <directory" name = "subdirectory">
    <file name = "hij.jpg"/>
    <file name = "klm.bmp"/>
    </directory>
    </directory>
    It is just the names of the files I am interested in and not the contents. Is this a good approach of sending back the data as a string containg xml definition. Is there any better appproach in terms of performance, memory etc? I am currently planning on using DOM for construction of this structure. Is there a source code for reading and converting the folder structure into xml. Just for your information, the clients gets this information and shows it as a tree structure on the GUI.
    Thanks!!!!

    Is this a good approach of sending back the data as a string containg xml definition. It'll work.
    An alternative, more direct approach is to build a memory representation and send this as argument/return value of an RMI call. You'd need to write classes MyDirectory and MyFile; MyFile has just a name; MyDirectory has a name and a collection of MyDirectory and one of MyFile. Make these classes implement Serializable and you can send them over RMI.
    The effort to write those trivial classes would be less than to implement XML encoding/decoding, and also in terms of runtime performance and memory it will be hard to beat Java's serialization with anything XML-based. In this case I doubt performance/memory are relevant considerations though.
    If for some reason I'd go for sending XML Strings anyway, I wouldn't do the encoding/decoding myself; I'd use XStream to convert Java classes to/from XML and still end up writing the above two classes and be done.
    Sorry if you wanted a simple yes or no :-)

  • Set type creation and updation of the structure COMT_PROD_MAT_MAINTAIN_API

    Hello Experts,
    I've the below scenario,
    I created new Org dependent Z set type and assigned to a category.
    And I'm using the API - COM_PRODUCT_GETDETAIL_API to get the details about the material via the export parameter ES_MATERIAL_DATA which has the structure of COMT_PROD_MAT_MAINTAIN_API.
    My doubt :
    Whether the newly created Z set type structure will be automatically updated to this COMT_PROD_MAT_MAINTAIN_API? (In my case it has not happened)
    I hope system has to append this structure automatically.
    If not how to get this job done. Is there any settings to be done?
    If not Whether I can append this structure manually? will it affect anywhere?
    Kindly help me on this regard.
    Thanks in Advance!
    Regards,
    Senthil.

    Also Senthil,
    I am pasting some sample code for your help. this should solve your issue
    Also make sure the set type structures are appened in COM PRODUCT MAINTAIN API Structure else the updation logic doesn't work.
    DATA:         ls_detail1          TYPE zmsr_detail_maintain,
            gs_set_typ      TYPE comt_prod_mat_maintain_api,
           gt_product_api       TYPE comt_product_maintain_api_tab,
            gs_product_api  TYPE comt_product_maintain_api,
            gs_text1        TYPE comt_prlgtext_maintain,
        fill the new comm_product
        gs_product_api-com_product-product_guid = g_product_guid.
        gs_product_api-com_product-product_type  = c_product_type.
        gs_product_api-com_product-logsys        = g_logsys.
        gs_product_api-com_product-valid_from    = g_valid_from.
        gs_product_api-com_product-valid_to      = g_valid_to.
        gs_product_api-categories                = gt_categories.
        gs_text1-data-stxh-mandt         = sy-mandt.
        gs_text1-data-stxh-tdobject      = c_product.                            "'PRODUCT'.
        gs_text1-data-stxh-tdid          = c_base.                               "'BASE'.
        gs_text1-data-stxh-tdspras       = c_en.                                 "'EN'.
        ls_line-tdline                   = gs_upload1-lg_text.
        APPEND ls_line TO lt_lines.
        CLEAR ls_line.
        ls_longtxt-lines    = lt_lines.
        gs_text1-data-lines = ls_longtxt-lines.
        APPEND gs_text1 TO gs_product_api-long_texts.
        gs_text-data-langu      = c_en.                                          "'EN'.
        gs_text-data-short_text = gs_upload1-msr_desc.
        gs_text-data-valid_from = g_valid_from.
        gs_text-data-valid_to   = g_valid_to.
        gs_text-data-logsys     = g_logsys.
        APPEND gs_text TO gs_product_api-short_texts.
        CLEAR gs_text.
        APPEND gs_product_api TO gt_product_api.
          ls_detail1-data-zz0010       = gs_upload1-zz0010_1.
          ls_detail1-data-zz0011       = gs_upload1-zz0011_1.
          ls_detail1-data-zz0012       = gs_upload1-zz0012_1.
          ls_detail1-data-zz0013       = gs_upload1-zz0013_1.
          ls_detail1-data-zz0014       = gs_upload1-zz0014_1.
          ls_detail1-data-zz0015       = gs_upload1-zz0015_1.
          ls_detail1-data-zz0016       = gs_upload1-zz0016_1.
          ls_detail1-data-zz0017       = gs_upload1-zz0017_1.
          ls_detail1-data-zz0018       = gs_upload1-zz0018_1.
          ls_detail1-data-zz0019       = gs_upload1-zz0019_1.
          ls_detail1-data-zz0020       = gs_upload1-zz0020_1.
          ls_detail1-data-zz0021       = gs_upload1-zz0021_1.
          ls_detail1-data-zz0022       = gs_upload1-zfil_nbr.
          ls_detail1-data-product_guid = g_product_guid.
          ls_detail1-data-logsys       = g_logsys.
          ls_detail1-data-valid_from   = g_valid_from.
          ls_detail1-data-valid_to     = g_valid_to.
          APPEND ls_detail1 TO gs_set_typ-zmsr_detail.
          CLEAR ls_detail1.
          APPEND gs_set_typ  TO gt_set_typ.
          CLEAR gs_set_typ.
          CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
            EXPORTING
              i_datlo     = sy-datum
              i_timlo     = sy-uzeit
            IMPORTING
              e_timestamp = g_valid_from.
          APPEND gs_set_typ  TO gt_set_typ.
          CLEAR gs_set_typ.
    *-------Mainten. Functions for Materials
          CALL FUNCTION 'COM_PROD_MATERIAL_MAINTAIN_API'
            EXPORTING
              it_product      = gt_product_api
              it_set          = gt_set_typ
              iv_commit_work  = 'X'
              iv_update_task  = 'X'
              iv_enqueue_mode = 'E'
            IMPORTING
              et_bapireturn   = gt_bapireturn.
          IF sy-subrc = 0.
          Commit the BAPI
            COMMIT WORK .
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    HOpe this helps !!!!!

  • How to concatinate values of two columns and update into another column

    There is a table : TEST contains three columns - Column1 , Column2 , Column 3
    Column1 contains values - (1,2,4)
    Column2 contains values : (a,b,c)
    Column 3 is empty .
    Target : Values in column 3 should be (1a,2b,4c)
    Need to achieve this through procedure .

    Paul if i want to concatenate two strings or alpha numeric characters from 2 fields and display in the third field,Will this code be able to do that?

  • File Format Mismatch while update into Internal table using RFC_REMOTE_FILE

    Hi All,
    I used RFC_REMOTE_FILE to communicate with the presentation server in Background Mode. I connected successfully and got output too.
    But my requirement is to update the .csv file into internal tables.
    With RFC_REMOTE_FILE i can get the data as single row. But I can't separate the fields and update into the corressponding table field.
    What is the solution for the above issue. Could anyone help me.
    For the above RFC Communication I followed the below link
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2&overridelayout=true

    Hi All,
    I used RFC_REMOTE_FILE to communicate with the presentation server in Background Mode. I connected successfully and got output too.
    But my requirement is to update the .csv file into internal tables.
    With RFC_REMOTE_FILE i can get the data as single row. But I can't separate the fields and update into the corressponding table field.
    What is the solution for the above issue. Could anyone help me.
    For the above RFC Communication I followed the below link
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2&overridelayout=true

  • Find All INSERTs and UPDATEs

    Hi All;
    I want to find out all inserts and updates of a spesific table. For instance a package l,ke that
    CREATE OR REPLACE PACKAGE BODY param_test IS
      PROCEDURE ins_test IS
      BEGIN
    insert INTO parameter_value VALUES (2);
        INSERT INTO parameter_value VALUES (9);
        INSERT  INTO
        parameter_value VALUES (4);   
        insert INTO parameter_value VALUES (54);
      END ins_test;
    END param_test;I am querying user_source view. My query is below.
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    Connected as SYS
    SQL> SELECT us1.NAME, us1.line, us1.text
      2    FROM user_source us1,
      3         (SELECT us2.line, us2.NAME, us2.text
      4            FROM user_source us2
      5           WHERE regexp_like(upper(us2.text), '[[:space:]]*PARAMETER_VALUE[[:space:]]*')) us3
      6   WHERE us3.line - 1 = us1.line
      7     AND us1.NAME = us3.NAME
      8     AND regexp_like(upper(us1.text), '[[:space:]]*(INSERT[[:space:]]*INTO|UPDATE)[[:space:]]*')
      9  /
    NAME                                 LINE TEXT
    PARAM_TEST                              9 insert INTO parameter_value VALUES (2);
    PARAM_TEST                             12     INSERT  INTO
    SQL> My question is "Are tehre any solutions to overcome this situation?"
    Kindly Regards...

    You might be better off combining into your attack the use of user_dependencies. This will tell you what objects e.g., code is dependent on your table and then you can search the source of those modules for inserts and updates into the table. Even then you'll never be sure, especially if dynamic SQL is used as the statement may be pieced together from various bits if strings, as then user_dependencies won't contain the reference.

  • Selective deletion of request from ODS which is activated and updated

    Hi all,
    I would like to delete the request from ODS which is activated and updated into data targets, i.e if i have three resquests 1,2,3 which are activated  and loaded into cube..now i would like to delete the between (2) request from ods, it says we have to delete latest first(3) , cant we delete this 2 nd request by doing some sort of settings plz let me know if any body got come to know this...plz
    Many thanks in advance,
    BRB

    Hi
    Did you look at the Online-Docu (link above)? In the administration of the ODS (I think menue 'Manage' in an english environment -> I've none at the moment) where you see each loaded package there you have a button right of the request id (status of data mart). If you press on this a dialog screen appears. There you can press on the trash icon. This resets the delta queue for the specific request.
    You have to do this for request 3 and 2. Then you can delete the request nr. 2. The bw system will then delete this request from the active data and from the change log. After this you can schedule the delta load again. This process will load request nr. 3 to the connected InfoCubes.
    If you do not reset the delta queue you will not be able to load request nr. 3 from the change log.
    As I supose you want not to delete request nr. 3 because of some long duration to upload and activate the whole request again.
    This works fine. I've done the last weeks often because we loaded request with 3 million records and more.
    Regards,
    H.J.

  • MODIFYING AND UPDATING REPORT O/P

    MY ALV REPORT OUTPUT NEED TO BE MODIFIED AND UPDATED INTO DB.
    WHEN IT TRY TO MODIFY IN THE O/P IT IS NOT REFLECTING IN THE INTERNAL TABLE TO UPDATE DB ...
    PLZ HELP ME
    VERY URGENT..

    i supposed to be you have to write logic which is some what complex if you used oops alv then goto package slis or bc405[in se80] in that some examples r there refer the code.
    if helpful reward some points.

  • Not Properly Insert and Update in ODI interfaces

    Dear Brothers,
    The records are not inserting and updating even the CDC captured in the journal in one of my package. But, stopped and execute again then there is inserts and updates. I am not able to understand where the problem is. Can u suggest regarding the issue.

    Dear Bro,
    I am capturing CDC using consistent set. I am using (LKM SQL to DB2 UDB). While executing the package, the records are locked and extend window, but there is no inserts and updates into the database. It is throwing error as row index out of range while running the query. The query is running in Source Stage for ex. RTO_STAGE.JV$NUMGEN. query is triggering but records are not properly inserted and updated in the target.
    First time i saw in the CDC table, there was some 10 records available while executing no insert and update. Then, i stopped it and execute it again at that time i checked in the CDC table ie., the same table, but there was only 2 records available in CDC the old records were disappeared.
    I dont know the exact issue? My colleague is telling may be SNP tables not refreshing. Kindly suggest any solution.

  • Why is it when i update my status on facebook from iohone it splits the updates into two differents boxes with some funky symbol. I have uninstall facebook and installed it over and it still does it. only the facebook IPHONE app.

    why is it when i update my status on facebook from iphone it splits the updates into two differents boxes with some funky symbols at the beginning.. I have uninstall facebook and installed it over and it still does it. only the facebook IPHONE app where it says to update staus text to FBOOK  i have already update my phone too.
    if i go on the facebook site and update there through a brower on iphone it will work fine just cant us IPHONE mobile upload,  . But its a pain of not using my IPHONE APP for facebook cause it does that.

    The warranty entitles you to complimentary phone support for the first 90 days of ownership.

  • I connected my iphone 4s that i unlocked for t-mobile. I plugged it into itunes, and it asked me to update to ios6. I accepted the download and update button. it told me it needed 8 hours. i closed my laptop. not shut down. i opened and it wants restorin?

    I connected my iphone 4s that I unlocked for t-mobile. I plugged it into itunes, and it asked me to update to ios6. I accepted the download and update button. It told me it needed 8 hours. I closed my laptop, not shut down. I re-opened the laptop a few hours later, and it wants restoring?? Whats going on?! i want my iphone back! PLEASE HELP. I'M LOST!!! (I synced my iphone to my computer if that helps at all).

    Yes, and, I try to restore. I have the T-Mobile sim card in it just to clarify. It will not let me get passed that, it does not accept the t-mobile sim card. i tried restoring it using wifi, cellular, and i cant get i tunes. I am scared that if i take the tmobile sim card out and put the at&t one in just to complete the restoration process that the iphone will lock again and not read the tmobile sim card, then all my hard work has gone for nothing. ( this whole process was caused by me trying wanting to empty my pictures onto my computer because i did not have any storage space left). <--- that may not be as important, but i included it just because.

  • TS4083 Is there a way or a setting my folders in Mail to automatically update across all devices? if I transfer an email to a folder for follow-up on my PC, my folder in Mail on my iPhone doesn't update until I actually go into the folder and update manua

    Is there a way (or a setting) for my individual folders in Mail to automatically update across all devices? For example, if I transfer an email to a folder for follow-up on my PC - say 10th of the following month - the same folder in Mail on my iPhone doesn't update until I actually go into the folder and update manually.  Interestingly though, if I create a new folder on any of my devices they automatically appear on the other devices so it is just the actual contents that I am referring to here.  Appreciate any help or guidance.
    Regards
    Justin

    You can turn mail off in the settings but then you can't use it for anything, including the "test" that you want to perform.
    Settings>Mail, Contacts, Calendars>Account Name>Mail>Off. That totally turns off the mail account.
    As long as mail is turned on and you launch the app, it will look for an download new mail.

  • I just bought a (used) Iphone 3gs for wife and it had angry birds and $89 Navigation on it (I paid extra for it).  Once updated and logged into my I-tunes it no longer works? How can I make those apps work?

    I just bought a (used) Iphone 3gs for wife and it had angry birds and $89 Navigation on it (I paid extra for it).  Once updated and logged into my I-tunes it no longer works? How can I make those apps work?

    Apple doesn't have anything to do with this other than enforcing the DRM protection. The developers of this content expect to be paid if someone wants to use their content. When you purchase content in the app store, you purchase a license to use the content. This license does not permit you or anyone else to resell or give this content away. The individual you purchased the phone from simply does not have the right to sell or give away any purchased content on the phone. You were deceived.

  • My Android Galaxy S5 has locked up and gone into endless loading while trying to update to the Kitkat update. I have set it back to factory settings and tried again and it has locked up again. My phone no longer works. What else can I do?

    My Android Galaxy S5 has locked up and gone into endless loading while trying to update to the Kitkat update. I have set it back to factory settings and tried again and it has locked up again. My phone no longer works. What else can I do?

        Oh goodness,SLEEPER888. We wish you didn't have this problem while trying to complete this update.You have done quite a bit of troubleshooting on your own. If the phone update does not take, we would need to replace it with the warranty. Is it still locked up?
    TamaraH_VZW
    Follow us on Twitter @VZWSupport

Maybe you are looking for

  • Sales orders missing in MD04

    Hi, We have a specific issue where some of the sales order which are already confirmed but are missing in MD04. We have not able to identify the reasons. For correction we are using the program SDRQCR21 which again displays the missing SO in MD04. My

  • Com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException:

    Hi Everybody, This is the error regd Adobe forms I configured the ADs And Tested it,and the test was successful In the response,it has given the version number I tested it fom http://hostname:portno/AdobeDocumentServices/Config It is throwing the err

  • Oracle 10g forms problem

    hi can any body help me? i have installed oracle developer 10g with oracle 8i database when i run any form including the test.fmx it always ask to install JInitiator although it has been installed (appears in the control panel and in c:\program file\

  • SQL Server database details - DBInstanceSummary- Connection Status: Failure

    Hi guys, I have a strange problem with Maps 9.0 in the SQL Server database details -> DBInstanceSummary and DBInstanceProperties I got a failure as shown in the picture below. This sounds quite strange because I'm able to collect most of Instances an

  • UNICODE System - XML Encoding Error

    Dear Experts, We've upgraded our SAP system to ECC 6.0 Unicode. One of our applications works with XML files and we've been experimenting some problems with the XML encoding since the machine is Unicode enabled. In the XML structure we obtain strange