Skip validation of 'OBLIGATORY fields populated or not'? so that user GO_BACK

Hello
I placed a handful fields on selection screen, wherein there are push buttons are there and input free text fields.
Based on these button cliks and controlling the other fields visibility. So, user thinks that there are 2 screens. I also placed a BACK button, bcz user when cliks BACK button then the user thinks he/she is navigating from 2nd creen to 1st screen.
I made these free text input feilds as OBLIGATORY addition. So, when user cliks BACK button am getting error that 'Pls. enter required fields'
Pls. let me know how can I skip this error upon clikcing of BACK button, I mean, in this case we don't need to chk mandatory.
Thank you

Its not possible if you use the obligatory functionality. It defeats the purpose of obligatory. Instead don't use obligatory but check if the field is initial by your own and then display custom error message.
you can skip this check if the sy-ucomm is for the BACK button.
Thanks,
Vikram.M

Similar Messages

  • Skipping validation if field is hidden

    Hi, all!
    I have functional requirement, when specific input field becomes visible/invisible based on another field value. Sounds clear, I will define AutoSubmit and PartialTriggers properties between some field and dependent conditionally visible/invisible field. It works fine, but invisible field has attribute 'required=true' and framework reports required field validation error (in spite of the invisibility) and, of course, customer can't submit the form. Required attribute can be set using an EL expression, but I need skip validation for hidden fields at all. Is there any way to do it? And, of course, client-side way is preferable. Thank you.

    Thank you for quick answer.
    1. Studio Edition Version 11.1.1.5.0
    2. In view layer:
    id="TaxPeriod" simple="true" required="#{pageFlowScope.ModelBean.taxPayment}"
    label="blablabla" maximumLength="10"
    styleClass="shortField"
    binding="#{pageFlowScope.ModelBean.taxPeriodField}">
    <af:validateRegExp pattern="^(0)|(..\\...\\.....)$"
    messageDetailNoMatch="Format XX.XX.XXXX"/>
    </af:inputText>
    Yes, I can make the required attribute as EL. But what about other validation? reg exp, etc...

  • Currency Field - KOMK-WAERK not getting populated

    Dear All,
    In my infoset, i am reading the value from KONV table. But when i generate the infoset, system prompts a Warning Message saying:
    Currency Field KOMK-WAERK will not be filled. Affected currency amount fields: (& it gives out the list of fields).
    In my data section when i put TABLES KOMK, then the message does not appear, but the currency field still does not get populated when i execute the query.
    Any suggestions as to how i can make the currency field populate in my output?
    Await inputs.
    Anyone to help?
    Edited by: Vivek on Feb 9, 2008 8:51 PM

    Is not KOMK a structure, you need to fill this structure. Try to map required fields as following :
    CLEAR KOMK.
    KOMK-MANDT = SY-MANDT.
    KOMK-KALSM = VBDKR-KALSM.
    KOMK-FKART = VBDKR-FKART.
    KOMK-KAPPL = 'V'.
    IF VBDKR-KAPPL NE SPACE.
    KOMK-KAPPL = VBDKR-KAPPL.
    ENDIF.
    KOMK-WAERK = VBDKR-WAERK.
    KOMK-KNUMV = VBDKR-KNUMV.
    KOMK-VBTYP = VBDKR-VBTYP.
    KOMK-BUKRS = VBDKR-BUKRS.
    KOMK-BELNR = VBDKR-VBELN.
    Regards

  • Custom Field value is not getting populated in Display mode

    Hi Experts ,
    I have created a custom field on sales tab for BP Role Bill to prty in BP transaction in SAP CRM. The problem i am facing is that , after i chose my sales area field value is not populating in first time no matter whether i am in display or change mode but the moment i switch to the other mode the value is being populated. Kindly help me in solving this.
    Regards,
    Ameet

    Dear Chetan,
    If the field is added through AET, can you please check the Get & Set Methods?
    If the field value has fixed values which you have defined while creating, then check GET_V & GET_P methods.
    Thanks & Kind Regards,
    Ravi Kumar A R

  • Auto populating the Notes field in XK02/FK02

    Hi Experts,
    I have a requirement where I need to auto-populate the Notes field with some text.
    When the user clicks the arrow next to Email field a pop up comes up. In this pop up there is a Notes field. (Please see the Screen shot)
    I want this Notes field to be auto-populated with "Notes".
    How can I accomplish this?
    Please advice.
    Thanks.

    Hi -
    1. In SE51, go to progrram - SAPLSZA6 and screen 600, you will find in the PBO
      MODULE precalculate.                                      "*981i
      MODULE d0600_status.
      MODULE d0600_output.
      LOOP AT g_d0600_adsmtp WITH CONTROL t_control6 CURSOR
        t_control6-current_line.
        MODULE d0600_display_line.
      ENDLOOP.
      MODULE d0600_cursor.
    2. In the 1st three module below check if any user exit / BADI is there .
    (a) MODULE precalculate.      
    (b) MODULE d0600_status.
    (c) MODULE d0600_output
    If yes check for modifying the value of the field 'REMARK' in the interanl table g_d0600_adsmtp.
    Example g_d0600_adsmtp(1)-Remark = 'Notes'
    3. If no BADI / exit is available, then go for implicit enhancement in the perform inside  MODULE d0600_output.  i.e    FORM dynpro_output .
    At the end of form    FORM dynpro_output - modify the internal table   ct_comm_table.
    Please note - This form may be used by other programs, so you can put some conditions like restricting to trasaction code etc.

  • Text fields populated from lov mapping are not saved to database

    Hi Everyone,
    I'm having a wierd problem. My requirement is to autopopulate two text fields field 2 and field 3 when a value is selected from lov in field1 and save all the values to database on click of a submit button.
    Using lov mapping i'm able to populate field 2 and field 3 with corresponding values based on the value selected in field1. And also field2 and field3 should be in the readonly mode so that user cannot change the value.
    So to make the fields readonly i have changed the property of readonly to true for field2 and field3. But if I change the readonly property, the values for field2 and field3 are not being saved to database.
    The values are getting saved to database only when readonly = true for messageTextInput item type or if the item type is a form value.
    I also tried disable = true, which also didnt work.
    I tried to debug by writing some sop statements in PFR, but these statements also returned null for pageContext.getParameter("field2") etc;
    Can anyone please tell me how to solve this problem?
    Thanks
    Sunny

    Hi Gyan,
    I forgot to mention that , I also tried messageStyledText. Which also didn't work. I wanted to use vo.setAttribute as my last option, but i wanted to understand why the values are not saved to database when the text item is showing the values on the page.
    Thanks
    Sunny

  • How to revise form field value in query and skip validation

    Hi all,
    I have a 10g form that has a field which I want to manipulate during query. I want to display a different value depending upon its orignal value. I did this with a Post-Query trigger on the field's datablock. However, now, when I attempt a new query, the form thinks I've changed the field (which I did). I want to change the field but trick Forms into thinking there were no updates. How do I do this? Note: the field is a list item that has a style of combo box.
    Thanks, Mike

    Ammad,
    The reason is that sometimes the list returns the record group's key value (the second column) instead of the intended value (in the first column). This is because the record group is based on a SQL query. There are some values which are no longer in the table queried by the record group, thus the key value is displayed. I would rather nothing be displayed. As of now, I display a message indicating that there is a problem with the LOV.
    I know about using a non-database form field. But I don't have any room left and I don't want to lay the non-database field on top of the database field and then have to enable/disable the two fields.
    A friend at work suggested setting update_permission to trick Forms. Tried it but not successful yet.
    Thanks, Mike

  • How to skip validation using serverListener

    Hi,
    I am using Jdev 11.1.2.3.0
    My requirement was to called some action using the keyboard key.
    I tried with Access key first but its behaving differently in different browser.
    Crome: allowing action on access key press.
    IE : setting the focus on commandLink.
    Note : I have defined accessKey for RichCommandLink.
    Then i used the different approach which is as follows:
    1- Register the keyBoard handler to document. on beforePhase Event.
    2- Added the js file as follows :
    Javascript file:
    var keyRegistry = new Array();
    keyRegistry[0] = "alt 1";
    keyRegistry[1] = "alt 2";
    keyRegistry[2] = "alt 3";
    keyRegistry[3] = "alt 4";
    keyRegistry[4] = "alt 5";
    keyRegistry[5] = "alt 6";
    keyRegistry[6] = "alt 7";
    keyRegistry[7] = "alt 8";
    keyRegistry[8] = "alt 9";
    keyRegistry[9] = "alt 0";
    function registerKeyBoardHandler(serverListener, afdocument) {
      _serverListener = serverListener;
      var document = AdfPage.PAGE.findComponentByAbsoluteId(afdocument);
      _document = document;
      for (var i = keyRegistry.length - 1; i >= 0; i--) {
        var keyStroke = AdfKeyStroke.getKeyStrokeFromMarshalledString(keyRegistry);
    AdfRichUIPeer.registerKeyStroke(document, keyStroke, callBack);
    function callBack(keyCode) {
    var activeComponentClientId = AdfPage.PAGE.getActiveComponentId();
    // Send the marshalled key code to the server listener for the developer
    // To handle the function key in a managed bean method
    var marshalledKeyCode = keyCode.toMarshalledString();
    AdfCustomEvent.queue(_document,
    _serverListener, {keycode:marshalledKeyCode,
        activeComponentClientId:activeComponentClientId}, true);
    // indicate to the client that the key was handled and that there
    // is no need to pass the event to the browser to handle it
    return true;
    *jspx page:*
            <f:view beforePhase="#{KeyboardHandler.registerKeyboardMapping}">
    <f:loadBundle basename="properties/Labels" var="labels"/>
    <af:document id="adfDocument">
    <af:resource type="javascript" source="/js/keyboard.js"/>
    <af:serverListener type="keyboardToServerNotify" method="#{KeyboardHandler.handleKeyboardEvent}" />
    </af:document>
    </f:view>
    *Java Code :*
            public class KeyboardHandler {
    public KeyboardHandler() {
    super();
    public void registerKeyboardMapping(PhaseEvent phaseEvent) {
    if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE) {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService extRenderKitService =
    Service.getRenderKitService(facesContext,
    ExtendedRenderKitService.class);
    List childComponents = facesContext.getViewRoot().getChildren();
    //First child component in an ADF Faces page - and the only child - is af:document
    //Thus no need to parse the child components and check for their component family
    //type
    String id =
    ((UIComponent)childComponents.get(0)).getClientId(facesContext);
    StringBuffer script = new StringBuffer();
    script.append("window.registerKeyBoardHandler('keyboardToServerNotify','" +
    id + "')");
    extRenderKitService.addScript(facesContext, script.toString());
    public void handleKeyboardEvent(ClientEvent clientEvent) {
    String keyCode = (String)clientEvent.getParameters().get("keycode");
    System.out.println("KeyCode ::"+keyCode);
    //Here on basis of numeric key 0-9 i will decide different action
    This is working fine and launching the first action successfully.
    *Now problem is that when i invoked second action its asking me enter data for required fields.*
    If i was invoking serverlistener from button than I can control immediate property of command button. but here serverListener is getting called form document. How can I avoid validation here.
    Can anybody please me?
    Thanks a lot in advance.
    -Amit Sharma
    http://amit-adf-work.blogspot.com/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    If you want to skip all validation until time of commit you can do as described here
    http://andrejusb.blogspot.com/2012/12/skip-validation-for-adf-required-tabs.html

  • IT0185 Field value is not getting displayed on the Payslip

    Hi Friends,
    I have the similar issue of this post as Unable to View the IT0185 Subtype National Ins# (ICNUM) in Payslip.
    Little confused with PE51_CheckTab entries and other stuff.
    Could anybody please suggest as to how to resolve this?
    thanks in advance.

    I assume that you are referring to a brand new field on the second step that was not on the form of the first step. If this is the case, then you should put the field in a hidden block of the first steps form. Default values and Auto-population from shells/single record BPs only occur of the create step, even if they are not used on that step. As long as you put them on the create step (even in a hidden block) they should initialize.

  • Validation on multi fields

    Created a form on a table. table1 has columns:id (not null),fname,lname,div
    Need a validation: if all 3 fields are empty (fname,lname, div) then don't accept the input from the form.
    How do you do a validation on multiple fields in apex? I can write a function like
    if (:fname is null and :lname is null and :div is null ) then return True else return False.
    But how do you put this into the condition under the process section in Apex? basically it means if all 3 fields are null then don't execute the process row of table1 when user click create button.
    Can someone give me some pointers? Many thanks in advance.
    tai

    Tai,
    You can create page level validations in APEX where you can do what you have specified.
    In Page definition, click on + sing against 'Validations', Slelect 'Page level validation' and click NEXT, Select 'PL/SQL' click next and here select 'function returning boolean' and put your code.
    Return FALSE -- if validation fails
    Cheers
    Hari

  • Process_order api - Validation Failed for Field Bill To

    I am relatively new to the EBS world and I'm having some issues with calling the OE_Order_Pub.Process_order API. When I call this API I am getting a return error of "Validation failed for field - Bill To".
    For a background...I have an APEX application where users can choose parts from a small part master list to add to an existing order. The existing order will not have a status of Closed or Cancelled and there will be atleast 1 line in the order before the new parts are added. The parts will be added as new lines to the order with some of the new line data defaulting to the same information as the first line. I am using EBS version 12.1.3 with a multi-org setup. It seems that the orders under one org (id=3) are working fine, but another org(id=569) they never work and keep getting the error. I am setting the context to the org of the order and initializing the apps user information with the responsibility "Order Management Super User".
    Do you have any idea what could be wrong or how I can debug the error to get a little more detail?
    Here is the procedure I have.
    PROCEDURE TEK_ORD_PROCESS_ORDER(p_order_id IN NUMBER, p_return_code OUT NOCOPY VARCHAR2, p_status OUT NOCOPY VARCHAR2) IS
        CURSOR c_order_parts IS
          SELECT *
            FROM TEK_APEX.TEK_ORD_ORDER_PARTS
           WHERE ORDER_ID = p_order_id;
        TYPE t_parts IS TABLE OF TEK_APEX.TEK_ORD_ORDER_PARTS%ROWTYPE;
        v_order_parts t_parts;
        --Setup variables
        H_Op_Code      VARCHAR2(25) DEFAULT OE_GLOBALS.G_OPR_UPDATE;
        L_Op_Code      VARCHAR2(25) DEFAULT OE_GLOBALS.G_OPR_CREATE;
        v_install_type VARCHAR2(25) := 'PTO';
        v_source_id    NUMBER;
        v_user_id      NUMBER;
        v_resp_id      NUMBER;
        v_app_id       NUMBER;
        v_debug        VARCHAR2(32767);
        v_oracle_order OE_ORDER_HEADERS_ALL%ROWTYPE;
        v_apex_order   TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE;
        p_header_rec                    OE_Order_Pub.Header_Rec_Type;
        p_header_val_rec                OE_Order_Pub.Header_Val_Rec_Type;
        p_Header_Adj_tab                OE_Order_Pub.Header_Adj_Tbl_Type;
        p_Header_Adj_val_tab            OE_Order_Pub.Header_Adj_Val_Tbl_Type;
        p_Header_price_Att_tab          OE_Order_Pub.Header_Price_Att_Tbl_Type;
        p_Header_Adj_Att_tab            OE_Order_Pub.Header_Adj_Att_Tbl_Type;
        p_Header_Adj_Assoc_tab          OE_Order_Pub.Header_Adj_Assoc_Tbl_Type;
        p_Header_Scredit_tab            OE_Order_Pub.Header_Scredit_Tbl_Type;
        p_Header_Scredit_val_tab        OE_Order_Pub.Header_Scredit_Val_Tbl_Type;
        p_line_tab                      OE_Order_Pub.Line_Tbl_Type;
        p_line_val_tab                  OE_Order_Pub.Line_Val_Tbl_Type;
        p_Line_Adj_tab                  OE_Order_Pub.Line_Adj_Tbl_Type;
        p_Line_Adj_val_tab              OE_Order_Pub.Line_Adj_Val_Tbl_Type;
        p_Line_price_Att_tab            OE_Order_Pub.Line_Price_Att_Tbl_Type;
        p_Line_Adj_Att_tab              OE_Order_Pub.Line_Adj_Att_Tbl_Type;
        p_Line_Adj_Assoc_tab            OE_Order_Pub.Line_Adj_Assoc_Tbl_Type;
        p_Line_Scredit_tab              OE_Order_Pub.Line_Scredit_Tbl_Type;
        p_Line_Scredit_val_tab          OE_Order_Pub.Line_Scredit_Val_Tbl_Type;
        p_Lot_Serial_tab                OE_Order_Pub.Lot_Serial_Tbl_Type;
        p_Lot_Serial_val_tab            OE_Order_Pub.Lot_Serial_Val_Tbl_Type;
        p_action_request_tab            OE_Order_pub.Request_Tbl_Type;
        l_header_rec                    OE_Order_Pub.Header_Rec_Type;
        l_header_val_rec                OE_Order_Pub.Header_Val_Rec_Type;
        l_Header_Adj_tab                OE_Order_Pub.Header_Adj_Tbl_Type;
        l_Header_Adj_val_tab            OE_Order_Pub.Header_Adj_Val_Tbl_Type;
        l_Header_price_Att_tab          OE_Order_Pub.Header_Price_Att_Tbl_Type;
        l_Header_Adj_Att_tab            OE_Order_Pub.Header_Adj_Att_Tbl_Type;
        l_Header_Adj_Assoc_tab          OE_Order_Pub.Header_Adj_Assoc_Tbl_Type;
        l_Header_Scredit_tab            OE_Order_Pub.Header_Scredit_Tbl_Type;
        l_Header_Scredit_val_tab        OE_Order_Pub.Header_Scredit_Val_Tbl_Type;
        l_line_tab                      OE_Order_Pub.Line_Tbl_Type;
        l_line_val_tab                  OE_Order_Pub.Line_Val_Tbl_Type;
        l_Line_Adj_tab                  OE_Order_Pub.Line_Adj_Tbl_Type;
        l_Line_Adj_val_tab              OE_Order_Pub.Line_Adj_Val_Tbl_Type;
        l_Line_price_Att_tab            OE_Order_Pub.Line_Price_Att_Tbl_Type;
        l_Line_Adj_Att_tab              OE_Order_Pub.Line_Adj_Att_Tbl_Type;
        l_Line_Adj_Assoc_tab            OE_Order_Pub.Line_Adj_Assoc_Tbl_Type;
        l_Line_Scredit_tab              OE_Order_Pub.Line_Scredit_Tbl_Type;
        l_Line_Scredit_val_tab          OE_Order_Pub.Line_Scredit_Val_Tbl_Type;
        l_Lot_Serial_tab                OE_Order_Pub.Lot_Serial_Tbl_Type;
        l_Lot_Serial_val_tab            OE_Order_Pub.Lot_Serial_Val_Tbl_Type;
        l_ret_status                    VARCHAR2(200);
        l_msg_count                     NUMBER;
        l_msg_data                      VARCHAR2(200);
           --Email information
        v_email_address           varchar2(100);
           v_msg_text                varchar(1000);
           v_subject_text            varchar(1000);
           --Default line information
        v_item_id           NUMBER;
        v_contact_id        NUMBER;
        v_invoice_to_org_id oe_order_lines_all.INVOICE_TO_ORG_ID%TYPE;
        v_ship_to_org_id    oe_order_lines_all.SHIP_TO_ORG_ID%TYPE;
        v_sold_to_org_id    oe_order_lines_all.SOLD_TO_ORG_ID%TYPE;
        v_flow_status_code  oe_order_lines_all.FLOW_STATUS_CODE%TYPE;
        FUNCTION GET_ORACLE_ORDER(p_order_number IN OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE)
          RETURN OE_ORDER_HEADERS_ALL%ROWTYPE IS
          v_order OE_ORDER_HEADERS_ALL%ROWTYPE;
        BEGIN
          SELECT *
            INTO v_order
            FROM APPS.OE_ORDER_HEADERS_ALL
           WHERE ORDER_NUMBER = p_order_number;
          RETURN v_order;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_ORACLE_ORDER;
        FUNCTION GET_APEX_ORDER(p_order_id IN TEK_APEX.TEK_ORD_SALES_ORDERS.ORDER_ID%TYPE)
          RETURN TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE IS
          v_order TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE;
        BEGIN
          SELECT *
            INTO v_order
            FROM TEK_APEX.TEK_ORD_SALES_ORDERS
           WHERE ORDER_ID = p_order_id;
          RETURN v_order;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_APEX_ORDER;
        FUNCTION GET_SOURCE_ID(p_source_name IN VARCHAR2)
          RETURN OE_ORDER_SOURCES.ORDER_SOURCE_ID%TYPE IS
          v_source_id OE_ORDER_SOURCES.ORDER_SOURCE_ID%TYPE;
        BEGIN
          SELECT ORDER_SOURCE_ID
            INTO v_source_id
            FROM APPS.OE_ORDER_SOURCES
           WHERE NAME = p_source_name;
          RETURN v_source_id;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_SOURCE_ID;
        FUNCTION GET_ITEM_ID(p_part_number IN VARCHAR2, p_org_id IN NUMBER)
          RETURN MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE IS
          v_item_id MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE;
        BEGIN
          SELECT INVENTORY_ITEM_ID
            INTO v_item_id
            FROM APPS.MTL_SYSTEM_ITEMS
           WHERE SEGMENT1 = p_part_number
             AND ORGANIZATION_ID = p_org_id;
          RETURN v_item_id;
        EXCEPTION
          WHEN OTHERS THEN
            RETURN NULL;
        END GET_ITEM_ID;
      BEGIN
        apps.mo_global.set_policy_context('S',3);
        apps.mo_global.init('XXTEK');
        BEGIN
          SELECT USER_ID
            INTO v_user_id
            FROM APPS.FND_USER
           WHERE USER_NAME = 'SYSADMIN';
        EXCEPTION
          WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error selecting user');
        END;
        BEGIN
          SELECT RESPONSIBILITY_ID, APPLICATION_ID
            INTO v_resp_id, v_app_id
            FROM TEK_APEX.TEK_RR_ACTIVE_RESP_VW
           WHERE UPPER(RESPONSIBILITY_NAME) = 'ORDER MANAGEMENT SUPER USER';
          --Set current user information
          fnd_global.apps_initialize (user_id      => v_user_id
                                     ,resp_id      => v_resp_id
                                     ,resp_appl_id => v_app_id);
        EXCEPTION
          WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error selecting responsibility');
        END;
        --Get the order information from Oracle and APEX
        v_apex_order := GET_APEX_ORDER(p_order_id);
        IF v_apex_order.ORDER_ID IS NULL THEN
          RAISE_APPLICATION_ERROR(-20001, 'APEX Order ID is invalid: ' || p_order_id);
        END IF;
        v_oracle_order := GET_ORACLE_ORDER(TO_NUMBER(v_apex_order.ORDER_NUMBER));
        IF v_oracle_order.ORDER_NUMBER IS NULL THEN
          RAISE_APPLICATION_ERROR(-20001, 'Order Number not found in Oracle: ' || v_apex_order.ORDER_NUMBER);
        END IF;
        apps.mo_global.set_policy_context('S', v_oracle_order.ORG_ID);
        v_source_id := GET_SOURCE_ID('IMPORT');
        IF v_source_id IS NULL THEN
          RAISE_APPLICATION_ERROR(-20001, 'Source ID not found for IMPORT');
        END IF;
        /* ********** Gather Order Header********** */
        /* ********** Info.              ********** */
        OE_Order_Pub.Get_Order(p_api_version_number    =>      1.0,
                               p_init_msg_list         =>      FND_API.G_TRUE,
                               p_return_values         =>      FND_API.G_TRUE,
                               x_return_status         =>      l_ret_status,
                               x_msg_count             =>      l_msg_count,
                               x_msg_data              =>      l_msg_data,
                               p_header_id             =>      v_oracle_order.HEADER_ID,
                               p_header                =>      NULL,
                               x_header_rec            =>      l_header_rec,
                               x_header_val_rec        =>      l_header_val_rec,
                               x_Header_Adj_tbl        =>      l_Header_Adj_tab,
                               x_Header_Adj_val_tbl    =>      l_Header_Adj_val_tab,
                               x_Header_price_Att_tbl  =>      l_Header_price_Att_tab,
                               x_Header_Adj_Att_tbl    =>      l_Header_Adj_Att_tab,
                               x_Header_Adj_Assoc_tbl  =>      l_Header_Adj_Assoc_tab,
                               x_Header_Scredit_tbl    =>      l_Header_Scredit_tab,
                               x_Header_Scredit_val_tbl=>      l_Header_Scredit_val_tab,
                               x_line_tbl              =>      l_line_tab,
                               x_line_val_tbl          =>      l_line_val_tab,
                               x_Line_Adj_tbl          =>      l_Line_Adj_tab,
                               x_Line_Adj_val_tbl      =>      l_Line_Adj_val_tab,
                               x_Line_price_Att_tbl    =>      l_Line_price_Att_tab,
                               x_Line_Adj_Att_tbl      =>      l_Line_Adj_Att_tab,
                               x_Line_Adj_Assoc_tbl    =>      l_Line_Adj_Assoc_tab,
                               x_Line_Scredit_tbl      =>      l_Line_Scredit_tab,
                               x_Line_Scredit_val_tbl  =>      l_Line_Scredit_val_tab,
                               x_Lot_Serial_tbl        =>      l_Lot_Serial_tab,
                               x_Lot_Serial_val_tbl    =>      l_Lot_Serial_val_tab);
        --Save defaults from first line
        IF l_line_tab.EXISTS(1) THEN
          v_contact_id        := l_line_tab(1).SHIP_TO_CONTACT_ID;
          v_invoice_to_org_id := l_line_tab(1).INVOICE_TO_ORG_ID;
          v_ship_to_org_id    := l_line_tab(1).SHIP_TO_ORG_ID;
          v_sold_to_org_id    := l_line_tab(1).SOLD_TO_ORG_ID;
          v_flow_status_code  := l_line_tab(1).FLOW_STATUS_CODE;
        END IF;
        --Clear out the line array before adding any new parts
        FOR i IN l_line_tab.FIRST..l_line_tab.LAST LOOP
          l_line_tab.DELETE(i);
          l_line_val_tab.DELETE(i);
          l_line_adj_tab.DELETE(i);
          l_line_adj_val_tab.DELETE(i);
          l_line_price_att_tab.DELETE(i);
          l_line_adj_att_tab.DELETE(i);
          l_line_adj_assoc_tab.DELETE(i);
          l_line_scredit_tab.DELETE(i);
          l_line_scredit_val_tab.DELETE(i);
          l_lot_serial_tab.DELETE(i);
          l_lot_serial_val_tab.DELETE(i);
        END LOOP;
        /* ********** Gather Order Lines ********** */
        OPEN c_order_parts;
        FETCH c_order_parts BULK COLLECT INTO v_order_parts;
        CLOSE c_order_parts;
        FOR i IN v_order_parts.FIRST..v_order_parts.LAST LOOP
          v_item_id := GET_ITEM_ID(v_order_parts(i).PART_NUMBER, v_oracle_order.SHIP_FROM_ORG_ID);
          IF v_item_id IS NULL THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error selecting part number ' || v_order_parts(i).PART_NUMBER);
          END IF;
          --Clear line first
          l_line_tab(i)             := OE_Order_Pub.G_Miss_Line_Rec;
             l_line_val_tab(i)         := OE_ORDER_PUB.G_MISS_LINE_VAL_REC;
          l_line_adj_tab(i)             := OE_ORDER_PUB.G_MISS_LINE_ADJ_REC;
          l_line_adj_val_tab(i)     := OE_ORDER_PUB.G_MISS_LINE_ADJ_VAL_REC;
          l_line_price_att_tab(i)      := OE_ORDER_PUB.G_MISS_LINE_PRICE_ATT_REC ;
          l_line_adj_att_tab(i)     := OE_ORDER_PUB.G_MISS_LINE_ADJ_ATT_REC;
          l_line_adj_assoc_tab(i)   := OE_ORDER_PUB.G_MISS_LINE_ADJ_ASSOC_REC;
          l_line_scredit_tab(i)     := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_REC;
          l_line_scredit_val_tab(i) := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_VAL_REC;
          l_lot_serial_tab(i)       := OE_ORDER_PUB.G_MISS_LOT_SERIAL_REC;
          l_lot_serial_val_tab(i)   := OE_ORDER_PUB.G_MISS_LOT_SERIAL_VAL_REC;
          --Set line information
             l_line_tab(i).PRICE_LIST_ID          := v_oracle_order.PRICE_LIST_ID;
          l_line_tab(i).header_id              := v_oracle_order.header_id;
          l_line_tab(i).inventory_item_id      := v_item_id;
          l_line_tab(i).ordered_quantity       := v_order_parts(i).QUANTITY;
          l_line_tab(i).operation              := l_op_code;
          l_line_tab(i).unit_list_price        := 0;
          l_line_tab(i).ship_from_org_id       := v_oracle_order.ship_from_org_id;
          l_line_tab(i).program_id             := fnd_global.conc_program_id ;
          l_line_tab(i).program_application_id := fnd_global.PROG_APPL_ID;
          l_line_tab(i).order_source_id        := v_source_id;
          l_line_tab(i).calculate_price_flag   := 'N' ;
          l_line_tab(i).unit_selling_price     := 0.00 ;
             l_line_tab(i).request_date           := v_apex_order.onsite_date;
             l_line_tab(i).Schedule_ship_date     := v_apex_order.onsite_date;
             l_line_tab(i).promise_date           := null;
          l_line_tab(i).invoice_to_org_id      := v_invoice_to_org_id;
          l_line_tab(i).ship_to_org_id         := v_ship_to_org_id;
          l_line_tab(i).sold_to_org_id         := v_sold_to_org_id;
          l_line_tab(i).ship_to_contact_id     := v_contact_id;
        END LOOP;
    --OE_DEBUG_PUB.DEBUG_ON;
    --OE_DEBUG_PUB.Initialize;
    --OE_DEBUG_PUB.SetDebugLevel(5);
        --Add lines to order
        OE_Order_Pub.Process_order(p_api_version_number            =>      1.0,
                                   p_init_msg_list                 =>      FND_API.G_TRUE,
                                   p_return_values                 =>      FND_API.G_TRUE,
                                   p_action_commit                 =>      FND_API.G_FALSE,
                                   x_return_status                 =>      l_ret_status,
                                   x_msg_count                     =>      l_msg_count,
                                   x_msg_data                      =>      l_msg_data,
                                   p_header_rec                    =>  l_header_rec,
                                   p_old_header_rec                =>  l_header_rec,
                                   p_header_val_rec                =>  l_header_val_rec,
                                   p_old_header_val_rec            =>  l_header_val_rec,
                                   p_Header_Adj_tbl                =>  l_Header_Adj_tab,
                                   p_old_Header_Adj_tbl            =>  l_Header_Adj_tab,
                                   p_Header_Adj_val_tbl            =>  l_Header_Adj_val_tab,
                                   p_old_Header_Adj_val_tbl        =>  l_Header_Adj_val_tab,
                                   p_Header_price_Att_tbl          =>  l_Header_price_Att_tab,
                                   p_old_Header_Price_Att_tbl      =>  l_Header_price_Att_tab,
                                   p_Header_Adj_Att_tbl            =>  l_Header_Adj_Att_tab,
                                   p_old_Header_Adj_Att_tbl        =>  l_Header_Adj_Att_tab,
                                   p_Header_Adj_Assoc_tbl          =>  l_Header_Adj_Assoc_tab,
                                   p_old_Header_Adj_Assoc_tbl      =>  l_Header_Adj_Assoc_tab,
                                   p_Header_Scredit_tbl            =>  l_Header_Scredit_tab,
                                   p_old_Header_Scredit_tbl        =>  l_Header_Scredit_tab,
                                   p_Header_Scredit_val_tbl        =>  l_Header_Scredit_val_tab,
                                   p_old_Header_Scredit_val_tbl    =>  l_Header_Scredit_val_tab,
                                   p_line_tbl                      =>  l_line_tab,
                                   p_line_val_tbl                  =>  l_line_val_tab,
                                   p_Line_Adj_tbl                  =>  l_line_adj_tab,
                                   p_Line_Adj_val_tbl              =>  l_line_adj_val_tab,
                                   p_Line_price_Att_tbl            =>  l_line_price_att_tab,
                                   p_Line_Adj_Att_tbl              =>  l_line_adj_att_tab,
                                   p_Line_Adj_Assoc_tbl            =>  l_line_adj_assoc_tab,
                                   p_Line_Scredit_tbl              =>  l_line_scredit_tab,
                                   p_Line_Scredit_val_tbl          =>  l_line_scredit_val_tab,
                                   p_Lot_Serial_tbl                =>  l_lot_serial_tab,
                                   p_Lot_Serial_val_tbl            =>  l_lot_serial_val_tab,
                                   p_action_request_tbl            =>  OE_ORDER_PUB.G_MISS_REQUEST_TBL,
                                   x_header_rec                    =>      p_header_rec,
                                   x_header_val_rec                =>      p_header_val_rec,
                                   x_Header_Adj_tbl                =>      p_Header_Adj_tab,
                                   x_Header_Adj_val_tbl            =>      p_Header_Adj_val_tab,
                                   x_Header_price_Att_tbl          =>      p_Header_price_Att_tab,
                                   x_Header_Adj_Att_tbl            =>      p_Header_Adj_Att_tab,
                                   x_Header_Adj_Assoc_tbl          =>      p_Header_Adj_Assoc_tab,
                                   x_Header_Scredit_tbl            =>      p_Header_Scredit_tab,
                                   x_Header_Scredit_val_tbl        =>      p_Header_Scredit_val_tab,
                                   x_line_tbl                      =>      p_line_tab,
                                   x_line_val_tbl                  =>      p_line_val_tab,
                                   x_line_adj_tbl                  =>      p_line_adj_tab,
                                   x_line_adj_val_tbl              =>      p_line_adj_val_tab,
                                   x_line_price_att_tbl            =>      p_line_price_att_tab,
                                   x_line_adj_att_tbl              =>      p_line_adj_att_tab,
                                   x_line_adj_assoc_tbl            =>      p_line_adj_assoc_tab,
                                   x_line_scredit_tbl              =>      p_line_scredit_tab,
                                   x_line_scredit_val_tbl          =>      p_line_scredit_val_tab,
                                   x_lot_serial_tbl                =>      p_lot_serial_tab,
                                   x_lot_serial_val_tbl            =>      p_lot_serial_val_tab,
                                   x_action_request_tbl            =>      p_action_request_tab);
    --  OE_DEBUG_PUB.DEBUG_OFF;
        p_return_code := l_ret_status;
        IF l_ret_status != 'S' THEN
          DBMS_OUTPUT.PUT_LINE(l_msg_data);
          IF l_msg_count = 1 THEN
            p_status := OE_Msg_Pub.Get(1,'F');
          ELSE
            FOR i IN 1..l_msg_count LOOP
              p_status := OE_Msg_Pub.Get(i,'F') || '<br />';
            END LOOP;
          END IF;
          p_status := 'Error loading lines<br>' || p_status;
        ELSE
          p_status := 'Order Processed Successfully<br>' || v_order_parts.COUNT || ' Line(s) Loaded';
        END IF;
    --    WHILE OE_DEBUG_PUB.G_DEBUG_INDEX < OE_DEBUG_PUB.CountDebug LOOP
    --      OE_DEBUG_PUB.GetNext(v_debug);
    --      DBMS_OUTPUT.PUT_LINE(v_debug);
    --    END LOOP;
      EXCEPTION
        WHEN OTHERS THEN
          ROLLBACK;
          RAISE;
      END TEK_ORD_PROCESS_ORDER;Thanks!
    Jonathan Hart

    Hello,
    Try the following
    1) Check if any processing constraints are applied to customer/location
    2) Try to create a new customer and associate internal location.
    Create a new order to reproduce the issue
    Thanks
    -Arif

  • Field T_STCD1 does not exist in form this erroe msg coming in smartform

    hi,
    in my smartform, if i give one set of input like, 1st qtr of 2008, vendor and compcode, its displaying the value.
    but if i give the input like 1st qtr of 2007, vendor and some other compcode its giving some error like
    field T_STCD1 does not exist in form .
    this error coming after printpreview and not displaying.
    how can i debug it.
    can any one help me...........plz
    its very urgent.
    thanks.

    report  zmm_vat_ex_cert message-id zz                        .
                             TABLE DECLARATION                           *
    tables:  bseg , tvko.
    *Intenal Tables Declarations                                           *
    types: begin of it_address_type .
            include structure zvat_vendor.
    types :end of it_address_type.
    types : begin of it_address_info_type.
            include structure zadrc_table.
    types: end of it_address_info_type.
    types : begin of it_desig_type.
            include structure zmm_vat_sign.
    types: end of it_desig_type.
    types: begin of it_bkpf_type,
          bukrs  type bkpf-bukrs,
          belnr  type bkpf-belnr,
          gjahr  type bkpf-gjahr,
          blart type bkpf-blart,
          bldat  type bkpf-bldat,
          xblnr type bkpf-xblnr,
          awkey  type bkpf-awkey ,
          end of it_bkpf_type.
    types : begin of it_bseg_type,
          bukrs like bseg-bukrs,
          belnr like bseg-belnr,
          gjahr like bseg-gjahr,
          bschl like bseg-bschl,
          mwskz like bseg-mwskz,
          shkzg like bseg-shkzg,
          wrbtr like bseg-wrbtr,
          sgtxt type bseg-sgtxt,
          end of it_bseg_type.
    types: begin of it_rseg_type,
           ebeln like ekpo-ebeln,
           ebelp like ekpo-ebelp,
           bukrs like bkpf-bukrs,
           txz01 type ekpo-txz01,
           wrbtr type rseg-wrbtr,
           end of it_rseg_type.
    data:begda type d, endda type d.
    types: begin of it_item_type.
            include structure zitem_vat.
    types:end of it_item_type.
    data: it_rseg type table of it_rseg_type,
           wa_it_rseg like line of it_rseg.
    data: gt_addr type table of it_address_type.
    data gt_addr_info type table of it_address_info_type.
    data gt_bkpf type table of it_bkpf_type.
    data gt_bseg type table of it_bseg_type.
    data:
          gt_tvko type standard table of tvko,
          gt_item type table of it_item_type,
          h_itab type table of it_bseg_type,
          it_desig type table of it_desig_type,
          temp_item type table of it_item_type .
    data:wa_addr like line of gt_addr,
         wa_addr_info like line of gt_addr_info,
         wa_bkpf like line of gt_bkpf,
         wa_bseg like line of gt_bseg,
         wa_item like line of gt_item,
         wa_h_itab like line of h_itab,
         wa_it_desig like line of it_desig,
         wa_temp_item like line of temp_item,
        wa_tvko LIKE LINE OF gt_tvko.
         wa_tvko type tvko.
         Data Declaration                                                *
    data: sumtotal type bseg-wrbtr, "rbkp-waers ,
          sl_no type zmm_vatex_sno-serial_no,
          fiscal_year type string,
          fm_name type rs38l_fnam ,
          w_q_flag(5),
          w_quarter type string ,
          close_date type sy-datum ,
          fiscal type sy-datum, fiscal_nxt type sy-datum,
          gv_belnr type bkpf-belnr,
          gv_gjahr type bkpf-gjahr.
    data: ca_quarter type i.
    data: l_adrnr type t001-adrnr.
    data wa_vatex_sno type zmm_vatex_sno.
    data: q(1).
    data: stdtext(25).
    S E L E C T I O N   S C R E E N                                     *
    selection-screen begin of block b1 with frame title text-s01.
    select-options: s_date for sy-datum obligatory no-extension.
    parameters : vendor type lfa1-lifnr obligatory ,
                 compcode type bkpf-bukrs obligatory.
    select-options taxcode for bseg-mwskz obligatory default 'VI'.
    selection-screen end of block b1.
    at selection screen
    at selection-screen on s_date.
      if s_date-low0(4) <> s_date-high0(4).
        message e023 with text-e01.
      endif.
    *get calendar quarter  using the month entered in From date.
    *calculate the fiscal year and quarter
      if s_date-low4(2) > '0' and s_date-low4(2) <= '3' .
        ca_quarter = 1.
        fiscal0(4) = s_date-high0(4) .
        fiscal_nxt0(4) = s_date-high0(4) - 1.
        concatenate  fiscal_nxt2(2) '-' fiscal2(2)  into fiscal_year .
        concatenate 'last quarter of year ' fiscal_nxt0(4) '-' fiscal0(4)
        into w_quarter separated by space .
        q = '4'.
      elseif ( s_date-low4(2) > '3' and s_date-low4(2) <= '6' ).
        ca_quarter = 2.
        fiscal0(4) = s_date-high0(4) + 1.
        fiscal_nxt0(4) = s_date-high0(4).
        concatenate  fiscal_nxt2(2) '-' fiscal2(2)  into fiscal_year .
        concatenate '1st quarter of year ' fiscal_nxt0(4) '-' fiscal0(4)
         into w_quarter separated by space .
        q = '1'.
      elseif ( s_date-low4(2) > '6' and s_date-low4(2) <= '9' ).
        ca_quarter = 3.
        fiscal0(4) = s_date-high0(4) + 1.
        fiscal_nxt0(4) = s_date-high0(4).
        concatenate  fiscal_nxt2(2) '-' fiscal2(2)  into fiscal_year .
        concatenate '2nd quarter of year ' fiscal_nxt0(4) '-' fiscal0(4)  INTO
         w_quarter separated by space .
        q = '2'.
      elseif ( s_date-low4(2) > '9' and s_date-low4(2) <= '12' ).
        ca_quarter = 4.
        w_quarter = '3rd quarter of year'.
        fiscal0(4) = s_date-high0(4) + 1.
        fiscal_nxt0(4) = s_date-high0(4).
        concatenate  fiscal_nxt2(2) '-' fiscal2(2)  into fiscal_year .
        concatenate '3rd quarter of year '  fiscal_nxt0(4) '-' fiscal0(4)  INTO
         w_quarter separated by space .
        q = '3'.
      endif.
    *get first and last day of quarter by fetching calendar quarter and year in FM
      call function 'HR_99S_GET_DATES_QUARTER'
        exporting
          im_quarter = ca_quarter
          im_year    = s_date-low+0(4)
        importing
          ex_begda   = begda
          ex_endda   = endda.
    *validate the input dates is start and end of quarter
      if  s_date-low <> begda or  s_date-high <> endda.
        message e023 with 'Enter quarter begin and end dates only'.
      endif.
    *get last day of next month. for close date
      endda = endda + 1.
      call function 'RP_LAST_DAY_OF_MONTHS'
        exporting
          day_in            = endda
        importing
          last_day_of_month = close_date
        exceptions
          day_in_no_date    = 1
          others            = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
         Start of Selection
    start-of-selection.
    *CNO is specific to a Quarter/ Company code/ Vendor.
      unpack vendor to vendor.
      clear:sl_no, wa_vatex_sno.
      select single * from zmm_vatex_sno into wa_vatex_sno where from_date
      eq s_date-low and to_date eq s_date-high and vendor eq vendor
        and  compcode eq compcode.
      if sy-subrc eq 0.
        sl_no = wa_vatex_sno-serial_no.
      else.
        select max( serial_no )  from zmm_vatex_sno into wa_vatex_sno-serial_no  WHERE
          from_date  eq s_date-low and to_date eq s_date-high and compcode eQ compcode.
        if sy-subrc = 0.
          sl_no = wa_vatex_sno-serial_no  + 1.
        else.
          sl_no =  1.
        endif.
        wa_vatex_sno-from_date = s_date-low.
        wa_vatex_sno-to_date = s_date-high.
        wa_vatex_sno-vendor = vendor.
        wa_vatex_sno-compcode = compcode.
        wa_vatex_sno-serial_no = sl_no.
        insert zmm_vatex_sno from wa_vatex_sno.
      endif.
    *data selection from bkpf by date,fiscal and compcode
      refresh gt_bkpf.
      select bukrs
            belnr
            gjahr
            blart
            bldat
            xblnr
            awkey
            into  table  gt_bkpf from bkpf
            where bukrs eq compcode and
            budat in s_date and gjahr eq fiscal+0(4).
      check not gt_bkpf[] is initial.
      refresh gt_bseg.
      select bukrs
             belnr
             gjahr
             bschl
             mwskz
             shkzg
             wrbtr
             sgtxt from bseg into table gt_bseg
        for all entries in gt_bkpf where
              bukrs eq compcode and
              mwskz in taxcode and
              lifnr eq vendor and
             belnr = gt_bkpf-belnr and
         gjahr = gt_bkpf-gjahr  and shkzg = 'H'.
    selection without vendor   and posting key 40     *
      refresh h_itab.
      select bukrs
             belnr
             gjahr
             bschl
             mwskz
             shkzg
             wrbtr from bseg into table h_itab
             for all entries in gt_bseg
             where bukrs = gt_bseg-bukrs and
             belnr = gt_bseg-belnr and
             mwskz = gt_bseg-mwskz and
             gjahr = gt_bseg-gjahr  and
             ( bschl = '40' or bschl = '21' ).
      if sy-subrc = 0.
    deduct the amount if posting key is 40 for PO based docs
        clear wa_h_itab.
        loop at h_itab into wa_h_itab where bschl = '40'.
          clear wa_bseg.
          read table gt_bseg into wa_bseg with key belnr = wa_h_itab-belnr.
          if sy-subrc = 0.
            read table gt_bkpf into wa_bkpf with key belnr = wa_h_itab-belnr.
            if wa_bkpf-blart <> 'KR'.
              wa_bseg-wrbtr = wa_bseg-wrbtr - wa_h_itab-wrbtr.
            endif.
            modify  gt_bseg  from wa_bseg
             transporting wrbtr where belnr = wa_bseg-belnr
             and bschl = wa_bseg-bschl  .
          endif.
          clear wa_h_itab.
        endloop.
    deduct the amount if posting key is 21 for non-PO based docs
        clear wa_h_itab.
        loop at h_itab into wa_h_itab where bschl = '21'.
          clear wa_bseg.
          read table gt_bseg into wa_bseg with key belnr = wa_h_itab-belnr.
          if sy-subrc = 0.
            read table gt_bkpf into wa_bkpf with key belnr = wa_h_itab-belnr.
            if wa_bkpf-blart = 'KR'.
              wa_bseg-wrbtr = wa_bseg-wrbtr - wa_h_itab-wrbtr.
            endif.
            modify  gt_bseg  from wa_bseg
             transporting wrbtr where belnr = wa_bseg-belnr.
          endif.
          clear wa_h_itab.
        endloop.
      endif.
    final internal table
      clear wa_item. refresh gt_item. clear wa_bseg.
      loop at gt_bseg into wa_bseg.
        read table gt_bkpf into wa_bkpf with key belnr = wa_bseg-belnr .
        if sy-subrc = 0.
          move :
           wa_bkpf-xblnr to wa_item-xblnr,
                wa_bkpf-belnr to wa_item-belnr,
                wa_bkpf-bldat to wa_item-bldat,
               wa_bseg-wrbtr to  wa_item-wrbtr.
        endif.
    *selections for item description
        refresh it_rseg.
        select  ekpoebeln ekpoebelp ekpobukrs  txz01 rsegwrbtr
          into table it_rseg
          from rseg join ekpo
          on rsegebeln = ekpoebeln
          and rsegebelp = ekpoebelp
          and rsegbukrs = ekpobukrs
            where rsegbelnr = wa_bkpf-awkey(10) and rseggjahr = wa_bkpf-gjahr AND
            ekpo~bukrs = wa_bkpf-bukrs.
        if sy-subrc = 0.
          loop at it_rseg into wa_it_rseg.
            wa_item-txz01 = wa_it_rseg-txz01 .
            if sy-tabix <> 1.
           wa_item-wrbtr = wa_it_rseg-wrbtr .
              wa_item-wrbtr = space .
            endif.
            append wa_item to gt_item.
          endloop.
        else.
          wa_item-txz01 = wa_bseg-sgtxt.
          append wa_item to gt_item.
        endif.
        clear: wa_bseg, wa_item.
      endloop.
    *if records not found give message.
      if  gt_item[] is initial.
        message e000(vz) with text-x01.
      endif.
    calculate the sumtotal
      loop at gt_item into wa_item.
        sumtotal = sumtotal + wa_item-wrbtr .
      endloop.
         Selecting supplier address                                     *
      select single * from tvko into wa_tvko where vkorg = compcode.
      append wa_tvko to gt_tvko.
      if wa_tvko-vkorg = '2014'.
        stdtext = 'Z_2014_SOFTEX'.
      elseif wa_tvko-vkorg = '2006'.
        stdtext = 'Z_2006_SOFTEX'.
      else.
        stdtext = wa_tvko-txnam_adr.
      endif.
      select lifnr
             name1
             name2
             ort01
             ort02
             pfach
             stras
             regio from lfa1 into table gt_addr
             where lifnr eq vendor  .
         Selecting sez address                                         *
    SELECT SINGLE adrnr FROM t001 INTO l_adrnr WHERE bukrs EQ compcode.
    SELECT name1
          name2
          city1
          city2
          post_code1
          post_code2
          street
          house_num1
          FROM adrc INTO TABLE gt_addr_info
          WHERE addrnumber = l_adrnr.
         Information for designation                                    *
      select  * from zmm_vat_sign into table it_desig where company = compcode
         Call Function module SSF_FUNCTION_MODULE_NAME                *
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname                 = 'ZMM_VAT_EX_CERT'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
       importing
         fm_name                  = fm_name
    EXCEPTIONS
      NO_FORM                  = 1
      NO_FUNCTION_MODULE       = 2
      OTHERS                   = 3
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
         Call Function module fm_name                                  *
      call function fm_name
        exporting
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
          doc_num                    = sl_no
          quarter                    = w_quarter
          date                       = s_date-high
          sumtotal                   = sumtotal
          close_date                = close_date
          fiscal_year              = fiscal_year
          ca_quarter             = q
          text_name             = stdtext
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        tables
          itab                       = gt_item
          it_address                 = gt_addr
          it_infoaddress              = gt_addr_info
          it_designation             = it_desig
          it_tvko                   = gt_tvko
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.

  • XML Validation in PI 7.1 - Restart and skip validation possible, but how?

    Hello all,
    I read about schema validation in PI 7.1 and did a few tests on my own, but could not restart and skip validation for invalid payloaded messages. The documents say it is possible.
    Anyone know how? Thanks.
    BTW, I really think putting the schemas in server file system will cause a lot of authorization trouble in enterprises. No one gives access to the server filesystem and I don't think they will also like to open the required subdirectories for share. Asking the basis team to create the folder structures and maintaining schemas would be another pain. Don't you also think that SAP could find a better approach, like automatically uploading the schemas to the filesystem, or validating them from repository directly if possible?
    Kind regards,
    Gökhan

    Hi Gökhan,
    I am facing the same issue.
    I set up outbound xml validation in receiver agreement and tested it with valid and invalid messages.
    The validation works fine.
    But in case of validation error I tried to restart with skipping the validation. But this wasn't possible.
    I am always facing the same valdiation error.
    I already tried all different tools I know (sxi_monitor, message monitoring in rwb and in nwa)
    I am working on PI 7.11 SP6
    Did you find a solution for skipping the validation for a single message out of the monitoring?
    I know that there is the possibility of deactivate the validation in receiver agreement but thid doesn't meet the requirement of skip the validation only for a single message.
    Maybe anyone else faced and solved this issue already.
    Thanks in advance
    Jochen

  • How to create validation on the field in WEBUI ?

    Hi all,
    Can somebody inlight me with the following question?
    Is it possible in IC WebUI when New Customer is being created through IC center to put validation on some field for Example if customer with the Last Name, First Name, email exists already in the system to notify user about it and to not allow create duplicate. If it possible how to do it using adviseable by SAP ways?
    Thank you,
    Maria.

    Hi Maria,
    it is possible by implementing a BAdI. See the following discussion for more details: Execution of duplicate check.
    The SAP help also has some information on this:
    Duplicate Check for Accounts and Contacts - Business Partners - SAP Library
    Duplicate Check - Business Address Services (BC-SRV-ADR) - SAP Library
    Hope this helps,
    Christian
    ps.: I the future please search before posting a question. All the links above where in the 10 google results when searching for "sap crm business pattern duplicate check"

  • File-to-Idoc - field population problem.

    Hi All,
    I’m getting the following problem.
    My scenario is File–to–idoc.
    Problem:
    In the interface mapping I’m able to see all the values are populated correctly for Idoc.but when I see in IDX5 or SXMB_MONI one value instead of populating correctly replacing ‘,’ in that field.
    I’m using Java mapping program also to convert the file in to desired structure.
    Thanks in advance.
    Venu.

    Hi All,
    The out put from the above java program is.
    <?xml version='1.0' encoding='UTF-8'?><ns0:MT_MeterReading_IntermediateForm xmlns:ns0="urn://MVP_SR3_01/MVP/MeterReading"><Recordset><H1><Recordid>H1</Recordid><RouteNumber>10151G</RouteNumber><MetReaderId>002</MetReaderId><TotRead>000015</TotRead><TotDevUploaded>000016</TotDevUploaded></H1></Recordset><Recordset><H1><Recordid>H1</Recordid><RouteNumber>10151G</RouteNumber><MetReaderId>SYSADMIN</MetReaderId><TotRead>000000</TotRead><TotDevUploaded>000000</TotDevUploaded></H1><Item><D1><HMetReaderId>SYSADMIN</HMetReaderId><HTotDevicesUploaded>000000</HTotDevicesUploaded><AccountNumber>6205</AccountNumber><MeterReadCode>0000001495</MeterReadCode><ReadDate>20060819</ReadDate><TroubleCode></TroubleCode></D1><D2><ChgdSplInstr>IN FOOTPATH DOG BITES information for service order</ChgdSplInstr></D2><U2><Data>33333300100451</Data></U2><UC><Data><u>SKIP TEST COMMENTS FROM METER READER FOR 4000734 MRo with RR '09'</u> </Data></UC></Item></Recordset></ns0:MT_MeterReading_IntermediateForm>
    In abobe result last Data field value is populated correctly . the above result is from interface mapping.
    but when the idoc is generated in XI. I'm unable to see the value.
    Thanks,
    venu.

Maybe you are looking for

  • EDI TRADACOM through Seeburger Adapter into PI

    Has anybody configured communication channel in PI using Seeburger Adapter to convert EDI TRADACOM into xml ? Is there a useful tutorial to have a look at ?

  • -5002:Address is empty error with Business One 2007

    ANyone ever see this error message when trying to update a BP address of a customer? I found some threads in here that talked about this error back in 2004 as a bug. Why would this happen in 2007 B1? this._bp.Addresses.Add(); this._bp.Addresses.SetCu

  • Can I script the robohelp compiler?

    Hi! I'd like to know if I can write a command line script to automate CHM file compilation. I am a developer so I'm not afraid of writing code. I just want to know if there's any way to connect to the robohelp (CHM) compiler via a script (Javascript,

  • Mutiple Picture in screen

    Hi friends,   I am working with ECC 6.0 ABAP. I am having a requirment display mutiple images (dynamically) in single screen. The picture may be 10 or 20 or etc. Is there any way to do with picture control or ALV grid. Grid kind of picture display? T

  • Downtown Minneapolis 4G service non-existent M-F 8-5.  What am I paying for?

    Verizon has two towers "near" downtown.  They have dramatically oversold the number of phones used downtown relative to their capacity.  As such 4G service does not function Monday through Friday during regular business hours.  Even their downtown st