Validating screen fields in VK11/VK12 tcodes

Hello all,
My requirement is while creating/changing condition record via VK11 or VK12  user enter rate > 50% THEN error message
needs to be displayed.
For this I have implemented BADI SD_COND_SAVE_A  to validate the rate of the condition record.
My issue is...after geeting error message when i click on back button and go back to correct the rate value...
it's copying the rate in all line items.
  LOOP at ct_konpdb_new INTO wa_konpdb_new.
     wa_konpdb_new-kbetr = wa_konpdb_new-kbetr * -1.
     IF wa_konpdb_new-kbetr GT 500.
        MESSAGE e042(XXXXXXX).
     ENDIF.
Can you please tell me how to correct this issue.
regards,
Lokesh

Hi
Try with this tcode:
function z_sd_00503305.
*"*"Interfase local
*"  IMPORTING
*"     VALUE(FIELDNAME) TYPE  SEFELD
*"     VALUE(VALUE)
*"     VALUE(KOMG_I) TYPE  KOMG
*"     VALUE(KONP_I) TYPE  KONP
*"     VALUE(T681E_I) TYPE  T681E
*"  CHANGING
*"     REFERENCE(CHECK_FIELD) TYPE  CHAR1
*"     REFERENCE(RETURNCODE) TYPE  SUBRC
*  break: username.
  check sy-tcode = 'VK12' or sy-tcode = 'VK11'.
  case t681e_i-kvewe.
      case t681e_i-kotabnr.
        when '071'.                       "your table A071,
          if fieldname = 'WERKS'.
            "YOUR ALGORITHM TO CHECK ENTRIES
             returncode = sy-subrc.
          endif.
        when '155'.                        "and so on
      endcase.
  endcase.
endfunction.
To know how to work with BTE, please, check this [article|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7] by Lakshman Tandra.
Regards
Eduardo

Similar Messages

  • Validating Screen Fields in FD32 - BTE 1520

    Hello everyone,
    I have a requirement to make various checks before saving in FD32. For example I want to make sure that KNKK-DBEKR will be less than or equal to KNKK-KLIMK.
    I have searched SCN and I have implemented BTE 1520 (you can see an example thread here).
    My problem is that while in BTE 1520 I don't have the screen fields available (or at least I don't know how to make them available to my function module).
    Has anyone done something similar?
    Thank you in advance.

    Thanks Neal, but I already tried that. The function module (a copy of SAMPLE_INTERFACE_00001520) uses only two variables I_KUNNR and I_KKBER.
    As you can see in the screenshot below (from the debugger), I have been trying to find whether I have anything else available at that point.

  • How to validated screen field(Age) at PA30 transaction

    Hi SAP Technical Guru,
    i'm working with PA30 transaction, i have to validate the sceen field i.e. Birth Date.it should not consider less than 18 years,
    eg:the person who has <18 yrs it should raise a message like min age invalid for employement
    so ple

    Hi SAP Techinical Guru,
    please see code below, which i written to raise a message for filed date of birth,when the entere date if lessthan the 18 yrs it should raise message,
    data: dyears   like P0347-SCRYY,
          ddays  TYPE i,
          fromdate TYPE d,
          todate   TYPE d,
          temp TYPE string.
    CASE innnn-infty.
    WHEN '0002'.
        IF sy-tcode = 'PA30'.
          todate = sy-datum.
          temp = innnn-data3.
          CONDENSE temp NO-GAPS.
          fromdate = temp.
          CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
            EXPORTING
             date1                   = todate
             date2                   = fromdate
             output_format           = '01'
            IMPORTING
              years                   = dyears
            EXCEPTIONS
              invalid_dates_specified = 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.
           IF dyears < 18.
               MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
                       WITH 'EMPLOYEE AGE IS LESS THAN 18 YEARS'.
               RAISE error_occured.
           ENDIF.
    please give where iam getting wrong.
    regards,

  • How to restrict the screen field TASK in SWI2_FREQ tcode

    Hi All,
    The user who ever has authorization for this transaction code is able to access all the task types irrespective of SAP modules from back end.
    The concern is that the task type of any module should not be visible for un-authorized people.
    In the front end only the authorized people can see work flow items (mail's) and it's according to business requirement.
    Is there any solution?
    If Yes, Pls let me know .
    Thanks
    Heena.

    Hi Heena
    I'm afraid that you won't find any standard SAP Authorization object that can help you here,
    You might how ever be able to solve it with HR Structural authorization, but be carefull here, if you activate the structural authorization check you migh be looking at a large SAP Security Project.
    I would usually not recommend that you give access to this transaction to other than your workflow administrators. But if you need to you might be able to create transaction-variants with fixed tasks, and the assign thoose to a t-codes, to which you grant access
    Regards
    Morten Nielsen

  • "Valid on field" on VK13 screen

    Hi SD Gurus,
    Can anyone tell me if there is any link between the "valid on" field on condition records screen (VK11, VK12, VK13) and pricing reports.
    Thank You,
    Alekhya.

    Hi Alekhya,
    The field valid on in VK11/VK12/VK13 is for the validity of your condition record what ever you are maintaining.
    Till the given date your condition record will be valid.For example if the date is 1/12/2008.Means that price will come in the sales order for that condition type will come if you have created the order on or before that date.If that condition type is mandatory and if you create another order on 2/12/2008 means it will not fetch your price because it's validity expires.Then you have create new condition record for that or extend the validity period in change mode by VK12 T.Code.
    Regards,
    Mohan

  • Validating a selection-screen field

    Hi all,
    I am Anil.can any body explains me how to validate a selection-screen field for the following scenario?
    I have customer nos ranging from 100-1000.among them i dont have any sales orders for the customers who are in between 150-250.I have sales order(VBELN) as select-options and Plant(WERKS) as Parameter on the selection-screen.I want to validate these fields without hardcaode.How can i do that?Please send me the complete code.
    I am not getting how to validate a field  which is declared as parameter?
    regards and thanks in advance.
    Anil.

    Make sure that u are validating against the header table.
    say eg if u wnat t validate matnr in marc, then do as below.
    SELECT-OPTIONS: s_matnr FOR  marc-matnr.                  "Material No
    AT SELECTION-SCREEN.
    *Validate material no details
      PERFORM validate_matno.
    FORM validate_matno.
    DATA: v_matnr LIEK mara-matnr.
      SELECT SINGLE matnr INTO v_matnr
             FROM <b>mara</b>
             WHERE matnr IN s_matnr.
      IF sy-subrc NE 0.
        MESSAGE i128.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.
    Dont select from marc.
    Hope this is clear.

  • Selection-screen fields validation for dialog

    Hello ABAP Gurus
    Requirements: this is a report wherein , depending upon the correct select-options , user will pick some field values from table and some will be entered by the user in the next se51 custom screen for creation of a record in a ztable .
    the problem is :without validating select-options values , it calls the se51 screen 100.
    How to keep the cursor at the selection-screen field until & unless user enters the correct i/p s .if i/p are correct then only it should call screen 100 otherwise remain in the selection screen only .
    *& Report ZSD_REP_QUOT_BANK_CREATE *
    REPORT ZSD_REP_QUOT_BANK_CREATE NO STANDARD PAGE HEADING LINE-SIZE 255.
    TABLES: VBAK,VBAP,VBRK,ZSD_TABL_QOTBANK,MARA,KONV.
    DATA: OK_CODE LIKE SY-UCOMM,
    SAVE_OK_CODE LIKE SY-UCOMM,
    WA_ITAB LIKE ZSD_TABL_QOTBANK,
    ANSWER TYPE C,
    COPIED ,
    STS TYPE N,
    EMGRP LIKE MARA-EXTWG,
    QTY LIKE ZSD_TABL_QOTBANK-QTY,
    UPRICE LIKE ZSD_TABL_QOTBANK-UPRICE,
    TOT LIKE ZSD_TABL_QOTBANK-TOT,
    INO LIKE VBAP-POSNR.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: S_QTNO FOR ZSD_TABL_QOTBANK-QTNO
    NO INTERVALS NO-EXTENSION OBLIGATORY,
    S_ITNO FOR ZSD_TABL_QOTBANK-ITNO
    NO INTERVALS NO-EXTENSION OBLIGATORY.
    S_MATNO FOR ZSD_TABL_QOTBANK-MATNO
    NO INTERVALS NO-EXTENSION. "
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
    SELECT SINGLE VBTYP
    INTO VBAK-VBTYP
    FROM VBAK
    WHERE VBELN IN S_QTNO.
    IF SY-SUBRC EQ 0 AND VBAK-VBTYP NE 'B'.
    MESSAGE I005(ZQOTBANK).
    SET CURSOR FIELD S_QTNO-LOW.
    SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
    ENDIF.
    CLEAR WA_ITAB.
    SELECT SINGLE QTNO ITNO
    INTO WA_ITAB
    FROM ZSD_TABL_QOTBANK
    WHERE QTNO IN S_QTNO
    AND ITNO IN S_ITNO.
    IF SY-SUBRC EQ 0.
    MESSAGE I001(ZQOTBANK).
    SET CURSOR FIELD S_QTNO-LOW.
    SET CURSOR FIELD S_ITNO-LOW.
    SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
    ENDIF.
    *START-OF-SELECTION.
    END-OF-SELECTION.
    CALL SCREEN 0100.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS '0100'.
    SET TITLEBAR '0100'.
    ZSD_TABL_QOTBANK-QTNO = S_QTNO-LOW.
    SELECT SINGLE BUKRS_VF VKORG VTWEG SPART KUNNR ERDAT BNDDT
    KNUMV
    INTO (ZSD_TABL_QOTBANK-CCODE,
    ZSD_TABL_QOTBANK-SORG,
    ZSD_TABL_QOTBANK-DISTCHAN,
    ZSD_TABL_QOTBANK-DIV,
    ZSD_TABL_QOTBANK-CUSTNO,
    ZSD_TABL_QOTBANK-QTDAT,
    ZSD_TABL_QOTBANK-QTVALDAT,
    VBAK-KNUMV)
    FROM VBAK
    WHERE VBELN IN S_QTNO
    AND VBTYP = 'B'.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE KWMENG POSNR MATNR
    INTO (QTY , INO , ZSD_TABL_QOTBANK-MATNO)
    FROM VBAP
    WHERE VBELN IN S_QTNO.
    SELECT SINGLE EXTWG
    INTO EMGRP
    FROM MARA
    WHERE MATNR EQ ZSD_TABL_QOTBANK-MATNO.
    ZSD_TABL_QOTBANK-ITNO = INO.
    ZSD_TABL_QOTBANK-EMATGRP = EMGRP.
    ZSD_TABL_QOTBANK-QTY = QTY.
    SELECT SINGLE KBETR
    INTO UPRICE
    FROM KONV
    WHERE KNUMV = VBAK-KNUMV
    AND KPOSN = INO
    AND KSCHL = 'PR00'.
    ENDIF.
    ZSD_TABL_QOTBANK-UPRICE = UPRICE.
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-CGL_QTY.
    UPRICE = ZSD_TABL_QOTBANK-CGL_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-CGL_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
    UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
    UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-ALSTOM_QTY.
    UPRICE = ZSD_TABL_QOTBANK-ALSTOM_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-ALSTOM_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-SIEMENS_QTY.
    UPRICE = ZSD_TABL_QOTBANK-SIEMENS_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-SIEMENS_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-TELK_QTY.
    UPRICE = ZSD_TABL_QOTBANK-TELK_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-TELK_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    QTY = ZSD_TABL_QOTBANK-OTH_QTY.
    UPRICE = ZSD_TABL_QOTBANK-OTH_UPRICE .
    TOT = QTY * UPRICE .
    ZSD_TABL_QOTBANK-OTH_TOT = TOT .
    CLEAR: QTY, UPRICE, TOT.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'SAVE'.
    INSERT ZSD_TABL_QOTBANK.
    IF SY-SUBRC EQ 0.
    MESSAGE I000(ZQOTBANK).
    COMMIT WORK.
    CALL SELECTION-SCREEN 1000.
    ELSE.
    MESSAGE E001(ZQOTBANK).
    CALL SELECTION-SCREEN 1000.
    ENDIF.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module EXIT_COMMAND INPUT
    text
    MODULE EXIT_COMAND INPUT.
    SAVE_OK_CODE = OK_CODE.
    CLEAR OK_CODE.
    CASE SAVE_OK_CODE.
    WHEN 'CANCEL'.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    TITLEBAR = 'Quotation Bank Entry'
    TEXT_QUESTION = 'Do you want to Cancel ?'
    TEXT_BUTTON_1 = 'Yes'
    TEXT_BUTTON_2 = 'No'
    DEFAULT_BUTTON = '2'
    IMPORTING
    ANSWER = ANSWER.
    IF ANSWER = '1'.
    LEAVE PROGRAM.
    ELSE.
    CALL SELECTION-SCREEN 1000.
    ENDIF.
    WHEN 'EXIT'.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    TITLEBAR = 'Quotation Bank Entry'
    TEXT_QUESTION = 'Do you want to Exit ?'
    TEXT_BUTTON_1 = 'Yes'
    TEXT_BUTTON_2 = 'No'
    DEFAULT_BUTTON = '2'
    IMPORTING
    ANSWER = ANSWER.
    IF ANSWER = '1'.
    LEAVE PROGRAM.
    ELSE.
    CALL SELECTION-SCREEN 1000.
    ENDIF.
    ENDCASE.
    ENDMODULE. " EXIT_COMMAND INPUT
    Thnx in Advance

    Put the statement
    CALL SCREEN 100
    in the event <b>AT SELECTION-SCREEN</b> and NOT in <b>END-OF-SELECTION</b>.
    Regards,
    Subramanian V.

  • Validations on the screen fields in a module pool program

    Hi all
    i am creating a sales order against a purchase order ,i am selecting a PO click on a button to call another screen which has all the mandatory fields of the SO i want validations on the screen fields or the input fields as when i enter the header data and the items data and the partner data from the input serach help that is already enabled on the screen fields ,if there is any mismatch among the fileds and an error message is displayed for example:-" material no 100-100 does not exist for  sales area" then only that field where this message is present should be field enabled and the rest of the fields should be field disabled.
    also the error message i m displaying is in short text form and not in long text i clicked on it (long text) however how to use it was not known to me .
    thanks
    varun
    Moderator message: please do more research before asking, try solving problems yourself first, look for previous discussions of similar issues, post texts in more readable format, you have been warned several times before.
    Edited by: Thomas Zloch on Feb 7, 2012

    i want to have input search help as if i select sales document type then corresponding sales organizations should appear
    This would be quite opposite of what h_vakz does. h_vakz gives Sales document based on Sales org..and you want vice versa. Create a simple SH with
    selection method : TVAKZ
    AUART as importing only
    VKORG as exporting only. So when you enter an AUART you get all VKORG it is defined in. I'm not aware of a standard search help which matches the requirement. If anybody does please help me.
    i have header data (only mandatory fields),items data,partner data(all mandatory fields)
    and when i select all the header data the search help that is on the material number and partners role and number should appear corresponding to that header data
    You will have to be more specific sir..
    not able to apply please guide someone
    As for that just mention them in SCREEN->ELEMENT LIST->REFERENCES

  • Need to enhace tcode FD32 to add new screen fields on the initial screen

    Hi All,
    I am supposed to add two new screen fields on the initial screen of TCODE FD32,
    I am unable to find any screen exit for that. Is there any screen exit present for that or is there any way to do this.
    Kindly help me, solutions will be greatly rewarded.
    Thanks in advance,
    Nagaraju.

    check below
    Transaction Code - FD32                     Change Customer Credit Management                                                                               
    Exit Name           Description                                                                               
    RFDRRANZ            User exits: Accounts Receivable Information System                                                                               
    No of Exits:          1                                                                               
    Rewards if useful...............
    Minal

  • User exit for validation of field NEWKO in f-48 tcode in finance

    hi,
           Previously we  validated the Field XBLNR (Reference) in the document header from the table EKKO, for the PO Number. now we want to validate the vendor number(LIFNR)  in the field NEWKO from the table EKKO with reference to the PO number entered in the field XBLNR.
    we want to find out the correct user exits or any enhancement for the above validation.
    pls help me in this regard ,matter most urgent.
    Thanks & regards
    veera

    hi,
    for f-48 you could use FI-validation with tcode OB28
    use an exit (UK...) for your check in Program ZGGBR000
    A.

  • Screen field validation

    Hi,
        My requirement is to validate a particular screen field.......while  user enters the value on that field....(i.e) the message should not come after the user action....it should get displayed while entering the value itself.....is it possible...if so...how.?
    Thanks in advance,
    Varsha..

    Hi Varsha,
    If you use a field of type NUMC the system doen't allow you to enter CHARS
    i dont to that deapth, even for type i  and type SY-DATUM Fields system doesnt allow to enter chars aswell.
    Check this out.
    CL_GUI_DATAMANAGER
    in the above class there is a method ON_INPUT
    CL_PARSER_PII
    in the above classes there is a method PARSE_INPUT which might work as on focus event
    but we need to know the functionality in deapth.
    which might be useful to you
    Regards
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Dec 26, 2008 8:09 AM
    Edited by: Ramchander Krishnamraju on Dec 26, 2008 8:11 AM

  • How to skip the mandatory field validation for clearing the screen fields

    Hi Friends,
      I have created a module pool screen, and made some fields mandatory. after entering some fields, if i try to clear the fields, am unable to clear. Its throwing the error "Enter all required fields"., since some mandatory fields are there. But i could able to navigate through other screen. Both the "CLEAR" and "NEXT" command are given in the at-exit command only. Next is working but clear is not working.
    Please  provide me the solution.
    Thanks
    Karthikeyan.L

    Hi,
    To avoid automatic input checks you have to assing function type - E to appropriate screen field, which is not to be checked.
    These function codes don't trigger PAI processing, instead they go directly to
    MODULE mod AT EXIT-COMMAND.
    ..placed in PAI of the screen. In this way you can ommit automatic checks performed by system on mandatory fields. Please ensure you have assing E type to next and clear functions in GUI status.
    Regards
    Marcin

  • VK11/VK12: Automatically create anothercondition record upon saving

    Hi,
    First of all this is my first time to post a question here.  I find every thread very helpful and other members helpful.
    We came with a requirement to automatically create another condition record after the user clicks the save buttons.  I'm not inclined in this module so to give you an idea in my requirement here are the following steps:
    1.  User go to VK11
    2.  Choose Selling Price List/Material access sequence
    3.  In the the screen the user enter a sales org, distribution channel, and price list.
    Ex: Sales Organization: 0024
          Distribution Channel: 00
          Price List: 03
    4.  User enter in grid, material, amount, conditoin pricing unit.
    Ex:
    Material: 4668
    Amount: 5,00
    Condition Pricing Unit: 1
    5.  User click saves.  Entries in tables KONH and KONP are populated.  Condition record is saved
    Now the requirement is create a duplicate conditoin record but with DIFFERENT price list-> 02 and amount.  The new amount will be computed manually in the enhancement.
    I did my part researching what can be done to solve this requirment.  In the old threads, some suggest to use BADI BADI SD_COND_SAVE_A BADI.  The problem is I am also not familiar in using BADI so I hope someone can tell me how I can learn BADI so I can implement the requirements.  For the creation of condition records, I still have no idea how to do it.
    So here are my current challenges:
    1.  How can I trap the save button in VK11/VK12.  I am also thinking if all required validations were done prior to the creation to the conditoin record.  I'm also thinking what are the things I should consider before creating a duplicate condition record with the different pricelist 03 and amount.
    2.  How can I create a condition records.  Should I use a BAPI? I am also not familiar with BAPI
    In addition to the requirement, I am thinking of some problems that might arise.  I think there should be checking before creating the duplicate condition records.  But I have no idea what are the things to consider.
    I hope I explained my requirment clearly. Please feel free to ask for clarifications or question in my requirement.  Thank you for your help.  I really appreciate any help.
    Thanks and God Bless.
    -binaryghost
    Edited by: binary ghost on Sep 9, 2010 10:46 AM

    Hi,
    Try these BTE'S:
    BusTrEvent     SAPMV13A     OPEN_FI_PERFORM_00503301_BOST     00503301     Updating conditions (Pricing)).               
    BusTrEvent     SAPLV13A-LV13AU02     OPEN_FI_PERFORM_00503301_E     00503301/P&S     Update conditions (usage A)                    
    BusTrEvent     SAPLV130-LV130U01     OPEN_FI_PERFORM_00503302_E     00503302/P&S     (Updating conditions (general)).               
    BusTrEvent     SAPMV13A     OPEN_FI_PERFORM_00503308_E     00503308/P&S     Maintain conditions: Default condition (Condition Maintenance Control).                    
    I hope this may helpfull.
    Thank you,
    Thanks,
    AMS

  • Bapi for VK11 & VK12

    i have created a BDC program for uploading data into VK11 & VK12 .what it does that it compares the valid from and valid to dates from the flat files
    and if they already exist then for that condiotn type it goes to vk 12 and changes the prices and scalling quantity according to the falt file
    and if the date range is not present then it oes to VK11 and creates the same from the flat file
    now i want a bapi that works the same manner..
    if any body can hel;p me
    thanks in advance

    I am using the RV_condition_copy function the way it is described in this post, I am able to update the date but not the price in Vk12 / vk13 . I am using option D for maintain_mode (create with reference) - > this is essentially what I want to do, as we already ahve the pricing in vk13, we want to change it for year 2008.
    Please advise what I must be doing wrong. I do not get any errors while running the following code. Also I am doing commit. Thanks.
    Pranav
    Do I have to pass any values to I_komk I_komp, i do not have anything to pass.??!$#?
    ls_komg-kunnr = '0001000008'.  " Cust number
    ls_komg-matnr = 'PP500P3'.      " Mat number
    ls_komg-VKORG = 'PPC1'.
    ls_komg-vtweg = 'BB'.
    clear: Lt_komv,LS_KOMV.
    ls_komv-kappl = 'V '.        " Application V = Sales
    ls_komv-kschl = 'PR00'.    " Condition type
    ls_komv-waers = 'USD'.       " Currency
    ls_komv-kmein = 'EA'.        " Unit of measurement
    ls_komv-kpein = '100'.
    ls_komv-krech = 'C'.         " calculation type;
                                  "M = Quantity - monthy price
    LS_KOMV-KAWRT = '251.00'.
    ls_komv-kbetr = '121.50'.   " new condition value
    *LS_KOMV-KWERT_K = '251.10'.
    *LS_KOMV-KNUMV ='0000008911'
    append ls_komv to lt_komv.
    CLEAR LT_KOMV.
    call function 'RV_CONDITION_COPY'
      exporting
        application              = 'V'
        condition_table          = '005'      " cond. table
        condition_type           = 'PR00'   " cond. type
        date_from                = '20070108' " valid on
        date_to                  = '99991231' " valid to
        enqueue                  = 'X'        " lock entry
       i_komk                   = ls_komk
       i_komp                   = ls_komp
        key_fields               = ls_komg    " key fields
        maintain_mode            = 'D'        " A= create
                                              " B= change,
                                              " C= display
                                              " D= create with reference
    with reference
        no_authority_check       = 'X'
        keep_old_records         = 'X'
        overlap_confirmed        = 'X'
        no_db_update             = space
      importing
       e_komk                   = ls_komk
    e_komp                   = ls_komp
        new_record               = lv_new_record
      tables
        copy_records             = lS_komv
             EXCEPTIONS
                ENQUEUE_ON_RECORD        = 1
                INVALID_APPLICATION      = 2
                INVALID_CONDITION_NUMBER = 3
                INVALID_CONDITION_TYPE   = 4
                NO_SELECTION             = 5
                TABLE_NOT_VALID          = 6
                NO_AUTHORITY_EKORG       = 7
                NO_AUTHORITY_KSCHL       = 8.
    call function 'RV_CONDITION_SAVE'.
    call function 'RV_CONDITION_RESET'.
    necessary to write data
    commit work.
    Message was edited by:
            pranav kulkarni

  • Set default value in VK11/VK12

    Hi, All
    I use the release status in material price maintain. I want to set default value for the field release status in tc VK11/VK12. I test the 
    BADI SD_COND_SAVE_A and BTE 00503305,but I cannot resolve the question. I do not want to use screen varient SHD0. Can anybody give me a suggestion ?
    thanks a lot!

    hi
    Suppose you have 2 radio buttons and values are 1 and 0 respectively
    So You should try this...
    <af:selectOneRadio id="sor1" layout="horizontal" value="1">//type default value 1 here den it is selected default on page
                <af:selectItem label="ID" value="1" id="si6"/>
                <af:selectItem label="Passport" value="0" id="si16"/>
              </af:selectOneRadio>
    // I hope this will help you....

Maybe you are looking for