How to keep the field value in the forms for one week

I have an application that when the user logs on to it , it shows all the documents that are in the current dept.
the form has the following fields:
document no
sent date
assigned to
dep_LOV
and a check box
if a user clicks the check box and assignes the document to another dept by cliking the LOv then the assigned to field should be populated with the new value and the sent date should be today's date(sysdate). the requirment is that once the user assignes the documnet to certain depts (for example sales dept) the assigned to field and the sent date should show up in the form for one week and the user should be able to see that data in the form the next time she /he logs onto the application. the one week time is to make sure the documcnt has reached the assigned dept. after one week from today's date the updated assigned_to field and the document no should not display on the form. During the one week if the user logs on to the form again that particular document and the assigned to and sent to fields shoould be grayed out and shhould not be updatable. I will greatly appreciate any suggetion as of what to do to solve this problem. it is urgent. Pleade help

-> so you are saying that I should have a block level post_query trigger and put the where clause in it?
No. Post-query trigger runs AFTER the query has been executed, and it runs once for each row fetched. It is for other purposes, NOT for setting a where clause.
-> Plus i want to be able to gray out the field once populated with the sales dept.I have come up with the following code:
Your Set_item_instance_property is almost correct. And THAT line would go into the Post-Query trigger. This is what you might use:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> Set_item_instance_property ('docs.assigned_to',:system.trigger_record, Enabled,Property_False);</font></pre>
Please watch your use of underscore, dashes, commas and parentheses: _ - , ( )
The way to set your default where clause would be the following, and you should do it in the key-exeqry trigger, or someplace similar:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> set_block_property('DOCS', default_where,
'NVL(sent_date,sysdate) >= sysdate-7' );
Go_block('DOCS');
Execute_Query;</font></pre>
I used the NVL function so your select will show rows where sent_date is null OR sent_date has a value that is within 7 days prior to the current date.
What is the field :docs.assigned_to used for? If you want to include ONLY rows that are assigned to a particular person, then your where clause might be:
<pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> 'assigned_to = :ctrl.assigned_to and NVL(sent_date,sysdate) >= sysdate-7' </font></pre>
and you should have a control block with the assigned_to field in it, where the user can enter a value before querying the DOCS block.

Similar Messages

  • How to get a field value in the report

    hi all :-
    i need to get the field value in the formate trigger inside a specified field in the report?

    please post your request in the report category forum

  • Query regarding the fields details in particular form for all the users in

    Dear All,
                  I have one query regarding the fields details in particular form for all the users in company.
    Let take an exapmle if i had created Purchase Order having fields in content tab as 1.Item No. 2.Quantity 3.Unit Proce   4.Total   5. Location.
    While Login in User manager i set these fields only for Purchase order , but when i login from other user and open the similar purchase order the defaults fields are also seen including  above 4 fieds .
    Now my question is how to set the User choice fiels for the particular form that are common to all users.
    Means whenever i login in any user and opens the same document the same fields should be seen....Thanksssss.........

    You have to login with each and every user and do the Form Settings of every forms, so that all the forms look same for all the users.
    This is a manual job and you have do do it with every user login.
    Alternately, you can try out this link that explains
    [How to Copy One Screen Layout to Another User|http://www.sbonotes.com/2008/03/how-to-copy-one-screen-layout-to.html]

  • How to transfer the field values in MA form RFX

    Hi
    We have two  fields ( extended field of date type ) in Rfx page . Now client wants that this two field value will be transferred to Master Agreement page while creating MA form Rfx award .
    Is there any possible way to do this ?
    Regards
    Sudipta
    Edited by: Sudipta62 on Dec 20, 2011 10:38 AM

    Sudipta, Vikram,
    If names are the same, are the fields transferred automatically? Or do we still write code?
    Thanks,
    MP

  • Read and display the field values in the table control

    Hi Experts,
    I am new to the Table Control. I have created table control using the wizard where i have mentioned the ztable while creating which consist of the following fields.
    Item Number
    Material number
    Material Description
    Net Price.
    I would like to retrieve the material description, Order quantity and Netprice based on the selection of the material number from the table control field.
    Thanks in advance.
    Sunil Kumar.

    Hi,
    Try to implicate the following code to your requirement..
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
      LOOP AT itab INTO wa_itab.
       CHAIN.
        FIELD wa_itab-item.
        FIELD wa_itab-material MODULE fetch_desc_price ON CHAIN-REQUEST.
        FIELD wa_itab-mat_desc.
        FIELD wa_itab-price.
       ENDCHAIN
        MODULE modify_itab.
      ENDLOOP.
    Inside the module.
    MODULE fetch_desc_price INPUT.
    SELECT maktx FROM makt INTO itab-mat_desc
    WHERE matnr = itab-material.
    SELECT STPRS or resp fld from MBEW
    INTO itab-price WHERE matnr = itab-material.
    ENDMODULE.
    MODULE modify_itab INPUT.
    MODIFY itab from wa_itab INDEX <table control name>-CURRENT_LINE.
    ENDMODULE.

  • How to set a default value in a form, for a current record.

    Hello,
    I have created a form to store the details of an employee, details include employee id, name and lan id. I am wondering if it's possible to set the default value for an e-mail address. The e-mail address would be in the format '[email protected]'. So If I press 'create', I am directed to a form.
    In the forename field, if i type 'stewart'
    In the surname field, if I type 'Young'
    Then in the e-mail field, I should see '[email protected]'
    Furthermore, if I change 'stewart' to 'stuart', while still in the form, the e-mail address field is automatically updated to '[email protected]'
    Would anyone be able to help with this problem?

    Hi,
    to do this you need kind of interactivity in your form.
    You can achieve this either by:
    1) using JavaScript onchange-events on forename and surname items, or
    2) use the AJAX Computations option of ApexLib, see: http://www.oracle-and-apex.com/ajax-computations-rich-client-feeling/
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • Add field value to the existing internal table.

    how to add a field value to the existing internal table.
    DATA: BEGIN OF ITAB occurs 0,
                 EBELN TYPE EKPO-EBELN,
                 EBELP TYPE EKPO-EBELP,
                 AEDAT TYPE EKPO-AEDAT,
                 amount(10) type c,
               END OF ITAB.
    select * from ekpo
           into corresponding fields of table itab.
    itab-amount = '2400'.
    loop at itab where ebeln eq 70 .
           write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,itab-amount.
             endloop.
    here output is not showing the amount field value.
    please tell me how to solve this problem urgent
    thanks in advance.

    Hi Sekhar,
        First let me know wheather you are assigning some value to the amount field externally to all records? if this is wright means check the below code.
    DATA: BEGIN OF ITAB occurs 0,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    AEDAT TYPE EKPO-AEDAT,
    END OF ITAB.
    select * from ekpo
    into corresponding fields of table itab.
    v_amount = '2400'.
    loop at itab where ebeln eq 70 .
    write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,v_amount.
    endloop.
    or if you want to modify perticular records in itab  then use below code.
    DATA: BEGIN OF ITAB occurs 0,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    AEDAT TYPE EKPO-AEDAT,
    amount(10) type c,
    END OF ITAB.
    select * from ekpo
    into corresponding fields of table itab.
    loop at itab.
    itab-amount = '2400'.
    modify itab index sy-tabix (or perticular line number).
    endloop.
    loop at itab where ebeln eq 70 .
    write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,itab-amount.
    endloop.
    Thanks,
    Suma.

  • How to create a field value as constant while creating eCATT scripts

    Hello Guru's,
    I am updating thousands of records using eCATT.  How should i declare a field value as constant while creating a eCATT script it self,  so that it automatically picks that value and  update the records. I should not mention the field value in the upload file.
    Full points for the answer,

    Dont parameterize the value that you would like to keep as constant. Pass the default value to that feild while reocrding .

  • How to keep logs for one week through sm36 jobs creation

    Hi
       As i define a job through sm36. Its logs removed next day , but its logs removed through sm37 through next days. But some of the job logs does not removed for even one week. can somebody be help me to sort it out . I want to keep job logs for one week then where i have to define it. If some job is defined which remove all these logs then where we have to define that these logs will remain for one week , because some of the job logs will remain there for one week.
    Thanks in advance
    Regards
    Ravi Kant Arya
    +91 9999530385

    Hello,
    please check the variants of the report used in the job SAP_REORG_JOBS. With the report RSBTCDEL2 you can specify very detailed how long logs should be kept for which jobs (e.g. depending on the job name or job class).
    Regards
    Christian

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How can i transfer a field value in the main report to its sub-report?

    <p><font face="Arial" size="2">How can i transfer a field value in the main report to its sub-report?</font></p><p><font face="Arial" size="2">Please eloberate with example if possible!</font></p><p><font face="Arial" size="2">Thanks...</font></p><p> </p>

    <p>You can do a couple of things - one would be to pass the information using the data linking expert.  Right click on the subreport, choose &#39;Change Subreport Links&#39; and select the field(s) you are wanting to pass to the subreport.  CRW will build parameters and a record selection formula for you in the subreport, and if that&#39;s what you want, then great.  But you can also remove the selection formula from the subreport and work with the parameter fields in the subreport however you would like.</p><p>Alternatively, you can look to passing Shared variables back and forth from the main and subreport.  this link talks about the method to do this: http://diamond.businessobjects.com/node/251</p><p> </p>

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • How to add field value to the standard table

    Hi,
    How to add field value to the standard table?
    for example:
    when we go to TCODE SE16-> VBAK table -> on the selection screen if we press F4 against VBTYP we get all the available values for that field. How to add a new document Category value to this field so that it shows up in F4 help for that field.

    Hi Asif,
    I don't think it is possible and feasible for adding new field value to the field VBTYP because it is not possible through SPRO.
    If u see the domain of this field VBTYP we have fixed values provided by SAP. There is no value table for this. If u have value table then it will be updated through SPRO. But still if u really want to add some value u can do that by getting access key and add the value in the fixed values of the domain. But of no use other than simply displaying in F4. Because for what ever value u created here there will be no documents in VBAK or any table using this domain.
    Hope this is clear for u.
    Thanks,
    Vinod.

  • How to set the default values of the field of the context.

    Hi Experts ,
    I want to set the default value of the field of the context.
    Where and how this declaration should be done.
    Thanks in Advance.

    In the context tab of the view. Select the attribute for which you want to set the default value.it will show the properties at the bottom. set the Default value property to the value which you want to set as the default value.
    Regards
    Naresh

Maybe you are looking for

  • Can I Auto format the first paragraph on every page of a 20 page document?

    So I have a document that is basically just a numbered list of 200 entries. There are 10 entries per page, making it a 20 page document. Unfortunately, every so often I am given an additional entry to add, which invariaby is to the middle of the docu

  • ITunes 7 not recognizing my ipod - RESOLVED!

    Good news, gals and guys! It appears that I managed to solve my problem of iTunes 7 not seeing my iPod Nano. I went through all the support steps but had no success in fixing the issue. I decided that even though Appled did release a beta version of

  • JOB in Sql Server Agent should run multiple times.

    Hi Guys, I have a ETL SSIS job in Sql Server Agent, Which should run multiple times.  1. For Example : I scheduled a job at 10:00 PM, If the job fails at 10:00 PM it should run automatically again at 10:10 PM, if the job fails again at 10:10 PM then

  • UPGRADING FROM FOMS 3.1

    Please let me know weather any tool is avialble wherby i can convert existing forms (forms 3.1) and reports to Solaris based Oracle forms 6i and reports 6i. We have about 1000 forms to be converted. Please give me the details of the vendors who has s

  • Flex - Session like variable ?

    hi all, Is there a way to store a valriable in flex?( like a session in java/php). I am doing flex& Java integration but i need to store variable(var username:String in login page) in flex application. And I need to access user name in other pages al