Make PO Box City field as required when either of other fields r non-blank

Hi,
I need your help and valuable suggestion to fix this problem.
While Creating/Changing a vendor, I would like to input some data in the PO box address area (Table LFA1). If I populate the fields PO Box & Postal code fields in this area, the PO box City field should become a required one. Currently it is an optional field. I dont want to do it at field status level.
If there are not any data in either of those fields, then PO box city field should be an optional one.
How can we do this? Please provide me a solution in detail.

hi,
You can use user exits for this req. Take the help of your ABAPer who can assist you in finding the relevant exit and fix this as per the logic specified by you. Or you can also approach SAP Service marketplace who will provide the required data.
hope this helps
regards,
radhika

Similar Messages

  • How do i expand a field in a line with 3 other fields when forms design will not allow

    how do i expand a field in a line with 3 other fields when forms design will not allow it? I also want to shrink one of the fields and cannot do so.

    It is possible that all there is not enough room on your line to grow the field. You can try a few things :
    - Make the form width wider by dragging the right edge of the form or via the Form Setup dialog (File > Form Setup... and change the Form Width)
    - You can make other field on the row narrower (if they are not already at their minimum width).
    Each field type has a minimum width. What field type are you trying to make smaller?
    For example : Text and Multiline can go down to a width of 30. Dropdown min width depends on the length of the long item in the dropdown list.
    Hope this helps
    Gen

  • Date field automatcailly changing when tabbing through other scripted fields

    I have a form with a datetime field. The object is readonly. I format the field with javascript as yyyymmddhhmmss as a tracking number for the form. When tabbing through other fields with javascript the value changes to the current date time, like the code is being executed each time a scripted field is entered.
    Any ideas how to prevent that? I just want the code to execute when the form is opened.
    ----- form1.sbfDirect_Pay.dteCurrentDate::ready:layout - (JavaScript, client) ----------------------
    // Current Date in short-style date format.
    // $.rawValue = num2date(date(), DateFmt(1, "))
    var varCurrentTime = new Date();
    var varYear = varCurrentTime.getFullYear();
    var varMonth = varCurrentTime.getMonth() + 1;
    var varDay = varCurrentTime.getDate();
    var varHour = varCurrentTime.getHours();
    var varMin = varCurrentTime.getMinutes();
    var varSec = varCurrentTime.getSeconds();
    if(varMonth<10) varMonth = "0" + varMonth;
    if(varDay<10) varDay = "0" + varDay;
    if(varHour<10) varHour = "0" + varHour;
    if(varMin<10) varMin = "0" + varMin;
    if(varSec<10) varSec = "0" + varSec;
    // $.rawValue = year + "" + month + "" + day + "" + hour + "" + min + "" + sec;
    dteCurrentDate.rawValue = varYear + "" + varMonth + "" + varDay + "" + varHour + "" + varMin + "" + varSec;

    I think I just answered my own question. The code was in the layout:ready event. This area is executed each time the layout is modified. I moved the code to form:ready event.

  • Automatically populate fields in jsp documents based on other fields

    hello guys. I have a jsp document
    that has the following
    <af:inputText value="#{bindings.SourceDocumentId.inputValue}"
    label="#{bindings.SourceDocumentId.label}"
    required="#{bindings.SourceDocumentId.mandatory}"
    columns="#{bindings.SourceDocumentId.displayWidth}"
    binding="#{backing_transactions_editTransactions.docId}"
    id="docId">
    <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SourceDocumentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DocumentName.inputValue}"
    label="#{bindings.DocumentName.label}"
    required="#{bindings.DocumentName.mandatory}"
    columns="#{bindings.DocumentName.displayWidth}"
    binding="#{backing_transactions_editTransactions.docName}"
    id="docName">
    <af:validator binding="#{bindings.DocumentName.validator}"/>
    </af:inputText>
    And I have created the generated the backing beans automatically.
    public class EditTransactions {
    private CoreInputText docId;
    private CoreInputText docName;
    public CoreInputText getDocId() {
    return docId;
    public void setDocName(CoreInputText inputText7) {
    this.docName = inputText7;
    public CoreInputText getDocName() {
    return docName;
    I have a method in appmodule that has this
    public String getDocName(Number docId)
    {String docName;
    return docName
    on the document Id field I have to input a certain docId after I input the docId I have to populate automatically the docName based on the doc Id being given.
    question
    1. how can I set the document name automatically w/out submitting the page ?
    2. how can I use my backing bean to set the docName using the method in my AppModule.?
    Can anyone help me regarding this one.
    Thank in advance
    alvin.

A: automatically populate fields in jsp documents based on other fields

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

  • Payment Card field not required when terms Credit Card is selected

    Hi all,
    I am trying to make Payment Card fields required when the user selects Credit Card as Payment terms. Right now it allows to save the Sales Order even if there is no credit card number entered, even though the Payment Terms has been selected as Credit Card. I found a note 606494 but it has to do with a component we don't even have installed, so I could not implement it. Did not have any luck searching the forums. Please help!
    Thanks,
    Sergiy

    Check the settings -
    Set Up Payment Guarantees
    Define Forms of Payment Guarantee
    Transaction: OVFD
    Tables: T691K
    Action: R/3 is delivered with form “02” defined for payment cards. Other than the descriptor, the only other entry should be “3” in the column labeled “PymtGuaCat”
    Define Payment Guarantee Procedure
    Transaction:
    Tables: T691M/T691O
    Action: Define a procedure and a description.
    Forms of Payment Guarantee and make the following entries Sequential Number “1”
    Payment Guarantee Form “02”
    Routine Number “0” Routine Number can be used to validate payment card presence.
    Define Customer Payment Guarantee Flag
    Transaction:
    Tables: T691P
    Action: Define a flag to be stored in table.
    Create Customer Payment Guarantee = “Payment Card Payment Cards (All Customers can use Payment Cards)”.
    Define Sales Document Payment Guarantee Flag
    Transaction:
    Tables: T691R
    Action: Define the flag that will be associated with sales document types that are relevant for payment cards
    Assign Sales Document Payment Guarantee Flag
    Transaction:
    Tables: TVAK
    Action: Assign the document flag type the sales documents types that are relevant for payment cards.
    Determine Payment Guarantee Procedure
    Transaction: OVFJ
    Tables: T691U
    Action: Combine the Customer flag and the sales document flag to derive the payment guarantee procedure
    Payment Card Configuration
    Define Card Types
    Transaction:
    Tables: TVCIN
    Action: Create the different card types plus the routine that validates the card for length and prefix (etc…)
    Visa , Mastercard, American Express, and Discover
    Create the following entries for each payment card
    AMEX American Express ZCCARD_CHECK_AMEX Month
    DC Discover Card ZCCARD_CHECK_DC Month
    MC Mastercard ZCCARD_CHECK_MC Month
    VISA Visa ZCCARD_CHECK_VISA Month
    Regards
    Sai

  • After inserting into one field using LOV,  how to populate other fields ?

    Hi,
    I have a BLOCK based on a table (ex:EMP)
    And I have a LOV on the field(item): EMPNO.
    When I select one EMPNO from the LOV (when the field:EMPNO is populated with an emp number), the other fields should be populated
    Can some body let me know, which trigger I need to use and .......
    Thanks

    while creating LOV at empno you can this query
    select empno,ename,deptno from emp
    and define return item for each column.
    You can populate LOV manually at New_instance_item or Key_next_item
    of item empno.

  • Fields only "required" when visible

    Hi,
    I am trying to create a form that has radio buttons "yes" and "no".  I have it set so that a comments box (that is hidden and excluded from layout) becomes visible when the "no" button is clicked and remains hidden or re-hidden (not a real word) when the "yes" button is clicked.
    My difficulty is that I would like the comments box to be required only when it is visible.
    Can anyone help with the scripting?

    Hi Candy,
    Thank you so much for your prompt response.  I have tried this. However if the user clicks "no" and then changes their mind and clicks "yes" the Comments box does not disappear.
    I have tried this in the Yes:
    xfa.form.form1.Inspection.Comments2.presence = "hidden";
    var NumOfComments = xfa.form.form1.Inspection.Comments2.count;
    //If there is an instance of the subform, remove it. There can only be 1 or 0 instances of the subform
    if (NumOfComments == 1) {
    xfa.form.form1.Inspection._Comments2.removeInstance(0);
    xfa.form.form1.Inspection.Comments2.presence.validate.nullTest = "disabled"
    And this in the No:
    xfa.form.form1.Inspection.Comments2.presence = "visible";
    var NumOfComments = xfa.form.form1.Inspection.Comments2.count;
    //if the subform is not there (e.g. user already clicked yes), then add it back to the form
    if (NumOfComments == 0) {
      xfa.form.form1.Inspection._Comments2.addInstance(1);
    //make the subform visible
    xfa. form.form1.Inspection.Comments2.presence = "visible";
    xfa. form.form1.Inspection.Comments2.validate.nullTest = "error";
    This causes the Comments box to disappear, but it does not fix the validation error.  It is still requiring the comments box at print.  Should I be adding script to validation or preprint?
    I am new at this scripting thing and it has taken me so many hours just to get to where I am. My is an inspection checklist with 40 fields. I am so frustrated, any help you could provide would be much appreciated.
    TBurg

  • How can we make one view field value to be copied to other field of the the

    Hi   
       I am new  in CRM2007 I have enhanced sap component & enhanced SAP View but I wanted the field value of the enhanced view to be mapped to the field value of the same view which is added from EEWB
    Pls tell me if the added new field can be made as Dropdown list box without fixed values & Design Layer customizing I mean to say through coding can we made the input field as Dropdown
    Appreciate any help in advance
    Thanks
    Neel

    Hi,
    You can write your own ligic in GET_V_<FIELD> method. Select the values which needs to be displayed in the drop down list based on your own condition. Some sample code is given below:
    METHOD get_v_zzverksomr.
      DATA: lt_ddlb           TYPE bsp_wd_dropdown_table,
              ls_ddlb           TYPE bsp_wd_dropdown_line,
              lv_display_only   TYPE string,
              gr_ddlb_verksomr  type ref to CL_CRM_UIU_DDLB,
              ls_verksomr_values  TYPE LINE OF vrm_values.
        SELECT verksomr verksomrtxt FROM zkb_verks
           INTO TABLE lt_ddlb.
        IF sy-subrc EQ 0.
          INSERT INITIAL LINE INTO lt_ddlb INDEX 1.
        ENDIF.
      IF gr_ddlb_verksomr IS NOT BOUND.
        FREE gr_ddlb_verksomr.
        CREATE OBJECT gr_ddlb_verksomr
          EXPORTING
            iv_source_type = 'T'.
        LOOP AT gt_verksomr_values INTO ls_verksomr_values.
          ls_ddlb-key   = ls_verksomr_values-key.
          ls_ddlb-value = ls_verksomr_values-text.
          APPEND ls_ddlb TO lt_ddlb.
        ENDLOOP.
        gr_ddlb_verksomr->set_selection_table( it_selection_table = lt_ddlb ).
      ENDIF.
      rv_valuehelp_descriptor = gr_ddlb_verksomr.
    ENDMETHOD.
    Thanks
    Swagatika

  • Can i make text field's not show up before other fields?

    text fields on an iDVD page show up before everything else - i.e. the slide show and movie fields sweep in later.
    anyone know how to change this so they all come in together? either all sweep in or all are there from the start?

    You can't it is fixed.

  • Hiding selective fields in a report based on other field in the same report

    Hello!
    I am trying to create a report of the inventory items. 2 of the fields in the report would be the sale price of the item, and one of the properties (prop1) from the Item Master Property tab.
    Depending on whether Prop1 is Y/N, the price of the item should be displayed.
    If Prop1 = N, Price is displayed
    If Prop1 = Y, Price gets hidden
    Using queries, is it possible to create this kind of reports?
    I am using SAP 2005b PL 42.
    Thanks for any suggestions....
    Prajwal

    Hello Prajwal,
    It is definely possible !!
    If you have already created your query pls paste the same here so that I can help you otherwise. I will give you a general guidelines and you can take it from there..
    Using the CASE Statement inside your SELECT you can achieve this.
    SELECT T1.ItemCode AS 'Item No.', T1.ItemName AS 'Item Description',
    CASE WHEN  T1.QryGroup1 = 'N' THEN T0.Price ELSE 0 END 'List Price'
    FROM  [dbo].[ITM1] T0  INNER  JOIN [dbo].[OITM] T1  ON  T1.ItemCode = T0.ItemCode   WHERE T0.PriceList = 1

  • Message Mapping - SUM a field per unique combination of 2 other fields?

    I'm receiving a proxy with detail records, and I need to create a subtotals file.  Here an example:
    BEFORE MAPPING
       <ROW>
          <KOSTL>0000010300</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.51</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>123</POSID>
          <FTE>0.49</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.72</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>123</POSID>
          <FTE>0.82</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010300</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.18</FTE>
       </ROW>
    AFTER MAPPING:
       <ROW>
          <KOSTL>0000010300</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.59</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>123</POSID>
          <FTE>1.31</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.72</FTE>
       </ROW>
    How do I create a new record for all unquie combinations of KOSTL and POSID?  And total the FTE field for each line?  Can this be done in a message mapping?

    Hello,
    How do I create a new record for all unquie combinations of KOSTL and POSID? And total the FTE field for each line? Can this be done in a message mapping?
    Yes, very much possible with or without UDF. See sample mapping below without using UDF:
    For ROW:
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> collapseContext -> ROW
    POSID(set context to row) ->  /
    For KOSTL:
    KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> collapseContext -> splitByValue:eachValue -> KOSTL
    POSID(set context to row) -> /      KOSTL(set context to row) ->/                                          /
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
    POSID(set context to row) ->  /
    For POSID:
    KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> collapseContext -> splitByValue:eachValue -> POSID
    POSID(set context to row) -> /      POSID(set context to row) ->/                                          /
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
    POSID(set context to row) ->  /
    For FTE:
    KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> sum -> splitByValue:eachValue -> FTE
    POSID(set context to row) -> /      FTE(set context to row) ->/                                            /
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
    POSID(set context to row) ->  /
    Hope this helps,
    Mark

  • How to make metadata fields required when creating folders

    Hello all....
    Related issue with SR 3-6472229431 and SR 3-6471130611.
    We're using DIS 11.1.6 64-bits (2011_11_29 (rev 9756) 11.1.6.97) in a Windows 7 64-bits workstation (with UCM 11.1.1.5 in a Linux machine). The check-in of images to UCM goes fine.
    I'm trying to make some metadata fields required when creating a folder. These fields are required when making a check-in, but not when creating folders.
    Folders_g is enabled. DesktopTag too.
    EDIT: Patch: 14695303 - WCC 11.1.1.5.0 BUNDLE ( MLR 16 ) NOV 6 2012 applied.
    Is it possible?
    Thanks for all.
    Edited by: fgomes on 22/11/2012 03:24

    After reading your response and rereading the original question a bit closer, the metadata prompting feature does not apply to creating new folders, only content.
    Again, though, I think the focus here is in the wrong place. The metadata applied to a folder is intended to be ultimately applied to the content. You can build global rules that fire on submission of content to check if a field has a value, and throw an error if the value is empty.
    If you expect users to create folders (and actually apply any metadata to the actual folder itself), you will be disappointed. Experience shows that users are not interested in that level of detail when creating content, let alone folders. Letting typical users create folders is a bad idea anyway, as they tend to create the same inefficient folder structures they previously created in file shares within Content Server.
    If you need to tightly control folder attributes, you'll be better served by locking down the ability to create new folders. Otherwise you're looking at some type of customization. Keep in mind that you won't be able to customize the right click behavior of DIS. Any changes to DIS would have to be an enhancement request.

  • Field STCEG required at FB01 (one-time vendor account)

    Hello,
    Does anyone know how to put the field STCEG required when posting, through FB01 or similar, to an one-time vendor account?
    Thanks!

    Hi,
    Account group field status determine the status while creating/ changing the master data.
    For posting, you can control via posting key setting or field status assigned to gl.
    As you need to make it as required only for one time vendors, so create a validation in OB28/ GGB1 for it.
    Regards,
    Gaurav

  • "Valuation" field in requirement class

    Hi Experts,
    Could you please explain the difference between
    1) "Valuation" field in requirement class
           and
    2) "Consumption" field in account assignment category field (assigned in requirement class)
    Thanks,
    GAN
    Edited by: DSK on Feb 8, 2012 3:26 AM

    Hi,
    Valuation field defines the whether the sales order stock should be valuated or non valuated.
    Consumption indicator functions as follows.
    If the sales order is assigned with any cost objects like cost center, order etc it will get consumption indicator in delivery document
    in the following strategy.....
    1> Delivery item category assigned to requirement type - OVZI
    2> Requirement type assigned to requirement class - OVZH
    3> Requirement class has the consumption indicator - OVZG
    When you create delivery, system will determine delivery item category and it pull all the values from the requirement class associated with tha item category. This is the way it gets consumption indicator .
    Also check note 161729.
    Regards,
    Divraj

  • How do I make a form field validate that it is the sum of two other fields?

    Hi there,
    I am creating a form, and I would like one of the fields to validate by making sure that this field is the sum of two other fields in the form.  Does anyone have any ideas on how to go about this?  I know I'll need to run a custom validation script, but I'm not sure where to begin - I've never done one for validation before.
    Thanks for any help!

    OK, here's a sample script that I hope will clearly demonstrate the general approach. It is intended to be the custom Validate script of the field that the user enters that value that is supposed to be equal to the sum of the two others.
    // Custom Validate script
    (function () {
        // Get the value that the user entered
        var sVal = event.value;
        // If it is blank, do nothing else
        if (!sVal) {
            return;
        // Convert string to a number
        nVal = +sVal;
        // Get the values of the fields, as numbers
        var v1 = +getField("text1").value;
        var v2 = +getField("text2").value;
        // Add them together, rounding to two decimal places, converting to number
        var sum = +util.printf("%.2f", v1 + v2);
        // Compare entered value to the sum of the other two fields
        // Alter the user if they do not match
        if (nVal !== sum) {
            app.alert("The value you entered does not equal the sum of text1 and text2. Please correct.", 3);
            // If you want the entered value rejected, include the following
            event.rc = false;
    Replace "text1" and "text2" with the actual field names.

  • Maybe you are looking for