"Created By" field to set up defaults for vlookups/dropdowns

Hello,
I am working on my firm's sharepoint 2013 site and have a custom list that I am trying to make easy for users to use. One of the things I am trying to do is to set default values for some of the dropdown/vlookup columns based on the user who is creating
the new entry.
So let's say I create a list in the site that will contain these two columns:
User    Business Unit
A         Accounting
B         Manufacturing
The user column will match my big list's created by names that are automatically generated. In the big list I will have a Business Unit column that will be matching the values from above. The users should be able to select for which Business Unit they are
doing the work for but majority of the time they will have a default one. 
My goal is to have user A, when creating a new entry to have Business Unit automatically set to Accounting, but also for that user to be able to change it to Manufacturing if needed. This should only apply for creating the item. 
Any ideas how this can happen if at all? I searched all over for this, but can't find an example of how exactly to do it. As a side note, I cannot install any add-ons since I don't have permissions but can write script web parts if that is needed. 
Thank you in advance

Hi,
Per my understanding, you might want to set default value for the “Business Unit” column by looking up to another list.
You can apply
JavaScript with Client Object Model to the NewForm.aspx page to meet your requirement.
A possible solution can be like this: When user opens the NewForm.aspx page of the current list, the custom JavaScript will be executed to get information about the
current user, then query the other list for the default value, set the value to the drop down list of the “Business Unit” column dynamically. The JavaScript can be added into a Content Editor Web Part and insert into the NewForm.aspx page.
The links below would be helpful for implementing this scenario:
About how to
select an option of drop down list using JavaScript:
http://www.imranulhoque.com/javascript/javascript-beginners-select-a-dropdown-option-by-value/
About
how to use JavaScript Client Object model to access SharePoint list:
How to: Create, Update, and Delete List Items Using JavaScript
http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx  
Common Programming Tasks in the JavaScript Object Model
http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
Here are two links about how to
add code into SharePoint page via Content Editor Web Part:
http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • How can I set a default for webpages to expand to full screen?

    How can I set a default for webpages to expand to full screen? Every webpage I go to does not expand to a full screen which causes me to have to ctrl+++ each time. How can I set my preference to expand to full screen automatically?
    Thanks.

    The Firefox [https://support.mozilla.com/en-US/kb/Page+Zoom Page Zoom] feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox, as with some other browsers.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

  • How set printer defaults for a printer

    My motivation is to have my wife's new MacBook always print double-sided. Currently she needs to select the preset that we've made for printing duplex, but that's easy to forget to do.
    OS is 10.4.7
    Is there a way to set the printer defaults in this OS?
    I want to have duplex just be the default, even after reboot, and if she wants to print single-sided then she'd need to select the other preset.
    BTW: If it makes a difference -- We're using a Xerox 8550DP, for which the duplex selection is in the standard place of Print -> Layout -> Two-sided -> Long-edged binding
    (Some other printers require using the duplex selection in their own printer's section under that Copies & Pages dropdown menu but not this one.)
    Maybe I'm just not a very good searcher. I searched many here, MacFixit, MacWorld magazine, generally on the web. Looked in my David Pogues's Tiger book and Andy Ihnatko's Tiger book. I came up with nothing about setting printer defaults at all.
    I bet I can tweek it in a pref file. I hope I don't have to resort to a hack to do something this standard.
    Any help or pointers would be greatly appreciated!
    PB G4, MacMini (Tiger Server), MacBook Pro   Mac OS X (10.4.5)  

    I think you can do this. Set up a two-sided setting,
    and save it. Print with it. Then find the preference
    file com.apple.print.custompresets.plist, choose Get
    Info, and lock it.
    If you want to save another setting, you will have to
    unlock it.
    Hey this is only a workaround but it is a pretty darned good workaround, especially because it's not too invasive (only locking a pref file at the user level) and what's stored in that custompresets.plist file is com.apple.print.lastPresetPref, which is probably the key to your suggestion. I think I understand it, anyway.
    I followed that procedure, created a Custom Preset with duplex turned on which I named "Standard Duplex", then locked the file you suggest that's in my user's home Library. It survived app switching and a reboot. It seems to work great, and I can still use the Standard setting as well if I want to. I even chose the custom setting and although it's locked the temp changes I made were enacted (I chose to print this page, scaled to fit a #10 envelope) and that worked too. The Standard or other presets can still be chosen when you want to use those, and the app remembers the last setting through the rest of the session, it's just that upon opening an app the default is now my custom "Standard Duplex". This does what I want.
    I think this is a great workaround. I'm going to go load it onto my wife's MacBook. I suppose I should mark this solved even though there's no real, y'know, user-manual way to do this. Maybe something I'll just hope is a feature in Leopard.
    Thank you Bruce and all the other helpful folks who pondered on this one! Heh, I'm sure 1/2 of the tree population thanks you too.
    PB G4, Mac Mini G4, MacBook Pro, MacBook   Mac OS X (10.4.7)  

  • Is there any way to set the default for *.doc document so that Pages opens them automatically?

    I have a number of Ms Word documents because I used to have Word for Mac before the last OS release.  Now, of course, when I double-click on them, I get a message saying that PowerPC isn't supported.
    Now Pages will open these files.  Is there any way to change the default for *.doc files so that a double-click will open them in Pages? 
    (Instead of me going to the trouble of finding out where they are actually located on the hard drive so that I can open pages and say - here, open this file--even though you didn't create it--)

    Click on a .doc file and type Cmnd I to open Get Info. In the Open with: menu select Pages, then click on Change All…
    Walt

  • Create Secure store -  Cannot set up certs for trusted CAs

    I am installing the JAVA Add-in in an existing WAS ABAP 6.40 system. ( fresh install).
    I selected strong encryption ..but in the phase Create Secure Store I get an error. I have changed the r+w permissions on my unix box to 777 ( so all..;-) But still the same problem.
    -- SAP WEB AS JAVA SR1 ( SP9) - java 14_64 --
    Here is the log
    SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at javax.crypto.Cipher.a(Unknown Source)
            at javax.crypto.Cipher.getInstance(Unknown Source)
            at iaik.security.provider.IAIK.a(Unknown Source)
            at iaik.security.provider.IAIK.addAsJDK14Provider(Unknown Source)
            at iaik.security.provider.IAIK.addAsJDK14Provider(Unknown Source)
            at com.sap.security.core.server.secstorefs.Crypt.<clinit>(Crypt.java:82)
            at com.sap.security.core.server.secstorefs.SecStoreFS.setSID(SecStoreFS.java:158)
            at com.sap.security.core.server.secstorefs.SecStoreFS.handleCreate(SecStoreFS.java:804)
            at com.sap.security.core.server.secstorefs.SecStoreFS.main(SecStoreFS.java:1274)
    Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
            at javax.crypto.e.<clinit>(Unknown Source)
            ... 9 more
    Caused by: java.lang.SecurityException: Jurisdiction policy files are not signed by trusted signers!
            at javax.crypto.e.a(Unknown Source)
            at javax.crypto.e.a(Unknown Source)
            at javax.crypto.e.g(Unknown Source)
            at javax.crypto.f.run(Unknown Source)
            at javax.crypto.e.g(Unknown Source)
    at java.security.AccessController.doPrivileged1(Native Method)
            at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
            ... 10 more
    any idea ???

    Hello,
    we have the same problem on our site. Can you describe exactly what you've done? (What driver did you mean)?
    Thanks and best regards,
    Jens

  • Setting a default for the Table Headings

    Hi all,
    the users are asking me if it's possible to set in the Table View of Answer the Display Column & Table Headings = As Table.Column as default. This option can be found in the Table View Properties and you can set the value just for the current request...
    Is there a way to set a default value for this option for all the requests?
    Thanks in advance.
    Nazza

    it's stupid, but it works in 9 & 10. probably v8 also, but I can't remember that far back. and it might not work in future releases.
    add this to the top of your script:
    set termout off echo off feed off pages 0 timing off verify off
    rem Determine if parameter 1 is defined. If not, default to "XXX"
    spool temp1.sql
    select 'select decode(instr(''-' from dual;
    def 1
    select ''',''symbol 1 is UNDEFINED''||chr(10)),0,''rem fine'',''define 1 = XXX'') from dual;' from dual;
    spool off
    spool temp2.sql
    @temp1
    spool off
    @temp2
    set termout on
    put your code here
    and of course, it leaves two files (temp1 and temp2) in the current directory. so, you can add o/s dependent delete statements via a host command. or just leave them. you're call.
    Message was edited by:
    shoblock
    forgot the "set" commands at the top
    AND...
    set termout back on at the end (along with echo or whatever else you want).
    and I changed from defaulting &1 to a value of "1", to a value of "XXX". should make it easier to follow (I hope).
    and finally, thanks to Ron who helped me figure this one out (many years ago)

  • How to set initial value for a dropdown box?

    Hi,
    Within Netweaver 2004S (BI 7.0) we use integrated planning. In one of our applications we want to use a dropdown box (created with the WAD) to make a selection possible for a characteristic.
    We set up a pre-query to fill the dropdown box (via data binding CHARACTERISTIC_SELECTION) with the proper values. This works fine.
    We pass on the choosen entry (via command SET_VARIABLES_STATE) to a second variable that is used in another query. This command is triggered after the user makes a selection in the dropdown box. Also this works fine. After selection of one entry, the output of the second query is limited.
    We have the following problem: the first time a blank selection entry is added to the dropdownbox and that no values are passed on to the second query. Because it seems that the user first must choose an entry.
    What we would like to do is that one of the found values of the pre-query is automatically selected in the dropdown box and passed on to the second variable (to limit the second query).
    I give you an example:
    The first query delivers value A, B, and C for the characteristic of the dropdown box.
    The first time the dropdown box showns an empty entry, and three additional entries A, B and C. The second query shows all results, because the second variable doesn't receive any value via the command SET_VARIABLES_STATE. The command is not yet triggered.
    When you select A, B or C, the command is triggered and the second query shows only results for the choosen entry (this is correct). Now the empty entry has disappeared from the dropdown box. Only the entries A, B and C are left.
    Is it possible to set up the dropdown box on such a way (or add some script coding around it) that in the initial show for the dropdown box one of the entries is choosen automatically, so that the empty line is not part of the value set of the dropdown box and that the command connected to the dropdown box (in our case the SET_VARIABLES_STATE) is carried out automatically?
    Please, who can help us with this?
    Kind regards and thanks in advance,
    Marcel.

    Hi,
    In BW 3.5,say you want to set default for calmonth.
    In order to avoid the “ALL” option from appearing in the dropdown box,
    filter infobject 0CALMONTH for DP1 by any valid value.
    In the object Data_provider include the lines in Bold:
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_DATA_PROVIDER"/>
    <param name="NAME" value="DP1"/>
    <param name="QUERY" value="WORKSHOP_CALMONTH_DROPDOWN"/>
    <param name="INFOCUBE" value="0D_SD_C03"/>
    <<b>param name="FILTER_IOBJNM" value="0CALMONTH"/>
    <param name="FILTER_VALUE" value="200401"/></b>
    DATA_PROVIDER: DP1
    </object>
    Hope this helps.
    Anu.

  • How to set a default value in dropdown list in Wendynpro ABAP? Help!

    Hi Experts,
           I have Webdynpro for ABAP application that shows a DropdownwithKey UI element.
    1. I am able to populate the dropdown list. But by default the list is not showing any value. Only when I select a value from the list then it shows it.
    So how to set the default value to the first value in the list? Any code sample will be really helpfull.
    I have written the following code:
    method WDDOINIT .
      DATA:
        node_category TYPE REF TO if_wd_context_node_info.
      node_category = WD_CONTEXT->GET_NODE_INFO( ).
      node_category = node_category->GET_CHILD_NODE( 'CATEGORY' ).
      data:    LT_VALUESET type WDR_CONTEXT_ATTR_VALUE_LIST,
               L_VALUE type WDR_CONTEXT_ATTR_VALUE.
    L_VALUE-VALUE      = 'V1'.
    L_VALUE-TEXT    = 'yesterday'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V2'.
    L_VALUE-TEXT    = 'today'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V3'.
    L_VALUE-TEXT    = 'tomorrow'.
    INSERT L_VALUE into table LT_VALUESET.
    node_category->SET_ATTRIBUTE_VALUE_SET(
                 NAME = 'CAT_VALUE'
                 VALUE_SET = LT_VALUESET ).
    endmethod.
    Note that: I am using webdynpro for ABAP.
    Thanks
    Gopal

    I am not sure how it works in Web Dynpro for ABAP, but in Web Dynpro for Java to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element)  in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<defalut value>)
    This generally done in Initialization method of the controller.

  • How to do you set the default for a radio radio button

    I am having a problem setting a value in my code.
    I would like to default a value for the radio button.
    I think I need to use some java/javascript using the cattributes option but I
    am not sure what I should be saying.
    The example is provided below.
    >>>>>>>>>>>>>
    htp.tableRowOpen;
    htp.formRadio('in_prior_no','1',chkd);
    htp.p('1');
    htp.formRadio('in_prior_no','2',chkd);
    htp.p('2');
    htp.formRadio('in_prior_no','3',chkd);
    htp.p('3');
    htp.formRadio('in_prior_no','4',chkd);
    htp.p('4');
    htp.formRadio('in_prior_no','5',chkd);
    htp.p('5');
    htp.tabledata(); htp.br;htp.br;
    htp.tableclose;
    <<<<<<<<<<<<<

    As far as I know, iMovie version 10 is only accurate to .1 seconds or 3 frames.
    I think you could only get down to 5 frames in version 9, though you could display frames s you mention.
    Matt

  • How set up defaults for Rich Media parms?

    My PDFs typically contain a large number of video clips - sometimes as many as 100, with the same particular cluster of parameters needed for every one (floating window, stay open forever till closed by user, no poster, etc.). The current interface forces me to enter these parameters again and again in a set of different dialogs for every single one of these clips one at a time. Then when I inevitably realize later that I need to edit the document, Acrobat's primitive Text Touch-up capabilities force me to return to the source Word document, make the changes there, rebuild the PDF, and go through the same lengthy and tedious process of embedding the video clips and setting their parameters all over again.
    I have requested the ability to have a set of parameters stored as a default as long as about seven years ago, but without success. Back then, someone recommended to me a third party company that might be able to do this for me, but at the time, I was reluctant to spend the money. No longer. I'm now ready to pay the piper. Does anyone know of such a company that might rescue me from this Sisyphusean toil? Or some other solution that I'm simply not aware of?
    Thanks in advance for your help!
    Peyton

    Thanks, but as far as I can see, Replace Pages won't do the job either. Either I must go back to the source document in Microsoft Word and make the changes, perform the page replacement, then re-insert the media clips, or excerpt the appropriate pages to a separate PDF and make the changes with the Text Touch-up tool, which does not enable the text to flow to a second page. And in neither one of these means does the text flow to the next page with all other pages flowing as desired - to say nothing of the fact the many of my decisions as to when to make a new page depend on my own judgement in the source document as to margins, when to add a carriage return to prevent splitting of material that should stay together, and so on.
    So on your advice I have just submitted a post on this topic to the Acrobat SDK forum.
    Thanks again,
    Peyton Todd

  • How to set RAW defaults for Contrast and Brightness?

    When I open a RAW fole in PS Elements 8 the Brightness set to 50 and the contrast set to 25.
    How to set these two values to 0 (zero) as a defaults when a RAW file opened for the first time (defaults).
    Thank you for the help.
    Leo

    I think you can set presets in camera RAW (I'm at work now so I can't tell you the exact method), but setting contrast and brightness to zero gives you an ugly image, and you will most likely move the contrast up and the brightness up, so I'm not sure you are really gaining anything by having a default of 0 contrast and 0 brightness.
    The defaults chosen by Adobe are reasonable.

  • Is it possible to set a default for "Time Span"?

    AME seems to default to the Time Span to "Work Area" when rendering AE compositions. Is there any method, either in the app or by preference file hackery, to change this default to "Entire Composition?"
    Coming from rendering in AE, this is a major problem for my workflow. You can't save this setting with a preset, like you can in AE, so I have to manually set this on every single comp I render. When I inevitably forget (about half the time or more), I end up with partial renders or having to cancel renders and start them over. Not fun.
    I have submitted this as a feature request.

    I miss appointments b/c of this too.
    And no, Apple does not read these forums UNLESS you comment on how pathetic and Mickey Mouse certain elements of their software is - like no 'default' setting for alarms in iCal, and not being able to resize windows from all edges (vs. the little annoying corner) etc etc.
    I hope they fix it with the new software package in Leopard. I'm somewhat afraid it's going to be 'Leper' at first though. We'll see...

  • GR/GI slip print option to be set as default  for movement type 311

    HI,
    I am required to do transfer posting by using tcode MIGO . In this the slip(GR/GI) print indicator is currently not checked  . I need to check  it every time to get the print .
    PLease tell me how can i set this option to be always set as checked as default setting . I need to do this movement type 311 specific.
    Waiting for your reply
    Thanks
    Rohit Chavan

    Hi
    If you are looking at having the print checkbox selected automatically when you goto MIGO, set the parameter ID NDR in your user master record as X.
    Regards
    Prasad

  • Field restrictions set in SWEC for BUS2012.

    Hi Gurus,
    The field restrictions have been set for fields (ekpo-menge, ekpo-netpr etc..). But this doesnot seem to work. The workflow triggers if there is any change in the PO. This should not happen. Please help in this regards.
    Thanks,
    Sathish.

    Please find below the code for the same.
    FUNCTION ZTMP_CHECK_po_workflow.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(EVENT) LIKE  SWETYPECOU-EVENT
    *"     REFERENCE(RECTYPE) LIKE  SWETYPECOU-RECTYPE
    *"     REFERENCE(OBJTYPE) LIKE  SWETYPECOU-OBJTYPE
    *"     REFERENCE(OBJKEY) LIKE  SWEINSTCOU-OBJKEY
    *"  TABLES
    *"      EVENT_CONTAINER STRUCTURE  SWCONT
    *"  EXCEPTIONS
    *"      ANY_EXCEPTION
      TYPES:BEGIN OF ity_awkey,
              awkey TYPE awkey,
            END OF ity_awkey.
    * Local internal table declaration
      DATA:it_cdpos TYPE STANDARD TABLE OF cdpos INITIAL SIZE 0,
            it_rseg TYPE STANDARD TABLE OF rseg INITIAL SIZE 0,
            it_bseg TYPE STANDARD TABLE OF bseg INITIAL SIZE 0,
            it_bkpf TYPE STANDARD TABLE OF bkpf INITIAL SIZE 0,
            it_rbkp TYPE STANDARD TABLE OF rbkp INITIAL SIZE 0,
            it_awkey TYPE STANDARD TABLE OF ity_awkey INITIAL SIZE 0 .
      DATA: wa_cont TYPE swr_cont,
    it_cont TYPE STANDARD TABLE OF swr_cont.
    * Local work area declaration
      DATA:wa_cdpos TYPE cdpos,
            wa_swcont TYPE swcont,
            wa_bkpf TYPE bkpf,
            wa_bseg TYPE bseg,
            wa_ekko TYPE ekko,
            wa_awkey TYPE ity_awkey,
            wa_rseg TYPE rseg,
            wa_rbkp TYPE rbkp.
    * Local variable declaration
      DATA: lv_flag     TYPE i,
            lv_changenr TYPE cdchangenr,
            lv_change   TYPE char1,
            lv_po_change TYPE char1,
            lv_objtype TYPE swetypecou-objtype,
            lv_objkey TYPE sweinstcou-objkey.
    * Get header data of PO
      SELECT SINGLE *
        FROM ekko
        INTO wa_ekko
        WHERE ebeln EQ objkey.
    * If revised PO approved
      IF wa_ekko-frgke  EQ 'A' AND wa_ekko-procstat EQ '05'.
        SELECT *
          FROM rseg
          INTO TABLE it_rseg
          WHERE ebeln EQ wa_ekko-ebeln.
        IF sy-subrc EQ 0.
          SORT it_rseg BY belnr.
          DELETE ADJACENT DUPLICATES FROM it_rseg COMPARING belnr.
          LOOP AT it_rseg INTO wa_rseg.
            CONCATENATE wa_rseg-belnr wa_rseg-gjahr INTO wa_awkey-awkey.
            APPEND wa_awkey TO it_awkey.
          ENDLOOP.
          SORT it_awkey BY awkey.
          DELETE ADJACENT DUPLICATES FROM it_awkey.
    *     Get invcoice document
          SELECT *
            FROM bkpf
            INTO TABLE it_bkpf
            FOR ALL ENTRIES IN it_awkey
            WHERE awkey EQ it_awkey-awkey.
          IF sy-subrc EQ 0.
            SELECT *
              FROM bseg
              INTO TABLE it_bseg
              FOR ALL ENTRIES IN it_bkpf
              WHERE bukrs EQ it_bkpf-bukrs
                AND belnr EQ it_bkpf-belnr
                AND gjahr EQ it_bkpf-gjahr.
          ENDIF.
        ENDIF.
    *   Check if any invoice is blocked
        LOOP AT it_bseg INTO wa_bseg WHERE zlspr IS NOT INITIAL. "WHERE zlspr IS NOT INITIAL.
          READ TABLE it_bkpf
                INTO wa_bkpf
                WITH KEY bukrs = wa_bseg-bukrs
                         belnr = wa_bseg-belnr
                         gjahr = wa_bseg-gjahr.
          IF sy-subrc EQ 0.
            lv_objtype = 'BUS2081'.
            lv_objkey = wa_bkpf-awkey.
            CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
              EXPORTING
                object_type = lv_objtype
                object_key  = lv_objkey
                event       = 'ZPO_CHANGE'
                commit_work = ''.
          ENDIF.
        ENDLOOP.
    * If revised PO changed and it has invoices pending for approvals.
      ELSE.
    * Read change object document number
        READ TABLE  event_container
              INTO wa_swcont
              WITH KEY element = 'CD_CHANGENR'.
        IF sy-subrc EQ 0.
          lv_changenr = wa_swcont-value.
          CLEAR wa_swcont.
          SELECT *
            FROM cdpos
            INTO TABLE it_cdpos
            WHERE objectclas EQ 'EINKBELEG'
              AND objectid   EQ objkey
              AND changenr   EQ lv_changenr.
          IF sy-subrc EQ 0.
    *   Check if PO Value is changed.
            READ TABLE it_cdpos
                  INTO wa_cdpos
                  WITH KEY tabname = 'EKKO'
                           fname   = 'RLWRT'.
            IF sy-subrc EQ 0.
              lv_po_change = 'X'.
            ENDIF.
    *   Check if PO Value is changed.
            READ TABLE it_cdpos
                  INTO wa_cdpos
                  WITH KEY tabname = 'EKPO'
                           fname   = 'MENGE'.
            IF sy-subrc EQ 0.
              lv_po_change = 'X'.
            ENDIF.
    *   Check if PO Value is changed.
            READ TABLE it_cdpos
                  INTO wa_cdpos
                  WITH KEY tabname = 'EKPO'
                           fname   = 'NETWR'.
            IF sy-subrc EQ 0.
              lv_po_change = 'X'.
            ENDIF.
            IF lv_po_change EQ 'X'..
    * Get header data of PO
              SELECT SINGLE *
                FROM ekko
                INTO wa_ekko
                WHERE ebeln EQ objkey.
    * If revised PO approved
              IF sy-subrc EQ 0.
                SELECT *
                  FROM rseg
                  INTO TABLE it_rseg
                  WHERE ebeln EQ wa_ekko-ebeln.
                IF sy-subrc EQ 0.
                  SORT it_rseg BY belnr.
                  DELETE ADJACENT DUPLICATES FROM it_rseg COMPARING belnr.
                  LOOP AT it_rseg INTO wa_rseg.
                    CONCATENATE wa_rseg-belnr wa_rseg-gjahr INTO wa_awkey-awkey.
                    APPEND wa_awkey TO it_awkey.
                  ENDLOOP.
                  SORT it_awkey BY awkey.
                  DELETE ADJACENT DUPLICATES FROM it_awkey.
    *     Get invcoice document
                  SELECT *
                    FROM bkpf
                    INTO TABLE it_bkpf
                    FOR ALL ENTRIES IN it_awkey
                    WHERE awkey EQ it_awkey-awkey.
                  IF sy-subrc EQ 0.
                    SELECT *
                      FROM bseg
                      INTO TABLE it_bseg
                      FOR ALL ENTRIES IN it_bkpf
                      WHERE bukrs EQ it_bkpf-bukrs
                        AND belnr EQ it_bkpf-belnr
                        AND gjahr EQ it_bkpf-gjahr.
                  ENDIF.
                ENDIF.
    *   Check if any invoice is blocked
                LOOP AT it_bseg INTO wa_bseg WHERE zlspr IS NOT INITIAL. "WHERE zlspr IS NOT INITIAL.
                  READ TABLE it_bkpf
                        INTO wa_bkpf
                        WITH KEY bukrs = wa_bseg-bukrs
                                 belnr = wa_bseg-belnr
                                 gjahr = wa_bseg-gjahr.
                  IF sy-subrc EQ 0.
    *                wa_cont-element = 'GV_CONFIRM_FLAG'.
    *                wa_cont-value = 'X'.
    *                APPEND wa_cont TO it_cont.
                    lv_objtype = 'BUS2081'.
                    lv_objkey = wa_bkpf-awkey.
                    CALL FUNCTION 'SWE_EVENT_CREATE'
                      EXPORTING
                        objtype = lv_objtype
                        objkey  = lv_objkey
                        event   = 'ZPO_CHANGE2'.
                    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                    ENDIF.
                  ENDIF.
                ENDLOOP.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      CLEAR lv_po_change.
    * Read change object document number
      READ TABLE  event_container
            INTO wa_swcont
            WITH KEY element = 'CD_CHANGENR'.
      IF sy-subrc EQ 0.
        lv_changenr = wa_swcont-value.
        CLEAR wa_swcont.
        SELECT *
          FROM cdpos
          INTO TABLE it_cdpos
          WHERE objectclas EQ 'EINKBELEG'
            AND objectid   EQ objkey
            AND changenr   EQ lv_changenr.
        IF sy-subrc EQ 0.
    *   Check if PO Value is changed.
          READ TABLE it_cdpos
                       INTO wa_cdpos
                       WITH KEY tabname = 'EKKO'
                                fname   = 'RLWRT'.
          IF sy-subrc EQ 0.
            lv_po_change = 'X'.
          ENDIF.
    *   Check if PO Value is changed.
          READ TABLE it_cdpos
                INTO wa_cdpos
                WITH KEY tabname = 'EKPO'
                         fname   = 'MENGE'.
          IF sy-subrc EQ 0.
            lv_po_change = 'X'.
          ENDIF.
    *   Check if PO Value is changed.
          READ TABLE it_cdpos
                INTO wa_cdpos
                WITH KEY tabname = 'EKPO'
                         fname   = 'NETWR'.
          IF sy-subrc EQ 0.
            lv_po_change = 'X'.
          ENDIF.
          IF lv_po_change EQ 'X'.
            lv_change = 'X'.
            EXPORT ex_change FROM lv_change TO  MEMORY ID 'ZTMPANGE'.
            EXPORT ex_change FROM lv_change TO  MEMORY ID 'ZTMPANGE1'.
            lv_flag = 1.
          ELSE.
          ENDIF.
          IF lv_flag NE 1.
            RAISE any_exception.
          ENDIF.
        ENDIF."    IF sy-subrc EQ 0. CDPOS
      ENDIF."  IF sy-subrc EQ 0.
      IF objtype EQ 'BUS2012'.
        READ TABLE  event_container
              INTO wa_swcont
              WITH KEY element = 'RELEASECODE'.
        IF wa_swcont-value IS INITIAL AND sy-subrc EQ 0.
          RAISE any_exception.
        ENDIF.
        IF sy-subrc NE 0.
          RAISE any_exception.
        ENDIF.
      ENDIF.
    ENDFUNCTION.

  • How do I set a default for folders to be read & write

    I have an IMAC with OSX v10.6. I am on a network with a few other computers. My disk is used to house shared folders. When I create a new folder or file from Word it is set to "read only" and I have to go into the file info and set it to "read & write". This may be a simple fix but I would like to know how to change my preferences to fix this issue.
    THANKS!

    The Firefox [https://support.mozilla.com/en-US/kb/Page+Zoom Page Zoom] feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox, as with some other browsers.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

Maybe you are looking for

  • How to use the BADI CRM_MKTLIST_BADI in External List Management?

    Hi Experts, I am using ELM tool to upload new accounts from an excel file. I need to do some coding before the BPs get created into CRM. This coding is for mapping some fields & doing a few validation checks. We have a BADI CRM_MKTLIST_BADI for this.

  • Can't work out how to stop Mac mail from Forwarding to GMail account.

    Okay. This is on behalf of my sister. For whatever reason, when emails are sent to her @mac.com address they get forwarded to her GMail account and deleted from her @mac.com address. So they never appear in her @mac.com inbox. She now wants this rela

  • ITunes cannot connect to internet

    So I can't use my new ipod touch without connecting to the itunes store. I've disabled all my firewalls, yet I still cannot connect to the itunes store. I run the network diagnostics and it fails, but when I click the help button, I see "iTunes Help

  • Please review/help WPA config

    It seems to be setup ok for 802.1x with WEP re-keying but we are not being assigned an IP address after connection is established. We have confirmed EAP-TLS works through our Radius box using a different AP, the Linksys WRT54G so it seems to be a con

  • Task assignment in Collab server

    Hi All, Not really sure where to post Collab server questions but here goes... It appears that a task can only be assigned to an individual Collab 3.02. Does anyone know if a task can be assigned to a group or several individuals in Collab 4? Thanks,