Creating F4 with  values determined by another field

Hi,
I have a table with a few fields.
I created a search help for the first field.
According to my demands, the values of the search help of the second field should be determined according to the
user selection of the first field.
I thought to use SET/GET - so this way I save the value of the first field and I implement an exit method where I do the GET.
But - where can I do the SET ??
Thanks you all.
Promise to award points...
Ruthie.

Find the following code.
*---  IT for changing fields on the screen
DATA : t_dynp_flds LIKE  dynpread OCCURS 0 WITH HEADER LINE.
*---  Append values
  t_dynpfields-fieldname = 'ZPPA_IDR_ACTIONS-MASSN'.
  APPEND t_dynpfields.
  CLEAR  t_dynpfields.
*---  Read screen field values before PAI field transport
  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            dyname               = 'ZPPA_IDR_MAINTAIN'
            dynumb               = '3004'
       TABLES
            dynpfields           = t_dynpfields
       EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            invalid_parameter    = 7
            undefind_error       = 8
            double_conversion    = 9
            stepl_not_found      = 10
            OTHERS               = 11.
  IF sy-subrc EQ 0.
  READ TABLE t_dynpfields WITH KEY fieldname = 'ZPPA_IDR_ACTIONS-MASSN'.
    IF sy-subrc EQ 0.
      MOVE t_dynpfields-fieldvalue TO l_massn.
    ENDIF.
  ELSE.
    EXIT.
  ENDIF.
*---  Retrieve values for reason for action
  lt_t530t-gap = space.
  SELECT t530~massg
         t530t~mgtxt
     INTO (lt_t530t-massg, lt_t530t-mgtxt)
    FROM t530  JOIN t530t
    ON t530tmassg = t530massg
    WHERE t530t~sprsl = sy-langu
      AND t530t~massn = l_massn
      AND t530~massn = l_massn.
    APPEND lt_t530t.
    CLEAR  lt_t530t.
  ENDSELECT.
  IF sy-subrc NE 0.
    CLEAR : lt_t530t,
            lt_t530t[].
*---  No table entries found
    MESSAGE s001 WITH text-047.
    EXIT.
  ENDIF.
  SORT lt_t530t BY massg mgtxt.
  DELETE ADJACENT DUPLICATES FROM lt_t530t COMPARING massg
mgtxt.
  CLEAR : l_tabix.
*---  FM to give List of values of Org values
  CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
       EXPORTING
            endpos_col   = 85
            endpos_row   = 20
            startpos_col = 50
            startpos_row = 10
            titletext    = text-042
       IMPORTING
            choise       = l_tabix
       TABLES
            valuetab     = lt_t530t
       EXCEPTIONS
            break_off    = 1
            OTHERS       = 2.
  IF sy-subrc EQ 0.
    READ TABLE lt_t530t INDEX l_tabix.
    IF sy-subrc EQ 0.
*---  Clear IT t_dynp_flds
      CLEAR : t_dynp_flds,
              t_dynp_flds[].
*---  Append screen values
      t_dynp_flds-fieldname = 'ZPPA_IDR_ACTIONS-MASSG'.
      t_dynp_flds-fieldvalue = lt_t530t-massg.
      APPEND t_dynp_flds.
      CLEAR  t_dynp_flds.
      t_dynp_flds-fieldname = 'ZPPA_IDR_ACTIONS-MGTXT'.
      t_dynp_flds-fieldvalue = lt_t530t-mgtxt.
      APPEND t_dynp_flds.
      CLEAR  t_dynp_flds.
*---  Change screen field contents w/o PBO
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
           EXPORTING
                dyname               = 'ZPPA_IDR_MAINTAIN'
                dynumb               = '3004'
           TABLES
                dynpfields           = t_dynp_flds
           EXCEPTIONS
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                undefind_error       = 7
                OTHERS               = 8.
      IF sy-subrc NE 0.
        CLEAR : t_dynp_flds,
                t_dynp_flds[],
                zppa_idr_actions-mgtxt.
      ENDIF.
    ENDIF.
  ENDIF.
-Anu.

Similar Messages

  • Creating attributes with value as CDATA

    is it possible to create elements with attributes and values where values are CDATA

    You can't use a CDATA section as the value of an attribute, if that's what you were asking.

  • Help to set value of an attribute based on value selected in another field

    Hi all,
    I want to set the value of an attribute STRUCT.ITM_TYPE to a default value whenever i select one of the value from dropdown list in LC_STATUS.
    I tried to add an event in the get_p method of the lc_status but there i cant able to access the context of the ITM_TYPE as the fields are in different views.
    Please Help,
    Rewards will be awarded.
    Naveenn

    Hi Vineet,
    Thanks for the suggestion.
    Please chech my code and suggest me for any corrections.
    In the Get_P_LCSTATUS method of Context Node BTADMINH in View1.
    METHOD GET_P_LCSTATUS.
      CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'ACT_STATUS_SELECTED'.
      ENDCASE.
    ENDMETHOD.
    In event handler method in Context Node BTADMINI in View2
    method EH_ONACT_STATUS_SELECTED.
    * Added by wizard: Handler for event 'ACT_STATUS_SELECTED'
    data: lr_ent1 type ref to cl_crm_bol_entity,
             lr_ent2 type ref to cl_crm_bol_entity.
    lr_ent1 = me->typed_context->BTADMINH->collection_wrapper->get_current( ).
    check lr_ent1 is bound.
    * To Get Value of First Attribute
    lv_attr1 = lr_ent1->get_property_as_string( 'LC_STATUS' ).
    * To Set Value of 2nd Input Field now based upon this value
    lr_ent2 = me->typed_context->BTADMINI->collection_wrapper->get_current( ).
    *lr_ent2->lock( ).
    lr_ent2->set_property_as_string( iv_attr_name = 'ITM.TYPE'  iv_value = 'RREQ' ).
    endif.
    endmethod.
    but during syntax check its showing error messge as BTADMINH is unknown.
    2) How and where to bind the context node in custom controller.
    Please help.

  • How to set field checkbox values based on another field

    I'm trying to provide the user with the ability to check one box "Check All" which would then set the check boxes for a section to the same value as shown in the example.  Anyone know how I can accomplish this?
    Thank you.
    Example
    General Category A     [  ] Check All
         [  ]  Item 1
         [  ]  Item 2
         [  ]  Item 3
         [  ]  Item 4
    If user selects "Check All", all the Items in the list for "General Category A" are then checked automatically.

    You can create a document level function to check a series of check fiels as long as they all have the same checked value.
    // document level function that can be used for many sections
    function CheckAll(aFields, sChecked) {
    // test to see Check All box for being checked
    // and if checked set to aFields to checked value
    // otherwise clear fields
    if(this.getField(event.target.name).value == 'Off') {
    // field unchecked
    this.resetForm(aFields); // clear the fields
    // end box not checked
    } else {
    // check all box has been checked
    // loop through the fields to check
    for (i = 0; i < aFields.length; i++) {
    // all fields are assumed to have a value of 'Yes' when selected
    var f = this.getField(aFields[i]); // get field for element i
    f.value = sChecked; // set to checked value
    } // end loop to check
    // end checked
    } // end unchecked
    } // end CheckAll function
    // end document level function
    You can then add a mouse up aciton for the check all check box:
    // mouse up action for check all check box
    // define array of check box fields to process
    var aSecFields = new Array('Item 1', 'Item 2', 'Item 3', 'Item 4');
    // call CheckAll function
    // passing the array list of field names and checked value
    CheckAll(aSecFields, 'Yes');
    or you can use 1 line of executable code:
    // mouse up action for check all check box
    // call CheckAll function
    // passing the array list of field names and checked value
    CheckAll(['Item 1', 'Item 2', 'Item 3', 'Item 4'], 'Yes');

  • Creating List of values in the Pk field show it in af:table

    Hi folks,
                  i'm using jdev 11.1.1.6.0 i'm having departmentvo in that vo i'm having departmentid it has primary key. i needed to create to list of values for that departmentid. so i use createofvalues pallete i did it. just map the departmentid from the employeevo.
    finally i drag and drop the departmentvo as af:table. i press create insert button row is ready for insertion.
    first field is departmentid. i use the list of values to assign the values. it is not assigning. no error.. no logs.
    i googled it around. i got this blog. the problem is on jan 2013.
    Andrejus Baranovskis's Blog: LOV for Editable Primary Key in ADF Table Problem
    is anyone fix this. if so please share it.

    you got to say you have a department VO with department Id as primary key and u want to refer that department Id as an LOV from employee VO?
    yes you are right.
    Why will you create a department with already existing department Id?
    no. no.
    This is contradictory
    In employees table, you can insert only department id which already exists in department table(because of foreign key)
    So if you base your department id lov on employees table, returned IDs already exists in department table and you can't use them for new department id(because this is PK in departments table)
    Dario

  • How to create Messages with Value Bindging

    Hello,
    i have an custom component and want to show all message for this component:
    <h:column>
    <t:messages binding="#{FolgeterminMessages.messages}" globalOnly="false"></t:messages>
                                                                          <co:note noteManager="#{performanceGesp.folgeGespraech}"
                                                                               noteClient="#{performanceGesp.noticeClient}">
                                                                          </co:note>
                                                                     </h:column>

    To Create messages in message bundles with parameters, perform the steps as given below
    Scenario: To Create a message as "Department Name XXXXXXX is already existing "
    Step#1: For the given entity object “DepartmentEO”, Go to “overview” tab and click “Business Rules” finger tab.
    Step#2: Select “Entity Validators” in the list & click “+” to add a new entity level validation rule.
    Step#3: Now go to “Failure Handling” tab, and click the Magnifier Icon.
    Step#4: Now in the “Display Value” field, enter the message with flower-braces as below.
    Department Name {department_name} is already existing
    Step#5: Also modify the Key & Description fields as needed. And click “Save and Select” button.
    Step#6: Now go to “Token Message Expressions” section, double-click the Expression field corresponding to "department_name" & give the relevant Attribute names say "DepartmentName"
    Step#7: Now click “OK”.

  • ERS - transaction MRRL creating invoices with value ZERO service

    Hello!
    I have a service sheet, then a 101 movement,I reverse it and created the 102.
    By mistake the ERS was run and created a IR with zero value.
    I tried to reverse de IR document in MR8M and I get the error:
    You are not allowed to have zero lines only
    If I try to modify the Service Sheet I get:
    An invoice already exists for this entry sheet
    According to note 385905:
    ERS zero documents cannot be cancelled. As these are documents without an update to FI, such a cancellation process is also not useful.
    How can I post this invoice correctly??
    I need the IR backed out so I can re post the invoice correctly. If I try to create a new service enry sheet the system tell me it is complete.
    THANKS!!!
    Edited by: SussyO on Jun 29, 2010 12:55 AM

    Dear Sandra,
    For every purchase order with flag 'ERS' a table entry is generated.
    If a goods receipt is posted, this GR should be invoiced via ERS
    (Tr. MRRL). Manually posted invoices should be avoided, because
    the table entry will not be deleted. A new invoice receipt must be
    created while running ERS (but with amount and quantity zero and without
    FI documents) in order to give a message to the vendor because he
    has sent you an invoice by mistake.
    The different handling has intentionally been implemented because
    in Tr. MRRL, you can use the message determination.
    Using Tr. MRRL, a message to your vendor is created (because he may
    have sent you an invoice probably by error). Now he'll get a zero bill.
    Also, please verify the SAP note 385905 which explains that these invoices are
    visible in your PO history. It goes onto say that these  documents cannot be cancelled and anyway, because they have no FI docs, such a cancellation would be useless. And please verify more one SAP note 415286.
    Regards,
    Paulo Evaristo

  • Infopath: How to load data in one field based on value selected in another field

    We have a drop down list field in the infopath form and we have some more fields that should change depending on the dropdown selection. 
    How can we achieve this please ?
    Thank you !

    Hi Prajk, sounds like you want to do cascading dropdowns. If so, see the link below. If you're just trying to enter information into a field (not a dropdown) based off the value of the dropdown, then set a rule so that if dropdown = "this," set
    the field's value to "this."
    http://blogs.msdn.com/b/bharatgupta/archive/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010.aspx
    cameron rautmann

  • Selection values in query should have help values based on another field

    Hi all,
    I have the following requirement:
    I have a query in which there are the following two filters in the
    selection criteria:
    1. COuntry
    2. State
    Based on the Country selected, the values for the State should come up
    in the Help values in the slection criteria. The user then shall select from these values.
    I plan to use a variable for Country with Replacemetn path as the second query whcih shall have Coutnry and States.
    Is this right or can I do this in a better way? Please suggest.
    Thanks and Regards,
    Srilakshmi B

    Hi,
    See you can achieve this through exit variable.
    Try to create one custom table or try to refer to master data tables may be?
    Custom table need to maintain your master data and need to be referred in below code.
    INCLUDE ZXRSRU01 *
    Enhancement: MultiProvider using InfoProvider Variable
    include YBW_INFOPROVIDER_VARIABLE.
    *& Include YBW_INFOPROVIDER_VARIABLE *
    DATA:
    ls_var TYPE rrs0_s_var_range,
    ls_range TYPE rsr_s_rangesid,
    l_contained TYPE c,
    ls_mapping TYPE ybw_mapping,
    lt_mapping TYPE TABLE OF ybw_mapping.
    Called after variable popup
    IF i_step = 2 AND i_vnam = 'INFOPROV'.
    - 13 -
    Read mapping table
    REFRESH lt_mapping.
    SELECT * FROM ybw_mapping INTO TABLE lt_mapping.
    Process all selection for country variable
    REFRESH e_t_range.
    LOOP AT i_t_var_range INTO ls_var WHERE vnam = 'S_COUNT'.
    Process all mapping rules
    LOOP AT lt_mapping INTO ls_mapping.
    Always fill LOW and HIGH, Otherwise logic below will not work
    IF ls_mapping-high IS INITIAL.
    ls_mapping-high = ls_mapping-low.
    ENDIF.
    Check if selection is contained in the defined InfoProvider
    CLEAR l_contained.
    CASE ls_var-opt.
    WHEN 'EQ'.
    IF ls_var-low BETWEEN ls_mapping-low AND ls_mapping-high.
    l_contained = 'X'.
    ENDIF.
    WHEN 'BT'.
    IF ls_var-low <= ls_mapping-high AND
    ls_var-high => ls_mapping-low.
    l_contained = 'X'.
    ENDIF.
    ENDCASE.
    Add InfoProvider to return table
    Note: Use COLLECT to avoid duplicates
    IF l_contained = 'X'.
    CLEAR ls_range.
    ls_range-sign = 'I'.
    ls_range-opt = 'EQ'.
    ls_range-low = ls_mapping-infoprov.
    COLLECT ls_range INTO e_t_range.
    ENDIF.
    ENDLOOP. " lt_mapping
    ENDLOOP. " i_t_var_range
    EXIT.
    ENDIF.
    Thanks and regards

  • Sum Fields Values Identified by Another Field

    Working in LiveCycle ES2. Very basic experience in developing scripting. Have created an expandable Expense Reimbursement form with a replicating table for each expense item (e.g., row). Have a subform at the end of the form to capture the totals.  Have been able to script to capture the AmountSpent for all of the expense items:
    form1.MainForm.TotalsSF.Table4.Row2.EmployeeExpenses::calculate - (FormCalc, client)
    Sum(ExpenseDetailsTable[*].ExpenseTypeRow.AmountSpent)
    Need to script to capture the AmountSpent for only items that are identified as NonReimbursable:
    form1.MainForm.TotalsSF.Table4.Row3.NonReimbExpenses
    Have a checkbox in the table to identify an expense item as NonReimb.  This box replicates with the table.
    form1.MainForm.ExpenseDetailsTable.DetailsLocationRow.NonReimb
    How do I script a calculation to sum all of the AmountSpent for each item that is checked as NonReimb?

    You should post this in the forum for LiveCycle Designer. This forum is for documents created in Acrobat.

  • Clear selection screen fields on using value help on another field

    Hi Experts,
    I have 3 fields -  reason1, reason2, reason3.
    Now i want to clear fields reason2 and reason 3 when i use value help for reason1.
    How do i go about it.
    Thanks & Regards
    Gaurav Kumar Raghav

    Hi,
    You use the function module 'DYNP_VALUES_UPDATE', here is a code extract showing its use..
    *&      Form  f4_laufd
    form f4_laufd .
      data: ls_laufk type ilaufk,
            lt_laufk type table of ilaufk.
      ls_laufk-laufk = space.
      ls_laufk-sign  = 'I'.
      append ls_laufk to lt_laufk.
      call function 'F4_ZAHLLAUF'
        exporting
          f1typ = 'D'
          f2nme = 'F110V-LAUFI'
        importing
          laufd = p_laufd
          laufi = p_laufi
        tables
          laufk = lt_laufk.
      perform set_selection using 'P_LAUFI' p_laufi.
    endform.                                                    " f4_laufd
    *&      Form  set_selection
    form set_selection  using    value(i_field)
                                 i_value.
      data: ls_dynpfld type dynpread,
            lt_dynpfld type table of dynpread.
      ls_dynpfld-fieldname  = i_field.
      ls_dynpfld-fieldvalue = i_value.
      append ls_dynpfld to lt_dynpfld.
      call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname     = sy-repid
          dynumb     = sy-dynnr
        tables
          dynpfields = lt_dynpfld.
    endform.                    " set_selection
    Darren

  • Formula to Display Value Based on Another Field's Value

    Hello,
    I have a column that displays the vehicle used for drives, but the report also lists fixed sites that do not have a vehicle assigned.
    What I'm trying to accomplish is to utilize a formula but I'm having trouble with getting it to work. What I've got is:
    if {CenterDetail.CenterType}=0 then {MobileSetupMaster.ShortDesc}
    else
    I'm not sure what to place in the else statement to make the value equal to null.
    Suggestions?

    hi Trey,
    are you just trying to show an empty formula or an actual null.
    if empty, then
    if {CenterDetail.CenterType}=0 then {MobileSetupMaster.ShortDesc}
    else ""
    will work.

  • Create document with refrence + update some fields by passing some  values

    Hello Experts,
    I have a small problem . I have to create the sales order from BAPI ...but the scenario is
          have to create with refreence to another document
          some fields like condition types or material or order quantity etc are passed from an excel sheet
    hence some information which is populated in excel sheet should be picked up rest everything should be picked up
    from the refrence document
    How can use both information (from the refrence document and externally passed from the excel)  and create a new document
    please suggest!!!!
    regards,
    Khushy

    Hi,
    I am  not sure whether I really understand your request. Let me try to help.
    > Example: <FT_TAB> TYPE STANDARD TABLE,
    >                 <FS_TAB> TYPE ANY,            
    >
    > DATA: INT_TAB  is my dynamic table values.
    >
    >
    > LOOP AT INT_TAB.
    >  ASSIGN COMPONENT 'MATNR'  OF STRUCTURE <FS_TAB> TO <F_VALUE>
    > <F_VALUE> = INT_TAB-MATNR.
    >  APPEND <FS_TAB> TO <FT_TAB>
    Here <FT_TAB> must already be assigned to some internal table with a given (dynamic) structure. Did this happen before this piece of code?
    What I would do is to create a dynamic table (see documentation to CREATE DATA) with MATNR and the STYLE field (LVC_T_STYL). See the documentation for CREATE DATA - creation of internal tables. When collection the field descriptions for that internal table I would also build the field catalogue for the ALV.
    Then assign <FT_TAB> to that newly created internal table, <FS_TAB> to a newly created structure (same as a table line).
    Move the MATNR to component 1 (or component 'MATNR') of the table and fill the style table according to your needs. Then insert the <FS_TAB> into <FT_TAB>.
    Finally call the ALV SET_TABLE... method with your dynamic table and your field catalogue.
    Regards,
    Gerd Rother

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

  • Mail notification at value placed at approver field in Additional tab

    Hi SAP Gurus,
    in the business  based on the document (DIR ) we are creating there will be specific person responsible for approving the document.
    so we have created a characteristic values in additional tab field, having the list of names / values of approvers,
    so while creating the DIR the user will select the relevant approver who is suppose to approve the document, here the requirement is based on the characteristic field value in DIR,
    that particular person should get a Mail asking him to  approve the document.
    how to go about this, can standard work flow solve this requirement, or should we have to go for development in Workflow to meet this requirement, will the value at additional tab act as a triggering point for Mail generation to specific user? i have not worked with Work flow.
    please explain in detail the steps to meet this requirement.
    Points awaiting,
    Thanks and regards,
    Priya S

    Hi
    thanks for your inputs,
    The complete requirement is the client needs  to check the values in Characteristics  (the users) with there credentials, just like the funtionality provided in field USER in document Data Tab,
    and he will place the relevant Users (one or many) and the mail has to be triggred to each of the reviewers and the document approvers based on the value placed.
    (here not placing any values in Characteristics and only ging by Work FLow, it  will not give any record in the DIR who are the Approvers or reviewers of that particular Document, so it is required for reporting purpose also)
    so it is two requirement,
    1) search criteria in the values of Characteristics just like that is available in the field USER in document Data Tab (just exactly the same no compromise)
    2) Mails to the users placed in the Characteristics automatically to review, ( which could other wise be done through Document distribution)
    there is still more to share with you all in the class and classification requirements.
    need your help
    Thanks and regards
    Priya S

Maybe you are looking for

  • Safari 2.0.4 crash after transferring all files

    Hello I bought a new iMac so i transferred all my files using FireWire cable. All the apps are working fine except Safari which is crashing every time i run it. I installed Safari 3 BETA and its working great, but i still want to use my old version.

  • MacBook Pro - 10.6.8 - Logitech USB devices - Gray Screen

    After moving to 10.6.8 my Logitech wireless keyboard/mouse and usb wired mouse cause immediate gray screen after usb connection.  On advice from consultation at Genius Bar I did a full re-install of OS and re-install of 10.6.8 and the problem immedia

  • HP Media Smart Photo problem

    I have a HP Pavilion p6310y PC, when I view a picture from my picture library then try to close the program I get the following message "HP MediaSmart photo main program is not responding". I didn't have problems with this until a few months ago. I j

  • How to get real html files with forms 6i

    I know this may be a repeat question, but this is our context : We are deploying a heavy Forms6i app to the web. Everything is ok. We're able to run the forms in the MS Internet Explorer 5 native java window, without having to download first Jinitiat

  • Excel files getting corrupted when editing locally

    We are getting corrupted files when using "edit locally". Editing seems to work fine, but when the next user tries to open the file it is corrupted. This error only occurs intermittently. When checking the logs I found below error message: #com.sappo