How to clear the fields within copy routines in the copy contorl

HI Gurus,
I need to clear  the fields VBP-VBELV and VBAP-PSSNV within the copy routines 303 in the copy control between quote item and sales order item. I am not sure how to do that... Can some body please help.
This is required because we had sales order and quote using the same requirement type which controls the special stock indicator. This leads to the stock getting update in quotation instead of the sales order, because the quotation is initiating document (collecting all cost etc).Now i know requirement should only be passed to production from sales order and not from quotation so i changed the config but there are some existing documents using same requirement type on both quotation and sales order and to correct those i need to clear fields VBP-VBELV and VBAP-PSSNV within the copy routines 303.
Please help!
Regards,
Sam

Hi ,
just use this code in ur save button action handler , this will clear the field after entered in to the database and will ready for the next set of data.
String password=wdContext.currentContextElement().getpwd();
try{
     InitialContext ctx=new InitialContext();
     DataSource ds=(DataSource)ctx.lookup("jdbc/SAPJ2EDB");
     Connection con=ds.getConnection();
     con.setAutoCommit(false);
     Statement stmt=con.createStatement();
     int retIns = stmt.executeUpdate("insert into TMP_NEWUSERDETAIL(PASSWORD) values("password")");
     con.commit();
     con.setAutoCommit(true);
     wdContext.currentContextElement().setpwd(null);
or use a seperate button to clear the field.
wdContext.currentContextElement().set<Attributename>(null);
Regards
Vijayakhanna Raman

Similar Messages

  • The field "SOURCE_PACKAGE" is unknown IN THE START ROUTINE?

    Hi all,
    i am trying to create a start routine in the DTP FROM THE CUBE TO THE OPEN HUB.
    But when i check the syntax : it throws me an error message stating.
    The field "SOURCE_PACKAGE" is unknown IN THE START ROUTINE?
    how come the source package is unknow in the start routine can anyone pls advise  me on this!!
    DATA: l_tabix TYPE sy-tabix, wa_source_package TYPE tys_sc_1.
    LOOP AT SOURCE_PACKAGE INTO wa_source_package.
    l_tabix = sy-tabix.
    IF wa_source_package-SALES EMP EQ ' '.
    DELETE SOURCE_PACKAGE
    WHERE SALESEMP EQ ' '.
    INDEX l_tabix.
    ENDIF.
    ENDLOOP.

    Hi Pooja,
    I think that the error comes from the delete statement.
    As you already said, the SOURCE_PACKAGE is from BI7.0. That means that the LOOP AT statement cannot be wrong (although I prefer field-symbols)
    I would restate you code like below:
    DATA: l_tabix TYPE sy-tabix,
          wa_source_package TYPE _ty_s_sc_1.
    LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.     "<source_fields> is declared as line from source_package
    * l_tabix = sy-tabix.
      IF <source_fields>-SALES_EMP IS INITIAL.
        DELETE <source_fields> FROM SOURCE_PACKAGE.
    * If this line does not work, try to add TABLE after the FROM-statement
    *WHERE SALESEMP EQ ' '.
    *INDEX l_tabix.
      ENDIF.
    ENDLOOP.
    Hopefully this will help.
    Alternatively you can try a single statement, because it is not necessary to do a loop.
    DELETE SOURCE_PACKAGE WHERE sales_emp IS INITIAL.
    Good luck!
    Steven Groot
    Edited by: S. Groot on Aug 11, 2010 7:50 AM

  • How do you change the fields that are displayed on the email preview list after a search?

    How do you modify the fields that are displayed in the mail preview list in the center column of Mac mail after you conduct a search of your email?   All of a sudden the displayed fields changed on me whenever I do a search in mail.   When I have not filtered my email with a search, the default field shown in bold at the top of each message's preview is the "From" field.   However, when I do a search this changes to the "To" field.   Can anyone help?   Thanks, ccarey

    ipicus
    But why would you want this?
    iTunes is responsible for the File Management, let it get on with it, you do your organisation in the iTunes window. And everything you need to do, you can do via the iTunes Window. Want to find the file of a track quickly? Right click on it in the iTunes Window and select Show File: A finder window pops open with the file already selected.
    Regards
    TD

  • Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO

    Is there a way to sort a PDF file with multiple pages by a specific field within the PDF? All pages have the same invoice format and i would like to sort by a field within and then print the documents. (Vendor, PO#, Date, ect.)

    When you say field, do you mean specifically a form field, such as a text field? Or is the information regular text on the page?

  • How to validate the field when i am populating the data cursor to block

    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.

    902434 wrote:
    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.If you want to validate at entry level then use When-Validate-Item trigger and check the input and show message. Like
    If :quentity <0 then
    message('do not enter negative value');
    message('do not enter negative value');
    raise form_trigger_failure;
    end if;Why u open same thread again ? not closing one.. check this one
    </a>
    How to validate the field when i am populating the data cursor to block
    Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • How to put an asterisk in the field label rather than on the field in Infopath

    For a mandatory field in Infopath, we know that the red asterisk shows up always on the control. Is there a way we can make it appear on the label instead. 
    In the figure below, can we have the red asterisk on the label where ? symbol is present ?

    Hi Prajk,
    From your description, my understanding is that you want to put an asterisk in the field label rather than on the field in Infopath.
    By default, the asterisk is on the field, not the field label. If you want to put an asterisk in the field label, per my knowledge, you need to develop the column to do it.
    For developing InfoPath controls, I suggest you create a new thread on Visual Studio Tools for Office forum, more experts will assist you with Office development.
    VSTO:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsto
    Thanks,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Activate the FIELD Cost Center while issuing the Material to Order by 261

    Dear All,
    How to activate the FIELD Cost Center while issuing the material againest Order IN MB1A?
    Thanks and regards,
    Satyajit

    Hi all,
    I'm having problems with activating the cost center field too. I've already checked OMBW and OMJJ. For OMJJ, cost center field was required. For OMBW, Cost Center field was Supressed. However, when I checked the Change Logs, no changes were performed since last year. The user who raised this issue had the cost center field activated until December 1, 2008 but now it's deactiavted. So I don't think it's OMBW responsible for this since there was no change since last year.
    Please share your knowledge on this.
    Thanks!

  • What is the field to be used in the field catalog

    hi
    what is the field to be used in the field catalog of an ALV report to hide the relevant column inthe list

    hi,
    if you want to hide a particular column dont specify it in output list. it wont be displayed then.
    or if you want to display that column when particular radio button is selected then use:
    if radi1 = 'x'.
    Order Number
      wa_fldcat-fieldname     = 'AUFNR'.
      wa_fldcat-col_pos       =  l_pos.
      wa_fldcat-scrtext_s = 'Order'.
      wa_fldcat-scrtext_m = 'Order'.
      wa_fldcat-scrtext_l = 'Order'.
      APPEND wa_fldcat TO it_fldcat.
      CLEAR wa_fldcat.
      l_pos = l_pos + 1.
    endif.

  • What are the security settings to lock down a form with fillable fields and yet allow someone with Reader to fill in the fields as will as save the form and print it?

    What are the security settings to lock down a form with fillable fields and yet allow someone with Reader to fill in the fields as will as save the form and print it?

    You want to allow someone to open your document and fill out the form (in the fields you have created), but not change or edit the form, right? Here's the answer - assuming you are using Acrobat Pro and someone will be opening the PDF using at least Acrobat Reader 9 and up:
    Tools > Protection > Encrypt < Encrypt with Password
    Answer YES to change the security.
    A new window opens:
         Do NOT select Document Open (or that will require a password to open the document.)
         Select: Permissions (Check the box next to "Restrict editing and printing of the document.")
         Change the following 2 settings from the drop-down box:
              Printing Allowed: Select High Resolution
              Changes Allowed: Select Commenting, filling in form fields, and signing signature fields
              Leave selected: "Enable text access for screen reader devices for the visually impaired"
              Change Permissions Password (insert a strong password)
              Leave all other settings alone in "Options"
              OK - OK
              Re-enter the Permissions Password (the one you entered above)
              OK - OK
              Save the PDF to apply the security [notice that (SECURED0 will appear after the document title]

  • I am trying to map the fields in R3 system  with the infoobjects in BW.

    I am mapping the fields with in R3 with the infoobjects in BW.
    Can any please let me know the relavent mapping infoobjects and the procedure to find for the following fields.
    Description                          Type          Length
    Purchase Order     VARCHAR2     10
    PO Line Number     NUMBER     10
    Line Item Description     VARCHAR2     60
    Order Quantity          
    Unit of Measure     VARCHAR2     3
    Performance Start Date     DATE     7
    Performance End Date     DATE     7
    Order Date                           DATE      7
    PO Line Extended Amount     NUMBER     14
    PO Line Total Amount     NUMBER     14
    Project                         VARCHAR2     30
    Account ID                         VARCHAR2     15
    Cost Amount                             NUMBER      14
    Prime Contract ID     VARCHAR2     20
    Requisition ID     VARCHAR2     10
    Vendor ID                            VARCHAR2     12
    Vendor Name     VARCHAR2     25
    Entry Date/Time      DATE     7
    Address Descriptive Code     VARCHAR2     10
    Address Line 1     VARCHAR2     40
    City Name                         VARCHAR2     25
    Mail State                          VARCHAR2     15
    Postal Code                         VARCHAR2     10
    Country Code     VARCHAR2     8
    Phone Number     VARCHAR2     25
    Fax Number ID     VARCHAR2     25
    Other Phone Number ID     VARCHAR2     25

    Hi,
    You can find the fields and related infoobject for the datasource as follows
    Step1
    log on to the BW system
    Step2
    Go to SE11 ---> give the table name as RSOSFIELDMAP and execute
    Step3
    give the data source name for OLTPSOURCE field and execute
    Step4
    you will find the mapping between fields and relevent infoobjects
    Hope this helps
    Santosh

  • PT60 the field Personnel Area( PERSA ) of the authorization object P_ORGIN

    Hi,
    When running transaction PT60 the field Personnel Area( PERSA ) of the authorization object P_ORGIN is not checked.
    I have run SU24 ,the objects are there with chech indicator of authorization object = "CHECK".
    What can I do about it ? Is there any note to fix this ?
    thanks!
    Olivia Yang

    Hi,
    In object P_ORGIN what you need to check for authorisation is it on Personnel area or PSA.Actually we have org.key for authorisation which is define in P_ORGIN.If you can define org. key as PA/PSA/EG/ESG you can check the authorisation for specific users.
    Regards,
    Snita

  • How to clear text fields when the user navigates back to the screen

    Hi,
    Does anyone have any idea on how to clear the text input fields and dropdown boxes when the user navigates back to the screen, say for e.g. create screen?
    My issue is that i have plenty of fields in the create screen within a form. Is there a way to avoid programaticaly blanking out every field and just do it at the form level using an api to reset to a state before the user entry?
    Thanks

    This code allows you to make it more generic, and you would need to tweak it if there are more than TextInput controls, but it should provide some ideas.
    As far as using states, you could use SetProperty to set the text to empty, but that might be messier.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.containers.FormItem;
          import mx.controls.TextInput;
          import mx.events.IndexChangedEvent;
          import mx.core.Container;
          private function clearSreen(evt:IndexChangedEvent):void{
            var view:Container = tn.selectedChild as Container;
            for each(var child:Object in view.getChildren()){
              if(child is FormItem){
                var subchild:DisplayObject = child.getChildAt(0);
                if(subchild is TextInput){
                  TextInput(subchild).text = "";
        ]]>
      </mx:Script>
      <mx:TabNavigator id="tn" resizeToContent="true"
        change="clearSreen(event)">
        <mx:Form id="frm1" label="View Number One">
          <mx:FormItem label="First name:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Last name:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
        <mx:Form id="frm2" label="View Number Two">
          <mx:FormItem label="Address1:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Address2:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="City:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="State:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Zip code:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
      </mx:TabNavigator>
    </mx:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • How to clear all fields on the page by using javascript ?

    Hello,
    has anyone an example of javascript function that clears all fields on the page?
    Thanks

    Hi Edward,
    You may want to have a look here http://textsnippets.com/posts/show/215
    Or try this (source from http://www.mindpalette.com/tutorials/clear_defaults/index.php):
    function MPClearAll() {
    with (document.forms[thisForm]) {
    for (var n=0; n<defaultVals.length; n++) {
    var thisField = defaultVals[n][0];
    var thisDefault = defaultVals[n][1];
    if (elements[thisField].value == thisDefault)
    elements[thisField].value = '';
    }}}Hope that helps,
    Dimitri

  • How to clear input field value on back

    Hi All,
    I have developed an application, in which user put sales order on first page and press a button then its detail display on second page using restAPI. Now when I press back button on second page then it takes me to first page with holding previous sales order value in input field. And when I change its value and press that button again then it shows me previous sales order detail.
    Please suggest me, how to refresh cache and input fields value on back button?
    Thanks & Regards
    Shubhanshu

    Hi Viren,
    My code is,
    First view
    sap.ui.jsview("uitest2.first", {
      getControllerName : function() {
      return "uitest2.first";
      createContent : function(oController) {
      var text = new sap.m.Label({
            text: 'Dealer Code',
           layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center })
      var input =  new sap.m.Input("CUSTOMER",{
            type: sap.m.InputType.Text,
          placeholder: 'Enter Dealer code...',
          layoutData: new sap.m.FlexItemData({growFactor: 1, alignSelf: sap.m.FlexAlignSelf.Center}) 
      var Dealer = new sap.m.HBox({ 
                items:[  text,input
    //                   new sap.m.Label({
    //                   text: 'Dealer Code'
    //                   new sap.m.Input("CUSTOMER",{
    //                   type: sap.m.InputType.Text,
    //                   placeholder: 'Enter Dealer code...'
                       height : "6em"
          var button = new sap.m.Button({
               text: "Submit",
               press: function(oEvent) {
                  oController.loadData();
                  app = sap.ui.getCore().byId("myApp");
                  app.to("idsecond1");//, sap.ui.getCore().byId("CUSTOMER").getValue());
               layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center}) 
          return new sap.m.Page({
         title: "Sales Dealer Info",
         content: [ Dealer,button
    First controller
    sap.ui.controller("uitest2.first", {
        loadData: function() {      
            var oParameters = ({
            "CUSTOMER" : sap.ui.getCore().getElementById('CUSTOMER').getValue(),    
             console.log(oParameters);
             var url = "http://###########:8000/sap/bc/zrst_customer?sap-client=800/";
             var oModel = new sap.ui.model.json.JSONModel();
             $.ajax({             
             url : url ,
             dataType : "jsonp",
             type : "POST",
             data: oParameters,
             success: function(data,textStatus,jqXHR) {
             data = JSON.parse(data);
                     console.log(data);   
                     oModel.setData(data);
             sap.ui.getCore().setModel(oModel);
    Second View
    sap.ui.jsview("uitest2.second", {
      getControllerName : function() {
      return "uitest2.second";
      createContent : function(oController) {
      var oTable = new sap.m.Table("table",{
           headerText: "Dealer data",
           columns: [
             new sap.m.Column({
               header: new sap.m.Label({text: "NAME"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "CITY"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "COUNTRY"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "COUNTRYISO"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "STREET"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "PST_CODE"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "TELEPHONE"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "EMAIL"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
           items: {
           path: "/KEY",
           template: new sap.m.ColumnListItem({
           cells: [
                   new sap.m.Text({                              //new sap.m.ObjectIdentifier
                   text: "{NAME}"
                   new sap.m.Text({
                   text: "{CITY}"
                   new sap.m.Text({
                   text: "{COUNTRY}"
                   new sap.m.Text({
                   text: "{COUNTRYISO}"
                   new sap.m.Text({
                   text: "{STREET}"
                   new sap.m.Text({
                   text: "{PST_CODE}"
                   new sap.m.Text({
                   text: "{TELPHONE}"
                   new sap.m.Text({
                   text: "{EMAIL}"
      return new sap.m.Page({
      title: "Dealer Info",
      showNavButton: true, 
      navButtonTap:function(){ 
      app = sap.ui.getCore().byId("myApp"); 
      app.to("idfirst1"); 
      sap.ui.getCore().getElementById('CUSTOMER').setValue("");
      oModel.refresh();
      content: [ oTable
    Index.htm
    <!DOCTYPE HTML>
    <html>
      <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <script src="resources/sap-ui-core.js"
      id="sap-ui-bootstrap"
      data-sap-ui-libs="sap.m,sap.ui.commons"
      data-sap-ui-theme="sap_bluecrystal">
      </script>
      <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->
      <script>
      sap.ui.localResources("uitest2");
      var app = new sap.m.App("myApp",{initialPage:"idfirst1"});
      var page = sap.ui.view({id:"idfirst1", viewName:"uitest2.first", type:sap.ui.core.mvc.ViewType.JS});
      var page1 = sap.ui.view({id:"idsecond1", viewName:"uitest2.second", type:sap.ui.core.mvc.ViewType.JS});
      app.addPage(page).addPage(page1);
      app.placeAt("content");
      </script>
      </head>
      <body class="sapUiBody" role="application">
      <div id="content"></div>
      </body>
    </html>
    Thanks
    Shubhanshu

  • How to populate the field Discount Percent (DIS) in the outbound S1ORDEXC?

    Hello all,
    I am working with the Spec2000 to send out the IDOC S1ORDEXC.
    Does anyone know how to populate the field Discount Percent (DIS)?
    This field length of Discount Percent is 2 characters, but our customer discount in the Princing Conditions (Sales Order) is longer than 2 characters (ex:  7.500-%)
    Thank you

    Hello Thuan
    I guess you are working with IS- ADEC and SPEC 2000. I am not an expert on this but leave you some hints from OSS notes I came across.
    It appears like Discount Percent - DIS and Procurement Discount Percent -PDP are complementary and mutually exclusive. If one exists, the other need not.
    Looks like DIS is computed as (100-PDP)/100 and it is just a 2- integer data (as in 20 Percent). It is a kind of multiplier (Factor), example if  PDP discount is 10 percent, then DIS (Factor) is 0.9 and so  final (net) price after discount = Price*0.9.
    " If the discount comes in the S1BOOKED inbound into SD in the field DIS, then the discount has to be sent back in the DIS field .. if it came in the PDP field then it has to be sent back in the PDP field. If there was no discount in the incoming IDoc, then the discount has to be filled in the PDP if there was a change in the discount".
    KDATE in SPEC 2000 file maps to DIS and KPERC to PDP.
    PDP has 4 characters and per OSS note 440380, the point is ignored meaning you can work with 1225 instead of 12.25.
    So may be you can work with PDP?
    OSS notes: Apply to older releases but may still be applicable conceptually speaking.
    456153 - S1ORDEXC does not send out Discount
    440380 - PDP has only 4 characters in the SPEC IDoc instead of 5
    596042 - Discount percent DIS not considered e processing S1ORDEXC
    698668 - Incorrect calculation of unit price for PO item by S1ORDEXC
    Let me know you final findings.

Maybe you are looking for