How to combine both values and subquery in the insert statement

Hi everybody,
This is a case of inserting rows into a final results table from a temporary one. Actually, one of the fields is not always given in the temporary table. Thus, when inserting the rows into the final results table, an error message comes up to.
More clarification:
final results table(F_RESULT): field1, field2, field3 ( they are also primary keys with not null constraint)
temporary table(TEMP): field2, filed3
Is it possible to combine both values and subquery branchs of the insert statement:
Insert into F_RESULT (field2,field3) select field2,field3 from TEMP;
Insert into F_RESULT (field1) values (0);
into only one like this:
Insert into F_RESULT (field1,field2,field3) values (0, select field2 form Temp, select field3 from Temp);
Or there is another more effective solution. The main problem for me is the message that doesn't accept the null value. From the data integrity point of view, it is accepted to set field1 to zero.
Any hints?
Thanks for your reply.

That's easy, you can select any value from a table:
Insert into F_RESULT (field1,field2,field3)
select 0, field2, field3 from Temp;

Similar Messages

  • Dataretrieval in hr abap  (how to combine both pa and om in hr abap)

    Hi Experts?
        My requirement is i wants to retrieve the data from HRP1000 table i.e get the long text from the field sc_text ,for this they have provided me some field values like PLVAR='01'  ,  OTYPE='O'  , OBJID -
    (not given)  ,ENDDA =9999.12.31. and also they have mentioned table PA0001-BUKRS(field).
          how to get objid field?
       Please provide me query ,how to combine Organizational data(hrp1000)  with Personnel administration data(pa0001-bukrs)
    Thanks in advance,
    mohan

    Hi mohan,
    1. Its very impractical,
       especially in SAP HR Tables,
       to directly get data from tables using joins.
    2. In your case,
       first read from infotype 0001
       using direct select statement,
       (or u can use HR_READ_INFOTYPE)
    3. After wards, LOOP / FOR ALL ENTRIES IN
       and then read from the other required tables HRP1000.
    regards,
    amit m.

  • How to combine both ITEM and SCL data

    Hi all,
    I am working in Purchasing.I am having requirement to use both 2LIS_02_ITM which is Item level and 2LIS_02_SCL which is Schedule Line level.
    I created a ODS which includes both the data sources (2LIS_02_ITM & 2LIS_02_SCL) but whenever I am load data to the ODS from both of them I am not able to get values for certain Info Objects like Purchasing Document Number (0OI_EBELN), Item Number (0OI_EBELP) but when I load only from 2LIS_02_SCL I am able to get data for the objects.
    If I load from 2LIS_02_ITM also I am not able to find data.
    Can anyone tell me what is the error.
    Thanks in advance....
    regards,
    Mahi

    Hi,
    I will guide you how to find the issue.
    As you have correct data in PSA you can try simulating update from PSA with debugging switched on.
    From RSMO > Details > Data Package > Right click > Simulate update > Here check Debugging on for Transfer rules and Update rules. This will tell whats happening for the record. where is it being filtered.
    As this is coming in correctly you can rule out any issue with extraction.
    Hope this helps.
    Thanks,
    JituK

  • How to combine Submit value and item values in report condition?

    What I have is a report with some input parameters, one of which is a Select List with Submit that forces population of a second Select List. There is also a GO button. Depending on the combination of the two drop-downs, one of three report regions then gets displayed. This all works fine, but the users would like the report NOT to show UNTIL they click on the GO button. I'm trying to figure out how to tweak my conditions to include a Submit value along with item values. Can someone suggest a solution?
    (PS. I'm using dependent selects because I'm still using APEX 3.2)

    Hello
    When your page is submitted due to the the parent select list's value getting changed the APEX 'REQUEST' variable is set to the name of the select list item.
    You could perhaps use this to perhaps set a hidden item on the page whose value can then be checked in the conditions that control the display of your report regions.
    varad

  • How to populate both key and text in drop down list in dialog prog screen

    Hi, Can anyone please advice how to display both key and text in the drop down list in dialog prog screen. I tried with below code. keys and texts are getting populated in values table but only text is appearing when click on drop down. need to display both key and text in the drop down. Thanks in advance.
    TABLES: ZRPP_MODELS, ZRPP_FFLSTRATEGY.
    TYPE-POOLS : VRM.
    DATA : field_id TYPE VRM_ID ,
           values   TYPE VRM_VALUES,
           value    LIKE LINE OF values.
    FORM fill_model_list .
      select MODEL MODEL_DESC from ZRPP_MODELS into value.
        APPEND value TO VALUES.
      endselect.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = 'ZRPP_MODELS-MODEL'
          values = values.
    ENDFORM.

    You need to concatenate KEY & VALUES
      wa_values-key = '1'.
      wa_values-text = '1 - One'.
      append wa_values to i_values.
      wa_values-key = '2'.
      wa_values-text = '2 - Two'.
      append wa_values to i_values.
      wa_values-key = '3'.
      wa_values-text = '3 - Three'.
      append wa_values to i_values.
      call function 'VRM_SET_VALUES'
        exporting
          id              = 'LIST_BOX'
          values          = i_values
        exceptions
          id_illegal_name = 1
          others          = 2.

  • How to print both letter and legal size docs at same time with two trays

    I have an HP Laser Jet P2055dn printer. How can I print both letter and legal docs at same time?

    Not quite sure what you mean by "print both letter and legal docs at same time".
    If you mean that sometimes you want to print a document on Letter size paper, and at other times you want to print a different document on Legal sized paper, then all that is neccessary is to ensure that:
    The printer knows what Paper Size (e.g. Letter or Legal) is present in each tray; on many LaserJet devices, the size is detected automaticaly by sensors in each tray (except for the drop-down tray), but some devices may require that you set the size via front panel menus, or (for network models) via the Embedded Web Server equivalent.
    You may also need to specify what Paper Type (e.g. Plain or Letterhead) is present in each tray, in order to distinguish between two or more trays which have the same paper size loaded.
    Within your appllcation / print preferences, ensure that you select the required combination of size and type for the document.
    But if you mean how do you print a document with some pages on one size of paper, and other pages on a different size, this may only be possible with bespoke applications and/or printer drivers.

  • I have a 17" Mac Book Pro and a 13" Mac Book Pro...both use the same Apple ID. My wife now wants to change the Apple ID on the 13" to her Apple ID.  How do I do this and not loose the information on that computer?

    I have a 17" Mac Book Pro and a 13" Mac Book Pro...both use the same Apple ID. My wife uses the 13" and now wants to change the Apple ID on the 13" to her Apple ID.  How do I do this and not loose the information on that computer?

    Hello Teddy53149 and welcome to Apple Support Communities,
    Follow this procedure:
    Change your OS X account name and home directory name - Apple Support
    As they recommend and as always when you're messing with administrator accounts back everything up first.

  • Can anybody tell me how to extract sales value and cost value for an materi

    dear all,
    Can anybody tell me how to extract sales value and cost value for an material sold .
    All the values of cost value and sale values are getting  stored in bseg-wrbtr field .
    How to identify them uniquely.
    Or there is another way to find the sale and cost values.
    Regards
    Mave

    Hi Mave!
    Normally there is no condition change, when something is sold.
    But sales price depends on sales conditions (not only price, but also surcharges, discounts, taxes - if customized).
    Nevertheless, after selling you have a invoice document, where correct values <i>should</i> be stored (see VBRP fields mentioned above). If here is a problem, then customizing of price determination is in question, not a programming of user-exits with MARD selection for costs (or some other tries to get a price).
    When you specify your requirements more in detail, you might get better answers - but currently only general hints are possible ('see in invioce / G/L accounts').
    Regards,
    Christian

  • How to print  both normal and bold data in a single line

    Hi ,
    I have requirement wherin the data need to be displayed in a single line.
    FAX:              Z8525_text.
    where FAX needs to be in bold and Z8525_text is a standard text and it shoould not be bold , both of this needs to be displayed in
    a single line.
    Can you let me know how to print  both normal and bold data in a single line one of which is coming fro standard text.
    Regards,
    Senthil

    Hi Senthil,
    If you are using smartforms, have a character format created for BOLD and apply it to the text you want to highlight. The remaining text of the line could be applied with a Character format which is not highlighted.
    Try and revert in case you need further assistance

  • How do we pass values and Internal tables to Sub-routines

    how do we pass values and Internal tables to Sub-routines

    Hi,
    You can use the USING..or TABLES..or Changing addition..
    Check this example.
    DATA: T_MARA TYPE STANDARD TABLE OF MARA.
    PERFORM DISPLAY USING T_MARA.
    FORM DISPLAY USING LT_MARA LIKE T_MARA.
    DATA: WA TYPE MARA.
    LOOP AT LT_MARA INTO WA.
      WRITE: / WA-MATNR.
    ENDLOOP.
    ENDFORM.
    Thanks
    Naren

  • McAfee - combining both VSE and Agent?

    Hi everyone,
    We are planning to deploy McAfee (agent 4.6& vse 8.7) to some of user machines by using sccm2012. In our case, we don't want to use ePO or updater to push 
    the vse automatically. 
    Is there any ways to combining both VSE and Agent into one package? Or any scripts that can perform installing vse after agent install completed?
    Appreciated if someone here can help on this.
    Thank you.
    Best.

    Use task sequence.
    Refer to the below for the procedure
    http://griffo.hubpages.com/hub/Deploy-Packages-in-an-Order-Using-SCCM-2012
    Blog: http://theinfraguys.com
    Follow me at Facebook
    The Infra Guys Facebook Page
    Join the Singapore System Center Admin Group
    SG System Center Admin Group
    Please remember to click Mark as Answer on the answer if it helps you in anyway

  • Photoshop Elements 8, How to show  hue, value and saturation of a specific area of a pickture?

    Hello,
    Photoshop Elements 8, How to show  hue, value and saturation of a specific area of a picture?
    How should I select the area? Which tool?
    Thank you in advance, Karl

    First make sure your Info Palette is visible : menu Window / Info (shortcut F8)
    In this palette, click the small     icon 'more'
    Choose 'Palette Options'
    and choose HSB for the second palette readout.

  • How to combine Area chart and Line chart?

    Hi,
    I have to display Area chart with the Line chart in one graph.
    How can i do that,
    Please suggest.

    Pretty easy, just add series to your chart
    http://forums.arcgis.com/threads/73636-How-to-combine-line-chart-and-stacked-column-chart
    Dany

  • I have two iMac's on the same desk. Once iMac pairs with both keyboards and mice.  The other pairs with the mouse, but I cannot get the keyboard to connect.  How do I get a keyboard and mouse to connect to each iMac independently?

    I have two iMac's on the same desk (about a foot apart). One iMac pairs with both keyboards and mice.  The other pairs with the mouse only; I cannot get the keyboard to connect.  How do I get a keyboard and mouse to connect to each iMac independently?

    Antaeus00 wrote:
    I tried sending a request for help,
    But did you succeeed in sending a request for help?
    Did you receive a response? How long has it been since you sent a request?
    but I need someone with more authority to talk to.
    There is no one with more authority than iTunes store support. We herem are only users.

  • HT204053 I am unable to sync all contacts on my iMac (which includes outlook for Mac contacts) with my iPad mini, how do I do this, I have enabled icloud on both devices and ticked all the boxes.

    I am unable to sync all contact in my address book on my imac with my ipad mini, it looks like only icloud & yahoo contact sync leaving out the ones in outlook for mac.  I have enabled icloud on both devices and ticked all the boxes.

    Clive Owen wrote:
    Thanks for that, but my Outlook contacts are synced to and all in my mac contacts book, does this not meen they would go to icloud,
    No, they are in the On My Mac account in the Mac Contacts app, not iCloud.
    or are they in a different format despite being in mac contacts?  If so can the outlook contacts be exported in some other way to icloud?
    Outlook is not compatible with iCloud, check Microsofts site if you need more verification.
    If you want them in iCloud use Mac Contacts and move them from On My Mac to iCloud. This will remove them from Outlook.

Maybe you are looking for

  • Can't setup scan to email with google apps for your domain (HP Officejet Pro 8500 A910 Printer)

    Printer HP Officejet Pro 8500 A910 Web interface (HPLIP installed on ubuntu 11.10, but problem is linked to web config.)  "The device could not send the test e-mail message. (EmailAccounts-timeout)" when going through the full setup, and "The device

  • Reflection - Two packages/classes with same name

    Hi There ! I am in a situation and I need some help, if anyone can help me. I have two tools to work with different version of a server application. Now, the admin wants to have only one tool to work with both server app. The problem is that the serv

  • How to restric the selection screen option

    Hi,    This is my first time to use this site. I am working on report which is OM report using PCH logical DB. when I run the report it runs for all OBJID instead of running for the select one(the one I use on selection screen). Does any one has any

  • Assistance in clearing 4th gen Nano needed

    I am passing on my 4th gen. Nano - are there certain steps I should take to prepare it for the new owner?

  • IOS 8.0.2 on iPhone 4S crashes WiFi network

    Question: Has anyone seen problems with their WiFi network associated with iOS 8.0.2? Background: I installed 8.0.2 on my iPhone4S and it appears to crash my entire home WiFi.  I have 4 iOS devices in the house: iPhone 5, IPad, Apple TV and iPhone 4S