Check fields at save

Hi cprojects experts,
My requirement is to check if a project role contains one or more BP when the user clicks the save button (if not i'd like to display an error message). I've tried badi DPR_ATTRIBUTES (methods  VERIFY_ATTRIBUTES, CHECK, CHANGE_CHECK) and DPR_EVENTS (with filter ON_IF_DPR_COMMON_CHANGED). Unfortunately the badi implementations get triggered each time a field is changed.
Is there another badi which only gets triggered at click at the save button? Or is there a possibility to find out if the save button was clicked using the above mentioned badis?
I appreciate any hint!
Kind Regards
Wolfgang Brunneder

Hi Wolfgang,
a customer own subsystem should be  the 'modification free' soluation for your case. Please take a look th example codes
CL_DPR_DEMO_SUBSYSTEM, which you can abort the save and raise error.
I think, for your case the method IF_DPR_APPL_PLUG_IN_SUBSYSTEM~PREPARE_TO_SAVE is relevant.
Regarding how to create a customer subsystem.
I think, what important is to create a Z class, which implement the both interface IF_DPR_APPL_PLUG_IN_SUBSYSTEM &
IF_DPR_APPL_BOOTSTRAP_MEMBE, and adjust the parameter SR_INSTANCE with your own class name. After then the program will search all the active class, which implemented the interfaces and call one after another.
Kind regards,
Zhenbo

Similar Messages

  • Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    Trouble with calculating fields. Can't select (check) fields. Also can't figure out what's wrong with a division field (percent) that I created. Keep getting the pop up that format of the field doesn't allow blah blah blah... Help!

    1. Use the mouse to select the field and then press the space bar.
    2. A null string is the same as zero. What is the result for division by zero?

  • Eliminating Visible Fields on "Save As" Once form is filled out

    Hello,
    Has anyone figured out a way to create a form, that once the recipient has filled out can be "Saved As>NewFileName.pdf", and the newly created PDF does NOT show fields when it's opened?
    For background, i'm trying to create a very basic electronic letterhead that coworkers can fill out as a form, and then "SaveAs" a new PDF to send out to clients. The rub is that once the existing form has been filled out, and resaved with a new filename, it always shows up in Reader with the form fields highlighted, and looks tacky. I'd basically like a way to "eliminate fields" upon "SaveAs"?
    Thanks!

    You can use JavaScript to set fields to read-only. This would have to be done some time before the document is saved obviously. I often use something like a bookmark that when clicked will trigger the code to do this and the document can then be saved. If your coworkers will be using Acrobat, they can flatten certain fields, again using a script. This process converts the field appearances to regular page contents and makes it a bit more difficult for recipients form altering it.

  • CHECK FIELDS functionality

    Hello From google, i came to know that, CHECK FIELDS functionality is not available for SAP WebDynPro for ABAP in perspective of Interactive Forms, its availabel only for SAP WebDynPro JAVA stack. But, as per our busienss requirements, i need to have the similar functionality on our form, 1) Do i need to write the script explicitly on the form? 2) To get CHECK FIELDS validation functionality for all the fields on the form (its around 67 subForms and 158 fields) in one shot ( meaning, user pressess it at the end after filling all the fioelds on the form), then, where i need to write my code/script, is it on the form as script? 3) If so, at wht level i have ti write, is it each subForm level? or each PAGE level? or MASTER PAGE level? Thank you

    Hi,
    Presuming it is an interactive form, it would be faster and relatively easier if you could have a single validate button on your abap web dynpro screen and perform all validations (since you have backend connectivity too, you could validate against master data) in ABAP itself..
    Regards...Amith

  • Check field to InfoObject

    Hi,
    How to check field to InfoObject mapping, i mean how to identify particular field is exactly matching with corresponding InfoObject.
    For example, when i searched in Business content(BW) for Document number..lot of InfoObjects has come..so, how to choose Exact InfoObject for R/3 field BELNR (Document number from BSEG table)..
    Please provide solution...
    i am very thankful to you....
    Its urgent....so, pls..pls

    BI - SE16 Table - RSOSFIELDMAP - F7
    You will see :
    OLTPSOURCE
    LOGSYS
    OBJVERS
    FIELDNM = BELNR ( for example )
    IOBJNM
    CONVERSION
    Width of Output List
    Maximum No. of Hits
    Execute
    You will get a list of datasources where the ECC field exists -> Double Click on it -> You will the infoobject - IOBJNM

  • Can't find instructions for setting a PDF form to allow users to type in the fields and save the form.  Thanks

    Can't find instructions for setting a PDF form to allow users to type in the fields and save the form.  Thanks

    Hi,
    Have a look at this page Acrobat refers to them as "Reader Extended PDF", Adobe Acrobat X Pro * Enable Reader users to save form data
    Regards
    Bruce

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
    fieldcatalog-edit             = 'X'
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • Sharepoint Foundation 2013 People field wont save data

    Guys, having an issue with a list column. We have some columns that are Person or Group.  when we enter in a user, it finds it just fine saves it just fine. but if i come back into that list and edit some other field the Person or Group field is totaly
    cleared out. I don't know what is going on. we are using SharePoint foundation 2013.

    If you're using SharePoint 2013 April 2013 CU or higher, this is a known issue where the People data is missing in Edit view. There is a separate issue that is resolved in the September 2014 CU:
    http://support.microsoft.com/kb/2995905
    Consider the following scenario:
    You create a SharePoint 2013 list that contains a Person or Group (people picker) column.
    You create or edit an item, and then you select a person whose name contains a comma in the Person or Group field.
    In this scenario, the value of the Person or Group field is lost when you save the item. 
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How do I list product details   using   check boxes to save having to write the same info over and o

    Hi there
    First of all
    Happy New Year and I hope everyone is well all the best for the future
    Now...... back to the point
    What I want to do is........
    I am making a jewelry ... necklace... shopping site for my girlfriend.... well.... my wife in two weeks.... This site has been a loooong time coming.... I am still not happy with it so it still not public.... but is working ok She very upset it taking more than a year.... but I am still learning and I always want it better
    Anyway
    I have hundreds of Necklace details to enter..... i thought it would be easy but it is very tmie consuming...... So ...
    The necklaces are made from different kinds of stones.... turquoise .. agate ... and about a hundred more different kinds of stones
    In my add product form I have a field for entering product details..... to enter the different kinds of stones the necklaces are made from..... sometimes more than twenty for one necklace..... So what I want to do is have check boxes... or radio boxes to choose what stones to add to the description..... So I can have a list of about fifty different kinds of stones all with a check box next to them so that when you choose a box that stone name would appear in the product description
    Sounds easy but I can't figure out how to do it.....
    I think I need a different table in my database a 'stone_neck' field to store all the stone names.... about 50 fields..... .... with an id field and a name field and maybe a display field ....... I think
    Does that sound correct.......?
    If so then how do I display the details in a field in a table in my product detail page? I think I need a recordset on my detail page that gets all the stone names.... but how do I display the names of the stones that I have checked in the addprod form ? Do I need to put all every one of the stone info from the bindings panel? and then show region if .......
    i am confused
    If anyone has any ideas it would be great
    Have a great day

    Maybe you can take tips by visiting sites of prominent jewelry brands like Tiffany to get some ideas of how to structure your product list details.
    Just a thought.
    Mahadevan
    www.wheretobuyringsnow.com

  • Maintenance View - update field on SAVE

    Hi folks,
    I need to create a maintenance view on top of a table. If a user modifies and saves one field I would like to set a time stamp in a further field of the same table. How do I have to do that?
    Thanks for your help.

    In the se11 -> table maintenance generator ->  Environment -> Modification -> Events
    Here you can create routine to add a time stamp to automatically add when some user will modify / update any table row.
    Kuntal

  • Update address-dependent email field on save of BP

    We have a requirement to update the address-dependent email field from the address-independent email field upon saving a Business Partner.
    I've been working on the 'BUPA_ADDR_UPDATE' BADi but am having no luck with it so far. I have managed to retrieve the data in the address-independent email field using the 'BUPA_CENTRAL_GET_DETAIL' Function Module but as yet have not been able to do the update of the address-dependent email field.
    Can anyone offer any guidance please ?
    thanks,
    Malcolm.

    Hi Malcolm,
    Try using the BADI : ADDR_UPDATE.
    Email is a part of the address management, so you would need an address badi.
    BUPA_ADDR_UPDATE is a business partner badi and only has the address reference - such as address number, validity, move date, etc..it will not help in cases where you need to work with address fields such as city, country, email,etc.
    Another approach :
    Try writing your code in PARTNER_UPDATE badi. This is called after save of BP. So you can probably trigger another update on the BP's address from here..
    Hope this helps you.
    Cheers,
    Rishu.

  • How to control prsence of fields in saveas method.urgent please

    I Created a template form with some buttons ,textfields and dropdown fields. i kept saveas button if user clicks and saves the file as another name . i want to remove apprence of buttons and drop down buttons etcc.. i tried
    dataroot.Transmittal_pdf.Button1::click - (JavaScript, client); save as button click
    dataroot.Transmittal_pdf.Button1.presence="invisible";
    dataroot.Transmittal_pdf.ResetButton1.presence="invisible";
    dataroot.Transmittal_pdf.PrintButton1.presence="invisible";
    dataroot.Transmittal_pdf.Project_Type.presence="invisible";
    dataroot.Transmittal_pdf.Contract_Type.presence="invisible";
    app.execMenuItem("SaveAs");
    this one buttons are invisible in template  not in saved copy
    dataroot.Transmittal_pdf.Button1::click - (JavaScript, client); save as button click
    dataroot.Transmittal_pdf.Button1.presence="hidden";
    dataroot.Transmittal_pdf.ResetButton1.presence="hidden";
    dataroot.Transmittal_pdf.PrintButton1.presence="hidden";
    dataroot.Transmittal_pdf.Project_Type.presence="hidden";
    dataroot.Transmittal_pdf.Contract_Type.presence="hidden";
    app.execMenuItem("SaveAs");
    with regards
    prasad

    Malcolm
    it is worked for me for buttonms . but drop down arrow button still remained. please advice
    with regards
    prasad

  • Check field data type

    Hey,
    Im trying to determin the value of a JTextField.
    I want to test if the data in the field is either
    a) a String
    b) a Date
    c) a numeric
    How would i do this?
    Any example code of tutorials would be great
    thanks in advance
    Dave

    you're advocating exception handling for this?
    advocating expecting exceptions? normally if
    someone suggested this, I'd dismiss it as amateur
    ramblings, but I know that doesn't apply to you. what
    gives?Simplicty. To find out whether it's a valid int, you could of course use a regex to check for sign and all-digits,and then check the amount of digits for the maximum length - and if the String is as long as MAX_VALUE (or MIN_VALUE), you'll need to check each digit whether its equal or smaller than MAX_VALUE's.
    And then you parseInt() it.
    And for dates, it will be even worse.
    So you're going to write a hell of a lot of code that ends up doing what you'd do anyway, and in once case you have neat although avoidable "error" handling, while in the other case you're left with a lot of work, potential bugs and people cursing at you.
    If you're really a purist, a NumberFormatException should never occur. But I'm at least a bit more pragmatic.

  • Authorization Check Field Name

    Hi,
    Do we need to specify all field names when coding authorization check in abap?

    Hi,
    Plz go through this...
    AUTHORITY-CHECK OBJECT object
    ID name1 FIELD f1
    ID name2 FIELD f2
    ID name10 FIELD f10.
    Explanation of IDs:
    object Field which contains the name of the object for which the authorization is to be checked.
    name1 ... Fields which contain the names of the name10 authorization fields defined in the object.
    f1 ... Fields which contain the values for which the f10 authorization is to be checked.
    AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept).
    You must specify all authorizations for an object and a also a value for each ID (or DUMMY ).
    The system checks the values for the ID s by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.
    If a user has several authorizations for an object, the values are OR-ed together. This means that if the CHECK finds all the specified values in one authorization, the user can proceed. Only if none of the authorizations for a user contains all the required values is the user rejected.
    If the return code SY-SUBRC = 0, the user has the required authorization and may continue.
    The return code is modified to suit the different error scenarios.
    The return code values have the following meaning:
    4 User has no authorization in the SAP System for such an action. If necessary, change the user master record.
    8 Too many parameters (fields, values). Maximum allowed is 10.
    12 Specified object not maintained in the user master record.
    16 No profile entered in the user master record.
    24 The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect.
    28 Incorrect structure for user master record.
    32 Incorrect structure for user master record.
    36 Incorrect structure for user master record.
    If the return code value is 8 or possibly 24, inform the person responsible for the program. If the return code value is 4, 12, 15 or 24, consult your system administrator if you think you should have the relevant authorization. In the case of errors 28 to 36, contact SAP, since authorizations have probably been destroyed.
    Individual authorizations are assigned to users in their respective user profiles, i.e. they are grouped together in profiles which are stored in the user master record.
    Instead of ID name FIELD f , you can also write ID name DUMMY . This means that no check is performed for the field concerned.
    The check can only be performed on CHAR fields. All other field types result in 'unauthorized'.

  • Check field values wad

    Hi everyone,
    I'm working on a template in wad and I have to check whether the user has choosen values in different dropdown boxes or not. How do I do this? I tried different things with the command wizzard and javascript but don't know how to implement this.
    Thanks for your help!
    Regards
    Tim Jaschik

    Hi,
    thank's for your answers, but my problem won't be solved by a customer exit in cmod. I will explain the situation a little bit more detailed:
    - the user starts a web template (I created this in bex web application designer)
    - in this template, there are five queries, each one shows the masterdata of an attribute in an dropdown field (0material, 0customer, ...
    - after the user has choosen all five values, he clicks on a button, this button starts a planning function...
    BUT before the planning function starts, I wan't to check, whether all dropdown fields are filled or not. If the user has forgotten to choose a value from one ore more fields, the planning function should not start and the template should give the user a message, which dropdown box  has the be filled.
    So I'm not in the sap-context, this is a simple javascript problem. But I don't know how to implement this javascript solution in wad, to check the values of the dropdown boxes and give back a message to the user...
    Regards
    Tim Jaschik

Maybe you are looking for

  • Looking for a certain app.  can you help...

    I am going flying in a little cessna tomorrow. This will be my 2nd lesson. The instructor is happy for me to have my iphone on and it doesn't have to be in flight mode. What this means is I can use the GPS to track the flight. I am looking for a part

  • HELP!!!...ROLL OVER...PICTURE...ETC...HELP

    HELP!!!! Sorry, I'm in a hurry, I need to get what I will explain in a sec done ASAP for my project!!! So I hope you can help!! I have been making a calendar for my project in Flash CS5. On my calendar I have the days of the months, which are buttons

  • Reading Contents of File and displaying output

    I'm trying to read the contents of a file, then loop through the contents, perform some formatting, and display the output. Should I read the file into an array? What is the best approach? Thanks in advance.

  • Adobe Photo Deluxe 2 won't load photo from scanner

    I have been using APD2 with my scanner and as stand-alone for a long time. Recently, it stopped accepting the scanner files - something about not recognizing the file type or extension. What can be done on this? Also after loading and editing a photo

  • PDF ne s'ouvre pas

    J'ai dû installer de nouveau mon Adobe Pro. (J'ai Adobe creative suite 6). Toutes mes applications se téléchargent et ouvrent normalement excepté mes PDF. Le message d'erreur: Error1 s'inscrit. J'ai suivi les instructions et j'ai désinstaller et réin