Function module to validate Sales Deal in VA01

Dear Experts,
                   I have a requirement to validate the sales deal for material/material group and customer/customer group
discounts. I need to activate/deactivate the condition type based on the sales deal entered in the sold-to-party and ship-to-party
level. Please let me know if any function module is available for the same.
Thanks
Ramesh Manoharan

Hi,
Using custom ROUTINES in requirement column of pricing procedure (V/08) we can activate/deactivate any condition type in sales order. For your requirement you have to define the exact logic to write in routine.
n routine, you need to set the SY-SUBRC value.
If SY-SUBRC = 0, then the condition type will be triggered in sales order.
If SY-SUBRC = 4, then the condition type will not be triggered in sales order.
I hope this will help you.
If my understanding is wrong, please explain in detail about your requirement.
Regards,
Shashwath

Similar Messages

  • Function module to validate input value

    Hi all,
    can you please provide me the name of the function module to validate input value.
    I have a case where i have to validate decimal values. sometimes users may enter wrong decimal values by mistake instead of  "0.23" "0..23' and it gives CONVT_NO_NUMBER runtime error so have to come up with some solutions to validate user input.
    Please provide me Function module if anybody knows.
    Thanks,

    Try this one
    data: lv_htype TYPE dd01v-datatype.
        CALL FUNCTION 'NUMERIC_CHECK'
          EXPORTING
            string_in = my_number
          IMPORTING
            htype     = lv_htype.
        IF lv_htype NE 'NUMC'.
           Raise an error here...
        ENDIF.

  • API - BAPI , RFC Function module to validate user id and password

    Hi,
    Can anyone provide me with the function module to validate the username and password of the user of the back end R/3 System.
    Best Regards
    Sid

    Use function module SUSR_CHECK_LOGON_DATA. You need to provide auth_method (P for password check), userid and password.
    Be careful when you execute the function in test mode because it converts the input into upper case hence if you have lower case characters in your password it will return with invalid password. If you pass the lower case into the function in a program everything is fine.
    Regards,
    Michael

  • Function module to validate numeric values

    Hi all.
    Can some one please tell me Is there any Function Module to validate only numeric values?
    Like in year variable, it can never contain alphanumeric values or special symbols?
    Is there any function module to check, wheather the variable contains only numeric values, no alphanumeric value or special symbol?
    If there is no as such function module then what is the alternative approach we can take?
    Plz help me .
    Regards
    Dipankar

    Function Module NUMERIC_CHECK for Editing and checking numeric fields ( i.e. Num validations)
    Check using the Function Module "NUMERIC_CHECK".
    CALL FUNCTION 'NUMERIC_CHECK'
    EXPORTING
    STRING_IN = X
    IMPORTING
    STRING_OUT = X
    HTYPE = H_TYPE.
    if h_type = 'CHAR'.
    WRITE:/ 'Not Numeric'.
    else.
    write:/ 'Numeric'.
    ENDIF.
    REWARDS IF USEFUL
    GAURAV J.
    Edited by: GAURAV on Feb 3, 2008 2:19 PM

  • Function Module to validate date

    Hi,
    Is there a Function module to validate date in transfer rules or update rules. I checked the forum, couldn't find an answer. Any help is appreciated
    Thanks
    Bala

    You should be able to use this FM:
    CALL FUNCTION 'RSAR_DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        i_date                          = yourdate
    EXCEPTIONS
       PLAUSIBILITY_CHECK_FAILED       = 1

  • Function module to get Sales Order classification.

    Hello everyone,
    Can someone give me a function module to get Sales Order classification? Really appreciate it.

    Hi
    Check the following BAPI's:
    BAPI_OBJCL_GETDETAIL
    BAPI_OBJCL_CHANGE
    or use the fun module:
    CLAF_CLASSIFICATION_OF_OBJECTS.
    Reward points if useful
    Regards
    Anji

  • Function module for open sales order and open PO

    hi all,
    can anyone please tell me that is there any function module to get open sale order  and also for open purchase order?
    regards saurabh.

    Hi ,
    In EKPO Table u select this fields  Purchase Document no and Item no of Purchsing Document , Material no , and Purchase Order Qty.
    In MSEG Table u select this fields Purchase Document no and Item no of Purchsing Document , Material no , and  Qty.
    Both Tables having  Purchase Document  no , So  Purchase Doucment no throguh  u will get the Material and qty , Finally u Subract the both Material Qty's .
    u will get the Open Po For particular Material.
    If ur not getting ,Inform me .
    Regards ,
    Shankar GJ

  • Function module for Open Sales Orders.

    Can u any one tell me is there any standard function module to
    retrieve OPEN-SALES orders. I tried to debug VA05 but not of use...
    Thanks in advance,
    Sanjay.

    hi
      you can get open sales orders from vbuk and vbup
        SELECT
             A~VBELN
             A~GBSTK
             B~GBSTA FROM VBUK AS A
             INNER JOIN VBUP AS B
             ON AVBELN = BVBELN  INTO TABLE T_OPENS
             FOR ALL ENTRIES IN T_VBELN WHERE A~VBELN = T_VBELN-VBELN
            AND  A~GBSTK IN ('A','B')
             AND B~GBSTA IN ('A','B').
    in t_vebeln table is haveing sales orders by user selection you can get it like this
    regards,
    varma

  • Function module to validate posting date

    Hi all,
    i am using function module amfi_period_get_and_check to validate posting date.
    if posting date is not open this module raises error message but when i am using it
    in my code its not showing error message but when i am executing the module
    it is showing the message for the same date
    please reply soon
    thnx

    at selection-screen on pos_dt.
    CALL FUNCTION 'AMFI_PERIOD_GET_AND_CHECK'
      EXPORTING
        i_bukrs                = com_code-low
      I_GJAHR                =
        i_koart                = 's'
      I_KONTO                = ' '
       I_MONAT                = '00'
       I_BUDAT                = pos_dt.
    IMPORTING
      E_MONAT                =
      E_GJAHR                =
    EXCEPTIONS
      ERROR_PERIOD           = 1
      ERROR_PERIOD_ACC       = 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.

  • Re: Function Module to Validate ESS Id and Password

    Hi ,
         Is there is any function module / BAPI to validate the ESS Id and Password .
    Regards,
    Vijay

    Hello Vijay,
    there is a BAPI:
    BAPI_EMPLOYEE_CHECKPASSWORD
    Regards
    Gregor

  • Function module to validate time

    Hi Gurus,
    I am getting invalid time from source system , I need to validate the time in BW.
    Is there any function module to use to validate the time field ?
    Thanks
    Liza

    Try to write a small routine like this:
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
      DATA: i_time(2) TYPE c.
      i_time = TRAN_STRUCTURE-ZZENTIME.
      If i_time > 24.
           i_time = 0.
      else.
                   i_time = i_time.
      endif.
    RESULT = i_time.
    returncode <> 0 means skip this record
      RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    Hope it helps..

  • Function module/ Bapi for Sales order change

    Hi Experts,
    I require to have a Bapi/ function module to change a existing sales order to insert value in the field VBAP-SOBKZ.
    Please suggest.
    Thanks,
    Shibaji.

    HI,
    I have identified this Bapi but this Bapi does not contain the relevant field to update. Can you suggest any other Function module/ Bapi to update the field.
    Thanks & Regards,
    Shibaji

  • Function module for finding sales order GT total value(vbak-netwr)

    Can anyone tell which function module is used to find the Sales order  greater than the input parameter which is  total value(vbak-netwr).Output should be the details of sales order satisfying the condition.ie greater than the total value.

    Hi chandra
    I hope you are giving the logic to the ABAP'ers . By giving the input and the outputs. So here , VBAK-NETWR are related to functional consultants .
    Based on the requirement , SD,FI etc the give the logic but mostly it is related to SD consultants only
    Reagrds
    Srinath

  • Urjent-Any function module for finding Sales order, Delivery and Invoic

    Hi Experts,
    I am having selection screen like
    Sales order
    Delivery
    Invoice
    Customer
    If i give sales order
             Delivery and Invoice should pull
    If i give delivery
             sales order and Invoice should pull
    If i give Invoice
             sales order and delivery should pull
    If i give customer
               all customer related data should pull
    Do we have any function modules to meet this reqirement?
    If we have please provide function modules.
    Thanks,
    mahe
    Edited by: Rob Burbank on Mar 30, 2009 4:17 PM
    Edited by: mahahe on Mar 31, 2009 9:12 PM

    You can use VBFA table, right? in the FM also, you can find the same logic, like pulling from VBFA table.
    thanq

  • Function Module to get sales order number

    Hi,
    In a custom program I am giving Material number and Plant as input in VBAP to find the Sales Order number. However this step is taking long time to execute and so getting dump with time out error.
    Please let me know whether there is any Function Module in which we can input Material and plant and get the Sales Order Number.
    Regards

    Hi,
    Rather than searching for a FM, you can get a small report developed to look up for VBAP for a given material, plant.
    Ensure that this report is always run in background. Also consider giving other parameters for faster processing like date range etc..
    Regards,
    RS.

Maybe you are looking for

  • Macbook sleep wake up with lid closed

    Hi everybody. Since 10.9 I had a strange issue with sleep on my MBP 15. If I put it in sleep with the button and I close the lid, it will wake up closed waiting for the password. Also, if it is in sleep while charging, or charged, and I plug off the

  • [SOLVED] Wine Key Errors.

    Hi, I was running a full system upgrade earlier today, and it was upgrading wine when my laptop battery died. Now, wine has been interrupting my full system upgrade, so I attempted to remove and reinstall. Now I can't get it installed, and I am prese

  • Handbook for Final Cut

    Eventhoug I have Final Cut Express 3.5 I´ve been using as a handbook a Tom Wolsky´s book, Final Cut Pro 3, Editing workshop (second edition), as it was available in my city library. It´s quite usable for FCE 3.5 too, as there is not too many tools an

  • HT1725 in app purchase incorrect

    hi can you help

  • Unexpected closure

    Hello Anyone know the cause of the unexpected closure of the iMovie application versión10.0.2 Software OS X 10.9.2 (13C64) Maverick, while importing video for editing?. The computer is in use latest MacBook Pro 2011 model MacBookPro 8,1, 4 Gb RAM, 2.